Asynchronous scene environment migration method and device, equipment and medium

By configuring the environment identifier in the asynchronous request and calling back the execution result, the original environment and the target environment in the asynchronous scenario are decoupled, which solves the abnormal risk problem in the asynchronous scenario environment migration and ensures the stability and continuity of the business.

CN120729863APending Publication Date: 2025-09-30CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510855907.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

During the environment migration process in asynchronous scenarios, existing technologies have the problem of high abnormal risks, especially when the trusted and non-trusted environments are not completely isolated, the asynchronous request links are cross-linked and highly coupled, resulting in the expansion of the fault scope.

Method used

By configuring the source environment identifier or target environment identifier in the asynchronous request and calling back the execution result to the server of the corresponding environment through the gateway, the source environment and target environment in the asynchronous process scenario are completely decoupled to avoid mutual interference.

Benefits of technology

This effectively reduces the risk of abnormalities during environment migration in asynchronous scenarios and ensures business stability and continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729863A_ABST
    Figure CN120729863A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computers, is suitable for financial scenes and medical scenes, and discloses an environment migration method, device and equipment for an asynchronous scene and a medium, and the method comprises the steps: shunting an obtained asynchronous request to a server of an original environment or a server of a target environment through load balancing; the server side of the original environment or the server side of the target environment responds to the triggering end of the service scene according to the received asynchronous request, configures an original environment identifier or a target environment identifier for the received asynchronous request, and sends the asynchronous request configured with the original environment identifier or the target environment identifier to an asynchronous task processing end; and the asynchronous task processing end responds to the server of the original environment or the server of the target environment according to the received asynchronous request configured with the original environment identifier or the target environment identifier, triggers execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment. The abnormal risk of environment migration in the asynchronous scene is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology and is applicable to financial and medical scenarios, and in particular relates to an environment migration method, device, equipment and medium for asynchronous scenarios. Background Art

[0002] Key industries such as finance, insurance, and healthcare urgently need to migrate their existing business systems to domestically produced ICT systems. Core business scenarios in these industries, such as financial transactions, insurance underwriting and claims processing, and medical diagnostic data synchronization, generally rely on highly real-time, highly consistent asynchronous task processing systems. These ICT migrations require a complete full-stack technology reconstruction, encompassing domestically produced replacements for core components such as server hardware, operating systems, databases, and middleware.

[0003] In actual deployment, in order to ensure business continuity, a "dual-track parallel transition strategy of trusted and non-trusted environments" is usually adopted. In asynchronous processing scenarios, although asynchronous requests initially enter the trusted environment, due to the automatic diversion of the load balancing mechanism, the callback process may be routed to the non-trusted environment, and vice versa. This environment does not completely isolate the architecture of the trusted and non-trusted environments, resulting in cross-links and strong coupling of asynchronous request links. All requests processed by this module and their callback processes may be affected, thereby expanding the scope of failures and increasing the risk of abnormalities in the environment migration of asynchronous scenarios.

[0004] Therefore, how to reduce the abnormal risk in environment migration in asynchronous scenarios is a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The present invention provides an asynchronous scenario environment migration method, device, equipment and medium to solve the technical problem of high abnormality risk in the existing asynchronous scenario environment migration.

[0006] In a first aspect, the present invention provides an environment migration method for an asynchronous scenario, comprising:

[0007] Obtain asynchronous requests from the trigger end of the business scenario and distribute the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing;

[0008] The server end of the original environment or the server end of the target environment responds to the trigger end of the business scenario according to the received asynchronous request, configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end;

[0009] The asynchronous task processing end responds to the server end of the original environment or the server end of the target environment according to the asynchronous request after the received configuration of the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment;

[0010] The asynchronous task processing end will call back the execution result of the asynchronous request marked with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario.

[0011] In a second aspect, the present invention provides an environment migration device for an asynchronous scenario, comprising:

