A system upgrading method, device, equipment and storage medium

CN122173107APending Publication Date: 2026-06-09NETSUNION CLEARING CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETSUNION CLEARING CORP
Filing Date
2024-12-06
Publication Date
2026-06-09

Smart Images

  • Figure CN122173107A_ABST
    Figure CN122173107A_ABST
Patent Text Reader

Abstract

This application relates to a system upgrade method, apparatus, device, and storage medium for improving system upgrade efficiency. The method includes: at specified time intervals, acquiring the processing results of each service request by a first system within the specified time interval, wherein the system includes a first system and a second system, and the first system is an upgraded version of the second system; if the processing results of each service request meet a first specified condition, determining whether the system's traffic allocation strategy meets a second specified condition, wherein the traffic allocation strategy represents the proportion of each service request received by the first system and the second system respectively; if not, adjusting the traffic allocation strategy to obtain an adjusted allocation strategy, and determining the adjusted allocation strategy as the system's traffic allocation strategy, wherein the proportion of each service request received by the first system processed by the first system in the adjusted traffic allocation strategy increases; if yes, determining that the system upgrade is complete.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and more particularly to a system upgrade method, apparatus, device, and storage medium. Background Technology

[0002] Most systems are characterized by being business-critical, having a large volume of business, requiring high business continuity, and being complex. Such systems are generally composed of multiple subsystems, and a failure in any of these subsystems can potentially impact the overall system's business operations.

[0003] To address issues such as the expiration of service life of existing hardware and software and supply chain risks, a large-scale upgrade of various subsystems within the system is necessary to ensure system autonomy and controllability. Given the system's complexity and importance, ensuring business continuity while undertaking a large-scale upgrade is an industry-wide challenge.

[0004] In existing technologies, system upgrades typically involve gradually replacing each subsystem within the system. For example, replacing subsystems one by one until the replacement is complete, thus confirming the upgrade is finished. However, this approach introduces both old and new components into the system during the upgrade process. If problems arise during this phase, the numerous subsystems require troubleshooting each one, making problem identification difficult. Furthermore, this method cannot guarantee that the upgraded system will be able to handle business operations correctly. If the upgraded system malfunctions, the entire system becomes unusable, resulting in low business continuity and inefficient system upgrades. Therefore, a new system upgrade method is urgently needed. Summary of the Invention

[0005] This invention provides a system upgrade method for automatically upgrading the system. The upgraded system and the old system are two independent systems, so troubleshooting the new system is simpler, the operation is less complex, and the system upgrade efficiency is improved.

[0006] Firstly, this application provides a system upgrade method, the method comprising:

[0007] Every specified time interval, the processing results of each business request by the first system in the system within the specified time interval are obtained, wherein the system includes the first system and the second system, and the first system is an upgraded version of the second system;

[0008] If the processing result of each service request meets the first specified condition, it is determined whether the traffic allocation strategy of the system meets the second specified condition, wherein the traffic allocation strategy is used to represent the proportion of each service request received by the system processed by the first system and the second system respectively;

[0009] If not, the traffic allocation strategy is adjusted to obtain an adjusted allocation strategy, and the adjusted allocation strategy is determined as the traffic allocation strategy of the system. In the adjusted traffic allocation strategy, the proportion of the first system processing the various service requests received by the system increases, and the proportion of the second system processing the various service requests received by the system decreases.

[0010] If so, then the upgrade of the system is complete.

[0011] In the above method, the upgraded first system and the old system (second system) in this application are two independent systems. That is, the upgraded system is pre-upgraded, and there is no gradual cross-replacement of the old system (second system) for upgrading. Furthermore, to ensure the correctness of business processing in the upgraded first system, this application adjusts the traffic allocation strategy to regulate the ratio of business request processing by the first and second systems. Only when the upgraded first system meets specified conditions is it determined that the first system can normally process business requests, and the upgrade is then complete, ensuring the accuracy of the upgraded system. Therefore, this embodiment does not present problems with both old and new components in the system. If a problem occurs in the upgraded first system, it can be directly investigated, reducing the difficulty of troubleshooting and improving the efficiency of system upgrades.

[0012] In one possible implementation, before determining that the system upgrade is complete, the method further includes:

[0013] If a service request is received from the system, the target system corresponding to the service request is determined based on the service request and / or the traffic allocation strategy, wherein the target system is the first system or the second system;

[0014] The service request is sent to the target system for processing.

[0015] In the above method, the target system corresponding to the service request is determined based on the service request and / or the traffic allocation strategy, ensuring the accuracy of the determined target system. Furthermore, in this embodiment, the traffic allocation strategy can precisely control the ratio of service requests processed by the first system and the second system, ensuring the smooth completion of system upgrades.

