WO2016000137A1 - Method, client and system for multi-site automatic update - Google Patents
Method, client and system for multi-site automatic update Download PDFInfo
- Publication number
- WO2016000137A1 WO2016000137A1 PCT/CN2014/081179 CN2014081179W WO2016000137A1 WO 2016000137 A1 WO2016000137 A1 WO 2016000137A1 CN 2014081179 W CN2014081179 W CN 2014081179W WO 2016000137 A1 WO2016000137 A1 WO 2016000137A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- client
- information
- update
- site
- management terminal
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000012217 deletion Methods 0.000 claims description 27
- 230000037430 deletion Effects 0.000 claims description 27
- 230000010365 information processing Effects 0.000 claims description 12
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 238000012795 verification Methods 0.000 claims description 5
- 238000004806 packaging method and process Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 230000009471 action Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Definitions
- the present invention relates to the field of computer technologies, and in particular, to a multi-site automatic update method, a client, and a system.
- BACKGROUND OF THE INVENTION With the continuous development of the information age, the popularization of clustering and load balancing technologies, the server has evolved from a few initial stages to a huge data center, and the website update management has become increasingly complicated. At present, most of the work of updating management is manual. Operational. Even a simple system change or update often requires the operation and maintenance personnel to log in to each device to make manual changes one by one. When the number of devices reaches hundreds of thousands, the workload can be imagined. The stability and reliability of the update will gradually decrease as the workload increases.
- an embodiment of the present invention provides a multi-site automatic update method, a client, and a system, to solve the problem in the prior art that a manual update is required on a site-by-site basis.
- an embodiment of the present invention provides a multi-site automatic update method, where the method includes: acquiring update execution information of a management end, and parsing client update information according to the specification; Determining the site in the client that needs to be stopped, started, or restarted from the client update information; determining the service that needs to be stopped, started, or restarted in the client from the client update information according to the standard application naming principle;
- the client update information determines the files that need to be updated, and automatically performs the update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site; after the update operation ends, the update operation result is stored locally and the update is performed. The result of the operation is returned to the management terminal.
- the obtaining the update execution information of the management terminal, and parsing the client update information according to the method includes: Acquiring the grouping information and the update information of the management terminal; wherein the grouping information is information that the management terminal divides the client into groups according to the difference of the site or the service, where the group information includes a group name and a client ID list; the update information includes The group name and the client actually update the directory; by comparing the client ID with the grouping information, identifying the group to which the client belongs; and parsing the client update information from the update information of the management terminal according to the group to which the client belongs.
- the method further includes: before the performing the update operation, packaging the file that needs to be updated to obtain an archive package, storing the backup information of the archive package locally, and returning the backup information to the management end.
- the method further includes: acquiring rollback execution information of the management end; determining, from the rollback execution information, a site or a service that needs to be stopped, started, or restarted in the client; performing execution information according to the rollback Read the locally stored backup information, and release the content that needs to be rolled back from the archive package to overwrite the file that failed the update; execute the order in the order of stopping the site, stopping the service, restoring the file, starting the service, and starting the site. Roll operation; after the rollback operation ends, return the result of the rollback operation to the management side.
- the method further includes: after the end of the update operation, obtaining an information-summary algorithm MD5 value of the updated file from the update operation result; recording the MD5 value in a local file and returning the MD5 to the management terminal The value is used by the management side to verify the result of the update operation.
- the method further includes: acquiring deletion execution information of the management terminal; acquiring content information that the client needs to delete according to the deletion execution information; performing a deletion operation, and returning the deletion operation result to the management terminal.
- a client including: an information processing module, configured to acquire update execution information of a management end, and parse out client update information according to the method; According to the standard site naming principle, the site that needs to be stopped, started, or restarted in the client is determined from the client update information; the service control module is configured to determine the client from the client update information according to the standard application naming principle.
- the update module is used to determine the files that need to be updated from the client update information, and automatically execute in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site.
- the update operation after the update operation ends, stores the update operation result locally and returns the update operation result to the management terminal.
- the information processing module includes: a grouping information acquiring sub-module, configured to acquire grouping information and update information of the management terminal; wherein the grouping information is information that the management terminal divides the client into groups according to differences in sites or services. , the group information includes a group name and a client ID list; The new information includes a group name and a client actual update directory; a packet comparison submodule, configured to identify a packet to which the client belongs by comparing the client ID with the grouping information; and parsing the submodule for using the client The belonging packet parses the client update information from the update information of the management terminal.
- the client further includes: a backup module, configured to: before the performing the update operation, package the file that needs to be updated to obtain an archive package, store the backup information of the archive package locally, and return the backup information to the management end.
- a backup module configured to: before the performing the update operation, package the file that needs to be updated to obtain an archive package, store the backup information of the archive package locally, and return the backup information to the management end.
- the information processing module is further configured to obtain rollback execution information of the management end;
- the site control module is further configured to: determine, from the rollback execution information, that the client needs to stop, start, or restart
- the service control module is further configured to: determine, from the rollback execution information, a service that needs to be stopped, started, or restarted in the client;
- the client further includes: a rollback module, configured to perform Rewinding the execution information, reading the locally stored backup information, and releasing the content that needs to be rolled back from the archive package to overwrite the file that failed the update, according to stopping the site, stopping the service, restoring the file, starting the service, starting The sequence of the site performs a rollback operation. After the rollback operation ends, the result of the rollback operation is returned to the management terminal.
- the client further includes: a verification module, configured to: after the update operation ends, obtain an information of the updated file from the update operation result, a digest algorithm MD5 value; and record the MD5 value in a local file. And returning the MD5 value to the management terminal for the management side to verify the update operation result.
- a verification module configured to: after the update operation ends, obtain an information of the updated file from the update operation result, a digest algorithm MD5 value; and record the MD5 value in a local file. And returning the MD5 value to the management terminal for the management side to verify the update operation result.
- the information processing module is further configured to obtain the deletion execution information of the management terminal;
- the client further includes: a deletion module, configured to acquire, according to the deletion execution information, content information that the client needs to delete; Action, and return the result of the delete operation to the management side.
- an embodiment of the present invention provides a multi-site automatic update system, including: a management terminal and at least one of the foregoing clients; wherein the management terminal is configured to be used by the client
- the terminal provides update information, group information, and execution information, and saves the operation record.
- the invention has the following advantages: The method, the client and the system for automatically updating the multi-site provided by the embodiment of the present invention obtain the update information of the management terminal, and parse out the client update information, and parse the client update information.
- the management terminal may divide the client into several groups according to the difference of the site or the service, and the clients in the group are mostly load balancing configurations, and different packet update contents are different; the management terminal provides the client with update information with group information.
- the content of the update information can be reduced, and the management side can update the client of multiple load balancing configurations at the same time, thereby expanding the number of automatic update sites.
- FIG. 1 is a schematic diagram showing a multi-site automatic updating method according to an embodiment of the present invention
- FIG. 2 is a schematic structural diagram showing a multi-site automatic updating system according to an embodiment of the present invention
- a structural diagram of a client of an embodiment of the present invention
- FIG. 4 is a schematic structural diagram showing another client of an embodiment of the present invention.
- FIG. 5 is a schematic structural block diagram of a multi-site automatic update system according to an embodiment of the present invention. Mode for Carrying Out the Invention Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided to provide a more thorough understanding of the present invention. The disclosure is to be fully disclosed to those skilled in the art.
- the main technical idea of the present invention is that the client parses the client update information that can distinguish the site, the service, and the common content according to the update execution information of the management terminal, and judges from the client update information according to the standardized site naming principle and service naming principle.
- FIG. 1 shows a flow chart of a multi-site automatic update method according to an embodiment of the present invention.
- a multi-site automatic updating method provided by an embodiment of the present invention includes the following steps:
- the multi-site automatic update system needs two roles of management and client, and the management terminal provides update execution information; the client obtains update execution information and implements functions such as backup, update, rollback, and restart.
- the management side can also split the client into groups according to site or service differences and construct a group information file. Grouping is to reduce duplicate content.
- the group information is recorded in the management file, and the configuration is basically unchanged.
- the group information format group name, client ID list.
- the management terminal needs to include the group name when sending the update execution information to the client.
- the management terminal can automatically generate an update information file according to the specified update file directory rule, for example, the first layer directory name is required to update the group name, and the rest is the structure of the client actual directory.
- the management terminal sends an update execution instruction to the client, the management information is distributed to the plurality of clients together with the update information.
- FIG. 2 is a structural diagram of a multi-site automatic update system according to an embodiment of the present invention.
- the management side distributes the group information and the update information to each controlled client, and the clients are divided into groups according to the difference of the site or the service, and the contents of the clients in different groups need to be updated differently.
- the group information includes a group name and a client ID list
- the update information includes a group name and a client actual update directory.
- the client update information is parsed in the new information, and then the corresponding operation is performed locally on the client.
- the information published by the management side and the information returned by the client can be implemented by the open source tool Saltstack. According to the execution information of the management terminal, functions such as update, backup, rollback, delete, check, restart, etc. can be automatically implemented on the client.
- the client determines from the client update information which sites on the client need to stop, start, or restart according to the standard site naming principle, and perform related actions. In the process of stopping the site operation, it is also necessary to obtain a process value that needs to stop the site, and the process value can be provided by the management terminal in the execution information. When multiple contents of the site need to be modified, a decision lock is established to prevent the same site from performing repeated operations multiple times. The execution result of the site can be returned to the management terminal separately in the form of a list data structure as needed.
- the service that needs to be stopped, started, or restarted in the client is determined from the client update information.
- the client determines the service items on the client that need to be stopped, started, and restarted according to the application naming principle of the specification.
- the service can be a Java application and executed.
- the specified operation, the result of the execution can be returned to the management terminal separately according to the needs of the list data structure.
- the client can update the client update information according to the update information of the management terminal, and can distinguish the site, the service, and the common content from the client update information, and the common content can be a client file or configuration information, and the client updates according to the generated client. Information automatically maintains relevant sites and services.
- the generated client update information includes the actual update directory of the client, and the client obtains the update source file from the management terminal according to the actual update directory, and then updates the client local destination file.
- each site is executed in the order of stopping the site, stopping the service, and updating. Files, startup services, startup sites, if the update does not include services or sites, the site or service will not be stopped or started.
- the multiple sites can perform their respective update operations independently and synchronously.
- the update operation results are returned to the management terminal, and the update operation result is stored locally.
- the results of the update operation are recorded with specific sites, and/or services, and/or content that the client file update succeeded or failed. The recording and returning of the result of the update operation can make the update operation traceable.
- the multi-site automatic update method of the present invention may further include the steps of: before the automatic update operation is performed, packaging the file that needs to be updated to obtain an archive package, and storing the backup of the archive package locally. Information and return the backup information to the management terminal.
- the client After receiving the update execution information of the management terminal, the client parses the client update information from the update execution information, and then determines the file information that needs to be updated from the client update information, and needs to change first before the file is changed.
- the file is archived to a local backup, and the archived backup information is stored locally, the backup information records the file name of the archive package, and the backup information is returned to the client.
- the method embodiment automatically backs up files before the client file is updated, which ensures the security and reliability of the multi-site automatic update method.
- the multi-site automatic update method of the present invention may further include the steps of: acquiring rollback execution information of the management terminal; determining, from the rollback execution information, that the client needs to stop and start Or restarting the site or service; reading the locally stored backup information according to the rollback execution information, and releasing the content that needs to be rolled back from the archive package for overwriting the file that failed the update; Stop the service, restore the file, start the service, start the site in the order of the rollback operation; after the rollback operation ends, return the result of the rollback operation to the management side.
- the update operation result is also returned to the management terminal, and the management terminal generates a rollback execution information according to the update operation result of the update failure, and the client obtains the rollback execution of the management terminal.
- the local backup information is read, and the content that needs to be rolled back is released from the archive package and overwrites the file that failed the update.
- the rollback execution information includes the site or service content, and the site or service in the client that needs to be stopped, started, or restarted is determined from the rollback execution information, and then stops the site, stops the service, restores the file, and starts the service.
- the multi-site automatic update method of the present invention may further include the steps of: after the end of the update operation, obtaining an information-summary algorithm MD5 value of the updated file from the update operation result; The MD5 value is recorded in the local file and the MD5 value is returned to the management terminal for the management side to verify the update operation result.
- MD5 Message-Digest Algorithm 5
- the file content format is "file name: MD5", one per line, and the file name is also returned to the management terminal.
- MD5 is the dictionary type data of the value.
- the management end After receiving the MD5 value, the management end performs security, confidentiality verification, and version detection on the updated content of the client according to the MD5 value.
- the method embodiment automatically obtains the MD5 value of the update file and returns it to the management terminal after the client file is updated, thereby ensuring the security and integrity of the multi-site automatic update method.
- the multi-site automatic update method of the present invention may further include the steps of: acquiring deletion execution information of the management terminal; acquiring content information that the client needs to delete according to the deletion execution information; Delete the operation and return the result of the deletion operation to the management side.
- FIG. 3 illustrates an embodiment in accordance with the present invention.
- the client 300 provided by the embodiment of the present invention includes: an information processing module 310, configured to acquire update execution information of the management terminal, and parse the client update information accordingly;
- the site control module 320 is configured to determine, according to the standard site naming principle, a site in the client that needs to be stopped, started, or restarted from the client update information;
- the service control module 330 is configured to determine, according to the application naming principle of the specification, a service that needs to be stopped, started, or restarted in the client from the client update information;
- the update module 340 is configured to determine, from the client update information, a file that needs to be updated, and automatically perform an update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site, and storing the storage locally after the update operation ends. Update the operation result and return the update operation result to the management terminal.
- the information processing module 310 provided by the embodiment of the present invention may include:
- a grouping information obtaining sub-module configured to acquire grouping information and update information of the management terminal; wherein the grouping information is information that the management terminal divides the client into groups according to differences in sites or services, and the grouping information includes a group name and a client. ID list; the update information includes a group name and a client actual update directory;
- a packet comparison submodule configured to identify a packet to which the client belongs by comparing the client ID with the grouping information
- the parsing submodule is configured to parse the client update information from the update information of the management terminal according to the group to which the client belongs.
- another client 400 provided by the embodiment of the present invention further includes:
- the backup module 450 is configured to: before the performing the update operation, package the file that needs to be updated to obtain an archive file, store the backup information of the archive package locally, and return the backup information to the management terminal.
- the client 400 provided by the embodiment of the present invention further includes:
- the rollback module 460 is configured to read the locally stored backup information according to the rollback execution information of the management end, and release the content that needs to be rolled back from the archive package to cover the file that fails to be updated; according to stopping the site, stopping the service, Recover files, start services, start the site in a sequence, perform a rollback operation, and roll back the operation After the bundle, return the result of the rollback operation to the management side. among them,
- the information processing module 310 is further configured to acquire rollback execution information of the management end.
- the site control module 320 is further configured to determine, from the rollback execution information, a site in the client that needs to be stopped, started, or restarted.
- the service control module 330 is further configured to determine, from the rollback execution information, a service that needs to be stopped, started, or restarted in the client.
- the client 400 provided by the embodiment of the present invention further includes:
- the verification module 470 is configured to: after the end of the update operation, obtain an information-summary algorithm MD5 value of the updated file from the update operation result; record the MD5 value in a local file, and return the MD5 value to the management end to use The update operation results are verified on the management side.
- the client 400 provided by the embodiment of the present invention further includes:
- the deleting module 480 is configured to obtain content information that the client needs to delete according to the deletion execution information; perform a deletion operation, and return the deletion operation result to the management terminal. among them,
- the information processing module 310 is further configured to acquire deletion execution information of the management terminal.
- FIG. 5 shows a block diagram of a multi-site automatic updating system according to an embodiment of the present invention.
- a system for automatically updating a multi-site according to an embodiment of the present invention includes a management terminal 500 and at least one client (1, 2, ... N); wherein the management terminal 500 , used to provide update information, group information, and execution information to the client, and save the operation record.
- the execution information of the management terminal including the update execution information, the rollback execution information, and the deletion execution information, are delivered to the client through the interactive interface of the management terminal, and the specified client performs the specified operation.
- the client returns the automatically executed update result, the backup result, the rollback result, the MD5 value, and the deletion result to the management terminal, and the management terminal records the operation execution result in the management terminal file.
- the multi-site automatic update method, the client, and the system provided by the embodiment of the present invention obtain the update information of the management terminal, and parse out the client update information, and parse the client.
- the end update information can distinguish between the site, the service, and the normal content; and then, according to the standardized site naming principle and the application naming principle, the site and/or service in the client that needs to be stopped, started, or restarted is determined from the client update information, thereby Accurately perform related actions to ensure that there is no site exception during the update process; then determine the files that need to be updated from the client update information, and automatically perform the update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site, ensuring
- the automatic update of multiple sites on the client is completed securely, quickly and accurately; after the update operation ends, the update operation result is stored locally and the update operation result is returned to the management terminal, so that the update operation is traceable. It can be seen that the technical solution of the present invention can solve the problems in the prior art that need to be manually updated on a site-by-site basis, and improve the work efficiency, and also ensure the security, accuracy, and reliability of automatic update of multiple sites. .
- the management terminal may divide the client into several groups according to the difference of the site or the service, and the clients in the group are mostly load balancing configurations, and different packet update contents are different; the management terminal provides the client with update information with group information.
- the content of the update information can be reduced, and the management side can update the client of multiple load balancing configurations at the same time, thereby expanding the number of automatic update sites.
- packaging the file that needs to be updated to obtain an archive package can ensure the security and reliability of the multi-site automatic update. Sex.
- the local backup information is read by performing the rollback operation, the content that needs to be rolled back is released from the archive package, and the file that fails the update is overwritten, and the result of the rollback operation is returned to the management terminal.
- the information of the updated file is obtained from the update operation result - the digest algorithm MD5 value; the MD5 value is recorded in the local file and the MD5 value is returned to the management terminal for the management end pair
- the scheme of updating the operation results for verification ensures the security and integrity of the multi-site automatic update method.
- the client obtains the content information that the client needs to delete according to the deletion execution information of the management terminal, performs the deletion operation, and returns the deletion operation result to the management terminal, thereby ensuring the integrity and security of the multi-site automatic update method.
- the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
- a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention.
- the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
- a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals.
- signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Disclosed in the present invention are a method, client and system for a multi-site automatic update. The method of the present invention includes: obtaining update execution information of a management end, and parsing out client update information based on the update execution information; determining, according to a site naming principle and an application naming principle of a specification, the sites or services that need to be stopped, started or restarted in the client from the client update information; determining files that need to be updated from the client update information, performing update operation automatically in the order of stopping sites, stopping services, updating files, starting services and starting sites; after finishing the update operation, storing an update operation result locally and returning the update operation result to the management end. The solution of the present invention can solve problems in the prior art caused by manually updating the sites one by one, and guarantee the security, accuracy, and reliability of the multi-site automatic update while improving the work efficiency.
Description
一种多站点自动更新方法、 客户端和系统 技术领域 本发明涉及计算机技术领域, 特别涉及一种多站点自动更新方法、 客户端 和系统。 发明背景 随着信息时代的持续发展, 集群、 负载均衡技术的普及, 服务器从初期的 几台发展为庞大的数据中心, 网站更新管理也变得日趋复杂, 目前更新管理绝 大多数工作都是手工操作的。 即使一个简单的系统变更或更新往往都需要运维 人员逐一登录每台设备进行手工变更, 当设备数量达至成百上千时, 其工作量 之大可想而知。 工作量增大时更新的稳定性与可靠性亦会逐渐降低。 TECHNICAL FIELD The present invention relates to the field of computer technologies, and in particular, to a multi-site automatic update method, a client, and a system. BACKGROUND OF THE INVENTION With the continuous development of the information age, the popularization of clustering and load balancing technologies, the server has evolved from a few initial stages to a huge data center, and the website update management has become increasingly complicated. At present, most of the work of updating management is manual. Operational. Even a simple system change or update often requires the operation and maintenance personnel to log in to each device to make manual changes one by one. When the number of devices reaches hundreds of thousands, the workload can be imagined. The stability and reliability of the update will gradually decrease as the workload increases.
目前对于多站点更新, 大多数的处理方案是操作人员重复执行单站点更新 操作的流程, 或者编写一个脚本执行, 但更新包上传仍需操作人员逐台操作, 且遇到一台服务器部署多个站点时, 依然要手动逐一执行停止、 启动站点或服 务的操作, 工作效率很低。 发明内容 基于上述问题, 本发明实施例提供了一种多站点自动更新方法、 客户端和 系统, 以解决现有技术中需要逐个站点手动进行更新带来的问题。 Currently, for multi-site updates, most of the processing schemes are the process of the operator repeating the single-site update operation, or writing a script execution, but the update package upload still requires the operator to operate one by one, and encounters multiple deployments of one server. At the time of the site, it is still necessary to manually perform the operation of stopping, starting the site or the service one by one, and the work efficiency is very low. SUMMARY OF THE INVENTION Based on the above problems, an embodiment of the present invention provides a multi-site automatic update method, a client, and a system, to solve the problem in the prior art that a manual update is required on a site-by-site basis.
依据本发明的一个方面, 本发明实施例提供了一种多站点自动更新方法, 所述方法包括: 获取管理端的更新执行信息, 并依此解析出客户端更新信息; 依据规范的站点命名原则, 从客户端更新信息中判断出客户端中需要停止、 启 动、 或重启的站点; 依据规范的应用命名原则, 从客户端更新信息中判断出客 户端中需要停止、 启动、 或重启的服务; 从客户端更新信息中确定出需要更新 的文件, 按照停止站点、 停止服务、 更新文件、 启动服务、 启动站点的顺序自 动执行更新操作; 更新操作结束后, 在本地存储更新操作结果并将所述更新操 作结果返回管理端。 According to an aspect of the present invention, an embodiment of the present invention provides a multi-site automatic update method, where the method includes: acquiring update execution information of a management end, and parsing client update information according to the specification; Determining the site in the client that needs to be stopped, started, or restarted from the client update information; determining the service that needs to be stopped, started, or restarted in the client from the client update information according to the standard application naming principle; The client update information determines the files that need to be updated, and automatically performs the update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site; after the update operation ends, the update operation result is stored locally and the update is performed. The result of the operation is returned to the management terminal.
其中, 所述获取管理端的更新执行信息, 并依此解析出客户端更新信息包 括:
获取管理端的分组信息及更新信息; 其中, 所述分组信息是管理端按照站 点或服务的差异将客户端分割成若干组的信息, 分组信息包括分组名称和客户 端 ID列表; 所述更新信息包括分组名称和客户端实际更新目录; 通过将客户端 ID与所述分组信息比对, 识别出客户端所属的分组; 根据客户端所属的分组从 管理端的更新信息中解析出客户端更新信息。 The obtaining the update execution information of the management terminal, and parsing the client update information according to the method includes: Acquiring the grouping information and the update information of the management terminal; wherein the grouping information is information that the management terminal divides the client into groups according to the difference of the site or the service, where the group information includes a group name and a client ID list; the update information includes The group name and the client actually update the directory; by comparing the client ID with the grouping information, identifying the group to which the client belongs; and parsing the client update information from the update information of the management terminal according to the group to which the client belongs.
可选地, 所述方法还包括: 在执行更新操作之前, 打包所述需要更新的文 件得到归档包, 在本地存储该归档包的备份信息并将所述备份信息返回管理端。 Optionally, the method further includes: before the performing the update operation, packaging the file that needs to be updated to obtain an archive package, storing the backup information of the archive package locally, and returning the backup information to the management end.
可选地, 所述方法还包括: 获取管理端的回滚执行信息; 从所述回滚执行 信息中判断出客户端中需要停止、 启动、 或重启的站点或者服务; 根据所述回 滚执行信息, 读取本地存储的备份信息, 将需要回滚的内容从所述归档包中释 放以用于覆盖更新失败的文件; 按照停止站点、 停止服务、 恢复文件、 启动服 务、 启动站点的顺序执行回滚操作; 回滚操作结束后, 将回滚操作结果返回管 理端。 Optionally, the method further includes: acquiring rollback execution information of the management end; determining, from the rollback execution information, a site or a service that needs to be stopped, started, or restarted in the client; performing execution information according to the rollback Read the locally stored backup information, and release the content that needs to be rolled back from the archive package to overwrite the file that failed the update; execute the order in the order of stopping the site, stopping the service, restoring the file, starting the service, and starting the site. Roll operation; after the rollback operation ends, return the result of the rollback operation to the management side.
可选地, 所述方法还包括: 更新操作结束后, 从更新操作结果中获取更新 后的文件的信息-摘要算法 MD5值; 将所述 MD5值记录于本地文件中并向管理 端返回该 MD5值以用于管理端对更新操作结果进行校验。 Optionally, the method further includes: after the end of the update operation, obtaining an information-summary algorithm MD5 value of the updated file from the update operation result; recording the MD5 value in a local file and returning the MD5 to the management terminal The value is used by the management side to verify the result of the update operation.
可选地, 所述方法还包括: 获取管理端的删除执行信息; 根据所述删除执 行信息, 获取客户端需要删除的内容信息; 执行删除操作, 并将删除操作结果 返回管理端。 依据本发明的另一方面, 本发明实施例提供了一种客户端, 包括: 信息处 理模块, 用于获取管理端的更新执行信息, 并依此解析出客户端更新信息; 站 点控制模块, 用于依据规范的站点命名原则, 从客户端更新信息中判断出客户 端中需要停止、 启动、 或重启的站点; 服务控制模块, 用于依据规范的应用命 名原则, 从客户端更新信息中判断出客户端中需要停止、 启动、 或重启的服务; 更新模块, 用于从客户端更新信息中确定出需要更新的文件, 并按照停止站点、 停止服务、 更新文件、 启动服务、 启动站点的顺序自动执行更新操作, 更新操 作结束后, 在本地存储更新操作结果并将所述更新操作结果返回管理端。 Optionally, the method further includes: acquiring deletion execution information of the management terminal; acquiring content information that the client needs to delete according to the deletion execution information; performing a deletion operation, and returning the deletion operation result to the management terminal. According to another aspect of the present invention, an embodiment of the present invention provides a client, including: an information processing module, configured to acquire update execution information of a management end, and parse out client update information according to the method; According to the standard site naming principle, the site that needs to be stopped, started, or restarted in the client is determined from the client update information; the service control module is configured to determine the client from the client update information according to the standard application naming principle. The service that needs to be stopped, started, or restarted; the update module is used to determine the files that need to be updated from the client update information, and automatically execute in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site. The update operation, after the update operation ends, stores the update operation result locally and returns the update operation result to the management terminal.
其中, 所述信息处理模块包括: 分组信息获取子模块, 用于获取管理端的 分组信息及更新信息; 其中, 所述分组信息是管理端按照站点或服务的差异将 客户端分割成若干组的信息, 分组信息包括分组名称和客户端 ID列表; 所述更
新信息包括分组名称和客户端实际更新目录; 分组比对子模块, 用于通过将客 户端 ID与所述分组信息比对, 识别出客户端所属的分组; 解析子模块,用于根 据客户端所属的分组从管理端的更新信息中解析出客户端更新信息。 The information processing module includes: a grouping information acquiring sub-module, configured to acquire grouping information and update information of the management terminal; wherein the grouping information is information that the management terminal divides the client into groups according to differences in sites or services. , the group information includes a group name and a client ID list; The new information includes a group name and a client actual update directory; a packet comparison submodule, configured to identify a packet to which the client belongs by comparing the client ID with the grouping information; and parsing the submodule for using the client The belonging packet parses the client update information from the update information of the management terminal.
可选地, 所述客户端还包括: 备份模块, 用于在执行更新操作之前, 打包 所述需要更新的文件得到归档包, 在本地存储该归档包的备份信息并将所述备 份信息返回管理端。 Optionally, the client further includes: a backup module, configured to: before the performing the update operation, package the file that needs to be updated to obtain an archive package, store the backup information of the archive package locally, and return the backup information to the management end.
可选地, 所述信息处理模块, 还用于获取管理端的回滚执行信息; 所述站 点控制模块, 还用于从所述回滚执行信息中判断出客户端中需要停止、 启动、 或重启的站点; 所述服务控制模块, 还用于从所述回滚执行信息中判断出客户 端中需要停止、 启动、 或重启的服务; 所述客户端还包括: 回滚模块, 用于根 据所述回滚执行信息, 读取本地存储的备份信息, 将需要回滚的内容从所述归 档包中释放以用于覆盖更新失败的文件, 按照停止站点、 停止服务、 恢复文件、 启动服务、 启动站点的顺序执行回滚操作, 回滚操作结束后, 将回滚操作结果 返回管理端。 Optionally, the information processing module is further configured to obtain rollback execution information of the management end; the site control module is further configured to: determine, from the rollback execution information, that the client needs to stop, start, or restart The service control module is further configured to: determine, from the rollback execution information, a service that needs to be stopped, started, or restarted in the client; the client further includes: a rollback module, configured to perform Rewinding the execution information, reading the locally stored backup information, and releasing the content that needs to be rolled back from the archive package to overwrite the file that failed the update, according to stopping the site, stopping the service, restoring the file, starting the service, starting The sequence of the site performs a rollback operation. After the rollback operation ends, the result of the rollback operation is returned to the management terminal.
可选地, 所述客户端还包括: 校验模块, 用于更新操作结束后, 从更新操 作结果中获取更新后的文件的信息-摘要算法 MD5值; 将所述 MD5值记录于本 地文件中并向管理端返回该 MD5值以用于管理端对更新操作结果进行校验。 Optionally, the client further includes: a verification module, configured to: after the update operation ends, obtain an information of the updated file from the update operation result, a digest algorithm MD5 value; and record the MD5 value in a local file. And returning the MD5 value to the management terminal for the management side to verify the update operation result.
可选地, 所述信息处理模块, 还用于获取管理端的删除执行信息; 所述客 户端还包括: 删除模块, 用于根据所述删除执行信息, 获取客户端需要删除的 内容信息; 执行删除操作, 并将删除操作结果返回管理端。 Optionally, the information processing module is further configured to obtain the deletion execution information of the management terminal; the client further includes: a deletion module, configured to acquire, according to the deletion execution information, content information that the client needs to delete; Action, and return the result of the delete operation to the management side.
依据本发明的再一个方面, 本发明实施例提供了一种多站点自动更新系统, 其特征在于, 包括管理端和至少一个上述的客户端; 其中, 所述管理端, 用于 向所述客户端提供更新信息、 分组信息和执行信息, 并保存操作记录。 本发明的有益效果为: 本发明实施例提供的多站点自动更新的方法、 客户 端和系统, 通过获取管理端的更新执行信息, 并依此解析出客户端更新信息, 解析出的客户端更新信息能够区分站点、 服务和普通内容; 然后依据规范的站 点命名原则和应用命名原则, 从客户端更新信息中判断出客户端中需要停止、 启动、 或重启的站点和 /或服务, 从而准确执行相关动作, 保证更新过程不出现 站点异常; 接着从客户端更新信息中确定出需要更新的文件, 按照停止站点、
停止服务、 更新文件、 启动服务、 启动站点的顺序自动执行更新操作, 保证了 安全、 快速、 准确的完成客户端上多个站点的自动更新; 更新操作结束后, 在 本地存储更新操作结果并将所述更新操作结果返回管理端, 以使得更新操作具 有可追溯性。 由此可知, 本发明的技术方案能够解决现有技术中需要逐个站点 手动进行更新带来的问题, 在提高工作效率的同时, 保证了多个站点自动更新 的安全性、 准确性和可靠性。 According to still another aspect of the present invention, an embodiment of the present invention provides a multi-site automatic update system, including: a management terminal and at least one of the foregoing clients; wherein the management terminal is configured to be used by the client The terminal provides update information, group information, and execution information, and saves the operation record. The invention has the following advantages: The method, the client and the system for automatically updating the multi-site provided by the embodiment of the present invention obtain the update information of the management terminal, and parse out the client update information, and parse the client update information. Ability to distinguish between sites, services, and common content; then, based on the canonical site naming principles and application naming principles, determine the sites and/or services in the client that need to be stopped, started, or restarted from the client update information to accurately execute the relevant Action, to ensure that the site update is not abnormal during the update process; then determine the files that need to be updated from the client update information, according to the stop site, Stop the service, update files, start the service, and start the site automatically to perform the update operation, ensuring safe, fast, and accurate completion of automatic updates of multiple sites on the client; after the update operation, store the update operation results locally and The update operation result is returned to the management terminal to make the update operation traceable. It can be seen that the technical solution of the present invention can solve the problem that the prior art needs to be manually updated on a site-by-site basis, and the work efficiency is improved, and the security, accuracy, and reliability of automatic updating of multiple sites are ensured.
进一步地, 管理端可以按照站点或服务的差异将客户端分割成若干组, 组 内客户端多为负载均衡配置, 不同的分组更新内容不同; 管理端通过向客户端 提供具有分组信息的更新信息, 能够减少更新信息的内容重复, 实现管理端对 多套负载均衡配置的客户端同时进行更新操作, 扩大了自动更新站点的数量规 模。 Further, the management terminal may divide the client into several groups according to the difference of the site or the service, and the clients in the group are mostly load balancing configurations, and different packet update contents are different; the management terminal provides the client with update information with group information. The content of the update information can be reduced, and the management side can update the client of multiple load balancing configurations at the same time, thereby expanding the number of automatic update sites.
上述说明仅是本发明技术方案的概述, 为了能够更清楚了解本发明的技术 手段, 而可依照说明书的内容予以实施, 并且为了让本发明的上述和其它目的、 特征和优点能够更明显易懂, 以下特举本发明的具体实施方式。 附图简要说明 通过阅读下文优选实施方式的详细描述, 各种其他的优点和益处对于本领 域普通技术人员将变得清楚明了。 附图仅用于示出优选实施方式的目的, 而并 不认为是对本发明的限制。 而且在整个附图中, 用相同的参考符号表示相同的 部件。 在附图中: The above description is only an overview of the technical solutions of the present invention, and the technical means of the present invention can be more clearly understood, and can be implemented in accordance with the contents of the specification, and the above and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below. BRIEF DESCRIPTION OF THE DRAWINGS Various other advantages and benefits will become apparent to those of ordinary skill in the art. The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图 1示意性示出了本发明实施例的一种多站点自动更新方法的流程图; 图 2示意性示出了本发明实施例提供的多站点自动更新系统构架图; 图 3示意性示出了本发明实施例的一种客户端的结构图; FIG. 1 is a schematic diagram showing a multi-site automatic updating method according to an embodiment of the present invention; FIG. 2 is a schematic structural diagram showing a multi-site automatic updating system according to an embodiment of the present invention; A structural diagram of a client of an embodiment of the present invention;
图 4示意性示出了本发明实施例的另一种客户端的结构图 FIG. 4 is a schematic structural diagram showing another client of an embodiment of the present invention.
图 5示意性示出了本发明实施例提供的多站点自动更新系统的结构框图。 实施本发明的方式 下面将参照附图更详细地描述本公开的示例性实施例。 虽然附图中显示了 本公开的示例性实施例, 然而应当理解, 可以以各种形式实现本公开而不应被 这里阐述的实施例所限制。 相反, 提供这些实施例是为了能够更透彻地理解本
公开, 并且能够将本公开的范围完整的传达给本领域的技术人员。 本发明的主要技术构思在于, 客户端根据管理端的更新执行信息解析出能 够区分站点、 服务和普通内容的客户端更新信息, 依据规范的站点命名原则和 服务命名原则, 从客户端更新信息中判断出客户端中哪些站点需要停止、 启动、 或重启的站点和 /或服务, 按照停止站点、 停止服务、 更新客户端文件、 启动服 务、 启动站点的顺序自动执行更新操作, 从而准确执行相关动作, 保证更新过 程不出现站点异常, 从而安全、 快速、 准确的完成客户端上多个站点的自动更 新; 更新结束后, 在本地存储更新操作结果并将所述更新操作结果返回管理端, 以使得更新操作具有可追溯性。 另外本发明还可以在管理端提供带有分组信息 的更新执行信息, 减少更新信息的内容重复, 实现管理端对多套负载均衡配置 的客户端同时进行更新操作, 扩大了自动更新站点的数量规模。 图 1示出了才艮据本发明实施例的一种多站点自动更新方法的流程图。如图 1 所示, 本发明实施例提供的一种多站点自动更新方法, 包括如下步骤: FIG. 5 is a schematic structural block diagram of a multi-site automatic update system according to an embodiment of the present invention. Mode for Carrying Out the Invention Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided to provide a more thorough understanding of the present invention. The disclosure is to be fully disclosed to those skilled in the art. The main technical idea of the present invention is that the client parses the client update information that can distinguish the site, the service, and the common content according to the update execution information of the management terminal, and judges from the client update information according to the standardized site naming principle and service naming principle. Sites and/or services in which the sites need to be stopped, started, or restarted in the client, and the update operations are automatically performed in the order of stopping the site, stopping the service, updating the client files, starting the service, and starting the site, thereby accurately performing related actions, Ensure that the site update is not performed during the update process, thereby completing the automatic update of multiple sites on the client safely, quickly and accurately. After the update is completed, the update operation result is stored locally and the update operation result is returned to the management terminal to make the update The operation is traceable. In addition, the present invention can also provide update execution information with group information on the management side, reduce the content repetition of the update information, and realize the simultaneous update operation of the client for multiple sets of load balancing configurations, and expand the number of automatic update sites. . FIG. 1 shows a flow chart of a multi-site automatic update method according to an embodiment of the present invention. As shown in FIG. 1 , a multi-site automatic updating method provided by an embodiment of the present invention includes the following steps:
Sl l、 获取管理端的更新执行信息, 并依此解析出客户端更新信息。 Sl l, obtain the update execution information of the management terminal, and parse the client update information accordingly.
多站点自动更新系统运行需要管理端与客户端两个角色, 由管理端提供更 新执行信息; 客户端获取更新执行信息后实现备份、 更新、 回滚、 重启等功能。 The multi-site automatic update system needs two roles of management and client, and the management terminal provides update execution information; the client obtains update execution information and implements functions such as backup, update, rollback, and restart.
针对负载均衡配置的客户端, 管理端还可以按照站点或服务差异将客户端 分割成若干组, 并构造分组信息文件。 分组是为了减少重复内容。 分组信息记 录于管理端文件, 配置后基本不变, 分组信息格式: 分组名称、客户端 ID列表。 For clients with load balancing configuration, the management side can also split the client into groups according to site or service differences and construct a group information file. Grouping is to reduce duplicate content. The group information is recorded in the management file, and the configuration is basically unchanged. The group information format: group name, client ID list.
为此管理端在向客户端发送更新执行信息时, 需要包含有分组名称。 管理 端可以按照指定的更新文件目录规则, 例如第一层目录名为所需更新分组名称, 其余为客户端实际目录的结构自动生成更新信息文件。 管理端在向客户端发送 更新执行指令时, 将该分组信息和更新信息一并分发给多个客户端。 For this reason, the management terminal needs to include the group name when sending the update execution information to the client. The management terminal can automatically generate an update information file according to the specified update file directory rule, for example, the first layer directory name is required to update the group name, and the rest is the structure of the client actual directory. When the management terminal sends an update execution instruction to the client, the management information is distributed to the plurality of clients together with the update information.
如图 2所示, 图 2为本发明实施例提供的多站点自动更新系统构架图。 管 理端分发分组信息和更新信息给每个受控的客户端, 这些客户端按照站点或服 务差异分割成若干组, 不同分组内客户端需要更新的内容不同。 分组信息包括 分组名称和客户端 ID列表, 更新信息包括分组名称和客户端实际更新目录。 分 组内的每个客户端获取管理端的分组信息及更新信息后, 通过将自身 ID与所述 分组信息比对, 识别出自身所属的分组, 并根据自身所属的分组从管理端的更
新信息中解析出客户端更新信息, 然后在客户端本地执行相应操作。 管理端发布的信息与客户端返回的信息可以依靠开源工具 Saltstack实现。 根据管理端的执行信息在客户端上能够自动实现更新、 备份、 回滚、 删除、 校 验、 重启等功能。 As shown in FIG. 2, FIG. 2 is a structural diagram of a multi-site automatic update system according to an embodiment of the present invention. The management side distributes the group information and the update information to each controlled client, and the clients are divided into groups according to the difference of the site or the service, and the contents of the clients in different groups need to be updated differently. The group information includes a group name and a client ID list, and the update information includes a group name and a client actual update directory. After each client in the packet acquires the grouping information and the update information of the management terminal, it compares the self ID with the grouping information, identifies the packet to which the client belongs, and according to the group to which the user belongs, from the management terminal. The client update information is parsed in the new information, and then the corresponding operation is performed locally on the client. The information published by the management side and the information returned by the client can be implemented by the open source tool Saltstack. According to the execution information of the management terminal, functions such as update, backup, rollback, delete, check, restart, etc. can be automatically implemented on the client.
512、 依据规范的站点命名原则, 从客户端更新信息中判断出客户端中需要 停止、 启动、 或重启的站点。 512. According to the standard site naming principle, determine the site in the client that needs to be stopped, started, or restarted from the client update information.
当一台客户端上部署多个站点时, 客户端依据规范的站点命名原则, 从客 户端更新信息中判定出客户端上哪些站点需要停止、 启动或重启, 并执行相关 动作。 其中在停止站点操作过程中, 还需要获取需要停止站点的进程值, 该进 程值可以由管理端在执行信息中提供。 当站点内多处内容需要修改时, 建立判 定锁, 防止同一站点多次执行重复操作。 站点的执行操作结果根据需要可以列 表数据结构的形式单独返回管理端。 When multiple sites are deployed on a client, the client determines from the client update information which sites on the client need to stop, start, or restart according to the standard site naming principle, and perform related actions. In the process of stopping the site operation, it is also necessary to obtain a process value that needs to stop the site, and the process value can be provided by the management terminal in the execution information. When multiple contents of the site need to be modified, a decision lock is established to prevent the same site from performing repeated operations multiple times. The execution result of the site can be returned to the management terminal separately in the form of a list data structure as needed.
513、 依据规范的服务命名原则, 从客户端更新信息中判断出客户端中需要 停止、 启动、 或重启的服务。 513. According to the standard service naming principle, the service that needs to be stopped, started, or restarted in the client is determined from the client update information.
当一台客户端提供多种服务时, 客户端依据规范的应用命名原则, 从客户 端更新信息中判定出客户端上需要停止、 启动、 重启的服务项, 该服务可以为 Java应用, 并执行指定的操作, 执行的结果根据需要可以列表数据结构形式单 独返回管理端。 When a client provides multiple services, the client determines the service items on the client that need to be stopped, started, and restarted according to the application naming principle of the specification. The service can be a Java application and executed. The specified operation, the result of the execution can be returned to the management terminal separately according to the needs of the list data structure.
说明: 上述步骤 S12和 S13是可以同时进行的, 管理端的更新执行信息也 可以仅是指示客户端停止、 启动、 重启某个或某些站点或服务, 不涉及客户端 文件的更新, 此时客户端对站点或服务的执行操作结果需要单独返回管理端。 NOTE: The above steps S12 and S13 can be performed simultaneously. The update execution information of the management terminal can also only indicate that the client stops, starts, restarts some or some sites or services, and does not involve the update of the client file. The result of the execution of the site or service needs to be returned to the management terminal separately.
514、 从客户端更新信息中确定出需要更新的文件。 514. Determine, from the client update information, a file that needs to be updated.
客户端根据管理端的更新执行信息生成的客户端更新信息, 从客户端更新 信息中能够区分站点、 服务与普通内容, 该普通内容可以为客户端文件或配置 信息, 客户端根据生成的客户端更新信息自动维护着相关站点与服务。 The client can update the client update information according to the update information of the management terminal, and can distinguish the site, the service, and the common content from the client update information, and the common content can be a client file or configuration information, and the client updates according to the generated client. Information automatically maintains relevant sites and services.
在生成的客户端更新信息中, 包含有客户端实际更新目录, 客户端依据该 实际更新目录, 从管理端获取到更新源文件, 然后对客户端本地的目的文件进 行更新操作。 The generated client update information includes the actual update directory of the client, and the client obtains the update source file from the management terminal according to the actual update directory, and then updates the client local destination file.
515、 按照停止站点、 停止服务、 更新文件、 启动服务、 启动站点的顺序执 行更新操作。 515. Perform the update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site.
为保证更新安全, 每个站点的执行顺序依次为停止站点、 停止服务、 更新
文件、 启动服务、 启动站点, 若更新内容不包括服务或者站点, 将不执行站点 或服务的停止或启动。 To ensure the security of the update, each site is executed in the order of stopping the site, stopping the service, and updating. Files, startup services, startup sites, if the update does not include services or sites, the site or service will not be stopped or started.
当更新执行信息指示客户端上有多个站点需要同步更新时, 这些多个站点 可以独立地、 同步执行各自的更新操作。 When the update execution information indicates that there are multiple sites on the client that need to be updated synchronously, the multiple sites can perform their respective update operations independently and synchronously.
S 16、 更新操作结束后, 在本地存储更新操作结果并将所述更新操作结果返 回管理端。 S16. After the update operation ends, the update operation result is stored locally and the update operation result is returned to the management terminal.
更新操作结束后, 更新操作结果返回管理端, 并在本地存储该更新操作结 果。 更新操作结果记录有具体站点、 和 /或服务, 和 /或客户端文件更新成功或更 新失败的内容。 该对更新操作结果进行记录和返回, 能使得更新操作具有可追 溯性。 After the update operation ends, the update operation results are returned to the management terminal, and the update operation result is stored locally. The results of the update operation are recorded with specific sites, and/or services, and/or content that the client file update succeeded or failed. The recording and returning of the result of the update operation can make the update operation traceable.
在管理端保存有客户端执行更新操作的结果, 并按照操作人员信息、 操作 时间、 操作内容、 操作结果记录于管理端文件。 在本发明的一个方法实施例中, 本发明的多站点自动更新方法, 还可以包 括步骤: 在执行自动更新操作之前, 打包所述需要更新的文件得到归档包, 在 本地存储该归档包的备份信息并将所述备份信息返回管理端。 The result of the client performing the update operation is saved on the management side, and is recorded in the management terminal file according to the operator information, the operation time, the operation content, and the operation result. In a method embodiment of the present invention, the multi-site automatic update method of the present invention may further include the steps of: before the automatic update operation is performed, packaging the file that needs to be updated to obtain an archive package, and storing the backup of the archive package locally. Information and return the backup information to the management terminal.
客户端接收到管理端的更新执行信息后, 从更新执行信息中解析出客户端 更新信息, 再从客户端更新信息中确定出需要更新的文件信息, 在对该文件进 行变动之前, 首先将需要变动的文件归档至本地备份, 并在本地存储归档的备 份信息, 该备份信息记录有归档包的文件名, 同时将备份信息返回客户端。 本 方法实施例在客户端文件更新之前自动备份文件, 保证了多站点自动更新方法 的安全性和可靠性。 在本发明的另一个方法实施例中, 本发明的多站点自动更新方法, 还可以 包括步骤: 获取管理端的回滚执行信息; 从所述回滚执行信息中判断出客户端 中需要停止、 启动、 或重启的站点或者服务; 根据所述回滚执行信息, 读取本 地存储的备份信息, 将需要回滚的内容从所述归档包中释放以用于覆盖更新失 败的文件; 按照停止站点、 停止服务、 恢复文件、 启动服务、 启动站点的顺序 执行回滚操作; 回滚操作结束后, 将所述回滚操作结果返回管理端。 After receiving the update execution information of the management terminal, the client parses the client update information from the update execution information, and then determines the file information that needs to be updated from the client update information, and needs to change first before the file is changed. The file is archived to a local backup, and the archived backup information is stored locally, the backup information records the file name of the archive package, and the backup information is returned to the client. The method embodiment automatically backs up files before the client file is updated, which ensures the security and reliability of the multi-site automatic update method. In another method embodiment of the present invention, the multi-site automatic update method of the present invention may further include the steps of: acquiring rollback execution information of the management terminal; determining, from the rollback execution information, that the client needs to stop and start Or restarting the site or service; reading the locally stored backup information according to the rollback execution information, and releasing the content that needs to be rolled back from the archive package for overwriting the file that failed the update; Stop the service, restore the file, start the service, start the site in the order of the rollback operation; after the rollback operation ends, return the result of the rollback operation to the management side.
当客户端执行更新操作失败时, 也会将更新操作结果返回管理端, 管理端 根据更新失败的更新操作结果生成回滚执行信息, 客户端获取管理端的回滚执
行信息后, 读取本地备份信息, 将需要回滚的内容从归档包中释放并覆盖更新 失败的文件。 回滚执行信息中包含有站点或服务内容, 从所述回滚执行信息中 判断出客户端中需要停止、 启动、 或重启的站点或者服务, 然后按照停止站点、 停止服务、 恢复文件、 启动服务、 启动站点的顺序执行回滚操作, 以保证回滚 操作的安全性; 若回滚内容不包括服务或者站点, 将不执行站点或服务的停启。 回滚操作结果需要返回管理端。 本方法实施例为多站点自动更新失败时提供了 一种解决方案, 保证了多站点自动更新方法的稳定性和可靠性。 在本发明的再一种方法实施例中, 本发明的多站点自动更新方法, 还可以 包括步骤: 更新操作结束后, 从更新操作结果中获取更新后的文件的信息 -摘要 算法 MD5值;将所述 MD5值记录于本地文件中并向管理端返回该 MD5值以用 于管理端对更新操作结果进行校验。 When the client fails to perform the update operation, the update operation result is also returned to the management terminal, and the management terminal generates a rollback execution information according to the update operation result of the update failure, and the client obtains the rollback execution of the management terminal. After the line information, the local backup information is read, and the content that needs to be rolled back is released from the archive package and overwrites the file that failed the update. The rollback execution information includes the site or service content, and the site or service in the client that needs to be stopped, started, or restarted is determined from the rollback execution information, and then stops the site, stops the service, restores the file, and starts the service. Start the site in the order of the rollback operation to ensure the security of the rollback operation; if the rollback content does not include the service or the site, the site or service will not be stopped. The result of the rollback operation needs to be returned to the management side. The method embodiment provides a solution for multi-site automatic update failure, which ensures the stability and reliability of the multi-site automatic update method. In still another method embodiment of the present invention, the multi-site automatic update method of the present invention may further include the steps of: after the end of the update operation, obtaining an information-summary algorithm MD5 value of the updated file from the update operation result; The MD5 value is recorded in the local file and the MD5 value is returned to the management terminal for the management side to verify the update operation result.
MD5即 Message-Digest Algorithm 5 (信息-摘要算法 5 ), 又称为摘要算法、 哈希算法等, 用于确保信息传输完整一致。 在客户端更新操作结束后, 自动获 取客户端更新文件的 MD5值并记录于本地文件中, 文件内容格式为 "文件名: MD5" , 每行一条, 同时也向管理端返回以文件名为键, MD5 为值的字典类型 数据。 管理端收到该 MD5值后, 依据该 MD5值对客户端的更新内容进行安全 性、 保密性验证以及版本检测。 本方法实施例在客户端文件更新之后自动获取 更新文件的 MD5值并返回管理端,保证了多站点自动更新方法的安全性和完整 性。 在本发明的又一种方法实施例中, 本发明的多站点自动更新方法, 还可以 包括步骤: 获取管理端的删除执行信息; 根据所述删除执行信息, 获取客户端 需要删除的内容信息; 执行删除操作, 并将删除操作结果返回管理端。 MD5, Message-Digest Algorithm 5, is also known as digest algorithm, hash algorithm, etc., to ensure complete and consistent information transmission. After the client update operation ends, the MD5 value of the client update file is automatically obtained and recorded in the local file. The file content format is "file name: MD5", one per line, and the file name is also returned to the management terminal. , MD5 is the dictionary type data of the value. After receiving the MD5 value, the management end performs security, confidentiality verification, and version detection on the updated content of the client according to the MD5 value. The method embodiment automatically obtains the MD5 value of the update file and returns it to the management terminal after the client file is updated, thereby ensuring the security and integrity of the multi-site automatic update method. In still another method embodiment of the present invention, the multi-site automatic update method of the present invention may further include the steps of: acquiring deletion execution information of the management terminal; acquiring content information that the client needs to delete according to the deletion execution information; Delete the operation and return the result of the deletion operation to the management side.
例如当客户端执行更新操作成功后, 会将更新操作结果返回管理端, 管理 端根据更新成功的更新操作结果生成删除执行信息, 客户端获取管理端的删除 执行信息后, 对在执行更新操作之前备份的归档包进行删除。 本方法实施例为 多站点自动更新成功时提供了一种解决方案, 保证了多站点自动更新方法的完 整性和安全性。 基于与上述方法实施例相同的发明构思, 图 3 示出了根据本发明实施例的
一种客户端的结构图。 如图 3所示, 本发明实施例提供的客户端 300, 包括: 信息处理模块 310, 用于获取管理端的更新执行信息, 并依此解析出客户端 更新信息; For example, when the client performs the update operation successfully, the update operation result is returned to the management terminal, and the management terminal generates the deletion execution information according to the update operation result of the update success. After the client obtains the deletion execution information of the management terminal, the backup is performed before the update operation is performed. The archive package is deleted. The method embodiment provides a solution for multi-site automatic update success, which ensures the integrity and security of the multi-site automatic update method. Based on the same inventive concept as the above method embodiment, FIG. 3 illustrates an embodiment in accordance with the present invention. A structure diagram of a client. As shown in FIG. 3, the client 300 provided by the embodiment of the present invention includes: an information processing module 310, configured to acquire update execution information of the management terminal, and parse the client update information accordingly;
站点控制模块 320, 用于依据规范的站点命名原则, 从客户端更新信息中判 断出客户端中需要停止、 启动、 或重启的站点; The site control module 320 is configured to determine, according to the standard site naming principle, a site in the client that needs to be stopped, started, or restarted from the client update information;
服务控制模块 330, 用于依据规范的应用命名原则, 从客户端更新信息中判 断出客户端中需要停止、 启动、 或重启的服务; The service control module 330 is configured to determine, according to the application naming principle of the specification, a service that needs to be stopped, started, or restarted in the client from the client update information;
更新模块 340, 用于从客户端更新信息中确定出需要更新的文件, 并按照停 止站点、 停止服务、 更新文件、 启动服务、 启动站点的顺序自动执行更新操作, 更新操作结束后, 在本地存储更新操作结果并将所述更新操作结果返回管理端。 在本发明的一个实施例中, 本发明实施例提供的上述信息处理模块 310可 以包括: The update module 340 is configured to determine, from the client update information, a file that needs to be updated, and automatically perform an update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site, and storing the storage locally after the update operation ends. Update the operation result and return the update operation result to the management terminal. In an embodiment of the present invention, the information processing module 310 provided by the embodiment of the present invention may include:
分组信息获取子模块, 用于获取管理端的分组信息及更新信息; 其中, 所 述分组信息是管理端按照站点或服务的差异将客户端分割成若干组的信息, 分 组信息包括分组名称和客户端 ID列表; 所述更新信息包括分组名称和客户端实 际更新目录; a grouping information obtaining sub-module, configured to acquire grouping information and update information of the management terminal; wherein the grouping information is information that the management terminal divides the client into groups according to differences in sites or services, and the grouping information includes a group name and a client. ID list; the update information includes a group name and a client actual update directory;
分组比对子模块, 用于通过将客户端 ID与所述分组信息比对, 识别出客户 端所属的分组; a packet comparison submodule, configured to identify a packet to which the client belongs by comparing the client ID with the grouping information;
解析子模块, 用于根据客户端所属的分组从管理端的更新信息中解析出客 户端更新信息。 在本发明一个产品实施例中, 参见图 4, 进一步地在图 3所示的客户端结构 的基础上, 本发明实施例提供的另一种客户端 400, 还包括: The parsing submodule is configured to parse the client update information from the update information of the management terminal according to the group to which the client belongs. In a product embodiment of the present invention, referring to FIG. 4, further based on the client structure shown in FIG. 3, another client 400 provided by the embodiment of the present invention further includes:
备份模块 450, 用于在执行更新操作之前, 打包所述需要更新的文件得到归 档包, 在本地存储该归档包的备份信息并将所述备份信息返回管理端。 The backup module 450 is configured to: before the performing the update operation, package the file that needs to be updated to obtain an archive file, store the backup information of the archive package locally, and return the backup information to the management terminal.
在本发明另一个产品实施例中, 仍参见图 4, 本发明实施例提供的客户端 400, 还包括: In another embodiment of the present invention, referring to FIG. 4, the client 400 provided by the embodiment of the present invention further includes:
回滚模块 460,用于根据管理端的回滚执行信息,读取本地存储的备份信息, 将需要回滚的内容从归档包中释放以用于覆盖更新失败的文件; 按照停止站点、 停止服务、 恢复文件、 启动服务、 启动站点的顺序执行回滚操作, 回滚操作结
束后, 将回滚操作结果返回管理端。 其中, The rollback module 460 is configured to read the locally stored backup information according to the rollback execution information of the management end, and release the content that needs to be rolled back from the archive package to cover the file that fails to be updated; according to stopping the site, stopping the service, Recover files, start services, start the site in a sequence, perform a rollback operation, and roll back the operation After the bundle, return the result of the rollback operation to the management side. among them,
上述信息处理模块 310, 还用于获取管理端的回滚执行信息。 The information processing module 310 is further configured to acquire rollback execution information of the management end.
上述站点控制模块 320,还用于从所述回滚执行信息中判断出客户端中需要 停止、 启动、 或重启的站点。 The site control module 320 is further configured to determine, from the rollback execution information, a site in the client that needs to be stopped, started, or restarted.
上述服务控制模块 330 ,还用于从所述回滚执行信息中判断出客户端中需要 停止、 启动、 或重启的服务。 The service control module 330 is further configured to determine, from the rollback execution information, a service that needs to be stopped, started, or restarted in the client.
在本发明再一个产品实施例中, 仍参见图 4, 本发明实施例提供的客户端 400, 还包括: In still another embodiment of the present invention, referring to FIG. 4, the client 400 provided by the embodiment of the present invention further includes:
校验模块 470, 用于更新操作结束后, 从更新操作结果中获取更新后的文件 的信息-摘要算法 MD5值; 将所述 MD5值记录于本地文件中并向管理端返回该 MD5值以用于管理端对更新操作结果进行校验。 The verification module 470 is configured to: after the end of the update operation, obtain an information-summary algorithm MD5 value of the updated file from the update operation result; record the MD5 value in a local file, and return the MD5 value to the management end to use The update operation results are verified on the management side.
在本发明又一个产品实施例中, 仍参见图 4, 本发明实施例提供的客户端 400, 还包括: In still another embodiment of the present invention, referring to FIG. 4, the client 400 provided by the embodiment of the present invention further includes:
删除模块 480, 用于根据所述删除执行信息, 获取客户端需要删除的内容信 息; 执行删除操作, 并将删除操作结果返回管理端。 其中, The deleting module 480 is configured to obtain content information that the client needs to delete according to the deletion execution information; perform a deletion operation, and return the deletion operation result to the management terminal. among them,
上述信息处理模块 310, 还用于获取管理端的删除执行信息。 The information processing module 310 is further configured to acquire deletion execution information of the management terminal.
本发明产品实施例的客户端中各模块的具体工作方式, 可以参见上述本发 明方法实施例中的相关内容, 在此不再赘述。 基于与上述方法实施例相同的发明构思, 图 5 示出了根据本发明实施例的 一种多站点自动更新系统的结构框图。 如图 5 所示, 本发明实施例提供的一种 多站点自动更新的系统, 包括管理端 500和至少一个上述的客户端( 1, 2, ...N ); 其中, 所述管理端 500, 用于向客户端提供更新信息、 分组信息和执行信息, 并 保存操作记录。 For the specific working mode of each module in the client of the embodiment of the present invention, refer to the related content in the foregoing method embodiment of the present invention, and details are not described herein again. Based on the same inventive concept as the above method embodiment, FIG. 5 shows a block diagram of a multi-site automatic updating system according to an embodiment of the present invention. As shown in FIG. 5, a system for automatically updating a multi-site according to an embodiment of the present invention includes a management terminal 500 and at least one client (1, 2, ... N); wherein the management terminal 500 , used to provide update information, group information, and execution information to the client, and save the operation record.
管理端的执行信息, 包括更新执行信息、 回滚执行信息、 删除执行信息等, 通过管理端的交互界面向客户端下发, 指定客户端执行指定操作。 客户端将自 动执行的更新结果、 备份结果、 回滚结果、 MD5值、 删除结果返回给管理端, 管理端将这些操作执行结果记录于管理端文件。 综上所述, 本发明实施例提供的多站点自动更新方法、 客户端和系统, 通 过获取管理端的更新执行信息, 并依此解析出客户端更新信息, 解析出的客户
端更新信息能够区分站点、 服务和普通内容; 然后依据规范的站点命名原则和 应用命名原则, 从客户端更新信息中判断出客户端中需要停止、 启动、 或重启 的站点和 /或服务, 从而准确执行相关动作, 保证更新过程不出现站点异常; 接 着从客户端更新信息中确定出需要更新的文件, 按照停止站点、 停止服务、 更 新文件、 启动服务、 启动站点的顺序自动执行更新操作, 保证了安全、 快速、 准确的完成客户端上多个站点的自动更新; 更新操作结束后, 在本地存储更新 操作结果并将所述更新操作结果返回管理端, 以使得更新操作具有可追溯性。 由此可知, 本发明的技术方案能够解决现有技术中需要逐个站点手动进行更新 带来的问题, 在提高工作效率的同时, 也保证了多个站点自动更新的安全性、 准确性和可靠性。 The execution information of the management terminal, including the update execution information, the rollback execution information, and the deletion execution information, are delivered to the client through the interactive interface of the management terminal, and the specified client performs the specified operation. The client returns the automatically executed update result, the backup result, the rollback result, the MD5 value, and the deletion result to the management terminal, and the management terminal records the operation execution result in the management terminal file. In summary, the multi-site automatic update method, the client, and the system provided by the embodiment of the present invention obtain the update information of the management terminal, and parse out the client update information, and parse the client. The end update information can distinguish between the site, the service, and the normal content; and then, according to the standardized site naming principle and the application naming principle, the site and/or service in the client that needs to be stopped, started, or restarted is determined from the client update information, thereby Accurately perform related actions to ensure that there is no site exception during the update process; then determine the files that need to be updated from the client update information, and automatically perform the update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site, ensuring The automatic update of multiple sites on the client is completed securely, quickly and accurately; after the update operation ends, the update operation result is stored locally and the update operation result is returned to the management terminal, so that the update operation is traceable. It can be seen that the technical solution of the present invention can solve the problems in the prior art that need to be manually updated on a site-by-site basis, and improve the work efficiency, and also ensure the security, accuracy, and reliability of automatic update of multiple sites. .
进一步地, 管理端可以按照站点或服务的差异将客户端分割成若干组, 组 内客户端多为负载均衡配置, 不同的分组更新内容不同; 管理端通过向客户端 提供具有分组信息的更新信息, 能够减少更新信息的内容重复, 实现管理端对 多套负载均衡配置的客户端同时进行更新操作, 扩大了自动更新站点的数量规 模。 Further, the management terminal may divide the client into several groups according to the difference of the site or the service, and the clients in the group are mostly load balancing configurations, and different packet update contents are different; the management terminal provides the client with update information with group information. The content of the update information can be reduced, and the management side can update the client of multiple load balancing configurations at the same time, thereby expanding the number of automatic update sites.
进一步地, 在执行自动更新操作之前, 打包需要更新的文件得到归档包, 在本地存储该归档包的备份信息并将所述备份信息返回管理端的方案, 能够保 证多站点自动更新的安全性和可靠性。 Further, before performing the automatic update operation, packaging the file that needs to be updated to obtain an archive package, storing the backup information of the archive package locally, and returning the backup information to the management side, can ensure the security and reliability of the multi-site automatic update. Sex.
进一步地, 当客户端执行更新操作失败时, 通过执行回滚操作, 读取本地 备份信息, 将需要回滚的内容从归档包中释放并覆盖更新失败的文件, 回滚操 作结果返回管理端, 为多站点自动更新失败时提供了一种解决方案, 保证了多 站点自动更新方法的稳定性和可靠性。 Further, when the client performs the update operation, the local backup information is read by performing the rollback operation, the content that needs to be rolled back is released from the archive package, and the file that fails the update is overwritten, and the result of the rollback operation is returned to the management terminal. Provides a solution for multi-site automatic update failure, ensuring the stability and reliability of the multi-site automatic update method.
进一步地, 更新操作结束后, 从更新操作结果中获取更新后的文件的信息- 摘要算法 MD5值; 将所述 MD5值记录于本地文件中并向管理端返回该 MD5 值以用于管理端对更新操作结果进行校验的方案, 保证了多站点自动更新方法 的安全性和完整性。 Further, after the update operation ends, the information of the updated file is obtained from the update operation result - the digest algorithm MD5 value; the MD5 value is recorded in the local file and the MD5 value is returned to the management terminal for the management end pair The scheme of updating the operation results for verification ensures the security and integrity of the multi-site automatic update method.
进一步地, 客户端根据管理端的删除执行信息, 获取客户端需要删除的内 容信息, 执行删除操作, 并将删除操作结果返回管理端的方案, 保证了多站点 自动更新方法的完整性和安全性。 需要说明的是:
本发明的各个部件实施例可以以硬件实现, 或者以在一个或者多个处理器 上运行的软件模块实现, 或者以它们的组合实现。 本领域的技术人员应当理解, 可以在实践中使用微处理器或者数字信号处理器( DSP )来实现根据本发明实施 例中的一些或者全部部件的一些或者全部功能。 本发明还可以实现为用于执行 这里所描述的方法的一部分或者全部的设备或者装置程序 (例如, 计算机程序 和计算机程序产品)。 这样的实现本发明的程序可以存储在计算机可读介质上, 或者可以具有一个或者多个信号的形式。 这样的信号可以从因特网网站上下载 得到, 或者在载体信号上提供, 或者以任何其他形式提供。 Further, the client obtains the content information that the client needs to delete according to the deletion execution information of the management terminal, performs the deletion operation, and returns the deletion operation result to the management terminal, thereby ensuring the integrity and security of the multi-site automatic update method. It should be noted: The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
本文中所称的 "一个实施例"、 "实施例" 或者 "一个或者多个实施例" 意 味着, 结合实施例描述的特定特征、 结构或者特性包括在本发明的至少一个实 施例中。 此外, 请注意, 这里 "在一个实施例中" 的词语例子不一定全指同一 个实施例。 "an embodiment," or "an embodiment," or "an embodiment," In addition, it should be noted that the phrase "in one embodiment" herein does not necessarily refer to the same embodiment.
此外, 还应当注意, 本说明书中使用的语言主要是为了可读性和教导的目 的而选择的, 而不是为了解释或者限定本发明的主题而选择的。 因此, 在不偏 离所附权利要求书的范围和精神的情况下, 对于本技术领域的普通技术人员来 说许多修改和变更都是显而易见的。 对于本发明的范围, 对本发明所做的公开 是说明性的, 而非限制性的, 本发明的范围由所附权利要求书限定。
In addition, it should be noted that the language used in the specification has been selected for the purpose of reading and teaching, and is not intended to explain or limit the subject matter of the present invention. Therefore, many modifications and changes will be apparent to those skilled in the art without departing from the scope of the invention. The disclosure of the present invention is intended to be illustrative, and not restrictive, and the scope of the invention is defined by the appended claims.
Claims
1、 一种多站点自动更新方法, 其特征在于, 所述方法包括: A method for automatically updating a multi-site, the method comprising:
获取管理端的更新执行信息, 并依此解析出客户端更新信息; Obtaining the update execution information of the management terminal, and parsing the client update information accordingly;
依据规范的站点命名原则, 从客户端更新信息中判断出客户端中需要停止、 启动、 或重启的站点; According to the standard site naming principle, the site in the client that needs to be stopped, started, or restarted is determined from the client update information;
依据规范的应用命名原则, 从客户端更新信息中判断出客户端中需要停止、 启动、 或重启的服务; According to the standard application naming principle, the service that needs to be stopped, started, or restarted in the client is determined from the client update information;
从客户端更新信息中确定出需要更新的文件, 按照停止站点、 停止服务、 更新文件、 启动服务、 启动站点的顺序自动执行更新操作; Determine the files that need to be updated from the client update information, and automatically perform the update operation in the order of stopping the site, stopping the service, updating the file, starting the service, and starting the site;
更新操作结束后, 在本地存储更新操作结果并将所述更新操作结果返回管 理端。 After the update operation ends, the update operation result is stored locally and the update operation result is returned to the management side.
2、 根据权利要求 1所述的方法, 其特征在于, 所述获取管理端的更新执行 信息, 并依此解析出客户端更新信息包括: The method according to claim 1, wherein the obtaining the update execution information of the management terminal, and parsing the client update information according to the method includes:
获取管理端的分组信息及更新信息; 其中, 所述分组信息是管理端按照站 点或服务的差异将客户端分割成若干组的信息, 分组信息包括分组名称和客户 端 ID列表; 所述更新信息包括分组名称和客户端实际更新目录; Acquiring the grouping information and the update information of the management terminal; wherein the grouping information is information that the management terminal divides the client into groups according to the difference of the site or the service, where the group information includes a group name and a client ID list; the update information includes The group name and the actual update directory of the client;
通过将客户端 ID与所述分组信息比对, 识别出客户端所属的分组; 根据客户端所属的分组从管理端的更新信息中解析出客户端更新信息。 By comparing the client ID with the grouping information, the packet to which the client belongs is identified; and the client update information is parsed from the update information of the management terminal according to the group to which the client belongs.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述方法还包括: 在执行自动更新操作之前, 打包所述需要更新的文件得到归档包, 在本地 存储该归档包的备份信息并将所述备份信息返回管理端。 The method according to claim 1 or 2, wherein the method further comprises: before performing the automatic update operation, packaging the file that needs to be updated to obtain an archive package, and locally storing the backup information of the archive package. And return the backup information to the management terminal.
4、 根据权利要求 3所述的方法, 其特征在于, 所述方法还包括: 4. The method according to claim 3, wherein the method further comprises:
获取管理端的回滚执行信息; Obtaining the rollback execution information of the management terminal;
从所述回滚执行信息中判断出客户端中需要停止、 启动、 或重启的站点或 者服务; Determining, from the rollback execution information, a site or service in the client that needs to be stopped, started, or restarted;
根据所述回滚执行信息, 读取本地存储的备份信息, 将需要回滚的内容从 所述归档包中释放以用于覆盖更新失败的文件; And reading, according to the rollback execution information, the locally stored backup information, and releasing the content that needs to be rolled back from the archive package to cover the file that fails to be updated;
按照停止站点、 停止服务、 恢复文件、 启动服务、 启动站点的顺序执行回
Back in the order of stopping the site, stopping the service, restoring the file, starting the service, and starting the site
5、 根据权利要求 1或 2所述的方法, 其特征在于, 所述方法还包括: 更新操作结束后, 从更新操作结果中获取更新后的文件的信息-摘要算法 MD5值; The method according to claim 1 or 2, wherein the method further comprises: after the end of the updating operation, obtaining an information-digest algorithm MD5 value of the updated file from the update operation result;
将所述 MD5值记录于本地文件中并向管理端返回该 MD5值以用于管理端 对更新操作结果进行校验。 The MD5 value is recorded in a local file and the MD5 value is returned to the management terminal for the management side to verify the update operation result.
6、 根据权利要求 5所述的方法, 其特征在于, 所述方法还包括: The method according to claim 5, wherein the method further comprises:
获取管理端的删除执行信息; Obtain the deletion execution information of the management terminal;
根据所述删除执行信息, 获取客户端需要删除的内容信息; Obtaining content information that the client needs to delete according to the deletion execution information;
执行删除操作, 并将删除操作结果返回管理端。 Perform the delete operation and return the result of the delete operation to the management terminal.
7、 一种客户端, 其特征在于, 所述客户端还包括: A client, wherein the client further includes:
信息处理模块, 用于获取管理端的更新执行信息, 并依此解析出客户端更 新信息; An information processing module, configured to obtain update execution information of the management terminal, and parse the client update information accordingly;
站点控制模块, 用于依据规范的站点命名原则, 从客户端更新信息中判断 出客户端中需要停止、 启动、 或重启的站点; a site control module, configured to determine, from the client update information, a site in the client that needs to be stopped, started, or restarted according to the standard site naming principle;
服务控制模块, 用于依据规范的应用命名原则, 从客户端更新信息中判断 出客户端中需要停止、 启动、 或重启的服务; a service control module, configured to determine, according to a standard application naming principle, a service that needs to be stopped, started, or restarted in the client from the client update information;
更新模块, 用于从客户端更新信息中确定出需要更新的文件, 并按照停止 站点、 停止服务、 更新文件、 启动服务、 启动站点的顺序自动执行更新操作, 更新操作结束后, 在本地存储更新操作结果并将所述更新操作结果返回管理端。 An update module, configured to determine a file that needs to be updated from the client update information, and automatically perform an update operation in the order of stopping the site, stopping the service, updating the file, starting the service, starting the site, and storing the update locally after the update operation ends The result of the operation is returned to the management terminal.
8、 根据权利要求 7所述的客户端, 其特征在于, 所述信息处理模块包括: 分组信息获取子模块, 用于获取管理端的分组信息及更新信息; 其中, 所 述分组信息是管理端按照站点或服务的差异将客户端分割成若干组的信息, 分 组信息包括分组名称和客户端 ID列表; 所述更新信息包括分组名称和客户端实 际更新目录; The client according to claim 7, wherein the information processing module comprises: a grouping information obtaining sub-module, configured to acquire grouping information and update information of the management terminal; wherein the grouping information is The difference of the site or service divides the client into several groups of information, and the group information includes a group name and a client ID list; the update information includes a group name and a client actual update directory;
分组比对子模块, 用于通过将客户端 ID与所述分组信息比对, 识别出客户 端所属的分组; a packet comparison submodule, configured to identify a packet to which the client belongs by comparing the client ID with the grouping information;
解析子模块, 用于根据客户端所属的分组从管理端的更新信息中解析出客 户端更新信息。 The parsing submodule is configured to parse the client update information from the update information of the management terminal according to the group to which the client belongs.
9、 根据权利要求 7或 8所述的客户端, 其特征在于, 所述客户端还包括: 备份模块, 用于在执行更新操作之前, 打包所述需要更新的文件得到归档
包, 在本地存储该归档包的备份信息并将所述备份信息返回管理端。 The client according to claim 7 or 8, wherein the client further comprises: a backup module, configured to package the file to be updated to be archived before performing an update operation The package stores the backup information of the archive package locally and returns the backup information to the management terminal.
10、 根据权利要求 9所述的装置, 其特征在于, 10. Apparatus according to claim 9 wherein:
所述信息处理模块, 还用于获取管理端的回滚执行信息; The information processing module is further configured to acquire rollback execution information of the management end;
所述站点控制模块, 还用于从所述回滚执行信息中判断出客户端中需要停 止、 启动、 或重启的站点; The site control module is further configured to determine, from the rollback execution information, a site in the client that needs to be stopped, started, or restarted;
所述服务控制模块, 还用于从所述回滚执行信息中判断出客户端中需要停 止、 启动、 或重启的服务; The service control module is further configured to determine, from the rollback execution information, a service that needs to be stopped, started, or restarted in the client;
所述客户端还包括: The client also includes:
回滚模块, 用于根据所述回滚执行信息, 读取本地存储的备份信息, 将需 要回滚的内容从所述归档包中释放以用于覆盖更新失败的文件, 按照停止站点、 停止服务、 恢复文件、 启动服务、 启动站点的顺序执行回滚操作, 回滚操作结 束后, 将回滚操作结果返回管理端。 a rollback module, configured to read the locally stored backup information according to the rollback execution information, and release the content that needs to be rolled back from the archive package to cover the file that fails to be updated, according to stopping the site, stopping the service The file is restored, the service is started, the site is started, and the rollback operation is performed. After the rollback operation ends, the result of the rollback operation is returned to the management terminal.
11、 根据权利要求 7或 8所述的客户端, 其特征在于, 所述客户端还包括: 校验模块, 用于更新操作结束后, 从更新操作结果中获取更新后的文件的 信息-摘要算法 MD5值; 将所述 MD5值记录于本地文件中并向管理端返回该 MD5值以用于管理端对更新操作结果进行校验。 The client according to claim 7 or 8, wherein the client further comprises: a verification module, configured to obtain information of the updated file from the update operation result after the update operation ends - summary Algorithm MD5 value; record the MD5 value in a local file and return the MD5 value to the management terminal for the management side to verify the update operation result.
12、 根据权利要求 7所述的客户端, 其特征在于, 12. The client of claim 7 wherein:
所述信息处理模块, 还用于获取管理端的删除执行信息; The information processing module is further configured to acquire deletion execution information of the management terminal;
所述客户端还包括: The client also includes:
删除模块, 用于根据所述删除执行信息, 获取客户端需要删除的内容信息; 执行删除操作, 并将删除操作结果返回管理端。 The deleting module is configured to obtain content information that the client needs to delete according to the deletion execution information; perform a deletion operation, and return the deletion operation result to the management terminal.
13、 一种多站点自动更新系统, 其特征在于, 包括管理端和至少一个权利 要求 7-12任一项所述的客户端; 其中, 所述管理端, 用于向所述客户端提供更 新信息、 分组信息和执行信息, 并保存操作记录。
A multi-site automatic update system, comprising: a management terminal and at least one client according to any one of claims 7 to 12; wherein the management terminal is configured to provide an update to the client Information, grouping information, and execution information, and save operation records.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201480064008.2A CN105765908B (en) | 2014-06-30 | 2014-06-30 | A kind of multi-site automatic update method, client and system |
PCT/CN2014/081179 WO2016000137A1 (en) | 2014-06-30 | 2014-06-30 | Method, client and system for multi-site automatic update |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2014/081179 WO2016000137A1 (en) | 2014-06-30 | 2014-06-30 | Method, client and system for multi-site automatic update |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016000137A1 true WO2016000137A1 (en) | 2016-01-07 |
Family
ID=55018231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/081179 WO2016000137A1 (en) | 2014-06-30 | 2014-06-30 | Method, client and system for multi-site automatic update |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105765908B (en) |
WO (1) | WO2016000137A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110830554A (en) * | 2019-10-14 | 2020-02-21 | 珠海金山网络游戏科技有限公司 | Method and system for asynchronously and concurrently updating distributed node mirror image |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143295B (en) * | 2019-11-14 | 2024-01-30 | 泰康保险集团股份有限公司 | Policy information processing method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1280060A2 (en) * | 2001-07-28 | 2003-01-29 | Dresdner Kleinwort Wasserstein Limited | A system for managing a computer network |
CN101212336A (en) * | 2006-12-28 | 2008-07-02 | 上海广电Nec液晶显示器有限公司 | Automatic software update method for client, auxiliary method and related device |
CN101741905A (en) * | 2009-11-30 | 2010-06-16 | 曙光信息产业(北京)有限公司 | Rapid deployment method for cluster |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8589516B2 (en) * | 2009-09-10 | 2013-11-19 | Motorola Mobility Llc | Method and system for intermediating content provider website and mobile device |
CN102004778B (en) * | 2010-11-19 | 2012-02-29 | 清华大学 | A Text Index Online Update Method in Cloud Environment |
CN102479092A (en) * | 2010-11-30 | 2012-05-30 | 中兴通讯股份有限公司 | Method and device for updating patch of software system |
CN103186468B (en) * | 2013-04-10 | 2016-03-30 | 华为技术有限公司 | A kind of method and apparatus of verifying software upgrading accuracy |
-
2014
- 2014-06-30 WO PCT/CN2014/081179 patent/WO2016000137A1/en active Application Filing
- 2014-06-30 CN CN201480064008.2A patent/CN105765908B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1280060A2 (en) * | 2001-07-28 | 2003-01-29 | Dresdner Kleinwort Wasserstein Limited | A system for managing a computer network |
CN101212336A (en) * | 2006-12-28 | 2008-07-02 | 上海广电Nec液晶显示器有限公司 | Automatic software update method for client, auxiliary method and related device |
CN101741905A (en) * | 2009-11-30 | 2010-06-16 | 曙光信息产业(北京)有限公司 | Rapid deployment method for cluster |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110830554A (en) * | 2019-10-14 | 2020-02-21 | 珠海金山网络游戏科技有限公司 | Method and system for asynchronously and concurrently updating distributed node mirror image |
Also Published As
Publication number | Publication date |
---|---|
CN105765908A (en) | 2016-07-13 |
CN105765908B (en) | 2019-07-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10956389B2 (en) | File transfer system using file backup times | |
US11741046B2 (en) | Method and apparatus for creating system disk snapshot of virtual machine | |
US10810035B2 (en) | Deploying a cloud instance of a user virtual machine | |
US10895996B2 (en) | Data synchronization method, system, and apparatus using a work log for synchronizing data greater than a threshold value | |
US10229152B2 (en) | Automatically restoring data replication consistency without service interruption during parallel apply | |
US10949401B2 (en) | Data replication in site recovery environment | |
US11914480B2 (en) | Standbys for continuous data protection-enabled objects | |
US20170199903A1 (en) | System for backing out data | |
US20230147026A1 (en) | Bulk snapshot recovery | |
US12298944B2 (en) | System and method for eliminating full rescan synchronizations on service restarts | |
EP2542976B1 (en) | Method and apparatus of backing-up subversion repository | |
CN111625396A (en) | Backup data verification method, server and storage medium | |
WO2017198156A1 (en) | Service deployment method, apparatus and system | |
US10318385B2 (en) | Service recovery using snapshots and interservice messages | |
US9031969B2 (en) | Guaranteed in-flight SQL insert operation support during an RAC database failover | |
WO2016000137A1 (en) | Method, client and system for multi-site automatic update | |
CN103152381A (en) | Method and server system of processing browser corrupted data | |
US11074141B2 (en) | Database recovery using shared memory | |
WO2016180174A1 (en) | Method and apparatus for synchronizing voice files | |
CN114443354A (en) | File recovery method and device, electronic equipment and storage medium | |
CN111966532A (en) | Database management method and device, electronic equipment and medium | |
CN113722018B (en) | Jboss cache cleaning method and device | |
US12189626B1 (en) | Automatic query optimization | |
WO2023081886A1 (en) | Snapshot-based malware management | |
EP4430497A1 (en) | Snapshot-based malware management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14896651 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14896651 Country of ref document: EP Kind code of ref document: A1 |