[0012] The acquisition module is used to obtain asynchronous requests from the trigger end of the business scenario and distribute the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing;

[0013] The configuration module is used to configure the server end of the original environment or the server end of the target environment to respond to the trigger end of the business scenario according to the received asynchronous request, configure the original environment identifier or the target environment identifier for the received asynchronous request, and send the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end;

[0014] A generation module, wherein the asynchronous task processing end responds to the server of the original environment or the server of the target environment according to the received asynchronous request after configuring the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment;

[0015] The callback module, the asynchronous task processing end will call back the execution result of the asynchronous request marked with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario.

[0016] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the environment migration method for the above-mentioned asynchronous scenario are implemented.

[0017] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the environment migration method for the above-mentioned asynchronous scenario.

[0018] The environment migration method, device, equipment and medium of the above-mentioned asynchronous scenario, in the implemented scheme, can obtain asynchronous requests from the triggering end of the business scenario through the client, and divert the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing; the server end of the original environment or the server end of the target environment responds to the triggering end of the business scenario according to the received asynchronous request, and configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end; the asynchronous task processing end responds to the server end of the original environment or the server end of the target environment according to the received asynchronous request with the configured original environment identifier or the target environment identifier, and triggers the execution of the asynchronous request, generating an identifier with The execution result of the asynchronous request of the original environment or the target environment; the asynchronous task processing end will call back the execution result of the asynchronous request identified with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request identified with the original environment or the target environment to the triggering end of the business scenario. In the present invention, when performing environmental migration of the asynchronous scenario, by configuring the original environment identifier or the target environment identifier in the asynchronous request, and calling back the execution result of the asynchronous request identified with the original environment or the target environment to the server end of the original environment or the server end of the target environment through the gateway, the complete decoupling of the original environment and the target environment in the asynchronous process scenario is achieved, mutual interference is avoided, and the abnormal risk during the environmental migration process in the asynchronous scenario is effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 This is a schematic diagram of an application environment of an asynchronous scenario environment migration method according to an embodiment of the present invention;

[0021] Figure 2 This is a flow chart of an environment migration method for an asynchronous scenario according to an embodiment of the present invention;

[0022] Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S10;

[0023] Figure 4 yes Figure 2 A schematic flow chart of a specific implementation of step S20;

[0024] Figure 5 yes Figure 2 A schematic flow chart of a specific implementation of step S30;

[0025] Figure 6 yes Figure 2 A schematic flow chart of a specific implementation of step S40;

[0026] Figure 7 This is a schematic diagram of the structure of an environment migration device for an asynchronous scenario in one embodiment of the present invention;

[0027] Figure 8 is a structural diagram of a computer device in one embodiment of the present invention;

[0028] Figure 9 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0030] The asynchronous scenario environment migration method provided by the embodiment of the present invention can be applied in the following situations: Figure 1 In the application environment, Figure 1It is a schematic diagram of an application environment of an environment migration method for an asynchronous scenario in one embodiment of the present invention; wherein, the client communicates with the server through a network. The server can obtain an asynchronous request from the triggering end of the business scenario through the client, and divert the obtained asynchronous request to the server of the original environment or the server of the target environment through load balancing; the server of the original environment or the server of the target environment responds to the triggering end of the business scenario according to the received asynchronous request, and configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configuration of the original environment identifier or the target environment identifier to the asynchronous task processing end; the asynchronous task processing end responds to the server of the original environment or the server of the target environment according to the received asynchronous request with the configuration of the original environment identifier or the target environment identifier, and triggers the execution of the asynchronous request, generating an asynchronous request with the identification of the original environment or the target environment. Execution result; the asynchronous task processing end calls back the execution result of the asynchronous request identified with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment call back the execution result of the asynchronous request identified with the original environment or the target environment to the trigger end of the business scenario. In the present invention, when performing environmental migration of the asynchronous scenario, by configuring the original environment identifier or the target environment identifier in the asynchronous request, and calling back the execution result of the asynchronous request identified with the original environment or the target environment to the server end of the original environment or the server end of the target environment through the gateway, the complete decoupling of the original environment and the target environment in the asynchronous process scenario is achieved, mutual interference is avoided, and the abnormal risk in the environmental migration process in the asynchronous scenario is effectively reduced. The present invention is described in detail below through specific embodiments.