[0016] In one possible implementation, determining the target system corresponding to the service request based on the service request and / or the traffic allocation strategy includes:

[0017] Obtain the request identifier from the business request;

[0018] The request identifier is compared with the request identifiers of each business request previously processed by the system;

[0019] If a target request identifier that matches the request identifier exists among the request identifiers of all previously processed service requests by the system, then the system that processes the service request corresponding to the target request identifier is identified as the target system; or,

[0020] If there is no target request identifier that is the same as the request identifier among the request identifiers of the service requests previously processed by the system, the target system of the service request is determined by using the traffic allocation strategy and the request identifier.

[0021] In the above method, the request identifier is compared with the request identifiers of previously processed business requests to determine the requests related to the business request that were previously processed. If so, the system that processed the business request corresponding to the target request identifier is determined as the target system; otherwise, the traffic allocation strategy and the request identifier are used to determine the target system for the business request. Therefore, in this embodiment, related services are sent to the same system for processing to avoid processing failures and further improve the accuracy of the system's business processing.

[0022] In one possible implementation, the traffic allocation strategy includes a first hash value range for service requests corresponding to the first system and a second hash value range for service requests corresponding to the second system.

[0023] The step of determining the target system of the service request using the traffic allocation strategy and the request identifier includes:

[0024] The hash value of the business request is obtained by performing a hash calculation on the request identifier using a hash algorithm.

[0025] Based on the hash value of the service request, determine the target hash value range in which the service request belongs;

[0026] If the target hash value range is the first hash value range, then the first system is determined as the target system; or,

[0027] If the target hash value range is the second hash value range, then the second system is determined as the target system.

[0028] In the above method, a hash algorithm is used to calculate the hash value of the request identifier to obtain the hash value of the business request, and then the target system is determined based on the hash value of the business request. This ensures the accuracy of the determined target system.

[0029] In one possible implementation, the method further includes:

[0030] If the processing result of each service request does not meet the first specified condition, but meets the third specified condition, then the traffic allocation strategy is adjusted to the first specified ratio. The first specified ratio indicates that the number of service requests processed by the second system is equal to the total number of service requests in the system. The third specified condition is that the number of service processing failures in the processing result of each service request is greater than the first specified threshold, or the service failure rate is greater than the first specified probability. The service failure rate is obtained based on the number of service processing failures in the processing result of each service request and the total number of service requests.

[0031] In the above method, if it is determined in this application embodiment that the processing result of each service request does not meet the first specified condition, it means that the updated new system (i.e., the first system) cannot process the service request normally. Then, all service requests are sent to the second system (old system) for processing to avoid affecting the progress of the service and improve the accuracy and efficiency of service processing. Therefore, in this application embodiment, emergency decision-making and disaster recovery can be automatically completed in seconds when a fault occurs, which improves the disaster recovery capability of the system.

[0032] In one possible implementation, the processing result of each service request is determined to meet a first specified condition in the following way:

[0033] If the number of failed service processing results in each service request is less than a second specified threshold, and the service processing failure rate is less than a second specified probability, then the processing result of each service request is determined to satisfy the first specified condition, wherein the second specified threshold is less than the first specified threshold, and the second specified probability is less than the first specified probability; or,

[0034] If the number of business processing failures in the processing results of each business request is not less than the second specified threshold, or the business processing failure rate is not less than the second specified probability, then it is determined that the processing results of each business request do not meet the first specified condition.

[0035] In the above method, the number or failure rate of business processing failures in the processing results of each business request is used to determine whether the processing result of each business request meets the first specified condition, which ensures that the determined result is more accurate.

[0036] In one possible implementation, whether the system's traffic allocation strategy meets the second specified condition is determined by the following method:

[0037] If the number of service requests processed by the first system is equal to the total number of service requests in the system, then the traffic allocation strategy of the system is determined to meet the second specified condition; or,

[0038] If the number of service requests processed by the first system is not equal to the total number of service requests in the system, then it is determined that the traffic allocation strategy of the system does not meet the second specified condition.

[0039] In the above method, if the traffic allocation strategy of the system in this application embodiment is determined to meet the second specified condition, it means that all business requests are now being processed by the first system, indicating that the first system can process business requests normally. Therefore, no further steps are needed, which saves computing resources and further improves the efficiency of system upgrades.

[0040] Secondly, this application provides a system upgrade apparatus, the apparatus comprising:

[0041] The acquisition module is used to acquire the processing results of each business request by the first system in the system within the specified time period at regular intervals. The system includes the first system and the second system, and the first system is an upgraded version of the second system.

