WO2024001403A1 - 应用更新方法、装置及系统 - Google Patents
应用更新方法、装置及系统 Download PDFInfo
- Publication number
- WO2024001403A1 WO2024001403A1 PCT/CN2023/087216 CN2023087216W WO2024001403A1 WO 2024001403 A1 WO2024001403 A1 WO 2024001403A1 CN 2023087216 W CN2023087216 W CN 2023087216W WO 2024001403 A1 WO2024001403 A1 WO 2024001403A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- target program
- target
- updated
- version
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 121
- 230000004044 response Effects 0.000 claims description 82
- 230000006870 function Effects 0.000 claims description 34
- 230000015654 memory Effects 0.000 claims description 34
- 238000004590 computer program Methods 0.000 claims description 18
- 239000000523 sample Substances 0.000 description 222
- 230000008569 process Effects 0.000 description 21
- 238000004891 communication Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 17
- 206010047289 Ventricular extrasystoles Diseases 0.000 description 14
- 238000005129 volume perturbation calorimetry Methods 0.000 description 14
- 238000013461 design Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 4
- 239000007787 solid Substances 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004549 pulsed laser deposition Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Definitions
- the present application relates to the field of computer technology, and in particular to an application update method, device and system.
- a host application is an application that can provide external services (such as data processing, data forwarding and other services).
- the host application runs on a computer device (such as a server).
- the host application has a probe (agent) application (also called an agent application). While the host application is running, the probe application can implement functions related to the host application. For example, while the host application is running, the probe application can modify the bytecode or library functions of the host application, or extract the running parameters of the host application, etc.
- probe applications are frequently updated.
- the host application used to provide the service and its probe application will stop running, and the staff will update the versions of these probe applications. After that, Then restart these host applications and the updated probe application.
- This application provides an application update method, device and system, which can solve the problem that the current application update method is relatively single.
- the technical solution is as follows:
- the first aspect provides an application update system, including: a first application and a management center.
- the first application is used to send version information of at least one target program included in the first application to the management center.
- the first application includes multiple programs, and there is at least one target program in these programs.
- the at least one target program may be part of the multiple programs, or may be all of the multiple programs.
- the first application may send the version information of the at least one target program to the management center.
- the management center is configured to receive the version information of the at least one target program sent by the first application.
- the target program corresponding to the version information received by the management center may or may not be the target program to be updated.
- the first application is also configured to update the target program to be updated in at least one target program in the first application to the target version according to the identification of the version information of the target program to be updated received by the management center.
- the target program to be updated includes: a target program included in the first application and a target program included in the second application, and the first application and the second application have the same function.
- the target version may be the latest version or not, and this application does not limit this.
- the first application is not updated under the control of the staff, but is updated at least in the first application according to the identification of the version information of the target program to be updated received by the management center. a purpose
- the target program to be updated in the target program is updated to the target version.
- the update method of the first application in the application update system is different from the update method of the probe application in the related art. Therefore, the update method of the application is enriched.
- the first application is used to update the target program to be updated in at least one target program in the first application to the target version according to the identification of the version information of the target program to be updated received by the management center.
- the first operation and the second operation are executed sequentially.
- the first operation includes: filtering the version information of the target program to be updated from the version information received by the management center;
- the second operation includes: determining at least one of the first applications according to the identification of the version information of the target program to be updated. A target program in which updates are being made.
- the first application updates the updated target program to the target version.
- Both the first operation and the second operation may be performed by the management center, or both the first operation and the second operation may be performed by the first application, or the first operation may be performed by the management center and the second operation may be performed by the first application. .
- the management center when the first operation is performed by the management center and the second operation is performed by the first application, the management center is also configured to compare the version information of the target program and the target version information (information of the target version) to determine which of the multiple applications The above target program to be updated. Afterwards, the management center is also used to send an identification of the version information of the target program to be updated to the first application. After receiving these identifiers, the first application can perform the above-mentioned second operation according to these identifiers, and update the above-mentioned updated target program to the target version.
- the management center is also configured to: determine the target program to be updated in multiple applications by comparing the version information of the target program with the target version information; According to the identification of the version information of the target program to be updated, a target program to be updated among at least one target program in the first application is determined, and the identification of the target program to be updated is sent to the first application. After receiving these identifiers, the first application can update the updated target program indicated by these identifiers to the target version.
- the management center is also configured to determine the received version information of the target program to be updated in the second application, and send an identification of the version information of the target program to be updated in the second application to the first application.
- the first application is also configured to: receive these identifiers, and determine the target program to be updated in the first application by comparing the version information of the target program with the target version information, and then, according to the identifier of the target program to be updated in the first application and The received identification of the target program to be updated in the second application determines the target program to be updated among at least one target program in the first application.
- the host application of the first application and the host application of the second application are used to provide the same service.
- both the first application and the second application are probe applications, the functions of the first application and the second application are the same, and the services provided by the host applications of the first application and the second application are the same.
- the first application updates the target program to be updated in at least one target program in the first application to the target version according to the identification of the version information of the target program to be updated received by the management center
- the first application and the second application can If the target program in the program is not updated to the target version at the same time, then the host applications of the first application and the second application may not stop running at the same time, and the services provided by the host applications of the first application and the second application may not be interrupted.
- the host application of the first application and the host application of the second application may not be used to provide the same service, which is not limited in this embodiment of the present application.
- the identification of the version information of the target program to be updated includes the response number of the target program to be updated.
- the first application is used to: arrange the response numbers of the target program to be updated in the multiple applications from small to large, and arrange Among the target programs corresponding to the first n response numbers, the target program belonging to the first application is determined as the target program to be updated among at least one target program of the first application, and n is an integer greater than or equal to 1.
- the first application will periodically determine the target program to be updated among the multiple applications, and send the response of the target program to be updated.
- the numbers are arranged from small to large, and the target programs belonging to the first application are searched among the target programs corresponding to the first n response numbers, and when the target programs belonging to the first application are found, these target programs are regarded as the first application.
- the first application is used as an example to update the target version of the target program belonging to the first application among the target programs corresponding to the first n response numbers arranged from small to large.
- the first application may be used to update the target version of the target program belonging to the first application among the target programs corresponding to the first n response numbers arranged from large to small.
- the first application is used to arrange in a certain order the addresses of the devices on which the target programs to be updated in the multiple applications run, and assign the addresses of the first n target programs among the first n target programs belonging to the first application to The target version of the target program update.
- the application update system also includes: a configuration center.
- the first application is also used to send a subscription request to the configuration center, where the subscription request is used to indicate subscribing to the version information of the target program.
- the configuration center is used to send a subscription response to the first application, where the subscription response indicates that there is an update to the version information of the target program.
- the first application may determine based on the subscription response that there is an update to the version or version information of the target program.
- the first application may send a message to the management center to trigger the execution of the above first operation and the second operation.
- the first application may send the version information of at least one of the target programs to the management center.
- the first application is also used to obtain the download address of the target program from the configuration center, and obtain the target program of the target version from the software library according to the download address.
- the first application needs to update a certain target program to the target version, it can obtain the download address of the target program of the target version from the configuration center, and download the target program of the target version from the software library according to the download address, and then, according to the downloaded The target program of the target version updates the target program in the first application.
- an application update method is provided, which method can be executed by a first application (which can be understood as being executed by a device running the first application).
- the method includes: the first application includes at least After the version information of a target program is sent to the management center, the target program to be updated in the at least one target program is updated to the target version according to the identification of the target program to be updated received by the management center; wherein, the The target program to be updated includes: a target program included in the first application and a target program included in the second application, and the first application and the second application have the same function.
- the first application may also receive the information from the management center.
- the sent identification of the version information of the target program to be updated may also be updated.
- the host application of the first application and the host application of the second application are used to provide the same service.
- the identification of the version information of the target program to be updated includes the response number of the target program to be updated, and the first application receives the identification of the target program to be updated according to the management center,
- the response numbers of the target program to be updated can be arranged from small to large; and then the target programs corresponding to the first n response numbers belong to all the target programs.
- the target program of the first application is determined to be the target program to be updated in the at least one target program, n is an integer greater than or equal to 1; finally, the target program to be updated in the at least one target program is updated to the target program to be updated. Describe the target version.
- the first application may also send a subscription request to the configuration center, and receive the subscription sent by the configuration center.
- the subscription request is used to indicate a subscription to the version information of the target program; the subscription response indicates that there is an update to the version information of the target program.
- the first application can also obtain the download address of the target program from the configuration center, and obtain the target program of the target version from the software library according to the download address.
- the target version is the latest version.
- an application update method includes: a first application sending version information of at least one target program included in the first application to a management center; and the management center receiving the version information sent by the first application.
- the version information of the at least one target program then, the first application updates the updated target program in the at least one target program based on the identification of the version information of the target program to be updated received by the management center. is the target version; wherein the target program to be updated includes: a target program included in the first application and a target program included in the second application, and the first application and the second application have the same function.
- the The management center may also determine the target program to be updated by comparing the version information of the target program with the target version information, and send an identification of the version information of the target program to be updated to the first application.
- the host application of the first application and the host application of the second application are used to provide the same service.
- the identification of the version information of the target program to be updated includes a response number of the target program to be updated, and the first application responds according to the version information of the target program to be updated received by the management center.
- the response numbers of the target program to be updated can be arranged from small to large, and then the target corresponding to the first n response numbers is
- the target program belonging to the first application in the program is determined to be the target program to be updated in the at least one target program, n is an integer greater than or equal to 1; finally, the target program to be updated is updated to the target version .
- the first application may also send a subscription request to the configuration center, where the subscription request is used to indicate the need for the target program. to subscribe to the version information of the target program; the configuration center may also send a subscription response to the first application, where the subscription response indicates that there is an update to the version information of the target program.
- the first application may obtain the target version of the updated target program from the configuration center.
- the download address of the target program is obtained, and the target program of the target version is obtained from the software library according to the download address, and the target program is updated to the target version.
- the method further includes: the second application sending the included version information of at least one target program to the management center.
- the target version is the latest version.
- an application update device includes: a first sending module and an update module.
- the first sending module is used to send the version information of at least one target program included in the first application to the management center;
- the update module is used to send the at least one target program to the management center according to the identity of the target program to be updated received by the management center.
- the updated target program in one target program is updated to the target version;
- the target program to be updated includes: the target program included in the first application and the target program included in the second application, the first application and the third application.
- the two applications have the same functionality.
- the application update device further includes: a first receiving module, configured to update the target program to be updated in the at least one target program as the target according to the identification of the target program to be updated received by the management center. Before versioning, receive an identification of the version information of the target program to be updated sent by the management center.
- the host application of the first application and the host application of the second application are used to provide the same service.
- the identification of the version information of the target program to be updated includes the response number of the target program to be updated
- the update module is configured to: arrange the response numbers of the target program to be updated from small to large. ; Determine the target program belonging to the first application among the target programs corresponding to the first n response numbers as the target program to be updated in the at least one target program, n is an integer greater than or equal to 1; determine the at least one target program A target program to be updated in a target program is updated to the target version.
- the application updating device further includes a second sending module and a second receiving module.
- the second sending module is used to send a subscription request to the configuration center before the first sending module sends the version information of at least one target program included in the first application to the management center; the second receiving module is used to receive the version information sent by the configuration center.
- Subscription response the subscription request is used to indicate a subscription to the version information of the target program; the subscription response indicates that there is an update to the version information of the target program.
- the application update device also includes: an acquisition module and a download module.
- the acquisition module is used to obtain the download address of the target program from the configuration center, and the download module is used to obtain the target program of the target version from the software library according to the download address.
- the target version is the latest version.
- a computing device cluster including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute a program stored in the memory of the at least one computing device. Instructions to cause the cluster of computing devices to perform the method described in any design of the second aspect.
- a computing device cluster including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute a program stored in the memory of the at least one computing device. Instructions to cause the cluster of computing devices to perform the method described in any design of the third aspect.
- a computer-readable storage medium including computer program instructions.
- the computing device cluster performs the method described in any design of the second aspect. .
- a computer-readable storage medium including computer program instructions.
- the computing device cluster performs the method as described in any design of the third aspect. .
- a ninth aspect provides a computer program product containing instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to execute the method described in any design of the second aspect.
- a computer program product containing instructions is provided.
- the cluster of computing devices When the instructions are executed by a cluster of computing devices, the cluster of computing devices causes the cluster of computing devices to execute the method described in any design of the third aspect.
- Figure 1 is a schematic structural diagram of a service system provided by an embodiment of the present application.
- Figure 2 is a schematic structural diagram of an application update system provided by an embodiment of the present application.
- Figure 3 is a schematic structural diagram of another application update system provided by an embodiment of the present application.
- Figure 4 is a flow chart of an application update method provided by an embodiment of the present application.
- Figure 5 is a schematic structural diagram of another application update system provided by an embodiment of the present application.
- Figure 6 is a flow chart of another application update method provided by an embodiment of the present application.
- Figure 7 is a schematic diagram of an application update process provided by an embodiment of the present application.
- Figure 8 is a schematic diagram of another application update process provided by an embodiment of the present application.
- Figure 9 is a schematic structural diagram of another application update system provided by an embodiment of the present application.
- Figure 10 is a schematic diagram of another application update process provided by an embodiment of the present application.
- Figure 11 is a schematic diagram of another application update process provided by an embodiment of the present application.
- Figure 12 is a schematic diagram of another application update process provided by an embodiment of the present application.
- Figure 13 is a schematic diagram of another application update process provided by an embodiment of the present application.
- Figure 14 is a schematic diagram of another application update process provided by an embodiment of the present application.
- Figure 15 is a schematic structural diagram of an application update device provided by an embodiment of the present application.
- Figure 16 is a schematic diagram of a computing device provided by an embodiment of the present application.
- Figure 17 is a schematic diagram of a computing device cluster provided by an embodiment of the present application.
- Figure 18 is a schematic diagram of another computing device cluster provided by an embodiment of the present application.
- Embodiments of the present application provide a service system.
- the service system usually includes multiple host applications and probe (agent) applications of the host applications.
- probe application When the probe application is running, the host application of the probe application also runs, and the probe application stops running. , the host application of the probe application also stops running.
- the host application can provide external services (such as data query service, data storage service or data calculation service, etc.).
- the probe application can implement functions related to the host application at runtime. For example, the probe application can modify the bytecode or library functions of the host application, or extract parameters (such as running logs) of the host application.
- Host applications and probe applications run on computer devices (such as servers or server clusters, also called service nodes). It can be understood that a host application may have one or more probe applications, and the embodiment of the present application does not limit the number of probe applications of the host application.
- the service system includes three host applications, and these three host applications run on different devices.
- the number of host applications in the service system may not be 3.
- the number may be 1, 2, 10 or 100, etc.
- one or more host applications may run on a device, and the services provided by the multiple host applications may be the same or different.
- the host applications running on different devices may be the same or different. This is not limited in the embodiments of the present application. .
- the probe application will be updated frequently.
- the host application used to provide the service and its probe application running in the service system stop running, and the staff will update these probes.
- the application performs a version update, and then restarts these host applications and the updated probe application.
- the host applications used to provide a certain service stop running the service provided by the service system is interrupted.
- the embodiment of the present application provides an application update system, which provides a new application update method and enriches the application update method. Moreover, the application update system can ensure that the services provided by the host application are not interrupted during the probe application update process, thereby improving the reliability of the services provided by the application update system. The application update system can also realize automated updates of probe applications, reduce manual operation and maintenance costs, and reduce the probability of errors during the application update process.
- the application update system provided by the embodiment of the present application includes: multiple applications and a management center 02 (the management center is also called a management node).
- the multiple applications include application 01A and application 01B as an example.
- the multiple applications may all be the above-mentioned probe applications. Of course, they may not all be probe applications.
- the management center 02 may be a device such as a server or a server cluster.
- the multiple applications include a first application and a second application.
- application 01A is the first application and application 01B is the second application.
- the first application and the second application have the same functionality.
- the first application is used to send version information of at least one target program included in the first application to the management center 02 .
- the first application includes multiple programs, and there is at least one target program in these programs.
- the at least one target program may be part of the multiple programs, or may be all of the multiple programs.
- the first application may send the version information of the at least one target program to the management center 02 .
- the management center 02 is configured to receive the version information of the at least one target program sent by the first application.
- the first application can be any application among multiple applications. Therefore, multiple applications can send version information of at least one target program in the application to the management center.
- the management center can receive the version information sent by each application. Version information of at least one target program in the application.
- the management center may not only receive the version information of at least one target program in the first application sent by the first application, but also receive the version information of at least one target program in the second application sent by the second application.
- the target program corresponding to the version information received by the management center may or may not be the target program to be updated.
- the first application is also configured to update the target program to be updated in at least one target program in the first application to the target version according to the identification of the version information of the target program to be updated received by the management center.
- the target program to be updated includes: a target program included in the first application and a target program included in the second application.
- the target version may be the latest version, or may not be the latest version, which is not limited in the embodiments of this application.
- the first application and the second application have the same functions, and both send version information of at least one target program to the management center, and there is a target program to be updated in both the first application and the second application.
- the first application may update the target program to be updated in the first application to the target version (that is, update the version of the target program to the target version) according to the identification of the version information of the target program to be updated received by the management center.
- the first application is any application among the plurality of applications. Therefore, each application among the plurality of applications may have the same function as the first application.
- the embodiments of the present application will not be described in detail here.
- the first application is not updated under the control of the staff, but is updated according to the identification of the version information of the target program to be updated received by the management center.
- the updated target program in at least one target program in the first application is updated to the target version.
- the update method of the first application in the application update system is different from the update method of the probe application in the related art. Therefore, the update method of the application is enriched.
- the first application is used to update the target program according to the information received by the management center.
- the identifier of the version information is used to update the updated target program in at least one target program in the first application to the target version.
- the first operation and the second operation are executed sequentially.
- the first operation includes: filtering the version information of the target program to be updated from the version information received by the management center;
- the second operation includes: determining at least one of the first applications according to the identification of the version information of the target program to be updated. A target program in which updates are being made.
- the first application updates the updated target program to the target version.
- Both the first operation and the second operation may be performed by the management center, or both the first operation and the second operation may be performed by the first application, or the first operation may be performed by the management center and the second operation may be performed by the first application. .
- the management center when the first operation is performed by the management center and the second operation is performed by the first application, the management center is also configured to compare the version information of the target program and the target version information (information of the target version) to determine which of the multiple applications The above target program to be updated. Afterwards, the management center is also used to send an identification of the version information of the target program to be updated to the first application. After receiving these identifiers, the first application can perform the above-mentioned second operation according to these identifiers, and update the above-mentioned updated target program to the target version.
- the management center is also configured to: determine the target program to be updated in multiple applications by comparing the version information of the target program with the target version information; According to the identification of the version information of the target program to be updated, a target program to be updated among at least one target program in the first application is determined, and the identification of the target program to be updated is sent to the first application. After receiving these identifiers, the first application can update the updated target program indicated by these identifiers to the target version.
- the management center is also configured to determine the received version information of the target program to be updated in the second application, and send an identification of the version information of the target program to be updated in the second application to the first application.
- the first application is also configured to: receive these identifiers, and determine the target program to be updated in the first application by comparing the version information of the target program with the target version information, and then, according to the identifier of the target program to be updated in the first application and The received identification of the target program to be updated in the second application determines the target program to be updated among at least one target program in the first application.
- the management center will send to the first application the identification of the version information of the target program to be updated in other applications among the multiple applications except the first application that the management center has received.
- the first application needs to determine by itself the target program to be updated among at least one target program in the first application, and determine the first application based on the identification of the target program determined by the first application and the identification of the target programs to be updated in other applications.
- the target program for updating in the application is
- the host application of the first application and the host application of the second application are used to provide the same service.
- both the first application and the second application are probe applications, the functions of the first application and the second application are the same, and the services provided by the host applications of the first application and the second application are the same.
- the first application updates the target program to be updated in at least one target program in the first application to the target version according to the identification of the version information of the target program to be updated received by the management center
- the first application and the second application can If the target program in the program is not updated to the target version at the same time, then the host applications of the first application and the second application may not stop running at the same time, and the services provided by the host applications of the first application and the second application may not be interrupted.
- the host application of the first application and the host application of the second application may not be used to provide the same service, which is not limited in this embodiment of the present application.
- the identification of the version information of the target program to be updated includes the response number of the target program to be updated.
- the first application is used to: arrange the response numbers of the target program to be updated in the multiple applications from small to large, and arrange Among the target programs corresponding to the first n response numbers, the target program belonging to the first application is determined as the target program to be updated among at least one target program of the first application, and n is an integer greater than or equal to 1.
- the target programs corresponding to the first n response numbers there may be a target program belonging to the first application, or there may not be a target program belonging to the first application.
- the target programs corresponding to the previous n response numbers are As an example, there is a target program belonging to the first application.
- the first application will not update the target program therein.
- the first application will periodically determine the target programs to be updated in multiple applications, arrange the response numbers of the target programs to be updated from small to large, and search for the target programs corresponding to the first n response numbers that belong to the first nth application.
- Target programs of an application are found, and when target programs belonging to the first application are found, these target programs are used as target programs to be updated in the first application.
- the first application may stop periodically performing these operations.
- the first application will periodically determine the target programs to be updated in multiple applications, arrange the response numbers of the target programs to be updated from small to large, and locate the target program corresponding to the smallest response number. During the first application, the first application will update the version of the target program corresponding to the minimum response number to the target version.
- the target version of the target program updated by the first application belonging to the first n response numbers among the target programs corresponding to the first n response numbers arranged by the first application in ascending order is taken as an example.
- the first application may be used to update the target version of the target program belonging to the first application among the target programs corresponding to the first n response numbers arranged from large to small.
- the first application is used to arrange in a certain order the addresses of the devices on which the target programs to be updated in the multiple applications run, and assign the addresses of the first n target programs among the first n target programs belonging to the first application to The target version of the target program update.
- the application update system 0 also includes: a configuration center 03, which is also called a configuration node.
- the first application is also used to send a subscription request to the configuration center 03, where the subscription request is used to indicate subscribing to the version information of the target program.
- the configuration center 03 is configured to send a subscription response to the first application, where the subscription response indicates that there is an update to the version information of the target program.
- the first application may determine based on the subscription response that there is an update to the version or version information of the target program.
- the first application may send a message to the management center to trigger the execution of the above first operation and the second operation.
- the first application may send the version information of at least one of the target programs to the management center.
- This application does not limit the timing when the first application sends a subscription request to the configuration center, and when the first application sends the version information of at least one target program to the management center.
- the first application may send a subscription request to the configuration center after being started.
- the first application may also send version information of at least one target program to the management center after being started.
- the first application may first send a subscription request to the configuration center after being started, and then send the version information of at least one target program to the management center.
- after the first application is started it first sends a subscription request to the configuration center and receives a subscription response sent by the configuration center, and then sends the version information of at least one target program in the first application to the management center.
- the first application sends a subscription request to the configuration center and determines based on the subscription response that there is an update to the version or version information of the target program.
- the first application may not send a subscription request to the configuration center. Determine whether there is an update to the target program's version or version information based on the subscription response. For example, the first application determines whether there is an update to the version of the target program or the version information according to the user's instruction.
- the first application is also used to obtain the download address of the target program from the configuration center, and obtain the target program of the target version from the software library (not shown in the drawing) according to the download address.
- the first application needs to update a certain target program to the target version, it can obtain the download address of the target program of the target version from the configuration center, and download the target program of the target version from the software library according to the download address, and then, according to the downloaded The target version of the target program, for the target program in the first application order to update.
- the first application and the second application can be implemented through software, and the management center, configuration center and software library can all be implemented through software, or can be implemented through hardware.
- the implementation methods of the first application and the management center are introduced respectively.
- the implementation method of the second application can refer to the implementation method of the first application
- the implementation method of the configuration center and software library can refer to the implementation method of the management center.
- a module is an example of a software functional unit.
- the first application may include code running on a computing instance.
- the computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Further, the above computing device may be one or more.
- the first application may include code running on multiple hosts/virtual machines/containers. It should be noted that multiple hosts/virtual machines/containers used to run the application can be distributed in the same region (region) or in different regions. Multiple hosts/VMs/containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple geographical locations Close data center.
- AZ availability zone
- a region can include multiple AZs.
- the multiple hosts/VMs/containers used to run the code can be distributed in the same virtual private cloud (VPC), or across multiple VPCs.
- VPC virtual private cloud
- usually a VPC is set up in a region. Cross-region communication between two VPCs in the same region or between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway.
- the management center can include code that runs on computing instances.
- the computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Further, the above computing device may be one or more.
- a management center can include code running on multiple hosts/VMs/containers. It should be noted that multiple hosts/virtual machines/containers used to run the application can be distributed in the same region (region) or in different regions. Multiple hosts/VMs/containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple geographical locations Close data center. Among them, usually a region can include multiple AZs.
- the multiple hosts/VMs/containers used to run the code can be distributed in the same virtual private cloud (VPC), or across multiple VPCs.
- VPC virtual private cloud
- Cross-region communication between two VPCs in the same region or between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway.
- the management center may include at least one computing device, such as a server.
- the management center can also be a device implemented using an application specific integrated circuit (ASIC) or a programmable logic device (PLD).
- ASIC application specific integrated circuit
- PLD programmable logic device
- the above-mentioned PLD can be a complex programmable logic device (CPLD), a field programmable gate array (field programmable gate array, FPGA), a general array logic (generic array logic, GAL) device, or any combination thereof.
- CPLD complex programmable logic device
- FPGA field programmable gate array
- GAL general array logic
- Multiple computing devices included in the management center can be distributed in the same region or in different regions.
- Multiple computing devices included in the management center can be distributed in the same AZ or in different AZs.
- multiple computing devices included in the management center can be distributed in the same VPC or in multiple VPCs.
- the plurality of computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
- the embodiment of the present application also provides an application update system executed by the application update system. application update method.
- FIG. 4 is a flow chart of an application update method provided by an embodiment of the present application.
- the application update method provided by an embodiment of the present application will be explained below by taking the application update method shown in FIG. 4 as an example.
- the application update method includes:
- the first application sends version information of at least one target program included in the first application to the management center.
- the second application sends the version information of at least one target program included in the second application to the management center.
- first application and the second application have the same functions, and the host application of the first application and the host application of the second application are used to provide the same service.
- the first application and the second application may send the version information of at least one target program to the management center after being started.
- the first application and the second application will first send a subscription request to the configuration center.
- the subscription request is used to indicate a subscription to the version information of the target program, and receive a subscription response sent by the configuration center.
- the subscription response indicates the version information of the target program.
- the version information is updated; after that, the first application and the second application can send the version information of at least one of the target programs to the management center according to the received subscription response.
- the management center will receive the version information of at least one of the target programs sent by the application for which the target program has an update.
- the management center determines the target program to be updated by comparing the version information of the target program with the target version information; wherein the target program to be updated includes: the target program included in the first application and the target program included in the second application.
- the management center will receive the version information of the target program sent by each application, and the management center will compare the received version information with the target version information to determine the target program to be updated in these applications.
- the management center sends the identification of the version information of the target program to be updated to the first application.
- the first application updates the target program to be updated in at least one target program in the first application to the target version according to the identification of the version information of the target program to be updated received by the management center.
- the identification of the version information of the target program to be updated includes the response number of the target program to be updated.
- the first application may arrange the response numbers of the target program to be updated from small to large, and add the first n
- the target program belonging to the first application among the target programs corresponding to the response number is determined to be the target program to be updated in at least one target program, and n is an integer greater than or equal to 1; after that, the first application updates the target program to be updated as target version.
- the first application when updating the target program to the target version, can obtain the download address of the target program of the target version from the configuration center, and obtain the target program of the target version from the software library according to the download address, and Update the target program to the target version.
- FIG. 5 is a schematic structural diagram of another application update system provided by an embodiment of the present application
- FIG. 6 is a flow chart of another application update method provided by an embodiment of the present application.
- the method shown in Figure 6 can be used in the application update system shown in Figure 5.
- the method shown in Figure 6 takes the update process of the target probe application of the target host application as an example.
- the update process of any probe application of any host application in the application update system can refer to the target probe application of the target host application. update process.
- the application update method includes:
- the basic program of the target probe application sends a request for obtaining the download address of the latest version of the target program in the target probe application to the configuration center.
- the target probe application includes a base program and a target program, and the base program in different versions of the target probe application is the same, but the target program is different.
- This target program is the core part of the target probe application.
- the basic program in the target probe application After the basic program in the target probe application is run, it will send an acquisition request to the configuration center to request the download address of the latest version of the target program in the target probe application. For example, as shown in Figure 7, it is assumed that the three host applications are all target host applications, and the three probe applications are all target probe applications. Then, after the basic program of the target probe application is run in S101, the three basic programs will send a request to obtain the download address of the latest version of the target program to the configuration center 02 in S102.
- the configuration center sends the download address of the latest version of the target program in the target probe application to the basic program of the target probe application according to the acquisition request.
- the configuration center stores the download address of the latest version of the target program in the target probe application. After receiving the acquisition request, the configuration center will send the download address to the basic program according to the acquisition request. For example, as shown in Figure 8, after the scenario shown in Figure 7, the configuration center 03 will send the download address of the latest version of the target program to the three basic programs in S102.
- the acquisition request sent by the basic program can also carry the address of the device on which the basic program runs, and the configuration center can send the above download address to the basic program based on the address.
- the basic program of the target probe application downloads the latest version of the target program according to the download address of the latest version of the target program in the target probe application.
- the basic program of the target probe application After the basic program of the target probe application receives the download address sent by the configuration center, it can download the latest version of the target program in the target probe application based on the download address.
- the application update system can also include a software library 04.
- the basic program of the target probe application can be downloaded in the software library 04 according to the above download address. Download the latest version of the target program in the target probe application.
- the basic programs in the three target probe applications will download the latest version of the target program from the software library 04 according to the received download address in S104. .
- the basic program of the target probe application can store the downloaded latest version of the target program (for example, on a local disk), and then trigger the latest version of the target program. run. For example, as shown in Figure 11, after the scenario shown in Figure 10, the latest version of the target program will be run. In this way, the basic program in the target probe application and the latest version of the target program in the target probe application are all running. Since various versions of the target probe application have the same basic program, they are equivalent to the target The latest version of the probe application is running.
- the target program in the target probe application can be obtained through the above S101 to S103 method.
- the latest version of. In this way, when the staff configures the target probe application on the device for the first time, they only need to configure the basic program without configuring the target program, which reduces the staff's configuration pressure.
- the target host application can provide target services to the outside, and the target probe application can also implement functions related to the target host application.
- the target probe application can modify the bytecode or library functions of the target host application, or extract the parameters of the target host application (such as running logs).
- the target probe application sends the version information of the target program to the management center.
- the version information includes: the identification of the target program, the version number of the target program, the identification of the target service used by the target host application, and the version information. number.
- the target probe application will send the version information of the target program to the management center.
- the three target probe applications will send the version information of the target programs to the management center 02 in S104.
- the version information of the target program can also be called instance information.
- the version information of the target program includes: the identification of the target program, the version number of the target program, the identification of the target service provided by the target host application of the target probe application, and the number of the version information (Identity document, ID ).
- the number of the version information can also be called the response number, and the response numbers of different versions of information are different.
- the identifier of the target service may be: the service name of the target service, or the identifier of the target host application (host applications used to provide the same service have the same identifier).
- the version information may also include other information related to the running of the target probe application, such as at least one of the address of the device on which the target probe application runs, and the timestamp of the target probe application running the target program. kind of information.
- the version information of the target program is: the registration information of the target probe application.
- the above-mentioned management center used to receive the version information can also be called a registration center.
- the version information of the target program needs to include content related to target probe application registration.
- the target probe application stops running the target probe application needs to send the deregistration information of the target probe application to the management center to register with the management center, so that the management center can delete the registration information of the target probe application, or, The registration information of the target probe application is deregistered and marked.
- the target probe application sends a subscription request to the configuration center.
- the subscription request carries the identification and version number of the target program in the target probe application.
- the target probe application After the target probe application is run, it can also send a subscription request to the configuration center.
- the subscription request carries the identification and version number of the target program in the target probe application. For example, as shown in Figure 12, after the scenario shown in Figure 11, the three target probe applications will send subscription requests to the configuration center 03 in S105.
- the version number of the target program carried in the subscription request may be the version number attached by the configuration center when sending the download address to the basic program of the target probe application in S102, or the version number of the target program carried in the subscription request may be the version number of the target probe in S103.
- the embodiment of the present application does not limit the version number attached to the target program downloaded for the basic program of the application.
- the target probe application may be updated, and accordingly, the target program in the target probe application may also be updated.
- the configuration center can obtain the version number of the latest version of the target program.
- the staff can configure the identification of the target program and the version number of the latest version of the target program on the configuration center.
- the subscription request is used to request that when the version number of the target program carried in the subscription request is different from the version number of the latest version of the target program, a subscription response is sent to the target probe application that sent the subscription request.
- the configuration center sends a subscription response to the target probe application.
- the configuration center After receiving the subscription request sent by the target probe application, the configuration center can obtain the version number of the target program carried in the subscription request, and periodically compare the version number with the version number of the latest version of the target program. in comparison When the result is different, the configuration center can send a subscription response to the target probe application. When the comparison result is the same, the configuration center does not need to send the subscription response to the target probe application.
- the configuration center 03 determines that the version number of the target program carried in the three subscription requests sent by the three target probe applications is the same as the version number of the target program. If the version numbers of the latest versions are different, the configuration center 03 can send subscription responses to the three target probe applications respectively.
- the above subscription request may also carry the address of the device on which the target probe application runs, and the configuration center may send a subscription response to the target probe application based on the address.
- the target probe application determines, based on the subscription response, that the version of the target program in the target probe application is not the latest version.
- the target probe application After receiving the subscription response sent by the configuration center, the target probe application can determine that the version of the target program in the target probe application is not the latest version. At this time, the version of the target probe application is also not the latest version.
- the application update method provided by the embodiment of the present application may not include S105 to S107, but the target probe application uses other methods to determine that the version of the target program in the target probe application is not the latest version. For example, when the latest version of the target program in the target probe application changes, the configuration center can send the latest version of the target program to the target probe application, and the target probe application can compare the version of the target program with the received latest version. A comparison is made to determine whether the version of the target program in the target probe application is the latest version.
- the target probe application After determining that the version of the target program in the target probe application is not the latest version, the target probe application can update the version of the target program through subsequent operations.
- the target probe application sends a query request to the management center.
- the query request is used to request the version information of multiple target programs to be updated received by the management center; where the version information of the multiple target programs all include the target program.
- the identifier and the identifier of the target service, and the included version number is different from the version number of the latest version of the target program.
- the target probe application may first send a query request to the management center to query the version information of the multiple target programs received by the management center.
- each probe application in the application update system will send the version information of the target program to the management center when executing S104.
- the management center can receive multiple version information.
- the management center After receiving the query request sent by the target probe application, the management center can search for the version information of the multiple target programs mentioned above in the version information received by the management center.
- the probe applications to which the multiple target programs belong are all running probe applications. If the probe application to which a target program belongs stops running after being started, the target program does not belong to the multiple target programs.
- the version information of the multiple target programs all includes the identifier of the target program and the identifier of the target service. If a certain version information does not include the identifier of the target service and/or the identifier of the target program, then the version information does not belong to the multiple target programs. version information.
- the version information of the multiple target programs includes a version number of the target program that is different from a version number of the latest version of the target program. If the version information of a certain target program includes the same version number of the target program as the latest version of the target program, then the version information does not belong to the version information of the multiple target programs.
- the version information received by the management center is as shown in Table 1.
- the version information includes: 7 versions of information numbered 1 to 7.
- the version information numbered 1 to 4 is the version information of the target program in the host application used to provide service A
- the version information numbered 5 to 7 is the target program in the host application used to provide service B.
- the target program identifiers in the version information numbered 1 to 4 are all T1
- the identifiers of the target programs in the version information numbered 5 to 7 are The identifiers of the target programs in the version information are all T2.
- the version numbers of the target program in the version information numbered 1 to 3 and 5 to 7 are all 0.1, while the version number of the target program in the version information numbered 4 is 0.2. If the version information of the target program is version information numbered 1, and the latest version of the target program in the target probe application is 0.2, the management center can determine the version information numbered 1, 2, and 3 in Table 1 It is the version information of the above multiple target programs.
- the management center sends a query response to the target probe application according to the query request, and the query response carries the version information of the multiple target programs.
- the management center After receiving the query request, the management center can query the version information of the multiple target programs mentioned above, and carry the queried version information in the query response and send it to the target probe application.
- the query response sent by the management center may only carry the version information of the multiple target programs mentioned above; or, the query response may carry all the version information received by the management center.
- the target probe application can Find the version information of the above multiple target programs in these version information.
- the management center may first search for the version information of the currently running target program. For example, when the above version information is registration information, if a probe application currently stops running after being started, then when the target probe application is registered in the management center, the management center will delete the version information of the target program; in this way As a result, all version information stored on the management center is the version information of the running target program. For another example, when the above version information is registration information, if a probe application currently stops running after being started, then when the target probe application is registered in the management center, the management center will perform the version information of the target program.
- the management center can determine that the version information without deregistration mark is the version information of the target program that is running. For another example, when the above version information is not registration information, the management center can detect whether each target program is in a running state, and then find the version information of the target program in a running state based on the detection results.
- the management center After finding the version information of the target program that is currently running, the management center can search the version information for version information that includes the identification of the target service and the identification of the target program. Afterwards, the management center can search for the version information of the above-mentioned multiple target programs in these version information.
- the target probe application may also use other methods different from S108 and S109 to obtain the version information of the multiple target programs.
- the management center will periodically send the version information it receives to each target probe application.
- the target probe application can send the version information from the management center after determining that the version of the target program in the target probe application is not the latest version. Extract the version information of the above multiple target programs from the information.
- the target probe application determines whether the update conditions are satisfied based on the version information of the multiple target programs to be updated; the update conditions include: the number of the version information of the target program in the target probe application is the version of the multiple target programs to be updated. The smallest number among the numbers of the message.
- S108 is executed; when the update condition is satisfied, S101 is executed.
- the target probe application can determine whether the number of the version information of the target program is: the smallest number among the numbers of the version information of the multiple target programs. If the number of the version information of the target program in the target probe application is the minimum number, the target probe application determines that the update condition is met. If the number of the version information of the target program in the target probe application is not the minimum number, the target probe application determines that the update condition is not satisfied.
- the version information of the above-mentioned multiple target programs is: version information numbered 1 to 3. If the version information of the target program in the target probe application is version information numbered 1, then since number 1 is the smallest number among numbers 1 to 3, the target probe application determines that the update condition is satisfied. If the version information of the target program in the target probe application is version information numbered 2, since number 2 is not the smallest number among numbers 1 to 3, the target probe application determines that the update condition is not satisfied.
- the target probe application When the target probe application determines that the update condition is not met, it will repeatedly execute S108 to S110 until it determines that the update condition is met. For example, when the target probe application determines that the update condition is not met, it will repeatedly execute S108 to S110 after waiting for the target time.
- the target probe application When the target probe application determines that the update conditions are met, it can repeatedly perform S101 and subsequent operations to restart the target probe application. After repeatedly executing S101 to S103, the target probe application can obtain the latest version of the target program, and then update the version of the target program to the latest version, and update the version of the target probe application to the latest version.
- the target program of the target probe application when other probe applications repeatedly execute S108 to S110, the multiple target programs to be updated no longer include the targets in the target probe application. program. Furthermore, the target probe application only updates the target program of the target probe application when it determines that the update condition is met. Since the update condition is that the number of the version information of the target program in the target probe application is the above-mentioned minimum number, therefore, the The target programs applied by multiple probes will be updated in the order of increasing version information numbers.
- the target programs in these three probe applications will be updated in sequence, and these three probe applications will be updated in sequence.
- the update process shown in Figure 14 only one probe is updated at a time, and two probes are not updated.
- the host applications of the two probe applications that have not been updated can continue to provide services to the outside world, thereby avoiding the interruption of services provided by the three host applications caused by simultaneous updates of three probe applications.
- the target probe application will send the version information of the target program to the management center. Furthermore, the version information includes: the version number of the target program, and the identification of the target service provided by the target host application.
- the target probe application can update the target program in the target probe application according to the number of the version information received by the management center, so that multiple The version of the target program in the probe application is not updated at the same time. In this way, the target service-associated The problem of target service interruption caused by simultaneous updates of all target probe applications can ensure that the target service is not interrupted on the premise of updating the target probe applications.
- the update condition may also include: the number of the version information of the target program in the target probe application is the largest number among the numbers of the version information of multiple target programs to be updated.
- the target programs of the multiple probe applications can be updated in order of decreasing numbers of version information. It can be seen that in the embodiment of the present application, the target programs of the multiple probe applications can be updated sequentially according to the target order.
- the target order can be the order in which the numbers of the version information decrease in order, or it can also be the order in which the numbers of the version information increase in order. order.
- the target programs of the multiple probe applications can also be updated sequentially in another order different from the target order, for example, in a certain order according to the addresses of the devices where the target probe applications run, etc.
- the target probe application may not use the method in S108 to S110 to determine when the target program of the target probe application is updated. For example, the target probe application may first determine the update time of the target program of the target probe application based on the version information numbers of the multiple target programs, and then update the target program of the target probe application at this time. The order in which the target programs of the multiple probe applications are updated is related to the number of the version information, so that the target programs of the multiple probe applications are updated in sequence.
- the target programs of the above multiple probe applications may not be updated sequentially.
- the multiple probe applications are divided into multiple groups of target probe applications, each group of target probe applications includes at least two probe applications, and the target programs of the multiple groups of target probe applications are updated sequentially.
- the target programs of at least two target probe applications are updated each time, and the target programs of the multiple probe applications are updated multiple times.
- the embodiments of the present application do not limit the update order of the target programs of the multiple probe applications, but the target programs of the multiple probe applications are not updated to the latest version of the target probe application at the same time, thereby ensuring that the target Service is uninterrupted.
- the version information of the target program sent by the target probe application includes the number of the version information.
- the version information may not include the number of the version information.
- the management center After receiving the version information sent by the target probe application, the version information number can be added to the version information.
- the application update system includes a configuration center as an example.
- the application update system may not include a configuration center.
- the above embodiment may not include S101 to S103.
- the target probe application may use other implementation methods to determine (such as determining based on instructions input by the user) that the version of the target program is not the latest version.
- the basic program in the target probe application will execute the above S101 to S103.
- S101 to S103 may also have nothing to do with the basic program, but be executed by another program on the device where the target probe application runs, and the other program does not belong to the target probe application.
- the target probe application will execute the above S104 to S110.
- the basic program of the target probe application may execute the above S104 to S110, or the above S104 to S110 may also be executed by another program that does not belong to the target probe application. .
- the target probe application includes a basic program and a target program, and when the target probe application is updated, the target program in the target probe application is updated. Alternatively, when the target probe application is updated, the entire target probe application may be updated.
- the latest version of the target program in S101 to S103 can be replaced by the latest version of the target probe application
- the version information of the target program can be replaced by the version information of the target probe application
- the identification of the target program can be replaced by the target
- the identification of the probe application and the version number of the target program can be replaced by the version number of the target probe application.
- the target programs of the above multiple probe applications are updated in a certain order and can be replaced by the multiple probe applications that are updated in a certain order. .
- an embodiment of the present application also provides an application update device, which can be used to implement the function of the first application.
- the application update device includes: a first sending module 1501 and an update module 1502.
- the first sending module 1501 is used to send the version information of at least one target program included in the first application to the management center;
- the update module 1502 is used to send the version information of the target program to be updated according to the identification of the target program to be updated received by the management center.
- the target program to be updated among the at least one target program is updated to the target version;
- the target program to be updated includes: a target program included in the first application and a target program included in the second application, the first application and the target program being updated.
- the second application has the same functionality.
- the application update device further includes: a first receiving module, configured to update the target program to be updated in the at least one target program as the target according to the identification of the target program to be updated received by the management center. Before versioning, receive an identification of the version information of the target program to be updated sent by the management center.
- the host application of the first application and the host application of the second application are used to provide the same service.
- the identification of the version information of the target program to be updated includes the response number of the target program to be updated
- the update module is configured to: arrange the response numbers of the target program to be updated from small to large. ; Determine the target program belonging to the first application among the target programs corresponding to the first n response numbers as the target program to be updated in the at least one target program, n is an integer greater than or equal to 1; determine the at least one target program A target program to be updated in a target program is updated to the target version.
- the application updating device further includes a second sending module and a second receiving module.
- the second sending module is used to send a subscription request to the configuration center before the first sending module sends the version information of at least one target program included in the first application to the management center; the second receiving module is used to receive the version information sent by the configuration center.
- Subscription response the subscription request is used to indicate a subscription to the version information of the target program; the subscription response indicates that there is an update to the version information of the target program.
- the application update device also includes: an acquisition module and a download module.
- the acquisition module is used to obtain the download address of the target program from the configuration center, and the download module is used to obtain the target program of the target version from the software library according to the download address.
- the target version is the latest version.
- Each module in the application update device can be implemented by software, or can be implemented by hardware.
- the following takes the update module as an example to introduce the implementation method of the update module.
- the implementation of the first sending module, the first receiving module, the second sending module, the second receiving module, the obtaining module and the downloading module can refer to the implementation of the update module.
- Update modules can include code that runs on a computing instance.
- the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container.
- the above computing instance may be one or more.
- an update module can include code running on multiple hosts/VMs/containers.
- multiple hosts/virtual machines/containers used to run the code can be distributed in the same region or in different regions.
- multiple hosts/virtual machines/containers used to run the code can be distributed in the same AZ or in different AZs.
- Each AZ includes one data center or multiple geographically close data centers. . Among them, usually a region can include multiple AZs.
- the multiple hosts/VMs/containers used to run the code can be distributed in the same VPC or across multiple VPCs.
- a VPC is set up in a region, and between two VPCs in the same region, And cross-region communication between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway.
- a module can include at least one computing device, such as a server.
- the A module may also be a device implemented using ASIC or PLD.
- the above-mentioned PLD can be implemented by CPLD, FPGA, GAL or any combination thereof.
- Multiple computing devices included in the update module can be distributed in the same region or in different regions. Multiple computing devices included in the update module can be distributed in the same AZ or in different AZs. Similarly, multiple computing devices included in the update module can be distributed in the same VPC or in multiple VPCs.
- the plurality of computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
- the first sending module, the update module, the first receiving module, the second sending module, the second receiving module, the obtaining module and the downloading module can all be used to execute the process executed by the first application. Apply any steps in the update method. The steps responsible for implementation by the first sending module, update module, first receiving module, second sending module, second receiving module, acquisition module and download module can be specified as needed. Through the first sending module, update module and first receiving module , the second sending module, the second receiving module, the obtaining module and the downloading module respectively implement different steps in the method to realize all functions of the application updating device.
- computing device 100 includes: bus 1002, processor 1004, memory 1006, and communication interface 1008.
- the processor 1004, the memory 1006 and the communication interface 1008 communicate through the bus 1002.
- Computing device 100 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 100.
- the bus 1002 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
- PCI peripheral component interconnect
- EISA extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one line is used in Figure 16, but it does not mean that there is only one bus or one type of bus.
- Bus 1004 may include a path that carries information between various components of computing device 100 (eg, memory 1006, processor 1004, communications interface 1008).
- the processor 1004 may include a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP) or a digital signal processor (DSP). any one or more of them.
- CPU central processing unit
- GPU graphics processing unit
- MP microprocessor
- DSP digital signal processor
- Memory 1006 may include volatile memory, such as random access memory (RAM).
- the processor 1004 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, mechanical hard disk drive (hard disk drive, HDD) or solid state drive (solid state drive). drive, SSD).
- ROM read-only memory
- HDD hard disk drive
- SSD solid state drive
- executable program code is stored in the memory 1006, and the processor 1004 executes the executable program code to implement the functions of each module in the first application, the second application, the management center or the configuration center (Fig. 16 takes the above-mentioned first sending module 1501 and update module 1502 as an example), thereby implementing the method provided by the embodiment of the present application and executed by the first application, the second application, the management center or the configuration center. That is, the memory 1006 stores instructions for executing the method provided by the embodiment of the present application and executed by the first application, the second application, the management center or the configuration center.
- executable code is stored in the memory 1006, and the processor 1004 executes the executable code to respectively implement
- the functions of the aforementioned application update system (not shown in FIG. 16 ) are used to implement the method performed by the application update system provided by the embodiment of the present application. That is, the memory 1006 stores instructions for executing the method executed by the application update system provided by the embodiment of the present application.
- the communication interface 1003 uses transceiver modules such as, but not limited to, network interface cards and transceivers to implement communication between the computing device 100 and other devices or communication networks.
- An embodiment of the present application also provides a computing device cluster.
- the computing device cluster includes at least one computing device.
- the computing device may be a server, such as a central server, an edge server, or a local server in a local data center.
- the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
- the computing device cluster includes at least one computing device 100 .
- the same instructions may be stored in memory 1006 in one or more computing devices 100 in a cluster of computing devices.
- This instruction is used to execute the method provided by the embodiment of the present application for the application update system, the first application, the second application, the management center or the configuration center.
- the instruction in Figure 17 is used to execute the method provided by the embodiment of the present application.
- the first applied method is an example.
- the memory 1006 of one or more computing devices 100 in the computing device cluster may also store respectively the memory 1006 for executing the application update system, the first application provided by the embodiments of the present application, Part of the instructions for the method of the second application, management center or configuration center.
- a combination of one or more computing devices 100 can jointly execute instructions for the application update system, the first application, the second application, the management center or the configuration center provided by the embodiments of the present application.
- the memories 1006 in different computing devices 100 in the computing device cluster may store different instructions, respectively used to execute part of the functions of the first application, the second application, the management center or the configuration center. That is, the instructions stored in the memory 1006 in different computing devices 100 can implement the functions of one or more modules in the first application, the second application, the management center or the configuration center.
- one or more computing devices in a cluster of computing devices may be connected through a network.
- the network may be a wide area network or a local area network, etc.
- Figure 18 shows a possible implementation.
- two computing devices 100A and 100B are connected through a network.
- the connection to the network is made through a communication interface in each computing device.
- the memory 106 in the computing device 100A stores the function of executing a part of the first application, the second application, the management center or the configuration center (the first sending module in Figure 18). instructions.
- the memory 106 in the computing device 100B stores instructions for executing functions of the first application, the second application, the management center or another part of the module of the configuration center (eg, the update module in FIG. 18 ).
- connection method between the computing device clusters shown in Figure 18 may be that considering that the method provided by this application requires a large amount of data to be sent, it is considered that the functions implemented by the first sending module 1501 are performed by the computing device 100A.
- computing device 100A shown in FIG. 18 may also be performed by multiple computing devices 100.
- the functions of computing device 100B may also be performed by multiple computing devices 100 .
- Figure 18 takes the implementation of the functions of the first application as an example. It can be understood that for the second application, management center or configuration center, instructions for part of its functions may also be stored in the memory 106 in the computing device 100A. At the same time, Instructions for another portion of the functionality are stored in memory 106 in computing device 100B.
- the embodiment of the present application also provides another computing device cluster.
- the connection relationship between the computing devices in the computing device cluster can be similar to the connection method of the computing device cluster described in FIG. 17 and FIG. 18 .
- the difference is that the memory 106 in one or more computing devices 100 in the computing device cluster may store the same system for executing the update by the application. Executes the instruction to apply the update method.
- the memory 106 of one or more computing devices 100 in the computing device cluster may also store part of the instructions for executing the application update method executed by the application update system.
- a combination of one or more computing devices 100 may collectively execute instructions for performing an application update method performed by the application update system.
- the memory 1006 in different computing devices 100 in the computing device cluster may store different instructions for executing some functions of the application update system. Instructions stored in the memory 1006 in different computing devices 100 may implement functions of one or more of the first application, the second application, the management center, and the configuration center.
- Embodiments of the present application also provide a computer-readable storage medium, including computer program instructions.
- the computing device cluster executes any of the methods provided by the embodiments of the present application.
- Application update system execution method may be any available medium that a computing device can store or a data storage device such as a data center that contains one or more available media.
- the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
- Embodiments of the present application also provide a computer-readable storage medium, including computer program instructions.
- the computing device cluster executes any of the methods provided by the embodiments of the present application.
- the computer-readable storage medium may be any available medium that a computing device can store or a data storage device such as a data center that contains one or more available media.
- the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
- Embodiments of the present application also provide a computer program product containing instructions.
- the computer program product may be a software or program product containing instructions that can be run on a computing device or stored in any available medium.
- the computing device cluster is caused to perform any method performed by the application update system as provided in the embodiments of this application.
- Embodiments of the present application also provide a computer program product containing instructions.
- the computer program product may be a software or program product containing instructions that can be run on a computing device or stored in any available medium.
- the computing device cluster is caused to perform any method performed by the first application, the second application, the management center or the configuration center in the application update system as provided in the embodiments of this application.
- the data and information involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of data and information need to comply with the relevant laws, regulations and standards of relevant countries and regions.
- first, second, etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance.
- the term “at least one” refers to one or more, and “plurality” refers to two or more, unless expressly limited otherwise.
- the term “and/or” is just an association relationship that describes related objects, indicating that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. three conditions.
- a unit described as a separate component may or may not be physically separate.
- a component described as a unit may or may not be a physical unit, and may be located in one place, or may be distributed across multiple devices. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
一种应用更新方法、装置及系统,属于计算机技术领域。应用更新系统包括:第一应用和管理中心。第一应用用于将第一应用包括的至少一个目标程序的版本信息发送至管理中心,以及根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本。其中,该待更新的目标程序包括:第一应用包括的目标程序和第二应用包括的目标程序,第一应用和第二应用具有相同功能。本申请可以解决目前应用更新的方式较为单一的问题,本申请用于应用的更新。
Description
本申请要求于2022年06月27日提交的申请号为202210740805.4、发明名称为“一种自动化安装升级方法、装置及设备”的中国专利申请的优先权,以及于2022年10月24日提交的申请号为202211305912.0、发明名称为“应用更新方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及计算机技术领域,特别涉及一种应用更新方法、装置及系统。
宿主应用是一种能够对外提供服务(如数据处理、数据转发等服务)的应用,宿主应用运行在计算机设备(如服务器)上。宿主应用具有探针(agent)应用(也称代理应用)。在宿主应用运行的过程中,探针应用能够实现与宿主应用相关的功能。比如,在宿主应用运行的过程中,探针应用可以对宿主应用的字节码或库函数进行修改,或者,提取宿主应用运行的参数等。
目前,探针应用会经常存在版本更新。在用于提供某一服务的宿主应用的探针应用需要更新时,用于提供该服务的宿主应用及其探针应用均停止运行,并由工作人员对这些探针应用进行版本更新,之后,再重启这些宿主应用和版本更新后的探针应用。
但是,目前应用更新的方式较为单一。
发明内容
本申请提供了一种应用更新方法、装置及系统,可以解决目前应用更新的方式较为单一的问题,所述技术方案如下:
第一方面,提供了一种应用更新系统,包括:第一应用和管理中心。第一应用用于将第一应用包括的至少一个目标程序的版本信息发送至管理中心。可以理解的是,第一应用包括多个程序,这些程序中存在至少一个目标程序,该至少一个目标程序可以是该多个程序中的部分程序,也可以是该多个程序中的全部程序。第一应用在运行的过程中,可以将该至少一个目标程序的版本信息发送给管理中心。相应地,管理中心用于接收第一应用发送的该至少一个目标程序的版本信息。
管理中心接收到的版本信息对应的目标程序可能是待更新的目标程序,也可能不是待更新的目标程序。第一应用还用于根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本。其中,该待更新的目标程序包括:第一应用包括的目标程序和第二应用包括的目标程序,第一应用和第二应用具有相同功能。目标版本可以是最新版本,也可以不是最新版本,本申请对此不作限定。
本申请实施例提供的应用更新系统中,第一应用并不是在工作人员的操控下进行更新,而是根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目
标程序中进行更新的目标程序更新为目标版本。该应用更新系统中第一应用的更新方式与相关技术中探针应用的更新方式不同,因此,丰富了应用的更新方式。
进一步地,本申请中,第一应用用于根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本。在该方案中,第一操作和第二操作会被依次执行。其中,第一操作包括:在管理中心接收到的版本信息中筛选待更新的目标程序的版本信息;第二操作包括:根据该待更新的目标程序的版本信息的标识,确定第一应用中至少一个目标程序中进行更新的目标程序。之后,再由第一应用将该进行更新的目标程序更新为目标版本。
第一操作和第二操作均可以由管理中心执行,或者,第一操作和第二操作均可以由第一应用执行,又或者,第一操作由管理中心执行且第二操作由第一应用执行。
示例地,当第一操作由管理中心执行且第二操作由第一应用执行时,管理中心还用于通过比较目标程序的版本信息和目标版本信息(目标版本的信息),确定多个应用中上述待更新的目标程序。之后,管理中心还用于向第一应用发送该待更新的目标程序的版本信息的标识。第一应用在接收到这些标识后,可以根据这些标识执行上述第二操作,以及将上述进行更新的目标程序更新为目标版本。
又示例地,当第一操作和第二操作均可以由管理中心执行时,管理中心还用于:通过比较目标程序的版本信息和目标版本信息,确定多个应用中上述待更新的目标程序;根据该待更新的目标程序的版本信息的标识,确定第一应用中至少一个目标程序中进行更新的目标程序,并将该进行更新的目标程序的标识发送至第一应用。第一应用在接收到这些标识后,可以将这些标识所指示的进行更新的目标程序更新为目标版本。
可以理解的是,在本申请提供的方案中,也可以不是第一操作和第二操作会被依次执行。比如,管理中心还用于确定接收到的第二应用中待更新的目标程序的版本信息,并将第二应用中待更新的目标程序的版本信息的标识发送至第一应用。第一应用还用于:接收这些标识,以及通过比较目标程序的版本信息和目标版本信息,确定第一应用中待更新的目标程序,之后,根据第一应用中待更新的目标程序的标识和接收到的第二应用中待更新的目标程序的标识,确定第一应用中至少一个目标程序中进行更新的目标程序。
可选地,第一应用的宿主应用和第二应用的宿主应用用于提供相同的服务。这种情况下,第一应用和第二应用均为探针应用,并且,第一应用和第二应用功能相同,第一应用和第二应用的宿主应用提供的服务相同。如果第一应用根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本,能够使得第一应用和第二应用中的目标程序不同时更新为目标版本,那么便可以使得第一应用和第二应用的宿主应用不同时停止运行,第一应用和第二应用的宿主应用提供的服务可以不中断。第一应用的宿主应用和第二应用的宿主应用也可以不用于提供相同的服务,本申请实施例对此不作限定。
示例地,上述待更新的目标程序的版本信息的标识包括待更新的目标程序的响应编号,第一应用用于:将多个应用中待更新的目标程序的响应编号从小到大排列,并将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为第一应用的至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数。
第一应用会周期性地确定多个应用中待更新的目标程序,将该待更新的目标程序的响应
编号从小到大排列,并在前n个响应编号对应的目标程序中查找属于所述第一应用的目标程序,并在查找到属于第一应用的目标程序时,将这些目标程序作为第一应用中进行更新的目标程序。
本申请中以第一应用用于将响应编号从小到大排列的前n个响应编号对应的目标程序中属于所述第一应用的目标程序更新的目标版本为例。可选地,也可以是第一应用用于将响应编号从大到小排列的前n个响应编号对应的目标程序中属于所述第一应用的目标程序更新的目标版本。或者,第一应用用于对多个应用中待更新的目标程序所运行的设备的地址的某一顺序进行排列,并将这些目标程序中的前n个目标程序中属于所述第一应用的目标程序更新的目标版本。
可选地,该应用更新系统还包括:配置中心。第一应用还用于向配置中心发送订阅请求,订阅请求用于指示对目标程序的版本信息进行订阅。这种情况下,配置中心用于向第一应用发送订阅响应,订阅响应指示目标程序的版本信息存在更新。第一应用可以根据该订阅响应确定目标程序的版本或版本信息存在更新。第一应用在确定目标程序的版本信息存在更新时,可以向管理中心发送消息,以触发上述第一操作和第二操作的执行。或者,第一应用在确定目标程序的版本信息存在更新时,可以向管理中心发送其中至少一个目标程序的版本信息等。
可选地,第一应用还用于从配置中心获取目标程序的下载地址,并根据下载地址从软件库获取目标版本的目标程序。第一应用在需要将某一目标程序更新为目标版本时,可以从配置中心获取目标版本的目标程序的下载地址,并根据该下载地址从软件库下载目标版本的目标程序,之后,根据下载的目标版本的目标程序,对第一应用中的目标程序进行更新。
第二方面,提供了一种应用更新方法,该方法可以由第一应用执行(可以理解为由第一应用运行的设备执行),所述方法包括:第一应用在将第一应用包括的至少一个目标程序的版本信息发送至管理中心后,根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;其中,所述待更新的目标程序包括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
可选地,在根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本之前,第一应用还可以接收所述管理中心发送的所述待更新的目标程序的版本信息的标识。
可选地,所述第一应用的宿主应用和所述第二应用的宿主应用用于提供相同的服务。
可选地,所述待更新的目标程序的版本信息的标识包括所述待更新的目标程序的响应编号,所述第一应用在根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本时,可以将所述待更新的目标程序的响应编号从小到大排列;再将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为所述至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数;最后,将所述至少一个目标程序中进行更新的目标程序更新为所述目标版本。
可选地,在所述第一应用将第一应用包括的至少一个目标程序的版本信息发送至管理中心之前,第一应用还可以向配置中心发送订阅请求,以及接收所述配置中心发送的订阅响应,所述订阅请求用于指示对目标程序的版本信息进行订阅;所述订阅响应指示所述目标程序的版本信息存在更新。
可选地,第一应用还可以从所述配置中心获取所述目标程序的下载地址,并根据所述下载地址从软件库获取所述目标版本的目标程序。
可选地,所述目标版本为最新版本。
第三方面,提供了一种应用更新方法,所述方法包括:第一应用将所述第一应用包括的至少一个目标程序的版本信息发送至管理中心;管理中心接收所述第一应用发送的所述至少一个目标程序的版本信息;之后,所述第一应用根据所述管理中心接收到的待更新的目标程序的版本信息的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;其中,所述待更新的目标程序包括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
可选地,在所述第一应用根据所述管理中心接收到的待更新的目标程序的版本信息的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本之前,所述管理中心还可以通过比较所述目标程序的版本信息和目标版本信息,确定所述待更新的目标程序,并向所述第一应用发送所述待更新的目标程序的版本信息的标识。
可选地,所述第一应用的宿主应用和所述第二应用的宿主应用用于提供相同的服务。
可选地,所述待更新的目标程序的版本信息的标识包括所述待更新的目标程序的响应编号,所述第一应用在根据所述管理中心接收到的待更新的目标程序的版本信息的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本时,可以将所述待更新的目标程序的响应编号从小到大排列,之后,将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为所述至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数;最后,将所述进行更新的目标程序更新为目标版本。
可选地,在所述第一应用将所述至少一个目标程序的版本信息发送至管理中心前,所述第一应用还可以向配置中心发送订阅请求,所述订阅请求用于指示对目标程序的版本信息进行订阅;所述配置中心还可以向所述第一应用发送订阅响应,所述订阅响应指示所述目标程序的版本信息存在更新。
可选地,所述第一应用将所述至少一个目标程序中进行更新的目标程序更新为目标版本时,对于进行更新的目标程序,所述第一应用可以从配置中心获取所述目标版本的目标程序的下载地址,并根据所述下载地址从软件库获取所述目标版本的目标程序,以及将所述目标程序更新为所述目标版本。
可选地,所述方法还包括:所述第二应用向所述管理中心发送包括的至少一个目标程序的版本信息。
可选地,所述目标版本为最新版本。
第四方面,提供了一种应用更新装置,所述应用更新装置包括:第一发送模块和更新模块。其中,第一发送模块用于将第一应用包括的至少一个目标程序的版本信息发送至管理中心;更新模块用于根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;所述待更新的目标程序包括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
可选地,应用更新装置还包括:第一接收模块,用于在根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本之前,接收所述管理中心发送的所述待更新的目标程序的版本信息的标识。
可选地,所述第一应用的宿主应用和所述第二应用的宿主应用用于提供相同的服务。
可选地,所述待更新的目标程序的版本信息的标识包括所述待更新的目标程序的响应编号,所述更新模块用于:将所述待更新的目标程序的响应编号从小到大排列;将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为所述至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数;将所述至少一个目标程序中进行更新的目标程序更新为所述目标版本。
可选地,应用更新装置还包括第二发送模块和第二接收模块。第二发送模块用于在第一发送模块将第一应用包括的至少一个目标程序的版本信息发送至管理中心之前,向配置中心发送订阅请求;第二接收模块用于接收所述配置中心发送的订阅响应,所述订阅请求用于指示对目标程序的版本信息进行订阅;所述订阅响应指示所述目标程序的版本信息存在更新。
可选地,应用更新装置还包括:获取模块和下载模块。获取模块用于从所述配置中心获取所述目标程序的下载地址,下载模块用于根据所述下载地址从软件库获取所述目标版本的目标程序。
可选地,所述目标版本为最新版本。
第五方面,提供了一种计算设备集群,包括至少一个计算设备,每个计算设备包括处理器和存储器;所述至少一个计算设备的处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行如第二方面中任一设计所述的方法。
第六方面,提供了一种计算设备集群,包括至少一个计算设备,每个计算设备包括处理器和存储器;所述至少一个计算设备的处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行如第三方面中任一设计所述的方法。
第七方面,提供了一种计算机可读存储介质,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如第二方面中任一设计所述的方法。
第八方面,提供了一种计算机可读存储介质,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如第三方面中任一设计所述的方法。
第九方面,提供了一种包含指令的计算机程序产品,当所述指令被计算设备集群运行时,使得所述计算设备集群执行如第二方面中任一设计所述的方法。
第十方面,提供了一种包含指令的计算机程序产品,当所述指令被计算设备集群运行时,使得所述计算设备集群执行如第三方面中任一设计所述的方法。
上述第二方面至第十方面的效果可以参考第一方面中相应方案的效果,本申请实施例在此不做赘述。
图1为本申请实施例提供的一种服务系统的结构示意图;
图2为本申请实施例提供的一种应用更新系统的结构示意图;
图3为本申请实施例提供的另一种应用更新系统的结构示意图;
图4为本申请实施例提供的一种应用更新方法的流程图;
图5为本申请实施例提供的另一种应用更新系统的结构示意图;
图6为本申请实施例提供的另一种应用更新方法的流程图;
图7为本申请实施例提供的一种应用更新过程的示意图;
图8为本申请实施例提供的另一种应用更新过程的示意图;
图9为本申请实施例提供的另一种应用更新系统的结构示意图;
图10为本申请实施例提供的另一种应用更新过程的示意图;
图11为本申请实施例提供的另一种应用更新过程的示意图;
图12为本申请实施例提供的另一种应用更新过程的示意图;
图13为本申请实施例提供的另一种应用更新过程的示意图;
图14为本申请实施例提供的另一种应用更新过程的示意图;
图15为本申请实施例提供的一种应用更新装置的结构示意图;
图16为本申请实施例提供的一种计算设备的示意图;
图17为本申请实施例提供的一种计算设备集群的示意图;
图18为本申请实施例提供的另一种计算设备集群的示意图。
为使本申请的原理和技术方案更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
本申请实施例提供了一种服务系统,服务系统通常包括多个宿主应用以及宿主应用的探针(agent)应用,探针应用运行时,探针应用的宿主应用也运行,探针应用停止运行时,探针应用的宿主应用也停止运行。
宿主应用能够对外提供服务(如数据查询服务、数据存储服务或数据计算服务等服务)。探针应用在运行时可以实现与宿主应用相关的功能。示例地,探针应用可以对宿主应用的字节码或库函数进行修改,或者,提取宿主应用运行的参数(如运行日志)等。
宿主应用和探针应用运行在计算机设备(如服务器或服务器集群,也称服务节点)上。可以理解的是,一个宿主应用可以有一个或多个探针应用,本申请实施例不对宿主应用的探针应用的个数进行限定。
示例地,如图1所示,服务系统包括3个宿主应用,这三个宿主应用运行在不同的设备上。可以理解的是,服务系统中宿主应用的数量也可以不是3,比如,该数量可以是1、2、10或100等。另外,一个设备上可以运行有一个或多个宿主应用,该多个宿主应用提供的服务可以相同也可以不同,不同设备上运行的宿主应用可以相同也可以不同,本申请实施例对此不作限定。
探针应用会经常存在版本更新。在用于提供某一服务的宿主应用的某一探针应用需要更新时,服务系统中运行的用于提供该服务的宿主应用及其探针应用均停止运行,并由工作人员对这些探针应用进行版本更新,之后,再重启这些宿主应用和版本更新后的探针应用。在用于提供某一服务的宿主应用均停止运行时,服务系统提供的该服务中断。
比如,请参考前述图1,假设三个宿主应用均用于提供服务A。若该探针应用需要更新,则工作人员需要将这三个宿主应用和这三个探针应用均停止运行,此时,这三个宿主应用提供的服务A中断。之后,工作人员分别对这三个探针应用进行更新后,再重启这三个宿主应用和这三个探针应用,此时,这三个宿主应用提供的服务A恢复。可以看出,在探针应用更新的过程中,这些宿主应用由于停止运行而导致服务A中断,影响服务系统提供的服务A的可靠性。
另外,上述探针应用更新的过程中,需要工作人员手动操作。但是工作人员手动操作较容易出错,且耗时耗力,无法实现探针应用的自动化更新。并且,目前应用的更新方式较为单一。
本申请实施例提供了一种应用更新系统,该应用更新系统提供了一种应用的新的更新方式,丰富了应用的更新方式。并且,该应用更新系统可以保证在探针应用更新的过程中宿主应用提供的服务不中断,提升应用更新系统提供的服务的可靠性。该应用更新系统还能够实现探针应用的自动化更新,减少人工运维成本,降低应用更新过程中的出错概率。
示例地,如图2所示,本申请实施例提供的应用更新系统包括:多个应用和管理中心02(管理中心也称管理节点)。图2中以该多个应用包括应用01A和应用01B为例,多个应用均可以是上述探针应用,当然,也可以不都是探针应用。管理中心02可以是服务器或服务器集群等装置。
多个应用包括第一应用和第二应用,比如应用01A为第一应用,应用01B为第二应用。第一应用和第二应用具有相同功能。
第一应用用于将第一应用包括的至少一个目标程序的版本信息发送至管理中心02。可以理解的是,第一应用包括多个程序,这些程序中存在至少一个目标程序,该至少一个目标程序可以是该多个程序中的部分程序,也可以是该多个程序中的全部程序。第一应用在运行的过程中,可以将该至少一个目标程序的版本信息发送给管理中心02。相应地,管理中心02用于接收第一应用发送的该至少一个目标程序的版本信息。
可选地,第一应用可以是多个应用中的任一应用,因此,多个应用均可以将应用中至少一个目标程序的版本信息发送至管理中心,相应地,管理中心可以接收各个应用发送的应用中至少一个目标程序的版本信息。比如,管理中心不仅可以接收第一应用发送的第一应用中至少一个目标程序的版本信息,还可以接收第二应用发送的第二应用中至少一个目标程序的版本信息。
管理中心接收到的版本信息对应的目标程序可能是待更新的目标程序,也可能不是待更新的目标程序。第一应用还用于根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本。其中,该待更新的目标程序包括:第一应用包括的目标程序和第二应用包括的目标程序。目标版本可以是最新版本,也可以不是最新版本,本申请实施例对此不作限定。
可见,第一应用和第二应用的功能相同,且均向管理中心发送了其中至少一个目标程序的版本信息,并且第一应用和第二应用中均存在待更新的目标程序。第一应用可以根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中进行更新的目标程序更新为目标版本(也即将该目标程序的版本更新为该目标版本)。
第一应用为多个应用中的任一应用,因此,多个应用中各个应用均可以具有与第一应用相同的功能,本申请实施例在此不做赘述。
综上所述,本申请实施例提供的应用更新系统中,第一应用并不是在工作人员的操控下进行更新,而是根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本。该应用更新系统中第一应用的更新方式与相关技术中探针应用的更新方式不同,因此,丰富了应用的更新方式。
进一步地,本申请实施例中,第一应用用于根据管理中心接收到的待更新的目标程序的
版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本。在该方案中,第一操作和第二操作会被依次执行。其中,第一操作包括:在管理中心接收到的版本信息中筛选待更新的目标程序的版本信息;第二操作包括:根据该待更新的目标程序的版本信息的标识,确定第一应用中至少一个目标程序中进行更新的目标程序。在第二操作被执行后,再由第一应用将该进行更新的目标程序更新为目标版本。
第一操作和第二操作均可以由管理中心执行,或者,第一操作和第二操作均可以由第一应用执行,又或者,第一操作由管理中心执行且第二操作由第一应用执行。
示例地,当第一操作由管理中心执行且第二操作由第一应用执行时,管理中心还用于通过比较目标程序的版本信息和目标版本信息(目标版本的信息),确定多个应用中上述待更新的目标程序。之后,管理中心还用于向第一应用发送该待更新的目标程序的版本信息的标识。第一应用在接收到这些标识后,可以根据这些标识执行上述第二操作,以及将上述进行更新的目标程序更新为目标版本。
又示例地,当第一操作和第二操作均可以由管理中心执行时,管理中心还用于:通过比较目标程序的版本信息和目标版本信息,确定多个应用中上述待更新的目标程序;根据该待更新的目标程序的版本信息的标识,确定第一应用中至少一个目标程序中进行更新的目标程序,并将该进行更新的目标程序的标识发送至第一应用。第一应用在接收到这些标识后,可以将这些标识所指示的进行更新的目标程序更新为目标版本。
可以理解的是,在本申请提供的方案中,也可以不是第一操作和第二操作会被依次执行。比如,管理中心还用于确定接收到的第二应用中待更新的目标程序的版本信息,并将第二应用中待更新的目标程序的版本信息的标识发送至第一应用。第一应用还用于:接收这些标识,以及通过比较目标程序的版本信息和目标版本信息,确定第一应用中待更新的目标程序,之后,根据第一应用中待更新的目标程序的标识和接收到的第二应用中待更新的目标程序的标识,确定第一应用中至少一个目标程序中进行更新的目标程序。这种情况下,管理中心会向第一应用发送管理中心接收到的多个应用中除第一应用之外的其他应用中待更新的目标程序的版本信息的标识。第一应用需要自行确定第一应用中至少一个目标程序中进行更新的目标程序,并根据第一应用确定出的该目标程序的标识以及该其他应用中待更新的目标程序的标识,确定第一应用中进行更新的目标程序。
可选地,第一应用的宿主应用和第二应用的宿主应用用于提供相同的服务。这种情况下,第一应用和第二应用均为探针应用,并且,第一应用和第二应用功能相同,第一应用和第二应用的宿主应用提供的服务相同。如果第一应用根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本,能够使得第一应用和第二应用中的目标程序不同时更新为目标版本,那么便可以使得第一应用和第二应用的宿主应用不同时停止运行,第一应用和第二应用的宿主应用提供的服务可以不中断。第一应用的宿主应用和第二应用的宿主应用也可以不用于提供相同的服务,本申请实施例对此不作限定。
示例地,上述待更新的目标程序的版本信息的标识包括待更新的目标程序的响应编号,第一应用用于:将多个应用中待更新的目标程序的响应编号从小到大排列,并将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为第一应用的至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数。
可以理解的是,前n个响应编号对应的目标程序中可能有属于所述第一应用的目标程序,也可能没有属于第一应用的目标程序,本申请中以前n个响应编号对应的目标程序中有属于所述第一应用的目标程序为例。当前n个响应编号对应的目标程序中没有属于第一应用的目标程序时,第一应用不会更新其中的目标程序。
第一应用会周期性地确定多个应用中待更新的目标程序,将该待更新的目标程序的响应编号从小到大排列,并在前n个响应编号对应的目标程序中查找属于所述第一应用的目标程序,并在查找到属于第一应用的目标程序时,将这些目标程序作为第一应用中进行更新的目标程序。在待更新的目标程序不包括第一应用中的目标程序时,第一应用可以停止周期性地执行这些操作。
以n=1为例,第一应用会周期性地确定多个应用中待更新的目标程序,将该待更新的目标程序的响应编号从小到大排列,并在最小响应编号对应的目标程序属于第一应用时,第一应用会将该最小响应编号对应的目标程序的版本更新为目标版本。
本申请实施例中以第一应用用于将响应编号从小到大排列的前n个响应编号对应的目标程序中属于所述第一应用的目标程序更新的目标版本为例。可选地,也可以是第一应用用于将响应编号从大到小排列的前n个响应编号对应的目标程序中属于所述第一应用的目标程序更新的目标版本。或者,第一应用用于对多个应用中待更新的目标程序所运行的设备的地址的某一顺序进行排列,并将这些目标程序中的前n个目标程序中属于所述第一应用的目标程序更新的目标版本。
进一步地,请参考图3,在图2所示的系统的基础上。该应用更新系统0还包括:配置中心03,配置中心也称配置节点。第一应用还用于向配置中心03发送订阅请求,订阅请求用于指示对目标程序的版本信息进行订阅。这种情况下,配置中心03用于向第一应用发送订阅响应,订阅响应指示目标程序的版本信息存在更新。第一应用可以根据该订阅响应确定目标程序的版本或版本信息存在更新。第一应用在确定目标程序的版本信息存在更新时,可以向管理中心发送消息,以触发上述第一操作和第二操作的执行。或者,第一应用在确定目标程序的版本信息存在更新时,可以向管理中心发送其中至少一个目标程序的版本信息等。
本申请不对第一应用向配置中心发送订阅请求,以及第一应用将其中至少一个目标程序的版本信息发送至管理中心的时机进行限定。比如,第一应用可以是启动后便向配置中心发送订阅请求,第一应用在启动后还可以将其中至少一个目标程序的版本信息发送至管理中心。或者,第一应用可以是启动后先向配置中心发送订阅请求,再将其中至少一个目标程序的版本信息发送至管理中心。或者,第一应用在启动后,先向配置中心发送订阅请求并接收配置中心发送的订阅响应,之后将第一应用中至少一个目标程序的版本信息发送至管理中心。
本申请中以第一应用向配置中心发送订阅请求,并根据订阅响应确定目标程序的版本或版本信息存在更新为例,可选地,第一应用也可以不向配置中心发送订阅请求,并不根据订阅响应确定目标程序的版本或版本信息是否存在更新。比如,第一应用根据用户的指令确定目标程序的版本或版本信息是否存在更新。
可选地,第一应用还用于从配置中心获取目标程序的下载地址,并根据下载地址从软件库(附图中未示出)获取目标版本的目标程序。第一应用在需要将某一目标程序更新为目标版本时,可以从配置中心获取目标版本的目标程序的下载地址,并根据该下载地址从软件库下载目标版本的目标程序,之后,根据下载的目标版本的目标程序,对第一应用中的目标程
序进行更新。
第一应用、第二应用可以通过软件实现,管理中心、配置中心和软件库均可以通过软件实现,或者可以通过硬件实现。示例性的,接下来分别介绍第一应用和管理中心的实现方式。类似的,第二应用的实现方式可以参考第一应用的实现方式,配置中心和软件库的实现方式可以参考管理中心的实现方式。
模块作为软件功能单元的一种举例,第一应用可以包括运行在计算实例上的代码。其中,计算实例可以是物理主机(计算设备)、虚拟机、容器等计算设备中的至少一种。进一步地,上述计算设备可以是一台或者多台。例如,第一应用可以包括运行在多个主机/虚拟机/容器上的代码。需要说明的是,用于运行该应用程序的多个主机/虚拟机/容器可以分布在相同的区域(region)中,也可以分布在不同的region中。用于运行该代码的多个主机/虚拟机/容器可以分布在相同的可用区(availability zone,AZ)中,也可以分布在不同的AZ中,每个AZ包括一个数据中心或多个地理位置相近的数据中心。其中,通常一个region可以包括多个AZ。同样,用于运行该代码的多个主机/虚拟机/容器可以分布在同一个虚拟私有云(virtual private cloud,VPC)中,也可以分布在多个VPC中。其中,通常一个VPC设置在一个region内。同一region内两个VPC之间,以及不同region的VPC之间跨区通信需在每个VPC内设置通信网关,经通信网关实现VPC之间的互连。
模块作为软件功能单元的一种举例,管理中心可以包括运行在计算实例上的代码。其中,计算实例可以是物理主机(计算设备)、虚拟机、容器等计算设备中的至少一种。进一步地,上述计算设备可以是一台或者多台。例如,管理中心可以包括运行在多个主机/虚拟机/容器上的代码。需要说明的是,用于运行该应用程序的多个主机/虚拟机/容器可以分布在相同的区域(region)中,也可以分布在不同的region中。用于运行该代码的多个主机/虚拟机/容器可以分布在相同的可用区(availability zone,AZ)中,也可以分布在不同的AZ中,每个AZ包括一个数据中心或多个地理位置相近的数据中心。其中,通常一个region可以包括多个AZ。同样,用于运行该代码的多个主机/虚拟机/容器可以分布在同一个虚拟私有云(virtual private cloud,VPC)中,也可以分布在多个VPC中。其中,通常一个VPC设置在一个region内。同一region内两个VPC之间,以及不同region的VPC之间跨区通信需在每个VPC内设置通信网关,经通信网关实现VPC之间的互连。
模块作为硬件功能单元的一种举例,管理中心可以包括至少一个计算设备,如服务器等。或者,管理中心也可以是利用专用集成电路(application specific integrated circuit,ASIC)实现、或可编程逻辑器件(programmable logic device,PLD)实现的设备等。其中,上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程门阵列(field programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)器件或其任意组合实现。管理中心包括的多个计算设备可以分布在相同的region中,也可以分布在不同的region中。管理中心包括的多个计算设备可以分布在相同的AZ中,也可以分布在不同的AZ中。同样,管理中心包括的多个计算设备可以分布在同一个VPC中,也可以分布在多个VPC中。其中,所述多个计算设备可以是服务器、ASIC、PLD、CPLD、FPGA和GAL等计算设备的任意组合。
基于本申请实施例提供的应用更新系统,本申请实施例还提供了由该应用更新系统执行
的应用更新方法。
示例地,图4为本申请实施例提供的一种应用更新方法的流程图,以下将以图4所示的应用更新方法为例,对本申请实施例提供的应用更新方法进行讲解。如图4所示,该应用更新方法包括:
S001、第一应用将第一应用包括的至少一个目标程序的版本信息发送至管理中心。
S002、第二应用将第二应用包括的至少一个目标程序的版本信息发送至管理中心。
本申请实施例中以第一应用和第二应用具有相同功能,第一应用的宿主应用和第二应用的宿主应用用于提供相同的服务为例。
可选地,第一应用和第二应用可以在启动后便向管理中心发送其中至少一个目标程序的版本信息。
或者,第一应用和第二应用在启动后,会先向配置中心发送订阅请求,订阅请求用于指示对目标程序的版本信息进行订阅,并接收配置中心发送订阅响应,订阅响应指示目标程序的版本信息存在更新;之后,第一应用和第二应用可以根据接收到的订阅响应向管理中心发送其中至少一个目标程序的版本信息。这种情况下,管理中心会接收到目标程序存在更新的应用发送的其中至少一个目标程序的版本信息。
S003、管理中心通过比较目标程序的版本信息和目标版本信息,确定待更新的目标程序;其中,该待更新的目标程序包括:第一应用包括的目标程序和第二应用包括的目标程序。
管理中心会接收到各个应用发送的目标程序的版本信息,管理中心会将接收到的这些版本信息与目标版本的信息进行比较,以确定这些应用中待更新的目标程序。
S004、管理中心向第一应用发送待更新的目标程序的版本信息的标识。
S005、第一应用根据管理中心接收到的待更新的目标程序的版本信息的标识,将第一应用中至少一个目标程序中进行更新的目标程序更新为目标版本。
示例地,待更新的目标程序的版本信息的标识包括待更新的目标程序的响应编号,在S005中,第一应用可以将待更新的目标程序的响应编号从小到大排列,并将前n个响应编号对应的目标程序中属于第一应用的目标程序,确定为至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数;之后,第一应用将进行更新的目标程序更新为目标版本。
对于进行更新的目标程序,第一应用在将该目标程序更新为目标版本时,可以从配置中心获取目标版本的目标程序的下载地址,并根据下载地址从软件库获取目标版本的目标程序,以及将目标程序更新为目标版本。
可以理解的是,本申请实施例提供的方法实施例中操作的先后顺序能够进行适当调整,操作也能够根据情况进行相应增减,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。
又示例地,图5为本申请实施例提供的另一种应用更新系统的结构示意图,图6为本申请实施例提供的另一种应用更新方法的流程图。图6所示的方法可以用于图5所示的应用更新系统。并且,图6所示的方法以目标宿主应用的目标探针应用的更新过程为例,该应用更新系统中任意宿主应用的任意探针应用的更新过程,可以参考目标宿主应用的目标探针应用的更新过程。
如图6所示,该应用更新方法包括:
S101、目标探针应用的基础程序向配置中心发送目标探针应用中目标程序的最新版本的下载地址的获取请求。
目标探针应用包括基础程序和目标程序,并且,目标探针应用的不同版本中的基础程序相同,且目标程序不同。该目标程序为目标探针应用的核心部分,在目标探针应用更新时,会对该目标程序进行更新,但不会对基础程序进行更新。
目标探针应用中的基础程序在运行后,会向配置中心发送获取请求,以请求获取目标探针应用中的目标程序的最新版本的下载地址。示例地,如图7所示,假设三个宿主应用均为目标宿主应用,三个探针应用均为目标探针应用。那么,在S101中目标探针应用的基础程序运行后,三个基础程序在S102中会向配置中心02发送目标程序的最新版本的下载地址的获取请求。
S102、配置中心根据获取请求向目标探针应用的基础程序发送目标探针应用中目标程序的最新版本的下载地址。
配置中心上存储有目标探针应用中目标程序的最新版本的下载地址,配置中心在接收到获取请求后,会根据该获取请求向基础程序发送该下载地址。示例地,如图8所示,在图7所示的场景之后,配置中心03在S102中会向三个基础程序发送目标程序的最新版本的下载地址。
可选地,基础程序发送的获取请求还可以携带有基础程序所运行的设备的地址,配置中心可以根据该地址向基础程序发送上述下载地址。
S103、目标探针应用的基础程序根据目标探针应用中目标程序的最新版本的下载地址下载目标程序的最新版本。
目标探针应用的基础程序在接收到配置中心发送的下载地址后,便可以根据该下载地址下载目标探针应用中的目标程序的最新版本。
可选地,请参考图9,在图5所示的应用更新系统的基础上,该应用更新系统还可以包括软件库04,目标探针应用的基础程序可以根据上述下载地址,在软件库04中下载目标探针应用中目标程序的最新版本。
示例地,如图10所示,在图8所示的场景之后,三个目标探针应用中的基础程序在S104中会根据接收到的下载地址,从软件库04中下载目标程序的最新版本。
目标探针应用的基础程序在下载目标探针应用中目标程序的最新版本后,可以将下载的该目标程序的最新版本进行存储(如存储在本地磁盘),之后再触发该目标程序的最新版本运行。示例地,如图11所示,在图10所示的场景之后,目标程序的最新版本会运行。这样一来,目标探针应用中的基础程序,以及目标探针应用中目标程序的最新版本均处于运行状态,又由于各种版本的目标探针应用具有相同的基础程序,因此,相当于目标探针应用的最新版本处于运行状态。
根据上述S101至S103可知,无论目标探针应用的基础程序所安装的设备上是否安装有目标探针应用中的目标程序,均可以通过上述S101至S103的方法获取目标探针应用中目标程序的最新版本。这样一来,当工作人员首次在设备上配置目标探针应用时,只需配置基础程序即可,而无需配置目标程序,减轻了工作人员的配置压力。
可以理解的是,在目标宿主应用和目标探针应用均处于运行状态时,目标宿主应用可以向外提供目标服务,目标探针应用也可以实现与目标宿主应用相关的功能。比如,在目标宿
主应用运行的过程中,目标探针应用可以对目标宿主应用的字节码或库函数进行修改,或者,提取目标宿主应用运行的参数(如运行日志)等。
S104、目标探针应用向管理中心发送目标程序的版本信息,该版本信息包括:该目标程序的标识,该目标程序的版本号,目标宿主应用用于提供的目标服务的标识,以及该版本信息的编号。
目标探针应用会向管理中心发送目标程序的版本信息。示例地,如图11所示,三个目标探针应用在S104中会向管理中心02发送其中目标程序的版本信息。目标程序的版本信息也可以称为实例信息。
在S104中,目标程序的版本信息包括:目标程序的标识,目标程序的版本号,目标探针应用的目标宿主应用用于提供的目标服务的标识,以及该版本信息的编号(Identity document,ID)。版本信息的编号也可以称为响应编号,不同版本信息的响应编号不同。目标服务的标识可以是:该目标服务的服务名,或者,该目标宿主应用的标识(用于提供相同服务的宿主应用的标识相同)。
可选地,该版本信息还可以包括与目标探针应用运行相关的其他信息,比如,目标探针应用所运行的设备的地址,以及目标探针应用运行目标程序的时间戳等中的至少一种信息。
又可选地,目标程序的版本信息为:目标探针应用的注册信息,这样一来,上述用来接收该版本信息的管理中心也可以称为注册中心。并且,在目标程序的版本信息为该注册信息时,该目标程序的版本信息需要包括目标探针应用注册相关的内容。在目标探针应用停止运行时,目标探针应用需要向管理中心发送目标探针应用的去注册信息,以在管理中心上去注册,使管理中心删除上述目标探针应用的注册信息,或者,对目标探针应用的注册信息进行去注册标记。
S105、目标探针应用向配置中心发送订阅请求,订阅请求携带有该目标探针应用中目标程序的标识和版本号。
目标探针应用在运行后,还可以向配置中心发送订阅请求,该订阅请求携带有目标探针应用中目标程序的标识和版本号。示例地,如图12所示,在图11所示的场景之后,三个目标探针应用在S105中会向配置中心03发送订阅请求。
订阅请求携带的目标程序的版本号可以是S102中配置中心在向目标探针应用的基础程序发送下载地址时附带的版本号,或者,订阅请求携带的目标程序的版本号可以是S103中目标探针应用的基础程序下载的目标程序中附带的版本号,本申请实施例对此不作限定。
可以理解的是,随着时间的流逝,目标探针应用会存在更新的情况,相应地,目标探针应用中的目标程序也存在更新的情况。配置中心能够获取到目标程序的最新版本的版本号,比如,在目标程序更新时,工作人员可以在配置中心上配置目标程序的标识,以及该目标程序的最新版本的版本号。
订阅请求用于请求在订阅请求携带的目标程序的版本号与该目标程序的最新版本的版本号不同时,向发送该订阅请求的目标探针应用发送订阅响应。
S106、在订阅请求携带的目标程序的版本号与该目标程序的最新版本的版本号不同时,配置中心向目标探针应用发送订阅响应。
配置中心在接收到目标探针应用发送的订阅请求后,可以获取该订阅请求携带的目标程序的版本号,并周期性地将该版本号与该目标程序的最新版本的版本号进行比较。在比较的
结果是不同时,配置中心可以向该目标探针应用发送订阅响应。在比较的结果是相同时,配置中心可以无需向该目标探针应用发送该订阅响应。
示例地,如图13所示,在图12所示的场景之后,在S106中,若配置中心03确定三个目标探针应用发送的三个订阅请求携带的目标程序的版本号与目标程序的最新版本的版本号均不同,则配置中心03可以向这三个目标探针应用分别发送订阅响应。
可选地,上述订阅请求还可以携带有目标探针应用所运行的设备的地址,配置中心可以根据该地址向目标探针应用发送订阅响应。
S107、目标探针应用根据订阅响应,确定目标探针应用中的目标程序的版本不是最新版本。
目标探针应用在接收到配置中心发送的订阅响应后,便可以确定目标探针应用中的目标程序的版本不是最新版本,此时目标探针应用的版本也不是最新版本。
可选地,本申请实施例提供的应用更新方法也可以不包括S105至S107,而是目标探针应用采用其他方式确定目标探针应用中的目标程序的版本不是最新版本。比如,配置中心可以在目标探针应用中目标程序的最新版本变化时,向目标探针应用发送该目标程序的最新版本,目标探针应用可以将其中目标程序的版本与接收到的该最新版本进行比较,以确定目标探针应用中的目标程序的版本是否为最新版本。
在确定目标探针应用中的目标程序的版本不是最新版本后,目标探针应用便可以通过后续操作来对目标程序进行版本的更新。
S108、目标探针应用向管理中心发送查询请求,该查询请求用于请求查询管理中心接收到的待更新的多个目标程序的版本信息;其中,该多个目标程序的版本信息均包括目标程序的标识和目标服务的标识,且包括的版本号与目标程序的最新版本的版本号均不同。
目标探针应用在对目标程序进行版本的更新时,可以首先向管理中心发送查询请求,以查询管理中心接收到的上述多个目标程序的版本信息。
可以理解的是,应用更新系统中的各个探针应用均会在执行S104时,向管理中心发送目标程序的版本信息,这样一来,管理中心便可以接收到多个版本信息。管理中心在接收到目标探针应用发送的查询请求后,可以在管理中心接收到的版本信息中,查找上述多个目标程序的版本信息。
该多个目标程序所属的探针应用均为处于运行状态的探针应用,若某一目标程序所属的探针应用在启动后在当前停止运行,则该目标程序不属于该多个目标程序。
该多个目标程序的版本信息均包括目标程序的标识和目标服务的标识,若某一版本信息不包括目标服务的标识和/或目标程序的标识,则该版本信息不属于该多个目标程序的版本信息。
该多个目标程序的版本信息包括的目标程序的版本号与目标程序的最新版本的版本号不同。若某一目标程序的版本信息包括的目标程序的版本号与目标程序的最新版本的版本号相同,则该版本信息不属于该多个目标程序的版本信息。
例如,假设管理中心接收到的版本信息如表1所示,这些版本信息包括:编号为1至7的7个版本信息。这7个版本信息中,编号为1至4的版本信息为用于提供服务A的宿主应用中目标程序的版本信息,编号为5至7的版本信息为用于提供服务B的宿主应用中目标程序的版本信息。并且,编号为1至4的版本信息中目标程序的标识均为T1,编号为5至7的
版本信息中目标程序的标识均为T2。编号为1至3、5至7的版本信息中目标程序的版本号均为0.1,而编号为4的版本信息中目标程序的版本号为0.2。若目标程序的版本信息为编号为1的版本信息,并且,目标探针应用中目标程序的最新版本的版本号为0.2,则管理中心可以确定表1中编号为1、2和3的版本信息为上述多个目标程序的版本信息。
表1
S109、管理中心根据查询请求向目标探针应用发送查询响应,该查询响应携带有该多个目标程序的版本信息。
管理中心在接收到查询请求后,便可以查询上述多个目标程序的版本信息,并将查询到的这些版本信息携带在查询响应中发送给目标探针应用。
管理中心发送的查询响应可以是只携带有上述多个目标程序的版本信息;或者,也可以是该查询响应携带有管理中心接收到的所有版本信息,这种情况下,目标探针应用可以在这些版本信息中查找上述多个目标程序的版本信息。
以管理中心发送的查询响应只携带有上述多个目标程序的版本信息为例。
管理中心在查询上述多个目标程序的版本信息时,可以首先查找当前处于运行状态的目标程序的版本信息。比如,在上述版本信息为注册信息时,若某一探针应用在启动后当前停止运行,那么在该目标探针应用在管理中心上去注册时,管理中心会删除该目标程序的版本信息;这样一来,管理中心上存储的所有版本信息即为处于运行状态的目标程序的版本信息。又比如,在上述版本信息为注册信息时,若某一探针应用在启动后当前停止运行,那么在该目标探针应用在管理中心上去注册时,管理中心会对该目标程序的版本信息进行去注册标记;这样一来,管理中心便可以确定未进行去注册标记的版本信息为处于运行状态的目标程序的版本信息。再比如,在上述版本信息不是注册信息时,管理中心可以检测各个目标程序是否处于运行状态,进而根据检测的结果查找处于运行状态的目标程序的版本信息。
管理中心在查找到当前处于运行状态的目标程序的版本信息后,可以在这些版本信息中查找包含目标服务的标识和目标程序的标识的版本信息。之后,管理中心可以在这些版本信息中查找上述多个目标程序的版本信息。
目标探针应用在接收到的版本信息中查找上述多个目标程序的版本信息的过程,可以参考管理中心查找上述多个目标程序的版本信息的过程,本申请实施例在此不做赘述。
可选地,目标探针应用也可以采用与S108和S109不同的其他方式获取上述多个目标程序的版本信息。比如,管理中心会周期性地向各个目标探针应用发送其接收到的版本信息,目标探针应用可以在确定目标探针应用中的目标程序的版本不是最新版本之后,从管理中心发送的版本信息中提取上述多个目标程序的版本信息。
S110、目标探针应用根据待更新的多个目标程序的版本信息,判断更新条件是否满足;更新条件包括:目标探针应用中目标程序的版本信息的编号为待更新的多个目标程序的版本信息的编号中的最小编号。在更新条件不满足时,执行S108;在更新条件满足时,执行S101。
目标探针应用可以判断其中目标程序的版本信息的编号是否为:该多个目标程序的版本信息的编号中的最小编号。若目标探针应用中目标程序的版本信息的编号为该最小编号,则目标探针应用确定更新条件满足。若目标探针应用中目标程序的版本信息的编号不是该最小编号,则目标探针应用确定更新条件不满足。
示例地,仍然以上述表1为例,假设上述多个目标程序的版本信息为:编号为1至3的版本信息。若目标探针应用中目标程序的版本信息为编号为1的版本信息,则由于编号1为编号1至3中的最小编号,因此,目标探针应用确定更新条件满足。若目标探针应用中的目标程序的版本信息为编号为2的版本信息,则由于编号2并不是编号1至3中的最小编号,因此,目标探针应用确定更新条件不满足。
目标探针应用在确定更新条件不满足时,会重复执行S108至S110,直至确定更新条件满足。比如,目标探针应用在确定更新条件不满足时,会在等待目标时长后重复执行S108至S110。
目标探针应用在确定更新条件满足时,可以重复执行S101以及后续的操作,以实现对目标探针应用的重启。在重复执行S101至S103后,目标探针应用便能够得到目标程序的最新版本,进而将该目标程序的版本更新为最新版本,以及将目标探针应用的版本更新为最新版本。
可以理解的是,在目标探针应用的目标程序更新完毕后,在其他探针应用重复执行S108至S110的过程中,上述待更新的多个目标程序不再包括该目标探针应用中的目标程序。并且,目标探针应用在确定更新条件满足时,才对目标探针应用的目标程序进行更新,由于该更新条件为目标探针应用中目标程序的版本信息的编号为上述最小编号,因此,该多个探针应用的目标程序会按照版本信息的编号依次增大的顺序更新。
示例地,如图14所示,在图13所示的场景之后,若三个目标程序的版本信息均属于上述待更新的多个目标程序的版本信息,且这三个目标程序的版本信息的编号依次增大,那么,这三个探针应用中的目标程序依次更新,这三个探针应用会依次更新。在图14所示的更新过程中,每次只有一个探针应用更新,两个探针应用未更新。在一个探针应用更新的过程中,未更新的两个探针应用的宿主应用能够继续对外提供服务,从而避免了三个探针应用同时更新导致三个宿主应用提供的服务中断。
综上所述,本申请实施例提供的应用更新方法中,目标探针应用会向管理中心发送目标程序的版本信息。并且,该版本信息包括:目标程序的版本号,以及目标宿主应用用于提供的目标服务的标识。在目标探针应用中目标程序的版本不是最新版本时,目标探针应用可以根据管理中心接收到的版本信息的编号,更新目标探针应用中的目标程序,以使与目标服务关联的多个探针应用中的目标程序的版本不同时更新。这样一来,就避免了目标服务关联的
所有目标探针应用同时更新导致的目标服务中断的问题,能够在实现对目标探针应用进行更新的前提下,保证目标服务不中断。
上述更新条件也可以有其他实现方式。比如,该更新条件也可以是包括:目标探针应用中目标程序的版本信息的编号为该待更新的多个目标程序的版本信息的编号中的最大编号。这种情况下,可以实现该多个探针应用的目标程序按照版本信息的编号依次减小的顺序更新。可见,在本申请实施例中该多个探针应用的目标程序可以按照目标顺序依次更新,该目标顺序可以是版本信息的编号依次减小的顺序,也可以是版本信息的编号依次增大的顺序。该多个探针应用的目标程序也可以按照与目标顺序不同的其他顺序依次更新,比如,按照目标探针应用运行的设备的地址的某一顺序依次更新等。
上述多个探针应用的目标程序依次更新时,目标探针应用也可以不采用S108至S110中的方式确定目标探针应用的目标程序何时更新。比如,目标探针应用可以首先根据上述多个目标程序的版本信息的编号,确定该目标探针应用的目标程序更新的时间,再在该时间更新目标探针应用的目标程序。该多个探针应用的目标程序更新的时间的先后与版本信息的编号相关,以实现该多个探针应用的目标程序按顺序依次更新。
上述多个探针应用的目标程序也可以不是依次更新。比如,该多个探针应用分为多组目标探针应用,每组目标探针应用包括至少两个探针应用,该多组目标探针应用的目标程序依次更新。这种情况下,每次更新至少两个目标探针应用的目标程序,该多个探针应用的目标程序分多次更新完毕。总的来说,本申请实施例不对该多个探针应用的目标程序的更新顺序进行限定,但该多个探针应用的目标程序不同时更新为目标探针应用的最新版本,从而保证目标服务不中断。
上述实施例中以目标探针应用发送的目标程序的版本信息包括该版本信息的编号为例,可选地,该版本信息也可以不包括该版本信息的编号,这种情况下,管理中心在接收到目标探针应用发送的版本信息后,可以在该版本信息中添加版本信息的编号。
上述实施例中以应用更新系统包括配置中心为例,可选地,应用更新系统也可以不包括配置中心。这种情况下,上述实施例也可以不包括S101至S103。在上述S105至S107中,目标探针应用可以采用其他实现方式确定(如根据用户输入的指令确定)目标程序的版本不是最新版本。
在上述应用更新方法中,目标探针应用中的基础程序会执行上述S101至S103。可选地,S101至S103也可以与基础程序无关,而是由目标探针应用运行的设备上的另一程序执行,且该另一程序不属于目标探针应用。目标探针应用会执行上述S104至S110,示例地,可以是目标探针应用的基础程序执行上述S104至S110,或者,上述S104至S110也可以由不属于目标探针应用的该另一程序执行。
另外,上述实施例中以目标探针应用包括基础程序和目标程序,且目标探针应用在更新时,更新目标探针应用中的目标程序为例。可选地,也可以是目标探针应用在更新时,目标探针应用整体进行更新。
这种情况下,上述S101至S103中目标程序的最新版本可以替换为目标探针应用的最新版本,目标程序的版本信息可以替换为目标探针应用的版本信息,目标程序的标识可以替换为目标探针应用的标识,目标程序的版本号可以替换为目标探针应用的版本号,上述多个探针应用的目标程序按照一定的顺序更新可以替换为该多个探针应用按照一定的顺序更新。
本申请实施例还提供了一种应用更新装置,该应用更新装置可以用于实现上述第一应用的功能。示例地,如图15所示,该应用更新装置包括:第一发送模块1501和更新模块1502。其中,第一发送模块1501用于将第一应用包括的至少一个目标程序的版本信息发送至管理中心;更新模块1502用于根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;所述待更新的目标程序包括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
可选地,应用更新装置还包括:第一接收模块,用于在根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本之前,接收所述管理中心发送的所述待更新的目标程序的版本信息的标识。
可选地,所述第一应用的宿主应用和所述第二应用的宿主应用用于提供相同的服务。
可选地,所述待更新的目标程序的版本信息的标识包括所述待更新的目标程序的响应编号,所述更新模块用于:将所述待更新的目标程序的响应编号从小到大排列;将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为所述至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数;将所述至少一个目标程序中进行更新的目标程序更新为所述目标版本。
可选地,应用更新装置还包括第二发送模块和第二接收模块。第二发送模块用于在第一发送模块将第一应用包括的至少一个目标程序的版本信息发送至管理中心之前,向配置中心发送订阅请求;第二接收模块用于接收所述配置中心发送的订阅响应,所述订阅请求用于指示对目标程序的版本信息进行订阅;所述订阅响应指示所述目标程序的版本信息存在更新。
可选地,应用更新装置还包括:获取模块和下载模块。获取模块用于从所述配置中心获取所述目标程序的下载地址,下载模块用于根据所述下载地址从软件库获取所述目标版本的目标程序。
可选地,所述目标版本为最新版本。
应用更新装置中的各个模块(第一发送模块、更新模块、第一接收模块、第二发送模块、第二接收模块、获取模块和下载模块)均可以通过软件实现,或者可以通过硬件实现。示例性的,接下来以更新模块为例,介绍更新模块的实现方式。类似的,第一发送模块、第一接收模块、第二发送模块、第二接收模块、获取模块和下载模块的实现方式可以参考更新模块的实现方式。
模块作为软件功能单元的一种举例,更新模块可以包括运行在计算实例上的代码。其中,计算实例可以包括物理主机(计算设备)、虚拟机、容器中的至少一种。进一步地,上述计算实例可以是一台或者多台。例如,更新模块可以包括运行在多个主机/虚拟机/容器上的代码。需要说明的是,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的region中,也可以分布在不同的region中。进一步地,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的AZ中,也可以分布在不同的AZ中,每个AZ包括一个数据中心或多个地理位置相近的数据中心。其中,通常一个region可以包括多个AZ。
同样,用于运行该代码的多个主机/虚拟机/容器可以分布在同一个VPC中,也可以分布在多个VPC中。其中,通常一个VPC设置在一个region内,同一region内两个VPC之间,
以及不同region的VPC之间跨区通信需在每个VPC内设置通信网关,经通信网关实现VPC之间的互连。
模块作为硬件功能单元的一种举例,更新模块可以包括至少一个计算设备,如服务器等。或者,A模块也可以是利用ASIC实现、或PLD实现的设备等。其中,上述PLD可以是CPLD、FPGA、GAL或其任意组合实现。
更新模块包括的多个计算设备可以分布在相同的region中,也可以分布在不同的region中。更新模块包括的多个计算设备可以分布在相同的AZ中,也可以分布在不同的AZ中。同样,更新模块包括的多个计算设备可以分布在同一个VPC中,也可以分布在多个VPC中。其中,所述多个计算设备可以是服务器、ASIC、PLD、CPLD、FPGA和GAL等计算设备的任意组合。
需要说明的是,在其他实施例中,第一发送模块、更新模块、第一接收模块、第二发送模块、第二接收模块、获取模块和下载模块均可以用于执行由第一应用执行的应用更新方法中的任意步骤。第一发送模块、更新模块、第一接收模块、第二发送模块、第二接收模块、获取模块和下载模块负责实现的步骤可根据需要指定,通过第一发送模块、更新模块、第一接收模块、第二发送模块、第二接收模块、获取模块和下载模块分别实现该方法中不同的步骤来实现该应用更新装置的全部功能。
本申请实施例还提供一种计算设备100。如图16所示,计算设备100包括:总线1002、处理器1004、存储器1006和通信接口1008。处理器1004、存储器1006和通信接口1008之间通过总线1002通信。计算设备100可以是服务器或终端设备。应理解,本申请不限定计算设备100中的处理器、存储器的个数。
总线1002可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图16中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。总线1004可包括在计算设备100各个部件(例如,存储器1006、处理器1004、通信接口1008)之间传送信息的通路。
处理器1004可以包括中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理器(digital signal processor,DSP)等处理器中的任意一种或多种。
存储器1006可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。处理器1004还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,机械硬盘(hard disk drive,HDD)或固态硬盘(solid state drive,SSD)。
如图16所示,存储器1006中存储有可执行的程序代码,处理器1004执行该可执行的程序代码以分别实现第一应用、第二应用、管理中心或配置中心中各个模块的功能(图16中以上述第一发送模块1501和更新模块1502为例),从而实现本申请实施例提供的由第一应用、第二应用、管理中心或配置中心执行的方法。也即,存储器1006上存有用于执行本申请实施例提供的由第一应用、第二应用、管理中心或配置中心执行的方法的指令。
或者,存储器1006中存储有可执行的代码,处理器1004执行该可执行的代码以分别实
现前述应用更新系统的功能(图16中未示出),从而实现本申请实施例提供的由应用更新系统执行的方法。也即,存储器1006上存有用于执行本申请实施例提供的由应用更新系统执行的方法的指令。
通信接口1003使用例如但不限于网络接口卡、收发器一类的收发模块,来实现计算设备100与其他设备或通信网络之间的通信。
本申请实施例还提供了一种计算设备集群。该计算设备集群包括至少一台计算设备。该计算设备可以是服务器,例如是中心服务器、边缘服务器,或者是本地数据中心中的本地服务器。在一些实施例中,计算设备也可以是台式机、笔记本电脑或者智能手机等终端设备。
如图17所示,所述计算设备集群包括至少一个计算设备100。计算设备集群中的一个或多个计算设备100中的存储器1006中可以存有相同的指令。该指令用于执行本申请实施例提供的用于应用更新系统、第一应用、第二应用、管理中心或配置中心的方法,图17中以该指令用于执行本申请实施例提供的用于第一应用的方法为例。
在一些可能的实现方式中,该计算设备集群中的一个或多个计算设备100的存储器1006中也可以分别存有用于执行用于本申请实施例提供的用于应用更新系统、第一应用、第二应用、管理中心或配置中心的方法的部分指令。换言之,一个或多个计算设备100的组合可以共同执行用于本申请实施例提供的应用更新系统、第一应用、第二应用、管理中心或配置中心的指令。
计算设备集群中的不同的计算设备100中的存储器1006可以存储不同的指令,分别用于执行第一应用、第二应用、管理中心或配置中心的部分功能。也即,不同的计算设备100中的存储器1006存储的指令可以实第一应用、第二应用、管理中心或配置中心中一个或多个模块的功能。
在一些可能的实现方式中,计算设备集群中的一个或多个计算设备可以通过网络连接。其中,所述网络可以是广域网或局域网等等。图18示出了一种可能的实现方式。如图18所示,两个计算设备100A和100B之间通过网络进行连接。具体地,通过各个计算设备中的通信接口与所述网络进行连接。在这一类可能的实现方式中,计算设备100A中的存储器106中存有执行第一应用、第二应用、管理中心或配置中心的一部分模块(如图18中的第一发送模块)的功能的指令。同时,计算设备100B中的存储器106中存有执行第一应用、第二应用、管理中心或配置中心的另一部分模块(如图18中的更新模块)的功能的指令。
图18所示的计算设备集群之间的连接方式可以是考虑到本申请提供的方法需要大量地发送数据,因此考虑将第一发送模块1501实现的功能交由计算设备100A执行。
应理解,图18中示出的计算设备100A的功能也可以由多个计算设备100完成。同样,计算设备100B的功能也可以由多个计算设备100完成。
图18中以实现第一应用的功能为例,可以理解的是,对于第二应用、管理中心或配置中心,也可以是其一部分功能的指令存储在计算设备100A中的存储器106中,同时,另一部分功能的指令存储在计算设备100B中的存储器106中。
本申请实施例还提供了另一种计算设备集群。该计算设备集群中各计算设备之间的连接关系可以类似的参考图17和图18所述计算设备集群的连接方式。不同的是,该计算设备集群中的一个或多个计算设备100中的存储器106中可以存有相同的用于执行由应用更新系统
执行的应用更新方法的指令。
在一些可能的实现方式中,该计算设备集群中的一个或多个计算设备100的存储器106中也可以分别存有用于执行由应用更新系统执行的应用更新方法的部分指令。换言之,一个或多个计算设备100的组合可以共同执行用于执行由应用更新系统执行的应用更新方法的指令。
需要说明的是,计算设备集群中的不同的计算设备100中的存储器1006可以存储不同的指令,用于执行应用更新系统的部分功能。不同的计算设备100中的存储器1006存储的指令可以实现第一应用、第二应用、管理中心和配置中心中的一个或多个的功能。
本申请实施例还提供了一种计算机可读存储介质,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如本申请实施例提供的任一种由应用更新系统执行的方法。所述计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘)等。
本申请实施例还提供了一种计算机可读存储介质,包括计算机程序指令,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如本申请实施例提供的任一种由应用更新系统中第一应用、第二应用、管理中心或配置中心执行的方法。所述计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘)等。
本申请实施例还提供了一种包含指令的计算机程序产品,所述计算机程序产品可以是包含指令的,能够运行在计算设备上或被储存在任何可用介质中的软件或程序产品。当所述指令被计算设备集群运行时,使得所述计算设备集群执行如本申请实施例提供的任一种由应用更新系统执行的方法。
本申请实施例还提供了一种包含指令的计算机程序产品,所述计算机程序产品可以是包含指令的,能够运行在计算设备上或被储存在任何可用介质中的软件或程序产品。当所述指令被计算设备集群运行时,使得所述计算设备集群执行如本申请实施例提供的任一种由应用更新系统中第一应用、第二应用、管理中心或配置中心执行的方法。
本申请所涉及的数据和信息,均为经用户授权或者经过各方充分授权的,且数据和信息的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
在本申请中,术语“第一”和“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“至少一个”指一个或多个,“多个”指两个或两个以上,除非另有明确的限定。术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本申请实施例提供的方法实施例和装置实施例等不同类型的实施例均可以相互参考,本申请实施例对此不做限定。在本申请提供的相应实施例中,应该理解到,所揭露的系统和装置等可以通过其它的构成方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,
模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元描述的部件可以是或者也可以不是物理单元,既可以位于一个地方,或者也可以分布到多个装置上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
以上所述,仅为本申请的可选实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (20)
- 一种应用更新系统,其特征在于,所述系统包括:第一应用,用于将所述第一应用包括的至少一个目标程序的版本信息发送至管理中心;所述管理中心,用于接收所述第一应用发送的所述至少一个目标程序的版本信息;所述第一应用,还用于根据所述管理中心接收到的待更新的目标程序的版本信息的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;其中,所述待更新的目标程序包括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
- 根据权利要求1所述的系统,其特征在于,所述管理中心还用于:通过比较所述目标程序的版本信息和目标版本信息,确定所述待更新的目标程序;向所述第一应用发送所述待更新的目标程序的版本信息的标识。
- 根据权利要求1或2所述的系统,其特征在于,所述第一应用的宿主应用和所述第二应用的宿主应用用于提供相同的服务。
- 根据权利要求1至3任一所述的系统,其特征在于,所述待更新的目标程序的版本信息的标识包括所述待更新的目标程序的响应编号,所述第一应用用于:将所述待更新的目标程序的响应编号从小到大排列;将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为所述至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数。
- 根据权利要求1至4任一所述的系统,其特征在于,所述第一应用将所述至少一个目标程序的版本信息发送至管理中心前,所述第一应用,还用于向配置中心发送订阅请求,所述订阅请求用于指示对目标程序的版本信息进行订阅;所述配置中心,还用于向所述第一应用发送订阅响应,所述订阅响应指示所述目标程序的版本信息存在更新。
- 根据权利要求1至5任一所述的系统,其特征在于,所述第一应用,还用于从配置中心获取所述目标程序的下载地址,并根据所述下载地址从软件库获取所述目标版本的目标程序。
- 根据权利要求1至6任一所述的系统,其特征在于,所述管理中心,还用于接收所述第二应用发送的所述第二应用包括的至少一个目标程序的版本信息。
- 根据权利要求1至7任一所述的系统,其特征在于,所述目标版本为最新版本。
- 一种应用更新方法,其特征在于,所述方法包括:将第一应用包括的至少一个目标程序的版本信息发送至管理中心;根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;其中,所述待更新的目标程序包括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
- 根据权利要求9所述的方法,其特征在于,在根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本之前,所述方法还包括:接收所述管理中心发送的所述待更新的目标程序的版本信息的标识。
- 根据权利要求9或10所述的方法,其特征在于,所述第一应用的宿主应用和所述第二应用的宿主应用用于提供相同的服务。
- 根据权利要求9至11任一所述的方法,其特征在于,所述待更新的目标程序的版本信息的标识包括所述待更新的目标程序的响应编号,所述根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本,包括:将所述待更新的目标程序的响应编号从小到大排列;将前n个响应编号对应的目标程序中属于所述第一应用的目标程序,确定为所述至少一个目标程序中进行更新的目标程序,n为大于或等于1的整数;将所述至少一个目标程序中进行更新的目标程序更新为所述目标版本。
- 根据权利要求9至12任一所述的方法,其特征在于,在所述将第一应用包括的至少一个目标程序的版本信息发送至管理中心之前,所述方法还包括:向配置中心发送订阅请求,所述订阅请求用于指示对目标程序的版本信息进行订阅;接收所述配置中心发送的订阅响应,所述订阅响应指示所述目标程序的版本信息存在更新。
- 根据权利要求9至13任一所述的方法,其特征在于,所述方法还包括:从配置中心获取所述目标程序的下载地址,并根据所述下载地址从软件库获取所述目标版本的目标程序。
- 根据权利要求9至14任一所述的方法,其特征在于,所述目标版本为最新版本。
- 一种应用更新方法,其特征在于,所述方法包括:第一应用将所述第一应用包括的至少一个目标程序的版本信息发送至管理中心;管理中心接收所述第一应用发送的所述至少一个目标程序的版本信息;所述第一应用根据所述管理中心接收到的待更新的目标程序的版本信息的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;其中,所述待更新的目标程序包 括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
- 一种应用更新装置,其特征在于,所述应用更新装置包括:第一发送模块,用于将第一应用包括的至少一个目标程序的版本信息发送至管理中心;更新模块,用于根据所述管理中心接收到的待更新的目标程序的标识,将所述至少一个目标程序中进行更新的目标程序更新为目标版本;其中,所述待更新的目标程序包括:所述第一应用包括的目标程序和第二应用包括的目标程序,所述第一应用和所述第二应用具有相同功能。
- 一种计算设备集群,其特征在于,包括至少一个计算设备,每个计算设备包括处理器和存储器;所述至少一个计算设备的处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行如权利要求9至15任一所述的方法;或者,所述至少一个计算设备的处理器用于执行所述至少一个计算设备的存储器中存储的指令,以使得所述计算设备集群执行如权利要求16所述的方法。
- 一种计算机可读存储介质,其特征在于,包括计算机程序指令;当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如权利要求9至15任一所述的方法;或者,当所述计算机程序指令由计算设备集群执行时,所述计算设备集群执行如权利要求16所述的方法。
- 一种包含指令的计算机程序产品,其特征在于,当所述指令被计算设备集群运行时,使得所述计算设备集群执行如权利要求9至15任一所述的方法;或者,当所述指令被计算设备集群运行时,使得所述计算设备集群执行如权利要求16所述的方法。
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210740805 | 2022-06-27 | ||
CN202210740805.4 | 2022-06-27 | ||
CN202211305912.0A CN117348896A (zh) | 2022-06-27 | 2022-10-24 | 应用更新方法、装置及系统 |
CN202211305912.0 | 2022-10-24 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024001403A1 true WO2024001403A1 (zh) | 2024-01-04 |
Family
ID=89367332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/087216 WO2024001403A1 (zh) | 2022-06-27 | 2023-04-10 | 应用更新方法、装置及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117348896A (zh) |
WO (1) | WO2024001403A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112130888A (zh) * | 2020-08-12 | 2020-12-25 | 百度时代网络技术(北京)有限公司 | 应用程序更新的方法、装置、设备和计算机存储介质 |
CN113434180A (zh) * | 2021-07-13 | 2021-09-24 | 上海浦东发展银行股份有限公司 | 应用的数据处理方法、装置、服务器和存储介质 |
CN113641384A (zh) * | 2021-08-09 | 2021-11-12 | 杭州安恒信息技术股份有限公司 | 一种探针的升级管理方法、装置和系统 |
WO2021238301A1 (zh) * | 2020-05-27 | 2021-12-02 | 华为技术有限公司 | 一种应用更新方法、装置、设备及介质 |
CN114371859A (zh) * | 2021-12-28 | 2022-04-19 | 安天科技集团股份有限公司 | 应用软件rasp程序更新方法、服务器、电子设备及存储介质 |
-
2022
- 2022-10-24 CN CN202211305912.0A patent/CN117348896A/zh active Pending
-
2023
- 2023-04-10 WO PCT/CN2023/087216 patent/WO2024001403A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021238301A1 (zh) * | 2020-05-27 | 2021-12-02 | 华为技术有限公司 | 一种应用更新方法、装置、设备及介质 |
CN112130888A (zh) * | 2020-08-12 | 2020-12-25 | 百度时代网络技术(北京)有限公司 | 应用程序更新的方法、装置、设备和计算机存储介质 |
CN113434180A (zh) * | 2021-07-13 | 2021-09-24 | 上海浦东发展银行股份有限公司 | 应用的数据处理方法、装置、服务器和存储介质 |
CN113641384A (zh) * | 2021-08-09 | 2021-11-12 | 杭州安恒信息技术股份有限公司 | 一种探针的升级管理方法、装置和系统 |
CN114371859A (zh) * | 2021-12-28 | 2022-04-19 | 安天科技集团股份有限公司 | 应用软件rasp程序更新方法、服务器、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN117348896A (zh) | 2024-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11126358B2 (en) | Data migration agnostic of pathing software or underlying protocol | |
CA2896865C (en) | Method and system for using a recursive event listener on a node in hierarchical data structure | |
US9367261B2 (en) | Computer system, data management method and data management program | |
US11546228B2 (en) | Zero-touch configuration of network devices using hardware metadata | |
US11822970B2 (en) | Identifier (ID) allocation in a virtualized computing environment | |
CN108073423B (zh) | 一种加速器加载方法、系统和加速器加载装置 | |
US11953997B2 (en) | Systems and methods for cross-regional back up of distributed databases on a cloud service | |
US11645100B2 (en) | Global cache for container images in a clustered container host system | |
US9882855B1 (en) | Instance messaging service | |
US11991094B2 (en) | Metadata driven static determination of controller availability | |
US11042473B2 (en) | Intelligent test case management for system integration testing | |
US20200228417A1 (en) | System and method of associating metadata with computing resources across multiple providers | |
US12073258B2 (en) | Configuration map based sharding for containers in a machine learning serving infrastructure | |
CN113760901A (zh) | 数据处理方法、装置、设备及存储介质 | |
EP3531282A1 (en) | Accelerator loading method and system, and accelerator loading apparatus | |
US11977559B2 (en) | Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs | |
CN109067564B (zh) | 分布式处理方法、装置、计算机设备及存储介质 | |
US20190081858A1 (en) | Discovering and mitigating out-of-sync network parameters | |
WO2024001403A1 (zh) | 应用更新方法、装置及系统 | |
CN114365109A (zh) | 启用rdma的键-值存储库 | |
US20230019037A1 (en) | Reactive non-blocking input and output for target device communication | |
EP4437426A1 (en) | Federation of data during query time in computing systems | |
CN113253931B (zh) | 一种适用于rabbitmq自动切换使用云数据盘的方法 | |
US11805012B2 (en) | Cloud network mechanism driver migration | |
US12039378B2 (en) | In-band modification of event notification preferences for server events |
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: 23829593 Country of ref document: EP Kind code of ref document: A1 |