[0031] See also Figure 2 As shown, Figure 2 A schematic diagram of a flow chart of an asynchronous scenario environment migration method provided by an embodiment of the present invention. The asynchronous scenario environment migration method specifically includes the following steps:

[0032] S10: Obtain an asynchronous request from the trigger end of the business scenario, and divert the obtained asynchronous request to the server end of the original environment or the server end of the target environment through load balancing. Specifically, in an embodiment of the present invention, the asynchronous requests are reasonably distributed to the server ends of different environments through the load balancing mechanism, thereby avoiding overload of a single environment. It should be noted that the original environment can be a non-trusted innovation environment, and the target environment can be a trusted innovation environment. For example, in a financial scenario, a bank's asynchronous transaction request can be automatically distributed to a trusted innovation environment or a non-trusted innovation environment according to the system load, so as to avoid overload of a single environment and ensure the stable operation of services such as fund transfer and account query. In a medical scenario, when large-scale medical data processing is performed, the patient's medical record request can be diverted to different medical environments through load balancing. Specifically, if Figure 3 As stated, Figure 3 This is a flow chart of a specific implementation of step S10, which specifically includes the following steps S11-S12:

[0033] S11: Monitor the health status of the server side of the original environment or the server side of the target environment in real time, and dynamically allocate the request traffic based on the health status of the server side of the original environment or the server side of the target environment. Specifically, in an embodiment of the present invention, by continuously sensing the operating status of the server side, the distribution of request traffic can be dynamically adjusted according to the real-time load or fault conditions to ensure the stability and efficiency of the service response. For example, in financial services, the transaction system can automatically adjust the routing of high-frequency transactions, payment settlements and other requests according to the environmental performance to ensure the timeliness and stability of the operation. In medical services, patient data processing requests can also be reasonably diverted according to the health of the environment to avoid delays or interruptions of critical services under high load.

[0034] S12: When the health status of the target environment's server is abnormal, the request traffic is automatically switched to the server of the original environment. Specifically, in an embodiment of the present invention, when the target environment has performance abnormalities or is unavailable, the request can be seamlessly switched to the original environment to continue processing, thereby avoiding business interruption. For example, in a financial system, if a newly deployed information innovation environment fails, the system can immediately roll back transaction, authorization and other requests to the original environment to ensure that customer operations are not interrupted. In a medical system, if an abnormality occurs in the new environment running the diagnosis and treatment system, the data processing task can also be transferred to the original environment for continued execution to ensure the smooth progress of the diagnosis and treatment process.

[0035] S20: The server end of the original environment or the server end of the target environment responds to the trigger end of the business scenario according to the received asynchronous request, and configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end. Specifically, in an embodiment of the present invention, by adding the identifier of the original environment or the target environment to the request, the task can be accurately routed to the asynchronous task processing end, avoiding confusion or execution errors caused by switching between environments. Specifically, as Figure 4 As stated, Figure 4 This is a flow chart of a specific implementation of step S20, which specifically includes the following steps S21-S23:

[0036] S21: Obtain the environment type of the server side of the original environment or the server side of the target environment, and generate the corresponding original environment identifier or target environment identifier, wherein the original environment identifier or target environment identifier includes the architecture type, operating system version and service version number. Specifically, in an embodiment of the present invention, by obtaining detailed information such as the environment architecture type, operating system version, service version number, etc., the technology stack of the non-trusted innovation environment and the trusted innovation environment can be clarified. For example, in a financial transaction system, the non-trusted innovation environment and the trusted innovation environment may have different architectures or operating system versions. By generating and identifying environmental information, it is possible to identify which environment can process transaction requests and ensure compatibility. For example, a transaction request may require a specific operating system or service version to process risk control business. In a medical scenario, a hospital may use multiple platforms to process different patient data. By identifying the environment type and version, it can be clarified which data is processed by the old version of the electronic medical record system and which is processed by the new version of the electronic medical record system, providing a basis for subsequent environment migration.