[0042] The judgment module is used to determine whether the traffic allocation strategy of the system meets the second specified condition if the processing result of each service request meets the first specified condition. The traffic allocation strategy is used to represent the proportion of each service request received by the system processed by the first system and the second system respectively.

[0043] An adjustment module is used to adjust the traffic allocation strategy if no, to obtain an adjusted allocation strategy, and to determine the adjusted allocation strategy as the traffic allocation strategy of the system. In the adjusted traffic allocation strategy, the proportion of the first system processing each service request received by the system increases, and the proportion of the second system processing each service request received by the system decreases.

[0044] The upgrade completion module is used to determine if the upgrade of the system is complete if so.

[0045] In one possible implementation, the device further includes:

[0046] The target system determination module is used to determine the target system corresponding to the service request based on the service request and / or the traffic allocation strategy if a service request is received before the upgrade of the system is completed. The target system is either the first system or the second system.

[0047] The sending module is used to send the service request to the target system for processing.

[0048] In one possible implementation, the target system determination module is specifically used for:

[0049] Obtain the request identifier from the business request;

[0050] The request identifier is compared with the request identifiers of each business request previously processed by the system;

[0051] If a target request identifier that matches the request identifier exists among the request identifiers of all previously processed service requests by the system, then the system that processes the service request corresponding to the target request identifier is identified as the target system; or,

[0052] If there is no target request identifier that is the same as the request identifier among the request identifiers of the service requests previously processed by the system, the target system of the service request is determined by using the traffic allocation strategy and the request identifier.

[0053] In one possible implementation, the traffic allocation strategy includes a first hash value range for service requests corresponding to the first system and a second hash value range for service requests corresponding to the second system.

[0054] The target system determination module is further configured to:

[0055] The hash value of the business request is obtained by performing a hash calculation on the request identifier using a hash algorithm.

[0056] Based on the hash value of the service request, determine the target hash value range in which the service request belongs;

[0057] If the target hash value range is the first hash value range, then the first system is determined as the target system; or,

[0058] If the target hash value range is the second hash value range, then the second system is determined as the target system.

[0059] In one possible implementation, the device further includes:

[0060] The strategy adjustment module is used to adjust the traffic allocation strategy to a first specified ratio if the processing result of each service request does not meet the first specified condition but meets the third specified condition. The first specified ratio indicates that the number of service requests processed by the second system is equal to the total number of service requests in the system. The third specified condition is that the number of service processing failures in the processing result of each service request is greater than the first specified threshold, or the service failure rate is greater than the first specified probability. The service failure rate is obtained based on the number of service processing failures in the processing result of each service request and the total number of service requests.

[0061] In one possible implementation, the device further includes:

[0062] The first judgment module is used to determine whether the processing result of each service request meets the first specified condition through the following methods:

[0063] If the number of failed service processing results in each service request is less than a second specified threshold, and the service processing failure rate is less than a second specified probability, then the processing result of each service request is determined to satisfy the first specified condition, wherein the second specified threshold is less than the first specified threshold, and the second specified probability is less than the first specified probability; or,

[0064] If the number of business processing failures in the processing results of each business request is not less than the second specified threshold, or the business processing failure rate is not less than the second specified probability, then it is determined that the processing results of each business request do not meet the first specified condition.

[0065] In one possible implementation, the device further includes:

[0066] The second judgment module is used to determine whether the system's traffic allocation strategy meets the second specified condition through the following methods:

[0067] If the number of service requests processed by the first system is equal to the total number of service requests in the system, then the traffic allocation strategy of the system is determined to meet the second specified condition; or,

[0068] If the number of service requests processed by the first system is not equal to the total number of service requests in the system, then it is determined that the traffic allocation strategy of the system does not meet the second specified condition.

[0069] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the system upgrade method.

[0070] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the system upgrade method described above.

[0071] Fifthly, embodiments of this application provide a computer program product, including a computer program stored in a computer-readable storage medium; when a processor of a memory access device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the memory access device to perform the steps in the upgrade method of the system described above.

[0072] For the various aspects in the second to fifth sections above, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that the various possible solutions in the first section may achieve. They will not be repeated here. Attached Figure Description

[0073] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0074] Figure 1 A schematic diagram illustrating an upgrade of a system in the prior art provided for an embodiment of this application;

[0075] Figure 2 One of the flowcharts illustrating a system upgrade method provided in this application embodiment;

[0076] Figure 3 A schematic diagram of the system upgrade provided in the embodiments of this application;

[0077] Figure 4 A flowchart illustrating the method for processing business requests provided in this application embodiment;

[0078] Figure 5 This application provides a flowchart illustrating the process of determining the target system corresponding to a business request in an embodiment of the present application.

