System update publishing method based on cloud version control
By adopting multi-replica deployment and version control mechanisms in the system, zero downtime system updates are achieved, solving the problem of the need for a large amount of downtime and update failure in the existing technology, and improving user experience and resource utilization.
Patent Information
- Application Number
- CN202411766883.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-08
AI Technical Summary
Existing system update methods require a lot of downtime, affecting the user experience, and the code differences between the development environment and the production environment may lead to the failure of the update and cause waste of work.
The system update release method based on cloud version control is adopted, and zero downtime update is achieved by deploying multiple copies of each service. Use the version control mechanism to version the service and update and replace multiple copies of the target service in turn to ensure excessive smoothness between the old and new versions.
It realizes zero downtime updates, improves user experience, reduces the risk of update failure, and simplifies version management, improving resource utilization and service stability.
Smart Images

Figure CN119781808A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of version update control, and in particular to a system update and release method based on cloud version control. Background Art
[0002] At present, in today's digital age, various systems play a vital role in various fields; with the continuous development of technology and the continuous changes in user needs, systems need to be updated and released frequently to provide better performance, functions and user experience;
[0003] However, the current release and update of the system is often done after a lot of code modifications, the services that need to be updated are packaged and then the system update is announced; when the announcement time node arrives, the system service is stopped, and then the function package is replaced and the service is restarted to achieve the purpose of function release and update. After the update is released, a lot of testing is required, and after confirmation, a message is issued to notify the completion of the update, which leads to the following shortcomings:
[0004] 1. The update requires a lot of downtime, which greatly affects the user experience. It may cause the user's tasks to fail to be completed in time at some time nodes; 2. If there are code differences between the development environment and the production environment, the update will fail and even require function rollback, which will cause a lot of work waste;
[0005] Therefore, in order to overcome the above technical problems, the present invention provides a system update and release method based on cloud version control. Summary of the invention
[0006] The present invention provides a system update and release method based on cloud version control, which is used to effectively ensure that each copy has the ability to provide complete service capabilities by deploying multiple copies of each service of the platform; this multi-copy deployment method ensures that even if some copies are temporarily unavailable due to maintenance or updating, other copies can still continue to provide services, thereby achieving the goal of zero downtime; by performing version management on various services based on the version control mechanism, it is helpful to clearly distinguish the differences between different versions, and also greatly simplifies the complexity of version management, so that technical personnel can more easily track and record the change history of services; by updating and replacing multiple target copies of the target service in turn based on the version control mechanism to obtain a new target service, it is helpful to ensure a smooth transition between the old and new versions, thereby laying a foundation for the release and update of the new target service, and by performing load balancing management on multiple copies of the new target service, it is effectively guaranteed to improve the utilization rate of resources, and it can also ensure that even if a copy fails or the performance degrades, other copies can still bear the additional load, thereby ensuring the overall stability and availability of the service.
[0007] The present invention provides a system update and release method based on cloud version control, comprising:
[0008] Step 1: Get multiple services of the platform and deploy multiple copies of each service;
[0009] Step 2: Perform version management on each service based on the version control mechanism, and when there is a target service to be updated, update and replace multiple target copies of the target service in sequence based on the version control mechanism to obtain a new target service;
[0010] Step 3: Publish update notifications for the new target service and perform load balancing management on multiple copies of the new target service.
[0011] Preferably, in a system update and release method based on cloud version control, in step 2, version management is performed on each service based on a version control mechanism, including:
[0012] S21: Obtain the service type and version status of each service, and construct the version number corresponding to each service according to the service type and version status of each service;
[0013] S22: performing version management on the version numbers of various services according to the service type based on the version control mechanism, wherein the version management includes: version number storage, version number update, and copy update and replacement;
[0014] S23: When there is a target service to be updated, multiple target copies of the target service are updated and replaced in sequence based on the version control mechanism to obtain a new target service.
[0015] Preferably, a system update release method based on cloud version control, in S23, when there is a target service update, multiple target copies of the target service are updated and replaced in sequence based on the version control mechanism to obtain a new target service, including:
[0016] When there is a target service update, an updated version number of the target service is generated based on the version control mechanism;
[0017] Read multiple target copies of the target service and determine the real-time working status of each target copy, where the working status includes: processing user request status and idle status;
[0018] Based on the version control mechanism, the update version number is updated to multiple target copies according to the real-time working status of each target copy.
[0019] Preferably, a system update release method based on cloud version control updates the update version number to multiple target copies based on the version control mechanism according to the real-time working status of each target copy, including:
[0020] Based on the version control mechanism, the update version number is updated to multiple target copies according to the real-time working status of each target copy, including:
[0021] S231: marking, among multiple target replicas, a first target replica set corresponding to a target replica whose real-time working status is in an idle state and a second target replica set whose real-time working status is in a processing user request state;
[0022] S232: Add a serial number tag to the first target replica in the first target replica set, perform replica update operations in sequence according to the serial number tags, store the updated target replica in the third target replica set, and update the serial number tag of the first target replica set in real time;
[0023] S233: updating the first target replica in the first target replica set in real time according to the added sequence number tag, and storing the updated target replica in the third target replica set;
[0024] S234: Read the real-time working status of the second target replica set in real time, and when there is a target second target replica in the second target replica set that is in an idle state, update the target second target replica in the first target replica set as the first target replica, and add sequence number tags in sequence;
[0025] S235: During the update process, the real-time number of user requests of the target service is read in real time, and the real-time number of replicas in the first target replica set is read in real time;
[0026] S236: When the number of user requests is less than or equal to the number of real-time replicas minus one, extracting the number of first target replicas requested by the user from the first target replica set as second target replicas and updating them in the second target replica set;
[0027] S237: When the number of user requests is greater than the number of real-time replicas minus one, extracting the number of real-time replicas minus one first target replica from the first target replica set as the second target replica and updating it in the second target replica set;
[0028] S238: Repeat steps S234-S237 until the multiple target replicas are in the third target replica set, and complete the update and replacement of the multiple target replicas of the target service based on the third target replica set. At the same time, generate a new target service based on the update and replacement result.
[0029] Preferably, a system update release method based on cloud version control, in step 1, multiple services of the platform are obtained, and multiple copies are deployed for each service, including:
[0030] Read multiple services to determine the resource information weight and service access frequency of each service;
[0031] Obtain a replica number table, wherein the replica number table includes the number of replicas recommended for each resource information weight and the number of replicas recommended for each service access frequency;
[0032] Perform a first match in the replica number table according to the resource information weight of each service to obtain a first replica construction number, and at the same time, perform a second match in the replica number table according to the service access frequency of each service to obtain a second replica construction number;
[0033] The maximum value between the first replica build number and the second replica build number is taken as the target replica build number of the corresponding service;
[0034] Build the target replica corresponding to each service based on the resource data of each service;
[0035] Get the platform deployment mode, and deploy the target replicas and target replica build number corresponding to each service according to the platform deployment mode to complete the multi-replica deployment of each service.
[0036] Preferably, a system update release method based on cloud version control constructs replica resource data of a replica corresponding to each service according to resource data of each service, including:
[0037] Read the resource data of each service, and copy the resource data of each service to obtain the replica resource data of the replica;
[0038] Obtain the service logic of each service, and associate the replica resource data according to the service logic of each service;
[0039] Build a target copy of each service based on the data association results, and simulate the target copy of each service in the platform to obtain the simulation results;
[0040] The simulation results are matched with the actual results of the service. If the simulation results match the actual results of the service, the target replica is determined to be qualified.
[0041] Otherwise, the target copy is determined to be unqualified and is rebuilt.
[0042] Preferably, a system update release method based on cloud version control, after taking the maximum value between the first replica build number and the second replica build number as the target replica build number of the corresponding service, comprises:
[0043] Get the visit volume threshold;
[0044] Matching the visit volume threshold with the visit volume of the current service;
[0045] When the access volume threshold is compared with the access volume of the current service, and when the access volume of the current service is equal to or greater than the access volume threshold, the replica build instruction is triggered;
[0046] Build a replica of the current service according to the replica build instruction.
[0047] Preferably, in a system update release method based on cloud version control, in step 3, an update notification is released to a new target service, including a detection item for the new target service, and the specific process is as follows:
[0048] S31: Acquire the new target service and determine the detection items for the new target service, wherein the detection items include self-operation detection and compatibility detection with existing services in the platform;
[0049] S32: based on the detection project, the new target service is tested in the platform, and the operation parameters of the new target service are collected in real time based on the test run;
[0050] S33: dividing the operating parameters of the new target service into categories based on the detection items, and analyzing the operating parameters of each category to obtain the state change characteristics of the new target service itself and the operating stability characteristics compared with the existing services;
[0051] S34: Based on its own state change characteristics and operation stability characteristics, the new target service's own operation detection results and the compatibility detection results with the existing services in the platform are obtained. When both the self-operation detection results and the compatibility detection results meet the preset requirements, an update notification for the new target service is issued based on the platform.
[0052] Preferably, a system update release method based on cloud version control, in S34, when the self-operation detection results and the compatibility detection results meet the preset requirements, the new target service is controlled to roll back to the target service corresponding to the old version based on the version control mechanism.
[0053] Preferably, in a system update release method based on cloud version control, in step 3, multiple copies of the new target service are load balanced, including:
[0054] Based on the published results of the update notification, the number of visits to the new target service is monitored in real time. At the same time, multiple copies of the new target service are traversed, and the number of idle copies is obtained based on the traversal results;
[0055] Extract the maximum allowable access volume of each idle replica, and evenly divide the access volume of the new target service based on the maximum allowable access volume of each idle replica;
[0056] When the average partition result of each idle copy is less than or equal to the maximum allowed access volume, the load balancing management of multiple copies of the new target service is completed based on the average partition result;
[0057] Otherwise, the remaining access volume of each idle copy after the even division is queued and waits, and the corresponding copies are accessed in turn after the upper user's access is completed to complete the multi-copy load balancing management.
[0058] Compared with the prior art, the present invention has the following beneficial effects:
[0059] By deploying multiple copies of each service on the platform, it can be effectively guaranteed that each copy has the ability to provide complete service capabilities; this multi-copy deployment method ensures that even if some copies are temporarily unavailable due to maintenance or updates, other copies can still continue to provide services, thus achieving the goal of zero downtime; by managing the versions of various services based on the version control mechanism, it helps to clearly distinguish the differences between different versions, and also greatly simplifies the complexity of version management, allowing technical personnel to more easily track and record the change history of services; by updating and replacing multiple target copies of the target service in sequence based on the version control mechanism to obtain a new target service, it is helpful to ensure a smooth transition between the old and new versions, thereby laying the foundation for the release and update of the new target service, and by load balancing the new target service, it can effectively ensure the improvement of resource utilization, and ensure that even if a copy fails or performance degrades, other copies can still bear the additional load, ensuring the overall stability and availability of the service.
[0060] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.
[0061] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0063] Figure 1 This is a flow chart of a system update and release method based on cloud version control in an embodiment of the present invention;
[0064] Figure 2 This is a flowchart of step 2 in a system update and release method based on cloud version control in an embodiment of the present invention;
[0065] Figure 3 This is a flowchart of step 3 in a system update and release method based on cloud version control in an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0067] Embodiment 1:
[0068] This embodiment provides a system update release method based on cloud version control, such as Figure 1 As shown, including:
[0069] Step 1: Get multiple services of the platform and deploy multiple copies of each service;
[0070] Step 2: Perform version management on each service based on the version control mechanism, and when there is a target service to be updated, update and replace multiple target copies of the target service in sequence based on the version control mechanism to obtain a new target service;
[0071] Step 3: Publish update notifications for the new target service and perform load balancing management on multiple copies of the new target service.
[0072] In this embodiment, each service of the platform is deployed with multiple copies, which means that each service has multiple identical copies running, and each copy has the ability to provide complete service capabilities. This multi-copy deployment method ensures that even if some copies are temporarily unavailable due to maintenance or updates, other copies can still continue to provide services, thus achieving the goal of zero downtime.
[0073] In this embodiment, version management includes: version number storage, version number update, and copy update and replacement; the platform also provides a version control mechanism for each service. The version control mechanism strictly manages the services. This means that each service has a clear version number to identify its current version status. This clear version number not only helps to clearly distinguish the differences between different versions, but also greatly simplifies the complexity of version management, allowing technicians to more easily track and record the change history of the service.
[0074] In this embodiment, updating and replacing multiple target copies of the target service in sequence based on the version control mechanism may include: whenever a service is updated, the version control mechanism will assign it a new version number. This approach ensures a clear distinction between versions, allowing technicians to accurately understand the specific content and changes of each version. At the same time, the new version number also serves as an identifier of the service identity, which helps to quickly locate the specific version when a problem occurs, thereby improving the efficiency of troubleshooting and solving problems;
[0075] The version control mechanism also supports smooth upgrades and rollbacks of services. During the upgrade process, the version control mechanism can ensure a smooth transition between the old and new versions, avoiding service interruptions or unavailability caused by version upgrades. At the same time, if the new version has problems or does not meet expectations, the version control mechanism also supports rapid rollback to the old version, thereby ensuring the stability and availability of the service. This smooth upgrade and rollback capability is the key to achieving zero downtime updates based on zero downtime update delivery technology based on service replicas;
[0076] The smooth transition is: every time a service is updated, the version control mechanism will assign it a new version number. This approach ensures a clear distinction between versions, allowing technicians to accurately understand the specific content and changes of each version; at the same time, the new version number also serves as a service identity. When a service needs to be updated, the copies can be updated one by one instead of stopping the services of all copies at the same time.
[0077] In this embodiment, when a service needs to be updated, the replicas can be updated one by one instead of stopping the services of all replicas at the same time. In this way, even if some replicas are being updated, other replicas can still continue to process user requests, ensuring the continuity and availability of the service. This gradual update method greatly reduces the risk of service interruption and improves the user experience.
[0078] In this embodiment, the version control mechanism is a system or method for managing and tracking changes of services at different stages.
[0079] The working principle and beneficial effects of the above technical solution are: by deploying multiple copies of each service on the platform, it can be effectively guaranteed that each copy has the ability to provide complete service capabilities; this multi-copy deployment method ensures that even if some copies are temporarily unavailable due to maintenance or updates, other copies can still continue to provide services, thereby achieving the goal of zero downtime; by managing the versions of various services based on the version control mechanism, it helps to clearly distinguish the differences between different versions, and greatly simplifies the complexity of version management, allowing technical personnel to more easily track and record the change history of services; by updating and replacing multiple target copies of the target service in turn based on the version control mechanism to obtain a new target service, it is helpful to ensure a smooth transition between the old and new versions, thereby laying the foundation for the release and update of the new target service, and by load balancing the new target service, it is effectively guaranteed to improve resource utilization, and it can also ensure that even if a copy fails or performance degrades, other copies can still bear the additional load, thereby ensuring the overall stability and availability of the service.
[0080] Embodiment 2:
[0081] Based on Example 1, this example provides a system update release method based on cloud version control, such as Figure 2 As shown, in step 2, version management is performed on each service based on the version control mechanism, including:
[0082] S21: Obtain the service type and version status of each service, and construct the version number corresponding to each service according to the service type and version status of each service;
[0083] S22: performing version management on the version numbers of various services according to the service type based on the version control mechanism, wherein the version management includes: version number storage, version number update, and copy update and replacement;
[0084] S23: When there is a target service to be updated, multiple target copies of the target service are updated and replaced in sequence based on the version control mechanism to obtain a new target service.
[0085] In this embodiment, the service type may be a type of system service, such as gateway service, system service, etc.
[0086] In this embodiment, the version status may be the situation of the service during its version iteration process, for example, whether the current version is an official release version, a test version, a pre-release version, etc.; it may also indicate whether the version is stable, whether there are known problems or defects, whether it is being updated or maintained, and other status information; clarifying the version status helps relevant personnel understand the characteristics and applicable scenarios of the service or product at a specific stage, so as to better manage, use and make decisions.
[0087] In this embodiment, each service has a clear version number, which is used to identify the current version status of the service.
[0088] The working principle and beneficial effects of the above technical solution are: by determining the type, version status and version number of each service, the version management of each service can be effectively implemented based on the version control mechanism. Then, when the target service is updated, multiple target copies of the target service are updated and replaced in turn based on the version control mechanism to obtain a new target service. This not only helps to clearly distinguish the differences between different versions, but also greatly simplifies the complexity of version management, allowing technical personnel to more easily track and record the change history of the service.
[0089] Embodiment 3:
[0090] Based on Example 1, this embodiment provides a system update release method based on cloud version control. In S23, when there is a target service update, multiple target copies of the target service are updated and replaced in sequence based on the version control mechanism to obtain a new target service, including:
[0091] When there is a target service update, an updated version number of the target service is generated based on the version control mechanism;
[0092] Read multiple target copies of the target service and determine the real-time working status of each target copy, where the working status includes: processing user request status and idle status;
[0093] Based on the version control mechanism, the update version number is updated to multiple target copies according to the real-time working status of each target copy.
[0094] In this embodiment, the updated version number may be generated based on a version control mechanism and used to distinguish the version number of the target service before the update.
[0095] The working principle and beneficial effects of the above technical solution are: by determining the working status of multiple target copies and updating multiple target services in real time according to the working status, the continuity and availability of the target services can be effectively guaranteed; this gradual update method greatly reduces the risk of service interruption and improves the user experience.
[0096] Embodiment 4:
[0097] Based on Example 3, this embodiment provides a system update release method based on cloud version control, which updates the update version number to multiple target copies according to the real-time working status of each target copy based on the version control mechanism, including:
[0098] S231: marking, among multiple target replicas, a first target replica set corresponding to a target replica whose real-time working status is in an idle state and a second target replica set whose real-time working status is in a processing user request state;
[0099] S232: Add a serial number tag to the first target replica in the first target replica set, perform replica update operations in sequence according to the serial number tags, store the updated target replica in the third target replica set, and update the serial number tag of the first target replica set in real time;
[0100] S233: updating the first target replica in the first target replica set in real time according to the added sequence number tag, and storing the updated target replica in the third target replica set;
[0101] S234: Read the real-time working status of the second target replica set in real time, and when there is a target second target replica in the second target replica set that is in an idle state, update the target second target replica in the first target replica set as the first target replica, and add sequence number tags in sequence;
[0102] S235: During the update process, the real-time number of user requests of the target service is read in real time, and the real-time number of replicas in the first target replica set is read in real time;
[0103] S236: When the number of user requests is less than or equal to the number of real-time replicas minus one, extracting the number of first target replicas requested by the user from the first target replica set as second target replicas and updating them in the second target replica set;
[0104] S237: When the number of user requests is greater than the number of real-time replicas minus one, extracting the number of real-time replicas minus one first target replica from the first target replica set as the second target replica and updating it in the second target replica set;
[0105] S238: Repeat steps S234-S237 until the multiple target replicas are in the third target replica set, and complete the update and replacement of the multiple target replicas of the target service based on the third target replica set. At the same time, generate a new target service based on the update and replacement result.
[0106] In this embodiment, the first target replica set may be a target replica set corresponding to when the real-time working state is in an idle state, storing multiple first target replicas (ie, replicas in the space state).
[0107] In this embodiment, the second target replica set may be a target replica set corresponding to when the real-time working state is in the user requested state, storing multiple second target replicas (ie, replicas in the user requested state).
[0108] In this embodiment, adding a serial number tag may be randomly adding a serial number identifier to the target replicas in the first target replica set, for example: first, second, etc. By adding the serial number tag, the target replicas in the first target replica set can be effectively updated in sequence.
[0109] In this embodiment, updating the target second target copy as the first target copy in the first target copy set and adding serial number tags in sequence can be that the target second target copy that completes the user request state (that is, the copy in the idle state) is used as the first target copy, and the new first target copy is updated in the first target copy set, and adding serial number tags in sequence can be determining the sorting status of the first target copy in the current first target copy set, and adding serial number tags according to the sorting status, for example: if the first target copy in the current first target copy set is sorted to fifth, then the serial number tag added to the new first target copy is sixth.
[0110] In this embodiment, the third target replica set may be a set consisting of target replicas that have completed replica updating.
[0111] The working principle and beneficial effects of the above technical solution are: by dividing multiple target copies according to the real-time working status of multiple target copies, a first target copy set and a second target copy set are obtained; by adding a serial number tag to the first target copy corresponding to the first target copy set, the purpose of updating the first target copy in the first target copy set can be effectively achieved in sequence, thereby ensuring the orderliness of the update; by real-time monitoring of the dynamics of the second target copy in the second target copy set and the number of real-time user requests, the real-time update and replacement of the first target copy set and the second target copy set can be effectively achieved, further ensuring the stability and continuity of service operation; and then when all target copies are in the third target copy set, the acquisition of the new target service is completed, which greatly reduces the risk of service interruption and improves the user experience.
[0112] Embodiment 5:
[0113] Based on Example 1, this embodiment provides a system update release method based on cloud version control. In step 1, multiple services of the platform are obtained, and multiple copies are deployed for each service, including:
[0114] Read multiple services to determine the resource information weight and service access frequency of each service;
[0115] Obtain a replica number table, wherein the replica number table includes the number of replicas recommended for each resource information weight and the number of replicas recommended for each service access frequency;
[0116] Perform a first match in the replica number table according to the resource information weight of each service to obtain a first replica construction number, and at the same time, perform a second match in the replica number table according to the service access frequency of each service to obtain a second replica construction number;
[0117] The maximum value between the first replica build number and the second replica build number is taken as the target replica build number of the corresponding service;
[0118] Build the target replica corresponding to each service based on the resource data of each service;
[0119] Get the platform deployment mode, and deploy the target replicas and target replica build number corresponding to each service according to the platform deployment mode to complete the multi-replica deployment of each service.
[0120] In this embodiment, the resource information weight may be the importance of the resource information.
[0121] In this embodiment, the first replica construction number may be the number of replicas that can be constructed determined based on the resource information weight.
[0122] In this embodiment, the second replica construction number may be a constructible replica number determined based on a service access frequency.
[0123] In this embodiment, taking the maximum value between the first replica build number and the second replica build number as the target replica build number for the corresponding service can be used to ensure the effectiveness and integrity of the deployment of the replica number and avoid the problem of incomplete replica deployment.
[0124] The working principle and beneficial effects of the above technical solution are: first read multiple services to understand their respective resource information weights and service access frequencies; the resource information weight reflects the service's demand for resources, while the service access frequency reflects the popularity of the service. The first replica build number and the second replica build number are effectively determined through the replica number table, and the maximum value is selected as the target replica build number, which can effectively meet the dual requirements of resource demand and high access frequency, effectively ensure the reasonable construction of the number of replicas, and effectively avoid insufficient replicas.
[0125] Embodiment 6:
[0126] Based on Example 5, this embodiment provides a system update release method based on cloud version control, which constructs replica resource data of a replica corresponding to each service according to resource data of each service, including:
[0127] Read the resource data of each service, and copy the resource data of each service to obtain the replica resource data of the replica;
[0128] Obtain the service logic of each service, and associate the replica resource data according to the service logic of each service;
[0129] Build a target copy of each service based on the data association results, and simulate the target copy of each service in the platform to obtain the simulation results;
[0130] The simulation results are matched with the actual results of the service. If the simulation results match the actual results of the service, the target replica is determined to be qualified.
[0131] Otherwise, the target copy is determined to be unqualified and is rebuilt.
[0132] In this embodiment, the service logic may be a series of rules, processes, and operation sequences followed during the operation of the service. The service logic may effectively realize association between replica resource data according to the operation sequence.
[0133] In this embodiment, the actual operation result of the service may be known in advance.
[0134] The working principle and beneficial effects of the above technical solution are: by reading the resource data of each service and copying it, the replica resource data is obtained, which is the basis for building the replica; the data association of the replica resource data is effectively realized through the service logic; by performing simulation operation in the platform to obtain the simulation operation results, the stability of the replica operation is effectively guaranteed, ensuring that the replica can accurately implement the functions of the original service, thereby improving the reliability of the target replica operation.
[0135] Embodiment 7:
[0136] Based on Example 5, this embodiment provides a system update release method based on cloud version control, after taking the maximum value between the first replica build number and the second replica build number as the target replica build number of the corresponding service, including:
[0137] Get the visit volume threshold;
[0138] Matching the visit volume threshold with the visit volume of the current service;
[0139] When the access volume threshold is compared with the access volume of the current service, and when the access volume of the current service is equal to or greater than the access volume threshold, the replica build instruction is triggered;
[0140] Build a replica of the current service according to the replica build instruction.
[0141] In this embodiment, the access volume threshold may be set in advance and used to implement a standard for measuring whether to generate a trigger replica build instruction.
[0142] In this embodiment, the replica construction instruction may be set in advance, and the triggering condition is when the number of visits to the current service is equal to or greater than the number of visits threshold.
[0143] The beneficial effect of the above technical solution is: effectively ensuring the scalability of service copies, thereby ensuring the stability and continuity of service operation.
[0144] Embodiment 8:
[0145] Based on Example 1, this example provides a system update release method based on cloud version control, such as Figure 3 As shown, in step 3, an update notification is issued to the new target service, including the detection items of the new target service. The specific process is as follows:
[0146] S31: Acquire the new target service and determine the detection items for the new target service, wherein the detection items include self-operation detection and compatibility detection with existing services in the platform;
[0147] S32: based on the detection project, the new target service is tested in the platform, and the operation parameters of the new target service are collected in real time based on the test run;
[0148] S33: dividing the operating parameters of the new target service into categories based on the detection items, and analyzing the operating parameters of each category to obtain the state change characteristics of the new target service itself and the operating stability characteristics compared with the existing services;
[0149] S34: Based on its own state change characteristics and operation stability characteristics, the new target service's own operation detection results and the compatibility detection results with the existing services in the platform are obtained. When both the self-operation detection results and the compatibility detection results meet the preset requirements, an update notification for the new target service is issued based on the platform.
[0150] In this embodiment, the self-operation detection may be to detect the operation status of the new target service itself, with the purpose of ensuring that there is no problem with the function of the new target service itself.
[0151] In this embodiment, the compatibility detection is to detect the compatibility between the new target service and the services that have previously existed in the platform, in order to ensure that the new target service can effectively run in the platform.
[0152] In this embodiment, the characteristic of the state change itself may be that after the new target service is tested, the operation parameters of the new target service are analyzed to obtain the operation status of the new target service itself.
[0153] In this embodiment, the stable operation feature may be that after the new target service is tested, the operation parameters of the new target service are analyzed to obtain the compatibility between the new target service and the existing services in the platform.
[0154] In this embodiment, the preset requirements are set in advance.
[0155] The working principle and beneficial effects of the above technical solution are: by determining the detection items for the new target service, the new target service's own performance and compatibility with the existing services in the platform are detected according to the detection items, and finally when the detection results meet the preset requirements, the platform releases an update notification for the new target service, thereby ensuring the reliability of the update release of the new target service.
[0156] Embodiment 9:
[0157] Based on Example 8, this embodiment provides a system update and release method based on cloud version control. In S34, when the self-operation detection results and the compatibility detection results meet the preset requirements, the new target service is controlled to roll back to the target service corresponding to the old version based on the version control mechanism.
[0158] In this embodiment, the preset requirement may be when the target service of the new version has problems such as abnormal operation or does not meet the expected status.
[0159] The beneficial effect of the above technical solution is that if a new version has problems or does not meet expectations, the version control mechanism also supports rapid rollback to the old version, thereby ensuring the stability and availability of the service.
[0160] Embodiment 10:
[0161] Based on Example 1, this embodiment provides a system update release method based on cloud version control. In step 3, multi-copy load balancing management is performed on the new target service, including:
[0162] Based on the published results of the update notification, the number of visits to the new target service is monitored in real time. At the same time, multiple copies of the new target service are traversed, and the number of idle copies is obtained based on the traversal results;
[0163] Extract the maximum allowable access volume of each idle replica, and evenly divide the access volume of the new target service based on the maximum allowable access volume of each idle replica;
[0164] When the average partition result of each idle copy is less than or equal to the maximum allowed access volume, the load balancing management of multiple copies of the new target service is completed based on the average partition result;
[0165] Otherwise, the remaining access volume of each idle copy after the even division is queued and waits, and the corresponding copies are accessed in turn after the upper user's access is completed to complete the multi-copy load balancing management.
[0166] In this embodiment, the number of idle copies may be the number of copies that are currently available among the multiple copies corresponding to the new target service.
[0167] In this embodiment, the maximum allowable access amount may be the maximum number of accesses that can be allowed for each idle copy.
[0168] In this embodiment, the queue waiting may be to sort the users whose average segmentation results are greater than the maximum allowable access amount according to the access time and wait.
[0169] In this embodiment, the upper user may be the upper user of the current access user.
[0170] The working principle and beneficial effects of the above technical solution are: by determining the number of visits to the new target service and the number of idle copies of the new target service, load balancing management of multiple copies is achieved based on the number of visits and the number of idle copies. The multi-copy operation mechanism also achieves rational utilization of resources and high availability of services through load balancing technology. Load balancing technology can intelligently distribute user requests evenly to each service copy, avoiding the situation where one copy is overloaded while other copies are idle. This not only improves resource utilization, but also ensures that even if a copy fails or performance degrades, other copies can still bear the additional load, thereby ensuring the overall stability and availability of the service.
[0171] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A system update and release method based on cloud version control, characterized in that: include: Step 1: Get multiple services of the platform and deploy multiple copies of each service; Step 2: Perform version management on each service based on the version control mechanism, and when there is a target service to be updated, update and replace multiple target copies of the target service in sequence based on the version control mechanism to obtain a new target service; Step 3: Publish update notifications for the new target service and perform load balancing management on multiple copies of the new target service.
2. According to the method of claim 1, the system update and release method based on cloud version control is characterized in that: In step 2, version management is performed on each service based on the version control mechanism, including: S21: Obtain the service type and version status of each service, and construct the version number corresponding to each service according to the service type and version status of each service; S22: performing version management on the version numbers of various services according to the service type based on the version control mechanism, wherein the version management includes: version number storage, version number update, and copy update and replacement; S23: When there is a target service to be updated, multiple target copies of the target service are updated and replaced in sequence based on the version control mechanism to obtain a new target service.
3. According to the system update release method based on cloud version control according to claim 1, it is characterized in that: In S23, when there is a target service update, multiple target copies of the target service are updated and replaced in sequence based on the version control mechanism to obtain a new target service, including: When there is a target service update, an updated version number of the target service is generated based on the version control mechanism; Read multiple target copies of the target service and determine the real-time working status of each target copy, where the working status includes: processing user request status and idle status; Based on the version control mechanism, the update version number is updated to multiple target copies according to the real-time working status of each target copy.
4. According to the method of claim 3, the system update and release method based on cloud version control is characterized in that: Based on the version control mechanism, the update version number is updated to multiple target copies according to the real-time working status of each target copy, including: S231: marking, among multiple target replicas, a first target replica set corresponding to a target replica whose real-time working status is in an idle state and a second target replica set whose real-time working status is in a processing user request state; S232: Add a serial number tag to the first target replica in the first target replica set, perform replica update operations in sequence according to the serial number tags, store the updated target replica in the third target replica set, and update the serial number tag of the first target replica set in real time; S233: updating the first target replica in the first target replica set in real time according to the added sequence number tag, and storing the updated target replica in the third target replica set; S234: Read the real-time working status of the second target replica set in real time, and when there is a target second target replica in the second target replica set that is in an idle state, update the target second target replica in the first target replica set as the first target replica, and add sequence number tags in sequence; S235: During the update process, the real-time number of user requests of the target service is read in real time, and the real-time number of replicas in the first target replica set is read in real time; S236: When the number of user requests is less than or equal to the number of real-time replicas minus one, extracting the number of first target replicas requested by the user from the first target replica set as second target replicas and updating them in the second target replica set; S237: When the number of user requests is greater than the number of real-time replicas minus one, extracting the number of real-time replicas minus one first target replica from the first target replica set as the second target replica and updating it in the second target replica set; S238: Repeat steps S234-S237 until the multiple target replicas are in the third target replica set, and complete the update and replacement of the multiple target replicas of the target service based on the third target replica set. At the same time, generate a new target service based on the update and replacement result.
5. According to the system update release method based on cloud version control according to claim 1, it is characterized in that: In step 1, obtain multiple services of the platform and deploy multiple copies of each service, including: Read multiple services to determine the resource information weight and service access frequency of each service; Obtain a replica number table, wherein the replica number table includes the number of replicas recommended for each resource information weight and the number of replicas recommended for each service access frequency; Perform a first match in the replica number table according to the resource information weight of each service to obtain a first replica construction number, and at the same time, perform a second match in the replica number table according to the service access frequency of each service to obtain a second replica construction number; The maximum value between the first replica build number and the second replica build number is taken as the target replica build number of the corresponding service; Build the target replica corresponding to each service based on the resource data of each service; Get the platform deployment mode, and deploy the target replicas and target replica build number corresponding to each service according to the platform deployment mode to complete the multi-replica deployment of each service.
6. A system update and release method based on cloud version control according to claim 5, characterized in that: Build the replica resource data of each service's corresponding replica based on the resource data of each service, including: Read the resource data of each service, and copy the resource data of each service to obtain the replica resource data of the replica; Obtain the service logic of each service, and associate the replica resource data according to the service logic of each service; Build a target copy of each service based on the data association results, and simulate the target copy of each service in the platform to obtain the simulation results; The simulation results are matched with the actual results of the service. If the simulation results match the actual results of the service, the target replica is determined to be qualified. Otherwise, the target copy is determined to be unqualified and is rebuilt.
7. A system update and release method based on cloud version control according to claim 5, characterized in that: After taking the maximum value between the first replica build number and the second replica build number as the target replica build number of the corresponding service, including: Get the visit volume threshold; Matching the visit volume threshold with the visit volume of the current service; When the access volume threshold is compared with the access volume of the current service, and when the access volume of the current service is equal to or greater than the access volume threshold, the replica build instruction is triggered; Build a replica of the current service according to the replica build instruction.
8. The system update and release method based on cloud version control according to claim 1, characterized in that: In step 3, an update notification is issued for the new target service, including the detection items for the new target service. The specific process is as follows: S31: Acquire the new target service and determine the detection items for the new target service, wherein the detection items include self-operation detection and compatibility detection with existing services in the platform; S32: based on the detection project, the new target service is tested in the platform, and the operation parameters of the new target service are collected in real time based on the test run; S33: dividing the operating parameters of the new target service into categories based on the detection items, and analyzing the operating parameters of each category to obtain the state change characteristics of the new target service itself and the operating stability characteristics compared with the existing services; S34: Based on its own state change characteristics and operation stability characteristics, the new target service's own operation detection results and the compatibility detection results with the existing services in the platform are obtained. When both the self-operation detection results and the compatibility detection results meet the preset requirements, an update notification for the new target service is issued based on the platform.
9. A system update and release method based on cloud version control according to claim 8, characterized in that: In S34, when the self-operation detection result and the compatibility detection result meet the preset requirements, the new target service is controlled to roll back to the target service corresponding to the old version based on the version control mechanism.
10. A system update and release method based on cloud version control according to claim 1, characterized in that: In step 3, multiple copies of the new target service are load balanced, including: Based on the published results of the update notification, the number of visits to the new target service is monitored in real time. At the same time, multiple copies of the new target service are traversed, and the number of idle copies is obtained based on the traversal results; Extract the maximum allowable access volume of each idle replica, and evenly divide the access volume of the new target service based on the maximum allowable access volume of each idle replica; When the average partition result of each idle copy is less than or equal to the maximum allowed access volume, the load balancing management of multiple copies of the new target service is completed based on the average partition result; Otherwise, the remaining access volume of each idle copy after the even division is queued and waits, and the corresponding copies are accessed in turn after the upper user's access is completed to complete the multi-copy load balancing management.
Citation Information
Patent Citations
Rolling update method for cloud service system
CN105721617A