[0037] S22: The server of the original environment or the server of the target environment embeds the original environment identifier or the target environment identifier in the protocol header of the received asynchronous request. Specifically, in an embodiment of the present invention, the environment identifier is embedded in the request protocol header, so that the request or response from the original environment or the target environment can be identified in any processing link. For example, in a financial transaction platform, the embedded environment identifier can identify which environment the request is processed by in asynchronous request processing such as loan approval and asset management, so as to perform specific processing or recording according to the characteristics of the environment. In a medical image processing platform, different environments may be responsible for different types of image analysis tasks. For example, the target environment may focus on artificial intelligence analysis, and the original environment focuses on processing traditional image storage. By embedding the environment identifier in the request header, the source of the task can be accurately distinguished to ensure that the correct processing logic is applied to the original environment or the target environment.

[0038] S23: Encrypt the embedded source environment identifier or target environment identifier using a digital signature algorithm, and send the encrypted asynchronous request to the asynchronous task processing end. Specifically, in this embodiment of the present invention, encrypting the environment identifier before sending it can effectively prevent data from being tampered with or forged during transmission.

[0039] S30: The asynchronous task processing end responds to the server end of the original environment or the server end of the target environment according to the asynchronous request after the received configuration of the original environment identifier or the target environment identifier, and triggers the execution of the asynchronous request to generate the execution result of the asynchronous request identified with the original environment or the target environment. In the embodiment of the present invention, by identifying the environment identifier, the asynchronous task processing end can accurately perform operations according to the environment requirements of the task, ensuring that the task is executed in the correct environment. Specifically, Figure 5As stated, Figure 5 This is a flow chart of a specific implementation of step S30, which specifically includes the following steps S31-S32:

[0040] S31: The asynchronous task processing end parses the original environment identifier or the target environment identifier in the asynchronous request, and loads the corresponding dependency library and operating environment according to the architecture type in the original environment identifier or the target environment identifier. Specifically, in an embodiment of the present invention, by parsing the original environment or the target environment identifier, the asynchronous task processing end can automatically load the corresponding architecture, dependency library and operating environment according to the characteristics of the environment. For example, the trusted innovation platform may require a specific version of the database, while the non-trusted innovation environment may use different libraries and architectures. By automatically loading the corresponding dependency library, it can ensure that the transaction request switches smoothly between the two environments.

[0041] S32: Real-time collection of performance indicators when the original environment or target environment loads the corresponding dependent library and operating environment, and generates the execution results of the asynchronous request identified with the original environment or target environment. Specifically, in an embodiment of the present invention, real-time collection of performance indicators helps to monitor the performance of the environment during actual operation, including dependent library loading time, system response time, CPU occupancy, memory usage, etc. For example, in a financial system, when a transaction request passes through the asynchronous task processing end, performance data will be collected based on the environment identification of the transaction request to ensure that the transaction execution efficiency in different environments is in the optimal state. For example, if the transaction processing speed of the trusted innovation environment is slow, the system can adjust the strategy by analyzing performance indicators to transfer traffic to a more efficient environment.

[0042] S40: The asynchronous task processing end calls back the asynchronous request execution result marked with the original environment or the target environment to the server end of the original environment or the target environment, and the server end of the original environment and the server end of the target environment call back the execution result of the asynchronous request marked with the original environment or the target environment to the trigger end of the business scenario. In the embodiment of the present invention, the callback result carries the environment identifier to ensure that the execution result is returned to the correct server end and trigger end, and there will be no erroneous callbacks or data confusion across environments. Specifically, Figure 6 As stated, Figure 6 This is a flow chart of a specific implementation of step S40, which specifically includes the following steps S41-S43:

[0043] S41: The asynchronous task processing end calls back the asynchronous request execution result identified with the source environment or target environment to the gateway interface of the source environment's server or the target environment's server. Specifically, in this embodiment of the present invention, calling back the asynchronous task processing execution result to the designated gateway interface ensures that the asynchronous task result is promptly fed back to the correct server, ensuring that the task execution result can be quickly returned for subsequent processing.

[0044] S42: The gateway interface of the server of the original environment or the server of the target environment forwards the execution result of the asynchronous request identified with the original environment or the target environment to the server of the original environment or the server of the target environment through routing according to the original environment identifier and the target environment identifier. Specifically, in an embodiment of the present invention, the gateway interface routes and forwards the execution result of the asynchronous request according to the environment identifier. By analyzing the environment identifier, it can select the appropriate server for task processing, ensuring that the request is effectively and quickly forwarded to the correct target environment. For example, in a financial system, after a cross-border payment request is processed in a cloud environment, the gateway will route and forward the execution result to the original environment according to the environment identifier in the request. If an exception occurs in the target environment, the gateway can forward the execution result to the backup environment to ensure that the payment process is not interrupted.

[0045] S43: The server of the source environment or the target environment calls back the execution result of the received asynchronous request identified by the source environment or the target environment to the triggering end of the business scenario. Specifically, in this embodiment of the present invention, after the result of the asynchronous task is called back to the triggering end, the business logic can respond based on the completion status of the task. This callback mechanism can decouple the dependencies between different services and improve the efficiency of parallel processing.

[0046] In one embodiment of the present invention, after the server of the original environment and the server of the target environment call back the execution result of the asynchronous request identified with the original environment or the target environment to the trigger end of the business scenario, the method further includes: regularly collecting service logs from the server of the original environment or the target environment, wherein the service logs include at least error data and warning data; correlating and comparing the service logs of the original environment with the service logs of the target environment through a log analysis engine to detect whether an anomaly has occurred in the target environment; if an anomaly is detected in the target environment, triggering the server of the target environment to issue an alarm signal. Specifically, in this embodiment of the present invention, regularly collecting service logs can timely detect potential abnormal problems. Error data and warning data provide actionable information for operation and maintenance personnel, helping them quickly identify problems in the system. The alarm mechanism enables relevant personnel to respond in the shortest possible time and take measures to fix the problems in the target environment, avoiding long-term impact on business processes. For example, a financial transaction system regularly collects transaction processing service logs from the original environment and the target environment, especially focusing on information such as transaction failures and order processing delays.

[0047] In one embodiment of the present invention, the log analysis engine is used to correlate and compare the original environment service log and the target environment service log to detect whether an abnormality occurs in the target environment, including: traversing the target environment service log and detecting whether there is an abnormality in the target environment service log; if there is an abnormality in the target environment service log, detecting whether the abnormality in the target environment service log exists in the original environment service log; if the abnormality in the target environment service log does not exist in the original environment service log, it is determined that an abnormality occurs in the target environment. Specifically, in an embodiment of the present invention. If there are abnormalities in the target environment log, it is necessary to check whether these abnormalities also appear in the service log of the original environment. If there are no identical abnormalities in the original environment, it means that there may be unique faults or problems in the target environment. For example, in a financial scenario, a cross-border payment platform needs to process transactions in a cloud environment. By traversing the service logs in the cloud environment through a log analysis engine, it is found that some transaction requests failed to be processed, and the logs display error messages of "network timeout" and "payment interface call failure". By comparing these exceptions with the original environment logs, it was found that the original environment did not have similar "network timeout" or "payment interface call failure" exceptions. It was determined that there might be a network connection problem in the target environment, causing the payment request timeout.