[0079] Figure 6 A second schematic flowchart illustrating a system upgrade method provided in an embodiment of this application;

[0080] Figure 7 A schematic diagram of an upgrade device for a system provided in an embodiment of this application;

[0081] Figure 8 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0082] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The specific operating methods in the method embodiments can also be applied to the device embodiments or system embodiments.

[0083] In the description of this application, "multiple" is understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. A connected to B can represent: A and B directly connected, or A and B connected through C. Furthermore, in the description of this application, terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0084] Existing system upgrade methods involve gradually replacing each subsystem within the system. For example, replacing subsystems one by one until the replacement is complete, and then confirming that the system upgrade is finished. Figure 1 As shown, the system includes multiple subsystems, from Figure 1 As can be seen, existing system upgrades involve gradually replacing subsystems. However, this method results in both old and new parts of the system during the upgrade process. If a problem arises, the numerous subsystems require individual troubleshooting, making problem identification difficult. Furthermore, this method cannot guarantee that the upgraded system will be able to handle business operations correctly. If the upgraded system malfunctions, the entire system becomes unusable, leading to low accuracy and efficiency in system upgrades. Therefore, a new system upgrade method is urgently needed.

[0085] To address this issue, this application provides a system upgrade method. The upgraded first system and the old system (second system) are two independent systems. The upgraded system is pre-upgraded, and there is no gradual replacement of the old system (second system) during the upgrade. Furthermore, to ensure the correctness of business processing in the upgraded first system, this application adjusts the traffic allocation strategy to regulate the ratio of business request processing by the first and second systems. The upgrade is considered complete only when the upgraded first system meets specified conditions, thus ensuring the accuracy of the upgraded system. Therefore, this application avoids the problem of both old and new components existing in the system. If a problem occurs in the upgraded first system, it can be directly investigated, reducing the difficulty of troubleshooting and improving the efficiency of the system upgrade.

[0086] The present application will now be described in further detail with reference to the accompanying drawings. See also: Figure 2 The diagram shown is a flowchart of a system upgrade method provided in an embodiment of this application. The specific implementation process of this method is as follows:

[0087] Step 201: Every specified time interval, obtain the processing results of each service request by the first system in the system within the specified time interval, wherein the system includes the first system and the second system, and the first system is an upgraded version of the second system;

[0088] like Figure 3 The diagram shown is a structural schematic of a system upgrade in an embodiment of this application. Figure 3 As can be seen from the embodiments of this application, both the pre-upgraded first system and the original second system are deployed in the device. That is, each subsystem in the first system is an upgraded subsystem.

[0089] It should be noted that the specified duration in this application embodiment can be set according to the specific actual situation, and this application embodiment does not limit the specific value of the specified duration.

[0090] Step 202: If the processing result of each service request meets the first specified condition, determine whether the traffic allocation strategy of the system meets the second specified condition. If yes, proceed to step 204; otherwise, proceed to step 203.

[0091] The traffic allocation strategy is used to represent the proportion of each service request received by the system processed by the first system and the second system, respectively.

[0092] To ensure the accuracy of processing business requests, in one possible implementation, if the processing result of each business request does not meet the first specified condition but meets the third specified condition, the traffic allocation strategy is adjusted to the first specified ratio. The first specified ratio indicates that the number of business requests processed by the second system is equal to the total number of business requests in the system. The third specified condition is that the number of business processing failures in the processing result of each business request is greater than the first specified threshold, or the business failure rate is greater than the first specified probability. The business failure rate is obtained based on the number of business processing failures in the processing result of each business request and the total number of business requests.

[0093] The traffic allocation strategy in this application embodiment includes a first hash value range for business requests corresponding to the first system and a second hash value range for business requests corresponding to the second system.

[0094] For example, if the previous traffic allocation strategy was that the first hash value range was [a, b) and the second hash value range was [b, c), then the traffic allocation strategy after adjusting the traffic allocation strategy to the first specified ratio would be: the first hash value range is [a, c) and the second hash value range is 0.

[0095] Therefore, in this embodiment of the application, if it is determined that the processing result of each service request does not meet the first specified condition, it means that the updated new system (i.e., the first system) cannot process the service request normally. In this case, all service requests are sent to the second system (the old system) for processing, thereby avoiding the progress of image services and improving the accuracy and efficiency of service processing.

[0096] In one possible implementation, after adjusting the traffic allocation strategy to a first specified ratio, the specified duration is set to a first preset duration. The first preset duration is less than the specified duration.

[0097] It should be noted that the first preset duration in this application embodiment can be set according to the specific actual situation, and this application embodiment does not limit the specific value of the first preset duration.

