Service upgrade method, apparatus, device, and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2026-06-30
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]本发明提供一种服务升级方法、装置、设备及介质,以解决相关技术中在服务升级过程中无法实现服务连续性与数据一致性技术问题
[0009]上述服务升级方法、装置、计算机设备及存储介质所实现的方案中,通过在升级开始前首先完成服务环境检测以及任务状态记录,并结合备份处理形成完整的升级前数据基线,能够在服务升级过程中持续保留目标服务的运行数据和历史状态信息,从而提高升级过程中的数据可追溯性和任务可管理性,避免因升级异常导致数据缺失、备份遗漏或升级流程中断的问题。进一步地,通过建立双写同步规则,在服务升级过程中对数据变更信息进行实时同步处理,并在同步完成后执行服务验证处理以及流量切换处理,使得升级期间产生的数据变更能够持续同步至升级目标环境,同时利用服务验证结果对升级后的服务状态进行校验,在验证通过后再执行流量切换和状态更新,能够减少升级过程中因数据不一致、配置异常或服务不可用造成的升级失败风险,提高服务升级过程的连续性、可靠性和可控性。特别是在金融领域以及医疗健康养老领域等服务场景中,可在保障业务持续运行的同时完成服务升级,实现服务升级过程对业务访问影响较小的技术效果。
Smart Images