[0048] It can be seen that in the above scheme, when performing environment migration in an asynchronous scenario, by configuring the original environment identifier or the target environment identifier in the asynchronous request, and calling back the asynchronous request execution result identified with the original environment or the target environment to the server of the original environment or the target environment through the gateway, the original environment and the target environment in the asynchronous process scenario are completely decoupled, mutual interference is avoided, and the risk of abnormalities during environment migration in the asynchronous scenario is effectively reduced.

[0049] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean 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.

[0050] In one embodiment, an environment migration device for an asynchronous scenario is provided, and the environment migration device for an asynchronous scenario corresponds one-to-one to the environment migration method for an asynchronous scenario in the above embodiment. Figure 7 As shown, Figure 7 7 is a schematic diagram of the structure of an environment migration device for an asynchronous scenario according to an embodiment of the present invention. The environment migration device for an asynchronous scenario includes an acquisition module 71, a configuration module 72, a generation module 73, and a callback module 74. The functional modules are described in detail as follows:

[0051] The acquisition module is used to obtain asynchronous requests from the trigger end of the business scenario and distribute the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing;

[0052] The configuration module is used to configure the server end of the original environment or the server end of the target environment to respond to the trigger end of the business scenario according to the received asynchronous request, configure the original environment identifier or the target environment identifier for the received asynchronous request, and send the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end;

[0053] A generation module, wherein the asynchronous task processing end responds to the server of the original environment or the server of the target environment according to the received asynchronous request after configuring the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment;

[0054] The callback module, the asynchronous task processing end will call back the execution result of the asynchronous request marked with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario.

[0055] In one embodiment, the acquisition module 71 is specifically configured to:

[0056] Monitor the health status of the original environment's server or the target environment's server in real time, and dynamically allocate request traffic based on the health status of the original environment's server or the target environment's server.

[0057] When the health status of the server in the target environment is abnormal, the request traffic is automatically switched to the server in the original environment.

[0058] In one embodiment, the configuration module 72 is specifically configured to:

[0059] Obtaining the environment type of the server of the original environment or the target environment, and generating a corresponding original environment identifier or target environment identifier, wherein the original environment identifier or target environment identifier includes an architecture type, an operating system version, and a service version number;

[0060] The server of the original environment or the server of the target environment embeds the original environment identifier or the target environment identifier in the protocol header of the received asynchronous request;

[0061] The embedded original environment identifier or target environment identifier is encrypted by a digital signature algorithm, and the asynchronous request after the encrypted original environment identifier or target environment identifier is sent to the asynchronous task processing end.

[0062] In one embodiment, the generating module 73 is specifically configured to:

[0063] The asynchronous task processing end parses the original environment identifier or the target environment identifier in the asynchronous request, and loads the corresponding dependent library and operating environment according to the architecture type in the original environment identifier or the target environment identifier;

[0064] The performance indicators of the original environment or target environment when loading the corresponding dependent library and running environment are collected in real time, and the execution results of the asynchronous requests marked with the original environment or target environment are generated.

[0065] In one embodiment, the callback module 74 is specifically configured to:

[0066] The asynchronous task processing end calls back the asynchronous request execution result marked with the original environment or the target environment to the gateway interface of the server end of the original environment or the server end of the target environment;

[0067] The gateway interface of the server of the original environment or the server of the target environment forwards the asynchronous request execution result identified with the original environment or the target environment to the server of the original environment or the server of the target environment through routing according to the original environment identifier and the target environment identifier;

[0068] The server end of the original environment or the server end of the target environment calls back the execution result of the received asynchronous request identified with the original environment or the target environment to the trigger end of the business scenario.

[0069] In one embodiment, the environment migration device for the asynchronous scenario is further configured to:

[0070] Regularly collect service logs from the original environment server or the target environment server, wherein the service logs include at least error data and warning data;

[0071] The log analysis engine correlates and compares the original environment service logs with the target environment service logs to detect whether there are any anomalies in the target environment.

[0072] If an abnormality is detected in the target environment, the server of the target environment will be triggered to send an alarm signal.