[0098] The following describes the method for determining whether the processing result of each service request meets the first specified condition. In one possible implementation, the method for determining whether the processing result of each service request meets the first specified condition is as follows:

[0099] Method 1: If the number of business processing failures in the processing results of each business request is less than the second specified threshold or the business processing failure rate is less than the second specified probability, then it is determined that the processing results of each business request meet the first specified condition, wherein the second specified threshold is less than the first specified threshold and the second specified probability is less than the first specified probability.

[0100] In this embodiment, the processing result of any business request is either business processing failure or business processing success. The number of business processing failures in this embodiment is the total number of business requests that resulted in business processing failure. Furthermore, the business processing failure rate in this embodiment is obtained by dividing the number of business processing failures in the processing results of each business request by the total number of business requests.

[0101] Method 2: If the number of business processing failures in the processing results of each business request is not less than the second specified threshold, or the business processing failure rate is not less than the second specified probability, then it is determined that the processing results of each business request do not meet the first specified condition.

[0102] In this embodiment of the application, if the number of business processing failures in the processing results of each business request is not less than the second specified threshold but less than the first specified threshold; or the business processing failure rate is not less than the second specified probability but less than the first specified probability, then an alarm is issued to remind staff to perform manual processing.

[0103] It should be noted that the specified threshold and specified probability in the embodiments of this application can be set according to the specific actual situation. The embodiments of this application do not limit the specific values ​​of the specified threshold and specified probability.

[0104] Secondly, the method for determining whether the system's traffic allocation strategy meets the second specified condition in the embodiments of this application is described. In one possible implementation, the method for determining whether the system's traffic allocation strategy meets the second specified condition is as follows:

[0105] If the number of service requests processed by the first system is equal to the total number of service requests in the system, then the traffic allocation strategy of the system is determined to meet the second specified condition; or,

[0106] If the number of service requests processed by the first system is not equal to the total number of service requests in the system, then it is determined that the traffic allocation strategy of the system does not meet the second specified condition.

[0107] In this embodiment of the application, if the system's traffic allocation strategy meets the second specified condition, it means that all service requests are now being processed by the first system, indicating that the first system can handle service requests normally. Therefore, no further steps are needed, saving computing resources and further improving the efficiency of system upgrades.

[0108] Step 203: Adjust the traffic allocation strategy to obtain the adjusted allocation strategy, and determine the adjusted allocation strategy as the traffic allocation strategy of the system. In the adjusted traffic allocation strategy, the proportion of the first system processing the service requests received by the system increases, and the proportion of the second system processing the service requests received by the system decreases.

[0109] In this embodiment of the application, the method for adjusting the traffic allocation strategy each time is as follows: the first hash value interval of the first system is increased by a specified length, and the second hash value interval of the second system is decreased by the specified length.

[0110] For example, given a length of n, if the first hash value interval is [a, b) and the second hash value interval is [b, c), then the adjusted first hash value interval is [a, b+n) and the second hash value interval is [bn, c).

[0111] It should be noted that the specified length in this application embodiment can be set according to the actual situation, and this application embodiment does not limit the specific value of the specified length.

[0112] In order to ensure that the first system can operate normally, in one possible implementation, after executing step 203, the specified duration is increased by a second preset duration.

[0113] Therefore, in this embodiment of the application, each time the proportion of the first system processing the various service requests received by the system is increased, the specified time is also increased, so more service processing results can be obtained, ensuring the accuracy of the result of determining whether the first system can operate normally.

[0114] It should be noted that the second preset duration in this embodiment can be 5 minutes, 15 minutes, 30 minutes, etc. This embodiment does not limit the specific value of the second preset duration; the specific value can be set according to the actual situation.

[0115] Step 204: Confirm that the upgrade of the system is complete.

[0116] According to the embodiments of this application, after the system upgrade is completed, the second system can be taken offline.

[0117] The following describes the method for handling business requests during system upgrades in the embodiments of this application, such as... Figure 4 The diagram shown illustrates the process flow for handling business requests, which may include the following steps:

[0118] Step 401: If a service request is received from the system, then based on the service request and / or the traffic allocation strategy, determine the target system corresponding to the service request, wherein the target system is the first system or the second system;

[0119] like Figure 5 The diagram shown illustrates the process for determining the target system corresponding to a business request, which may include the following steps:

[0120] Step 501: Obtain the request identifier from the business request;

[0121] Step 502: Compare the request identifier with the request identifiers of each business request previously processed by the system, and determine whether there is a target request identifier that is the same as the request identifier among the request identifiers of each business request previously processed by the system. If yes, proceed to step 503; otherwise, proceed to step 504.