Figure CN122533944A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a service upgrade method, apparatus, device, and medium. Background Technology
[0002] With the application of cloud computing and distributed service architectures in the financial and healthcare sectors, core business systems generally face requirements for high availability and continuous service capabilities during operation. Therefore, how to achieve seamless switching during service upgrades has become a key technical issue.
[0003] Current system upgrade methods typically involve downtime backup, replacement deployment, and service restart. This approach requires service interruption during the upgrade, failing to meet the requirements of continuous financial transactions and real-time medical response. Furthermore, a single data synchronization mechanism is prone to data loss or inconsistencies during the upgrade process, especially in high-concurrency write scenarios, leading to data lag and conflicts. In addition, existing solutions lack state management and verification mechanisms for the upgrade process, making it impossible to effectively track and verify the upgrade process. This can result in situations where service unavailability occurs after the switchover but goes undetected. Therefore, a service upgrade methodology is urgently needed to ensure service continuity and data consistency in critical business scenarios such as finance and healthcare. Summary of the Invention
[0004] This invention provides a service upgrade method, apparatus, device, and medium to solve the technical problem in the related art that service continuity and data consistency cannot be achieved during the service upgrade process.
[0005] Firstly, a service upgrade method is provided, the method comprising: Upon receiving an upgrade request for the target service, a corresponding upgrade task is created, and the service environment of the target service is detected to obtain the environment detection results and the corresponding task status data. Based on the environmental detection results and the task status data, perform old service data backup processing to obtain basic backup data, and update the corresponding backup status data. A dual-write synchronization rule is established based on the basic backup data and the backup status data, and the data change information generated during service operation is synchronized based on the dual-write synchronization rule to obtain the synchronization data result. Based on the synchronized data results, service verification is performed to obtain the service verification result. Based on the service verification result, traffic switching and status update are performed to obtain the upgrade completion result.
[0006] Secondly, a service upgrade device is provided, comprising: The receiving module is used to create a corresponding upgrade task after receiving an upgrade request for the target service, and to detect the service environment of the target service to obtain the environment detection results and the corresponding task status data. The backup module is used to perform old service data backup processing based on the environmental detection results and the task status data to obtain basic backup data and update the corresponding backup status data. The data synchronization module is used to establish dual-write synchronization rules based on the basic backup data and the backup status data, and to synchronize data change information generated during service operation based on the dual-write synchronization rules to obtain synchronized data results. The service upgrade module is used to perform service verification processing based on the synchronization data results, obtain service verification results, and perform traffic switching and status update processing based on the service verification results to obtain the upgrade completion result.
[0007] Thirdly, a computer device is provided, 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 of the above-described service upgrade method.
[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described service upgrade method.
[0009] The solution implemented by the aforementioned service upgrade methods, devices, computer equipment, and storage media, by first completing service environment detection and task status recording before the upgrade begins, and combining this with backup processing to form a complete pre-upgrade data baseline, continuously retains the target service's operational data and historical status information during the service upgrade process. This improves data traceability and task manageability during the upgrade process, avoiding problems such as data loss, backup omissions, or upgrade process interruptions due to upgrade anomalies. Furthermore, by establishing dual-write synchronization rules, data change information is synchronized in real time during the service upgrade process. After synchronization is complete, service verification and traffic switching are performed, ensuring that data changes generated during the upgrade are continuously synchronized to the target environment. Simultaneously, the service verification results are used to verify the upgraded service status. Traffic switching and status updates are only performed after successful verification. This reduces the risk of upgrade failure due to data inconsistency, configuration anomalies, or service unavailability, improving the continuity, reliability, and controllability of the service upgrade process. Especially in service scenarios such as finance, healthcare, and elderly care, service upgrades can be completed while ensuring continuous business operation, achieving a technical effect of minimal impact on business access during the service upgrade process. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention 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.
[0011] Figure 1 This is a schematic diagram of an application environment for a service upgrade method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a service upgrade method according to an embodiment of the present invention; Figure 3 yes Figure 2 A schematic diagram of a specific implementation method for step S10; Figure 4 This is a schematic diagram of a service upgrade device in one embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 6 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] The service upgrade method provided in this embodiment of the invention can be applied to, for example, Figure 1In this application environment, the client and server communicate. Upon receiving an upgrade request for the target service from the client, the server can create a corresponding upgrade task, detect the service environment of the target service, and obtain environment detection results and corresponding task status data. Based on the environment detection results and task status data, the server performs old service data backup processing to obtain basic backup data and updates the corresponding backup status data. Based on the basic backup data and backup status data, a dual-write synchronization rule is established, and data change information generated during service operation is synchronized based on the dual-write synchronization rule to obtain synchronization data results. Based on the synchronization data results, service verification processing is performed to obtain service verification results, and based on the service verification results, traffic switching and status update processing are performed to obtain the upgrade completion result. In this invention, by completing service environment detection and task status recording before the upgrade begins, and combining this with backup processing to form a complete pre-upgrade data baseline, the operating data and historical status information of the target service can be continuously retained during the service upgrade process. This improves data traceability and task manageability during the upgrade process, avoiding problems such as data loss, backup omissions, or upgrade process interruptions due to upgrade anomalies. Furthermore, by establishing dual-write synchronization rules, data changes are synchronized in real time during service upgrades. Service verification and traffic switching are performed after synchronization is complete, ensuring that data changes generated during the upgrade are continuously synchronized to the target environment. Simultaneously, the service verification results are used to validate the upgraded service status. Traffic switching and status updates are only performed after successful verification. This reduces the risk of upgrade failures due to data inconsistencies, configuration anomalies, or service unavailability, improving the continuity, reliability, and controllability of the service upgrade process. Particularly in service scenarios such as finance, healthcare, and elderly care, this technology allows for service upgrades to be completed while ensuring continuous business operation, minimizing the impact of service upgrades on business access.
[0014] The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.
[0015] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a service upgrade method provided in an embodiment of the present invention, the method comprising the following steps: S10: After receiving the upgrade request of the target service, create the corresponding upgrade task, and detect the service environment of the target service to obtain the environment detection result and the corresponding task status data.
[0016] S10: After receiving the upgrade request of the target service, create the corresponding upgrade task, and detect the service environment of the target service to obtain the environment detection result and the corresponding task status data.
[0017] It should be noted that the target service can be a business service, application service, middleware service, or platform service to be upgraded. In the financial sector, the target service can be insurance underwriting services, claims review services, or risk assessment services; in the healthcare and elderly care sector, the target service can be electronic medical record management services, health record management services, remote diagnosis and treatment services, or elderly care monitoring services. Upgrade requests can be initiated proactively by operations and maintenance personnel or automatically triggered by the system according to a preset upgrade plan. The upgrade task records the execution information, running status, and control instructions during the service upgrade process; the service environment characterizes the current running environment of the target service, including computing resources, storage resources, network resources, and service dependencies. Environment detection results reflect whether the current service environment meets the upgrade execution conditions; task status data records the current execution stage of the upgrade task, providing a basis for subsequent upgrade process control.
[0018] For example, upon receiving an upgrade request for the target service, the service identifier, service version, and upgrade target information in the upgrade request can be parsed first, and a corresponding upgrade task instance can be created based on the parsing results. After the upgrade task is created, a unique task identifier can be assigned to the upgrade task, and a corresponding task status record table can be established to record the execution status of each stage in the subsequent upgrade process. Subsequently, detection processing is performed on the target service's runtime environment based on the upgrade task. For example, the CPU resource usage, memory resource usage, disk storage space usage, and network communication status of the server where the target service resides can be detected, as well as the status of the databases, middleware components, configuration files, and service interfaces that the target service depends on, thereby obtaining corresponding environment detection data.
[0019] Furthermore, the acquired environmental monitoring data can be used to analyze and process the current service environment to determine whether the upgrade execution conditions are met. For example, in a financial insurance system, it is possible to detect whether the underwriting business database is operating normally and whether the network bandwidth meets the data synchronization requirements; in a medical and elderly care platform, it is possible to detect the operating status of the electronic medical record database service, health record storage service, and remote diagnosis and treatment interface service. When the remaining disk space is detected to be lower than a preset capacity threshold, it can be determined that the current environment does not meet the backup data storage requirements; when an abnormal network connection is detected, it can be determined that the current environment does not meet the subsequent data synchronization requirements; when an abnormal operation of a dependent component is detected, it can be determined that the current environment does not meet the upgrade execution conditions. Based on the above analysis results, corresponding environmental monitoring results are generated, which can include various status types such as detection passed, detection failed, and pending processing.
[0020] In some embodiments, to achieve end-to-end governance of the upgrade process, corresponding task status data can be generated synchronously after the environment detection results are generated. Task status data records the current execution stage of the upgrade task and corresponding execution information. Task status data may include task identifier, current stage status, stage start time, stage end time, execution log information, and operation record information. The stage status can be managed using a state machine mechanism. For example, upon receiving an upgrade request, the task status can be initialized to "Preparing"; after the environment detection passes, the task status can be updated to "Ready"; if the environment detection fails, the task status can be updated to "Execution Failed," and corresponding alarm processing can be triggered. In this way, even if network interruption, system restart, or abnormal task termination occurs during the upgrade process, the current stage of the upgrade task can still be accurately identified based on the saved task status data, avoiding the duplication of completed operations.
[0021] Among them, such as Figure 3 As shown, the step of creating a corresponding upgrade task after receiving an upgrade request for the target service, and detecting the service environment of the target service to obtain the environment detection results and corresponding task status data includes the following steps: S11: Parse the identification information of the target service according to the upgrade request to obtain the target service identification data.
[0022] It should be noted that the target service identifier is used to uniquely identify the service object to be upgraded, so that the subsequent upgrade process can accurately locate the corresponding service resource. The target service identifier may include one or more of the following: service name, service number, service instance identifier, service version information, and runtime environment information.
[0023] For example, upon receiving an upgrade request, the request parameters can be parsed first to extract identification information related to the service to be upgraded. Subsequently, the extracted identification information can be standardized and format-validated to generate target service identification data in a unified format, providing foundational data support for subsequent upgrade tasks.
[0024] In some embodiments, the corresponding service registration information, deployment information, and historical operation information can be further queried based on the target service identifier data. For example, the service address, service dependencies, and service operation status information corresponding to the target service can be obtained from the service registry, and the obtained information can be associated with the target service identifier data to form a complete service identification result. Through the above method, the object to be upgraded can be accurately identified at the beginning of the upgrade process, providing a reliable data foundation for subsequent upgrade task creation and service environment detection.
[0025] S12: Generate a corresponding upgrade task based on the target service identifier data, and detect the service environment based on the upgrade task to obtain environment collection data.
[0026] For example, an upgrade task can be created based on the target service identifier data, and a unique task identifier can be assigned to the upgrade task. Simultaneously, task record information corresponding to this upgrade task can be established to record the stage status, execution logs, and operation records during the upgrade process. After the upgrade task is created, the operating environment of the target service can be detected and processed based on the service deployment and operational information recorded in the upgrade task, thereby obtaining environmental data.
[0027] In some embodiments, the resource requirements for this upgrade can be determined based on the upgrade task, and a matching analysis can be performed on the current environmental resource situation. For example, it can be determined whether the current disk space meets the requirements for subsequent data backup, whether the network bandwidth meets the requirements for subsequent data synchronization, and whether the service-dependent components are in normal operating condition, thereby providing data basis for the generation of subsequent environmental detection results.
[0028] S13: Generate a task stage status record based on the environmental data collected, and obtain the environmental detection results and the task status data.
[0029] For example, the target service's operating environment can be analyzed and processed based on collected environmental data. For instance, the collected CPU utilization, memory utilization, remaining disk capacity, and network status can be compared and analyzed with preset environmental thresholds. Simultaneously, the operating status of database services, middleware services, and other dependent components can be verified. When the detection results meet the upgrade execution conditions, a normal environment detection result can be generated; when insufficient disk space, abnormal network connections, or abnormal operation of dependent components are detected, an abnormal environment detection result is generated.
[0030] Furthermore, corresponding task stage status records can be generated based on the environmental detection results, forming task status data. In some embodiments, a state machine mechanism can be used to manage the upgrade process. Specifically, upon receiving an upgrade request, the task status can be set to "Preparing"; after the environmental detection passes, the task status can be updated to "Ready"; if the environmental detection fails, the task status can be updated to "Execution Failed," and corresponding exception information can be recorded. The task status data may include task identifier, stage status, stage start time, stage end time, execution log information, and operation record information.
[0031] By persistently storing task status data, even if network interruptions, system restarts, or abnormal task termination occur during subsequent upgrades, the upgrade process can still be accurately restored based on the task status data, and the current stage of the upgrade task can be identified, providing status information for the execution of subsequent backup, synchronization, verification, and switching stages.
[0032] S20: Based on the environmental detection results and the task status data, perform old service data backup processing to obtain basic backup data, and update the corresponding backup status data.
[0033] In some embodiments, the step of performing old service data backup processing based on the environment detection results and the task status data to obtain basic backup data includes: determining backup execution conditions based on the environment detection results and the task status data to obtain backup trigger information; performing full collection and processing of old service running data based on the backup trigger information to obtain an original business data set; performing backup processing based on the original business data set to obtain backup data results; and generating backup execution record information based on the backup data results to obtain the basic backup data.
[0034] S30: Establish dual-write synchronization rules based on the basic backup data and the backup status data, and perform synchronization processing on the data change information generated during service operation based on the dual-write synchronization rules to obtain the synchronization data result.
[0035] It should be noted that the dual-write synchronization rule is used to uniformly control the data writing behavior generated by the target service during the upgrade process, ensuring data consistency across different data storage locations or service instances. Basic backup data provides the baseline dataset before the upgrade, while backup status data characterizes the backup execution progress and completion status. Both serve as inputs for constructing the dual-write synchronization rule, achieving controllability and consistency constraints in the subsequent data synchronization process.
[0036] For example, the current service data status can be analyzed based on basic backup data and backup status data to determine whether the conditions for establishing dual-write synchronization rules are met. For instance, when the basic backup data has been persistently stored and the backup status data indicates that the backup is complete, the generation process of dual-write synchronization rules can be triggered. In some embodiments, dual-write synchronization rules may include data write routing rules, data synchronization triggering rules, and data consistency verification rules, thereby uniformly constraining and distributing control over data write behavior during service operation.
[0037] Furthermore, after the dual-write synchronization rules are established, data change information generated during service operation can be synchronized. This data change information can be triggered by data access requests, such as write requests, update requests, or delete requests, corresponding to changes in the data content. By synchronizing this data change information, corresponding data synchronization results can be obtained. These synchronization results characterize the consistency status and completion status of each data processing node during the dual-write synchronization process, thus providing a data foundation for subsequent service verification processing and supporting decisions regarding traffic switching and service status updates.
[0038] In some embodiments, establishing dual-write synchronization rules based on the basic backup data and the backup status data includes: determining synchronization initialization conditions based on the basic backup data and the backup status data to obtain synchronization trigger information; generating write control configuration data based on the synchronization trigger information to obtain dual-write control parameters; performing path distribution processing on data access request data based on the dual-write control parameters to obtain dual-write routing results; and generating data change record rules based on the dual-write routing results to obtain the dual-write synchronization rules.
[0039] For example, the synchronization initialization conditions can be determined first based on the basic backup data and backup status data, and then it can be determined whether the current system has the prerequisites for performing dual-write synchronization based on the synchronization initialization conditions. For instance, when the basic backup data has been persistently stored and the backup status data is in a completed state, synchronization trigger information can be generated to trigger the subsequent dual-write rule construction process.
[0040] In some embodiments, write control configuration data can be generated based on synchronization triggering information to form dual-write control parameters. The write control configuration data may include write target node information, write order control information, write routing policy information, and write consistency control parameters, used for fine-grained control and distribution management of the write behavior of data access requests. Further, the data access request data can be path-distributed based on the dual-write control parameters to obtain dual-write routing results. The path distribution processing is used to determine the distribution method of the data access request data in different data processing paths, for example, simultaneously distributing the same write request to both the original service data storage path and the target service data storage path, thereby forming a dual-path write structure.
[0041] In some embodiments, data change record rules can be generated based on the dual-write routing results, and the changes in data access request data during the dual-write process can be constrained and recorded based on these rules, thereby obtaining dual-write synchronization rules. Through this method, the dual-write synchronization rules not only possess write path control capabilities but also data change traceability capabilities, providing fundamental support for subsequent data synchronization processing and consistency verification.
[0042] In some embodiments, the step of synchronizing data change information generated during service operation based on the dual-write synchronization rule to obtain a synchronization data result includes: receiving data access request data according to the dual-write synchronization rule to obtain target write information; generating data change record information according to the target write information to obtain incremental change data; performing synchronization processing according to the incremental change data to obtain a synchronization execution result; and performing consistency aggregation processing according to the synchronization execution result to obtain the synchronization data result.
[0043] For example, data access request data can be received first according to the dual-write synchronization rules, and then parsed to obtain the target write information. The data access request data can include operation types such as write requests, update requests, or delete requests initiated by the business system; for example, in a financial transaction system, this corresponds to an account balance change request, and in a healthcare system, it corresponds to an electronic medical record update request. By performing structured parsing on the data access request data, the target write information for subsequent synchronization processing can be obtained.
[0044] In some embodiments, data change log information can be generated based on the target write information to form a traceable description of the data change process. The data change log information records attribute information such as the change type, change content, and change time corresponding to the target write information, and further forms incremental change data. Incremental change data is used to characterize the data portion that has changed relative to the basic backup data, thereby reducing resource consumption caused by full synchronization and improving synchronization efficiency. Furthermore, synchronization processing can be performed based on the incremental change data, synchronizing the incremental change data to the corresponding data processing path or service instance according to the dual-write synchronization rules, thereby obtaining the synchronization execution result. The synchronization execution result is used to characterize the data write execution status and synchronization completion status of each synchronization path.
[0045] In some embodiments, the synchronization execution results can be subjected to consistency aggregation processing to form a synchronization data result. Consistency aggregation processing may include operations such as comparing data consistency among multiple data replicas, statistically analyzing successful synchronization status, and summarizing abnormal synchronization records, thereby obtaining the final synchronization data result. This synchronization data result is used to characterize the consistency status of data synchronization during the upgrade process of the target service, providing data basis for subsequent service verification and traffic switching.
[0046] S40: Perform service verification processing based on the synchronization data results to obtain service verification results, and perform traffic switching processing and status update processing based on the service verification results to obtain upgrade completion results.
[0047] It should be noted that the service verification process is used to verify the data consistency and service availability after the dual-write synchronization is completed, in order to determine whether the target service meets the traffic switching conditions; the traffic switching process is used to gradually migrate business access requests from the original service path to the target service path; the status update process is used to record and update the execution phase of the upgrade task, thereby forming a complete upgrade closed-loop control process; the upgrade completion result is used to characterize the status information of the final execution completion of this service upgrade process.
[0048] For example, the service verification object data can be determined first based on the synchronization data results, and then consistency verification processing can be performed on the target service based on the service verification object data. For instance, the same data query request can be initiated to different service instances to obtain the corresponding service response results, and the service response results can be processed through structured parsing to obtain the verification data set to be compared. In some embodiments, the query results of the new and old data copies can be compared field by field to determine whether the data content, structure, and status are consistent, thereby generating service verification results.
[0049] For example, when service verification results indicate that data consistency meets a preset threshold or verification condition, traffic switching can be triggered. Traffic switching can include methods such as gradually migrating access traffic proportionally, canary switching, or full switching, thereby gradually transferring business access requests from the original service path to the target service path to reduce business risks during the switching process. Furthermore, after completing the traffic switching, the execution status of the upgrade task can be updated to generate a status update result. This status update process can include updating task stage identifiers, recording switching time nodes, and saving execution log information, thereby achieving state-based management of the entire upgrade process. Finally, an upgrade completion result is generated based on the status update result, indicating that the target service has been upgraded and is in a stable operating state.
[0050] In some embodiments, the step of performing service verification processing based on the synchronization data results to obtain service verification results includes: determining verification object information based on the synchronization data results to obtain target verification data; initiating a parallel query request based on the target verification data to obtain dual-path query response results; performing structured parsing processing based on the dual-path query response results to obtain parsed result data; and performing consistency comparison analysis processing based on the parsed result data to obtain the service verification results.
[0051] It should be noted that the service verification process is used to check the consistency of the target service data and the correctness of the service response after synchronization is completed, so as to determine whether the data status between different service instances meets the preset consistency conditions, thereby providing a basis for judgment for subsequent traffic switching and status updates.
[0052] For example, the verification object information can be determined first based on the synchronization data results, and target verification data can be generated based on the verification object information. The verification object information is used to indicate the range of data that needs to be verified, such as key business data identifiers, core data field sets, or configuration data sets; the target verification data is used as the input basis for subsequent parallel query requests.
[0053] In some embodiments, parallel query requests can be initiated to different service instances based on the target verification data to obtain dual-path query response results. The dual-path query response results are used to characterize the returned data results of the same verification object under different service paths, such as query response data sets from the original service instance and the target service instance. Further, the dual-path query response results can be subjected to structured parsing processing to convert the response data from different sources into a unified data structure format, thereby obtaining the parsed result data. Structured parsing processing may include field standardization, data format conversion, and data mapping to eliminate data representation differences between different service instances.
[0054] In some embodiments, consistency comparison analysis can be performed based on the parsed data to compare the data content between different service instances field by field or key fields, thereby determining whether there are differences in the data and generating service verification results.
[0055] In some embodiments, the step of performing traffic switching processing and status update processing based on the service verification result to obtain an upgrade completion result includes: determining traffic switching execution conditions based on the service verification result to obtain switching trigger information; generating traffic scheduling control parameters based on the switching trigger information to obtain traffic switching control information; performing migration processing on the access traffic of the target service based on the traffic switching control information to obtain a traffic switching result; updating task execution status information based on the traffic switching result and generating an upgrade completion identifier to obtain the upgrade completion result.
[0056] It should be noted that the traffic switching process is used to gradually migrate business access traffic from the original service path to the target service path after the service verification is passed, so as to achieve a smooth switch after the service upgrade; the status update process is used to update and record the execution status of the upgrade task during the traffic switching process, thereby forming a complete closed-loop management of the upgrade process; the upgrade completion result is used to characterize the result information of the target service completing the upgrade switch and entering a stable operating state.
[0057] For example, the traffic switching execution conditions can be determined first based on the service verification results, and switching trigger information can be generated based on the traffic switching execution conditions. For instance, when the service verification results show that the data consistency meets the preset threshold and the service response is normal, trigger information allowing switching can be generated; when the verification results do not meet the preset conditions, traffic switching can be paused and the current service running state can be maintained.
[0058] In some embodiments, traffic scheduling control parameters can be generated based on the switching trigger information to form traffic switching control information. These parameters may include traffic switching ratio parameters, switching rate parameters, target service routing parameters, and rollback control parameters, used for fine-grained scheduling control of service access traffic. Furthermore, the access traffic to the target service can be migrated based on the traffic switching control information to obtain the traffic switching result. This migration process may include gradually migrating access requests according to a preset ratio, switching access paths in batches, or switching all access entry points, enabling a smooth transition of service access from the original service path to the target service path, thereby reducing the risk of service fluctuations during the switching process.
[0059] In some embodiments, the task execution status information can be updated based on the traffic switching result, and an upgrade completion identifier can be generated to obtain the upgrade completion result. The task execution status information is used to record the final task status after the traffic switching is completed, such as switching completed or upgrade successful; the upgrade completion identifier is used to indicate that the upgrade task has been fully executed and has reached a stable operating state, thereby confirming the entire service upgrade process.
[0060] As can be seen, the above solution, by completing service environment detection and task status recording before the upgrade begins, and combining this with backup processing to form a complete pre-upgrade data baseline, continuously retains the target service's operational data and historical status information during the service upgrade process. This improves data traceability and task manageability during the upgrade, avoiding problems such as data loss, backup omissions, or upgrade process interruptions due to upgrade anomalies. Furthermore, by establishing dual-write synchronization rules, data change information is synchronized in real time during the service upgrade process. After synchronization, service verification and traffic switching are performed, ensuring that data changes generated during the upgrade are continuously synchronized to the target environment. Simultaneously, the service verification results are used to verify the upgraded service status. Traffic switching and status updates are only performed after successful verification. This reduces the risk of upgrade failure due to data inconsistency, configuration anomalies, or service unavailability, improving the continuity, reliability, and controllability of the service upgrade process. Especially in service scenarios such as finance, healthcare, and elderly care, this solution can complete service upgrades while ensuring continuous business operation, achieving a technical effect of minimizing the impact of service upgrades on business access.
[0061] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0062] In one embodiment, a service upgrade apparatus is provided, which corresponds one-to-one with the service upgrade methods described in the above embodiments. For example... Figure 4 As shown, the service upgrade device includes a receiving module 101, a backup module 102, a data synchronization module 103, and a service upgrade module 104. Detailed descriptions of each functional module are as follows: The receiving module 101 is used to create a corresponding upgrade task after receiving an upgrade request for the target service, and to detect the service environment of the target service to obtain the environment detection result and the corresponding task status data. Backup module 102 is used to perform old service data backup processing based on the environmental detection results and the task status data to obtain basic backup data and update the corresponding backup status data. The data synchronization module 103 is used to establish dual-write synchronization rules based on the basic backup data and the backup status data, and to perform synchronization processing on the data change information generated during service operation based on the dual-write synchronization rules to obtain the synchronization data result. The service upgrade module 104 is used to perform service verification processing based on the synchronization data results, obtain service verification results, and perform traffic switching processing and status update processing based on the service verification results to obtain upgrade completion results.
[0063] The receiving module 101 is configured to parse the identification information of the target service according to the upgrade request to obtain target service identification data; generate a corresponding upgrade task according to the target service identification data, and detect the service environment according to the upgrade task to obtain environment collection data; generate a task stage status record according to the environment collection data to obtain the environment detection result and the task status data.
[0064] The backup module 102 is used to determine the backup execution conditions based on the environment detection results and the task status data, and obtain backup trigger information; to collect and process the old service running data in full based on the backup trigger information, and obtain the original business data set; to perform backup processing based on the original business data set, and obtain backup data results; and to generate backup execution record information based on the backup data results, and obtain the basic backup data.
[0065] The data synchronization module 103 is used to determine the synchronization initialization conditions based on the basic backup data and the backup status data, and obtain synchronization trigger information; generate write control configuration data based on the synchronization trigger information, and obtain dual-write control parameters; perform path distribution processing on data access request data based on the dual-write control parameters, and obtain dual-write routing results; and generate data change record rules based on the dual-write routing results, and obtain the dual-write synchronization rules.
[0066] The data synchronization module 103 is used to receive data access request data according to the dual-write synchronization rules to obtain target write information; generate data change record information according to the target write information to obtain incremental change data; perform synchronization processing according to the incremental change data to obtain synchronization execution result; and perform consistency summary processing according to the synchronization execution result to obtain the synchronization data result.
[0067] The data synchronization module 103 is used to determine the verification object information based on the synchronization data result and obtain the target verification data; initiate a parallel query request based on the target verification data and obtain a dual-path query response result; perform structured parsing processing based on the dual-path query response result to obtain parsed result data; and perform consistency comparison analysis processing based on the parsed result data to obtain the service verification result.
[0068] The service upgrade module 104 is used to determine the traffic switching execution conditions based on the service verification results and obtain switching trigger information; generate traffic scheduling control parameters based on the switching trigger information and obtain traffic switching control information; perform migration processing on the access traffic of the target service based on the traffic switching control information and obtain traffic switching results; update task execution status information based on traffic switching results and generate an upgrade completion identifier to obtain the upgrade completion result.
[0069] This invention provides a service upgrade device that, by performing service environment detection and task status recording before the upgrade begins, and combining this with backup processing to form a complete pre-upgrade data baseline, continuously retains the target service's operational data and historical status information during the service upgrade process. This improves data traceability and task manageability during the upgrade process, avoiding problems such as data loss, backup omissions, or upgrade process interruptions due to upgrade anomalies. Furthermore, by establishing dual-write synchronization rules, data change information is synchronized in real time during the service upgrade process. After synchronization is complete, service verification and traffic switching are performed, ensuring that data changes generated during the upgrade are continuously synchronized to the target environment. Simultaneously, the service verification results are used to verify the upgraded service status. Traffic switching and status updates are only performed after successful verification. This reduces the risk of upgrade failure due to data inconsistency, configuration anomalies, or service unavailability, improving the continuity, reliability, and controllability of the service upgrade process. Particularly in service scenarios such as finance, healthcare, and elderly care, this device can complete service upgrades while ensuring continuous business operation, achieving the technical effect of minimizing the impact of the service upgrade process on business access.
[0070] Specific limitations regarding the service upgrade device can be found in the limitations of the service upgrade method described above, and will not be repeated here. Each module in the aforementioned service upgrade device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0071] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a service upgrade method on the server side.
[0072] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a service upgrade method on the client side.
[0073] In one embodiment, a computer device is provided, 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 perform the following steps: Upon receiving an upgrade request for the target service, a corresponding upgrade task is created, and the service environment of the target service is detected to obtain the environment detection results and the corresponding task status data. Based on the environmental detection results and the task status data, perform old service data backup processing to obtain basic backup data, and update the corresponding backup status data. A dual-write synchronization rule is established based on the basic backup data and the backup status data, and the data change information generated during service operation is synchronized based on the dual-write synchronization rule to obtain the synchronization data result. Based on the synchronized data results, service verification is performed to obtain the service verification result. Based on the service verification result, traffic switching and status update are performed to obtain the upgrade completion result.
[0074] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Upon receiving an upgrade request for the target service, a corresponding upgrade task is created, and the service environment of the target service is detected to obtain the environment detection results and the corresponding task status data. Based on the environmental detection results and the task status data, perform old service data backup processing to obtain basic backup data, and update the corresponding backup status data. A dual-write synchronization rule is established based on the basic backup data and the backup status data, and the data change information generated during service operation is synchronized based on the dual-write synchronization rule to obtain the synchronization data result. Based on the synchronized data results, service verification is performed to obtain the service verification result. Based on the service verification result, traffic switching and status update are performed to obtain the upgrade completion result.
[0075] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0076] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0077] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0078] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0079] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A service upgrade method, characterized in that, The method includes: Upon receiving an upgrade request for the target service, a corresponding upgrade task is created, and the service environment of the target service is detected to obtain the environment detection results and the corresponding task status data. Based on the environmental detection results and the task status data, perform old service data backup processing to obtain basic backup data, and update the corresponding backup status data. A dual-write synchronization rule is established based on the basic backup data and the backup status data, and the data change information generated during service operation is synchronized based on the dual-write synchronization rule to obtain the synchronization data result. Based on the synchronized data results, service verification is performed to obtain the service verification result. Based on the service verification result, traffic switching and status update are performed to obtain the upgrade completion result.
2. The method according to claim 1, characterized in that, Upon receiving an upgrade request for the target service, a corresponding upgrade task is created, and the service environment of the target service is detected to obtain the environment detection results and corresponding task status data, including: Based on the upgrade request, the identification information of the target service is parsed to obtain the target service identification data; Based on the target service identifier data, a corresponding upgrade task is generated, and the service environment is detected based on the upgrade task to obtain environment collection data; Based on the environmental data collected, a task phase status record is generated to obtain the environmental detection results and the task status data.
3. The method according to claim 1, characterized in that, The step of backing up old service data based on the environmental detection results and the task status data to obtain basic backup data includes: Based on the environmental detection results and the task status data, the backup execution conditions are determined, and backup trigger information is obtained. Based on the backup trigger information, the old service operation data is fully collected and processed to obtain the original business data set. The backup data is processed based on the original business data set to obtain the backup data result. Based on the backup data results, backup execution record information is generated to obtain the basic backup data.
4. The method according to claim 1, characterized in that, The step of establishing dual-write synchronization rules based on the basic backup data and the backup status data includes: Based on the basic backup data and the backup status data, the synchronization initialization conditions are determined, and the synchronization trigger information is obtained. Based on the synchronization triggering information, write control configuration data is generated to obtain dual write control parameters; The data access request data is distributed according to the dual-write control parameters to obtain the dual-write routing result; The dual-write synchronization rule is obtained by generating data change record rules based on the dual-write routing results.
5. The method according to claim 1, characterized in that, The process of synchronizing data change information generated during service operation based on the dual-write synchronization rules to obtain synchronized data results includes: According to the dual-write synchronization rule, data access request data is received to obtain target write information; Data change record information is generated based on the target write information to obtain incremental change data; Synchronization processing is performed based on the incremental change data to obtain the synchronization execution result; The synchronization data result is obtained by performing consistency aggregation processing based on the synchronization execution result.
6. The method according to claim 1, characterized in that, The step of performing service verification processing based on the synchronization data results to obtain service verification results includes: Based on the synchronization data results, the verification object information is determined, and the target verification data is obtained; Initiate a parallel query request based on the target verification data to obtain dual-path query response results; The structured parsing process is performed on the dual-path query response results to obtain the parsed result data; Based on the parsed data, a consistency comparison analysis is performed to obtain the service verification result.
7. The method according to claim 1, characterized in that, The process of switching traffic and updating status based on the service verification result to obtain the upgrade completion result includes: Based on the service verification results, determine the traffic switching execution conditions and obtain the switching trigger information; Based on the switching trigger information, traffic scheduling control parameters are generated to obtain traffic switching control information; The access traffic to the target service is migrated according to the traffic switching control information to obtain the traffic switching result. Update the task execution status information based on the traffic switching result and generate an upgrade completion identifier to obtain the upgrade completion result.
8. A service upgrade device, characterized in that, include: The receiving module is used to create a corresponding upgrade task after receiving an upgrade request for the target service, and to detect the service environment of the target service to obtain the environment detection results and the corresponding task status data. The backup module is used to perform old service data backup processing based on the environmental detection results and the task status data to obtain basic backup data and update the corresponding backup status data. The data synchronization module is used to establish dual-write synchronization rules based on the basic backup data and the backup status data, and to synchronize data change information generated during service operation based on the dual-write synchronization rules to obtain synchronized data results. The service upgrade module is used to perform service verification processing based on the synchronization data results, obtain service verification results, and perform traffic switching and status update processing based on the service verification results to obtain the upgrade completion result.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the service upgrade method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the service upgrade method as described in any one of claims 1 to 7.