[0073] In one embodiment, the environment migration device for the asynchronous scenario is further configured to:

[0074] Traverse the target environment service logs and detect whether there are any anomalies in the target environment service logs;

[0075] If there is an anomaly in the target environment service log, then detect whether the anomaly in the target environment service log exists in the original environment service log;

[0076] If the original environment service log does not contain the exception that exists in the target environment service log, it is determined that the target environment has an exception.

[0077] The present invention provides an environment migration device for an asynchronous scenario. When performing environment migration in an asynchronous scenario, the original environment identifier or the target environment identifier is configured in the asynchronous request, and the execution result of the asynchronous request identified with the original environment or the target environment is called back to the server of the original environment or the target environment through the gateway, thereby achieving complete decoupling of the original environment and the target environment in the asynchronous process scenario, avoiding mutual interference, and effectively reducing the abnormal risk during the environment migration process in the asynchronous scenario.

[0078] The specific definition of the environment migration device for asynchronous scenarios can be found in the definition of the environment migration method for asynchronous scenarios above, and will not be repeated here. The various modules in the above-mentioned environment migration device for asynchronous scenarios can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0079] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, Figure 8 1 is a schematic diagram of the structure of a computer device in one embodiment of the present invention. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the server side of an environment migration method for an asynchronous scenario.

[0080] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 9 As shown, Figure 91 is another structural schematic diagram of a computer device according to an embodiment of the present invention. The computer device includes a processor, memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external server via a network connection. When executed by the processor, the computer program implements the client-side functions or steps of an environment migration method for an asynchronous scenario.

[0081] 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. When the processor executes the computer program, the following steps are performed:

[0082] Obtain asynchronous requests from the trigger end of the business scenario and distribute the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing;

[0083] The server end of the original environment or the server end of the target environment responds to the trigger end of the business scenario according to the received asynchronous request, configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end;

[0084] The asynchronous task processing end responds to the server end of the original environment or the server end of the target environment according to the asynchronous request after the received configuration of the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment;

[0085] The asynchronous task processing end will call back the execution result of the asynchronous request marked with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario.

[0086] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0087] Obtain asynchronous requests from the trigger end of the business scenario and distribute the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing;

[0088] The server end of the original environment or the server end of the target environment responds to the trigger end of the business scenario according to the received asynchronous request, configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end;

[0089] The asynchronous task processing end responds to the server end of the original environment or the server end of the target environment according to the asynchronous request after the received configuration of the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment;

[0090] The asynchronous task processing end will call back the execution result of the asynchronous request marked with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario.

[0091] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0092] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchl ink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0093] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by 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.

[0094] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. An environment migration method for an asynchronous scenario, characterized in that: include: Obtain asynchronous requests from the trigger end of the business scenario and distribute the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing; The server end of the original environment or the server end of the target environment responds to the trigger end of the business scenario according to the received asynchronous request, configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end; The asynchronous task processing end responds to the server end of the original environment or the server end of the target environment according to the asynchronous request after the received configuration of the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment; The asynchronous task processing end will call back the execution result of the asynchronous request marked with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario.

2. The asynchronous scenario environment migration method according to claim 1, characterized in that: The asynchronous request is distributed to the server of the original environment or the server of the target environment through load balancing; including: Monitor the health status of the original environment's server or the target environment's server in real time, and dynamically allocate request traffic based on the health status of the original environment's server or the target environment's server. When the health status of the server in the target environment is abnormal, the request traffic is automatically switched to the server in the original environment.