[0122] Step 503: Determine the system that processes the business request corresponding to the target request identifier as the target system;

[0123] For example, if the request identifier of the received business request 1 is A, and if the request identifier of each of the previously processed business requests is A, and the business request 2 corresponding to the request identifier A was previously sent to the first system for processing, then the target system corresponding to business request 1 is also the first system.

[0124] Step 504: Using the traffic allocation strategy and the request identifier, determine the target system of the service request.

[0125] In one possible implementation, step 504 may be specifically implemented as follows: performing a hash calculation on the request identifier using a hash algorithm to obtain the hash value of the service request; determining the target hash value range where the service request is located based on the hash value of the service request; if the target hash value range is the first hash value range, then the first system is determined as the target system; or if the target hash value range is the second hash value range, then the second system is determined as the target system.

[0126] Step 402: Send the service request to the target system for processing.

[0127] In one possible implementation, after performing step 402, the request identifier of the service request is stored in correspondence with the target system.

[0128] Below, in conjunction with Figure 6 The system upgrade method in the embodiments of this application will be described, which may specifically include the following steps:

[0129] Step 601: Every specified time interval, obtain the processing results of each service request by the first system in the system within the specified time interval, wherein the system includes the first system and the second system, and the first system is an upgraded version of the second system;

[0130] Step 602: Determine whether the processing result of each service request meets the first specified condition. If yes, proceed to step 604; otherwise, proceed to step 603.

[0131] In this embodiment of the application, the first specified condition is that the number of service processing failures in the processing results of each service request is less than a second specified threshold, and the service processing failure rate is less than a second specified probability. The second specified threshold is less than the first specified threshold, and the second specified probability is less than the first specified probability.

[0132] Step 603: If it is determined that the processing result of each service request meets the third specified condition, then the traffic allocation strategy is adjusted to the first specified ratio, wherein the first specified ratio is used to indicate that the number of service requests processed by the second system is equal to the total number of service requests of the system;

[0133] The third specified condition is that the number of business processing failures in the processing results of each business request is greater than the first specified threshold, or the business failure rate is greater than the first specified probability.

[0134] Step 604: Determine whether the traffic allocation strategy of the system meets the second specified condition. If not, proceed to step 605; if yes, proceed to step 611. The traffic allocation strategy is used to represent the proportion of each service request received by the system processed by the first system and the second system, respectively.

[0135] Step 605: Adjust the traffic allocation strategy to obtain an adjusted allocation strategy, and determine the adjusted allocation strategy as the traffic allocation strategy of the system. In the adjusted traffic allocation strategy, the proportion of the first system processing the various service requests received by the system increases, and the proportion of the second system processing the various service requests received by the system decreases.

[0136] Step 606: If a service request is received from the system, obtain the request identifier in the service request;

[0137] Step 607: Compare the request identifier with the request identifiers of each business request previously processed by the system, and determine whether there is a target request identifier that is the same as the request identifier among the request identifiers of each business request previously processed by the system. If yes, proceed to step 608; otherwise, proceed to step 609.

[0138] Step 608: Determine the system that processes the business request corresponding to the target request identifier as the target system;

[0139] Step 609: Using the traffic allocation strategy and the request identifier, determine the target system of the service request;

[0140] Step 610: Send the service request to the target system for processing;

[0141] Step 611: Confirm that the upgrade of the system is complete.

[0142] Based on the same inventive concept, this application also provides a system upgrade device, see [link to relevant documentation]. Figure 7 The device 700 includes:

[0143] The acquisition module 701 is used to acquire the processing results of each business request by the first system in the system within the specified time period at regular intervals, wherein the system includes the first system and the second system, and the first system is an upgraded version of the second system;

[0144] The judgment module 702 is used to determine whether the traffic allocation strategy of the system meets the second specified condition if the processing result of each service request meets the first specified condition. The traffic allocation strategy is used to represent the proportion of each service request received by the system processed by the first system and the second system respectively.

[0145] The adjustment module 703 is used to adjust the traffic allocation strategy if no, to obtain an adjusted allocation strategy, and to determine the adjusted allocation strategy as the traffic allocation strategy of the system. In the adjusted traffic allocation strategy, the proportion of the first system processing each service request received by the system increases, and the proportion of the second system processing each service request received by the system decreases.

[0146] Upgrade completion module 704 is used to determine that the upgrade of the system is complete if the condition is met.

[0147] In one possible implementation, the device further includes:

[0148] The target system determination module 705 is used to determine the target system corresponding to the service request based on the service request and / or the traffic allocation strategy if a service request of the system is received before the upgrade of the system is completed, wherein the target system is the first system or the second system;

[0149] The sending module 706 is used to send the service request to the target system for processing.

[0150] In one possible implementation, the target system determination module 705 is specifically used for:

[0151] Obtain the request identifier from the business request;

[0152] The request identifier is compared with the request identifiers of each business request previously processed by the system;

[0153] If a target request identifier that matches the request identifier exists among the request identifiers of all previously processed service requests by the system, then the system that processes the service request corresponding to the target request identifier is identified as the target system; or,

[0154] If there is no target request identifier that is the same as the request identifier among the request identifiers of the service requests previously processed by the system, the target system of the service request is determined by using the traffic allocation strategy and the request identifier.

[0155] In one possible implementation, the traffic allocation strategy includes a first hash value range for service requests corresponding to the first system and a second hash value range for service requests corresponding to the second system.

[0156] The target system determination module 705 is further configured to:

[0157] The hash value of the business request is obtained by performing a hash calculation on the request identifier using a hash algorithm.

[0158] Based on the hash value of the service request, determine the target hash value range in which the service request belongs;

[0159] If the target hash value range is the first hash value range, then the first system is determined as the target system; or,

[0160] If the target hash value range is the second hash value range, then the second system is determined as the target system.

[0161] In one possible implementation, the device further includes:

[0162] The strategy adjustment module 707 is used to adjust the traffic allocation strategy to a first specified ratio if the processing result of each service request does not meet the first specified condition but meets the third specified condition. The first specified ratio indicates that the number of service requests processed by the second system is equal to the total number of service requests in the system. The third specified condition is that the number of service processing failures in the processing result of each service request is greater than the first specified threshold, or the service failure rate is greater than the first specified probability. The service failure rate is obtained based on the number of service processing failures in the processing result of each service request and the total number of service requests.

[0163] In one possible implementation, the device further includes:

[0164] The first judgment module 708 is used to determine whether the processing result of each service request meets the first specified condition through the following methods:

[0165] If the number of failed service processing results in each service request is less than a second specified threshold, and the service processing failure rate is less than a second specified probability, then the processing result of each service request is determined to satisfy the first specified condition, wherein the second specified threshold is less than the first specified threshold, and the second specified probability is less than the first specified probability; or,

[0166] If the number of business processing failures in the processing results of each business request is not less than the second specified threshold, or the business processing failure rate is not less than the second specified probability, then it is determined that the processing results of each business request do not meet the first specified condition.

[0167] In one possible implementation, the device further includes:

[0168] The second judgment module 709 is used to determine whether the system's traffic allocation strategy meets the second specified condition through the following methods:

[0169] If the number of service requests processed by the first system is equal to the total number of service requests in the system, then the traffic allocation strategy of the system is determined to meet the second specified condition; or,

[0170] If the number of service requests processed by the first system is not equal to the total number of service requests in the system, then it is determined that the traffic allocation strategy of the system does not meet the second specified condition.

[0171] Based on the same inventive concept, this application also provides an electronic device that can realize the function of the aforementioned system upgrade device, see reference. Figure 8 The electronic device includes:

[0172] At least one processor 801 and a memory 802 connected to at least one processor 801. In this embodiment, the specific connection medium between the processor 801 and the memory 802 is not limited. Figure 8 The example shown is the connection between processor 801 and memory 802 via bus 800. Bus 800 is... Figure 8 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. The 800 bus can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 8 The term is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 801 can also be called a controller; there is no restriction on the name.

[0173] In this embodiment, memory 802 stores instructions executable by at least one processor 801. By executing the instructions stored in memory 802, at least one processor 801 can perform the system upgrade method described above. Processor 801 can implement... Figure 6 The functions of each module in the device shown.

[0174] The processor 801 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 802 and calling data stored in memory 802, the processor can perform various functions and process data, thereby monitoring the device as a whole.

[0175] In one possible design, processor 801 may include one or more processing units. Processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 801. In some embodiments, processor 801 and memory 802 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.

[0176] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the system upgrade method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0177] Memory 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 802 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 802 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 802 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0178] By designing and programming the processor 801, the code corresponding to the system upgrade method described in the foregoing embodiments can be embedded into the chip, thereby enabling the chip to execute the code during operation. Figure 2 The steps of the data storage system upgrade method shown in the embodiment are described below. How to design and program the processor 801 is a technique well-known to those skilled in the art and will not be elaborated upon here.

[0179] This application also provides a computer-readable storage medium storing computer-executable instructions required to execute the processor, including a program required to execute the processor.

[0180] In some possible implementations, various aspects of the system upgrade method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps in the system upgrade method according to various exemplary embodiments of this application described above.