3. The asynchronous scenario environment migration method according to claim 1, characterized in that: The server end of the original environment or the server end of the target environment responds to the trigger end of the business scenario according to the received asynchronous request, configures the original environment identifier or the target environment identifier for the received asynchronous request, and sends the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end; including: Obtaining the environment type of the server of the original environment or the target environment, and generating a corresponding original environment identifier or target environment identifier, wherein the original environment identifier or target environment identifier includes an architecture type, an operating system version, and a service version number; The server of the original environment or the server of the target environment embeds the original environment identifier or the target environment identifier in the protocol header of the received asynchronous request; The embedded original environment identifier or target environment identifier is encrypted by a digital signature algorithm, and the asynchronous request after the encrypted original environment identifier or target environment identifier is sent to the asynchronous task processing end.

4. The asynchronous scenario environment migration method according to claim 1, characterized in that: The asynchronous task processing end responds to the server end of the original environment or the server end of the target environment according to the received asynchronous request after configuring the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment; including: The asynchronous task processing end parses the original environment identifier or the target environment identifier in the asynchronous request, and loads the corresponding dependent library and operating environment according to the architecture type in the original environment identifier or the target environment identifier; The performance indicators of the original environment or target environment when loading the corresponding dependent library and running environment are collected in real time, and the execution results of the asynchronous requests marked with the original environment or target environment are generated.

5. The asynchronous scenario environment migration method according to claim 1, characterized in that: The asynchronous task processing end calls back the execution result of the asynchronous request identified with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment call back the execution result of the asynchronous request identified with the original environment or the target environment to the trigger end of the business scenario; including: The asynchronous task processing end calls back the asynchronous request execution result marked with the original environment or the target environment to the gateway interface of the server end of the original environment or the server end of the target environment; The gateway interface of the server of the original environment or the server of the target environment forwards the asynchronous request execution result identified with the original environment or the target environment to the server of the original environment or the server of the target environment through routing according to the original environment identifier and the target environment identifier; The server end of the original environment or the server end of the target environment calls back the execution result of the received asynchronous request identified with the original environment or the target environment to the trigger end of the business scenario.

6. The asynchronous scenario environment migration method according to claim 1, characterized in that: After the server of the original environment and the server of the target environment call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario, the method further includes: Regularly collect service logs from the original environment server or the target environment server, wherein the service logs include at least error data and warning data; The log analysis engine correlates and compares the original environment service logs with the target environment service logs to detect whether there are any anomalies in the target environment. If an abnormality is detected in the target environment, the server of the target environment will be triggered to send an alarm signal.

7. The asynchronous scenario environment migration method according to claim 6, characterized in that: The log analysis engine is used to correlate and compare the original environment service log with the target environment service log to detect whether the target environment has any abnormalities; including: Traverse the target environment service logs and detect whether there are any anomalies in the target environment service logs; If there is an anomaly in the target environment service log, then detect whether the anomaly in the target environment service log exists in the original environment service log; If the original environment service log does not contain the exception that exists in the target environment service log, it is determined that the target environment has an exception.

8. An environment migration device for asynchronous scenarios, characterized in that: include: The acquisition module is used to obtain asynchronous requests from the trigger end of the business scenario and distribute the obtained asynchronous requests to the server end of the original environment or the server end of the target environment through load balancing; The configuration module is used to configure the server end of the original environment or the server end of the target environment to respond to the trigger end of the business scenario according to the received asynchronous request, configure the original environment identifier or the target environment identifier for the received asynchronous request, and send the asynchronous request with the configured original environment identifier or the target environment identifier to the asynchronous task processing end; A generation module, wherein the asynchronous task processing end responds to the server of the original environment or the server of the target environment according to the received asynchronous request after configuring the original environment identifier or the target environment identifier, triggers the execution of the asynchronous request, and generates an execution result of the asynchronous request identified with the original environment or the target environment; The callback module, the asynchronous task processing end will call back the execution result of the asynchronous request marked with the original environment or the target environment to the server end of the original environment or the server end of the target environment, and the server end of the original environment and the server end of the target environment will call back the execution result of the asynchronous request marked with the original environment or the target environment to the triggering end of the business scenario.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the environment migration method for the asynchronous scenario are implemented 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, the steps of the environment migration method for an asynchronous scenario are implemented.