[0181] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0182] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0185] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0186] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A system upgrade method, characterized in that, The method includes: Every specified time interval, the processing results of each business request by the first system in the system within the specified time interval are obtained, wherein the system includes the first system and the second system, and the first system is an upgraded version of the second system; If the processing result of each service request meets the first specified condition, it is determined whether the traffic allocation strategy of the system meets the second specified condition, wherein the traffic allocation strategy is used to represent the proportion of each service request received by the system processed by the first system and the second system respectively; If not, the traffic allocation strategy is adjusted to obtain an adjusted allocation strategy, and the adjusted allocation strategy is determined as the traffic allocation strategy of the system. In the adjusted traffic allocation strategy, the proportion of the first system processing the various service requests received by the system increases, and the proportion of the second system processing the various service requests received by the system decreases. If so, then the upgrade of the system is complete.

2. The method according to claim 1, characterized in that, Before determining that the upgrade of the system is complete, the method further includes: If a service request is received from the system, the target system corresponding to the service request is determined based on the service request and / or the traffic allocation strategy, wherein the target system is the first system or the second system; The service request is sent to the target system for processing.

3. The method according to claim 2, characterized in that, The step of determining the target system corresponding to the service request based on the service request and / or the traffic allocation strategy includes: Obtain the request identifier from the business request; The request identifier is compared with the request identifiers of each business request previously processed by the system; If a target request identifier that matches the request identifier exists among the request identifiers of all previously processed service requests by the system, then the system that processes the service request corresponding to the target request identifier is identified as the target system; or, If there is no target request identifier that is the same as the request identifier among the request identifiers of the service requests previously processed by the system, the target system of the service request is determined by using the traffic allocation strategy and the request identifier.

4. The method according to claim 3, characterized in that, The traffic allocation strategy includes a first hash value range for business requests corresponding to the first system and a second hash value range for business requests corresponding to the second system. The step of determining the target system of the service request using the traffic allocation strategy and the request identifier includes: The hash value of the business request is obtained by performing a hash calculation on the request identifier using a hash algorithm. Based on the hash value of the service request, determine the target hash value range in which the service request belongs; If the target hash value range is the first hash value range, then the first system is determined as the target system; or, If the target hash value range is the second hash value range, then the second system is determined as the target system.

5. The method according to claim 1, characterized in that, The method further includes: If the processing result of each service request does not meet the first specified condition, but meets the third specified condition, then the traffic allocation strategy is adjusted to the first specified ratio. The first specified ratio indicates that the number of service requests processed by the second system is equal to the total number of service requests in the system. The third specified condition is that the number of service processing failures in the processing result of each service request is greater than the first specified threshold, or the service failure rate is greater than the first specified probability. The service failure rate is obtained based on the number of service processing failures in the processing result of each service request and the total number of service requests.

6. The method according to claim 1 or 5, characterized in that, The following methods are used to determine whether the processing result of each service request meets the first specified condition: If the number of failed service processing results in each service request is less than a second specified threshold, and the service processing failure rate is less than a second specified probability, then the processing result of each service request is determined to satisfy the first specified condition, wherein the second specified threshold is less than the first specified threshold, and the second specified probability is less than the first specified probability; or, If the number of service processing failures in the processing results of each service request is not less than the second specified threshold, or the service processing failure rate is not less than the second specified probability, then it is determined that the processing results of each service request do not meet the first specified condition.

7. The method according to claim 1, characterized in that, Whether the system's traffic allocation strategy meets the second specified condition is determined by the following method: If the number of service requests processed by the first system is equal to the total number of service requests in the system, then the traffic allocation strategy of the system is determined to meet the second specified condition. or, If the number of service requests processed by the first system is not equal to the total number of service requests in the system, then it is determined that the traffic allocation strategy of the system does not meet the second specified condition.

8. A system upgrade device, characterized in that, The device includes: The acquisition module is used to acquire the processing results of each business request by the first system in the system within the specified time period at regular intervals. The system includes the first system and the second system, and the first system is an upgraded version of the second system. The judgment module is used to determine whether the traffic allocation strategy of the system meets the second specified condition if the processing result of each service request meets the first specified condition. The traffic allocation strategy is used to represent the proportion of each service request received by the system processed by the first system and the second system respectively. An adjustment module is used to adjust the traffic allocation strategy if no, to obtain an adjusted allocation strategy, and to determine the adjusted allocation strategy as the traffic allocation strategy of the system. In the adjusted traffic allocation strategy, the proportion of the first system processing each service request received by the system increases, and the proportion of the second system processing each service request received by the system decreases. The upgrade completion module is used to determine if the upgrade of the system is complete if so.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a computer program stored in the memory, implements the method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.