Chaotic test environment simulation method and device based on digital twinning
By injecting faults and updating the virtual testing system using digital twin technology, the problem of existing chaotic testing environments being unable to map the actual production system in real time is solved, achieving higher testing accuracy and realism.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2026-03-10
- Publication Date
- 2026-07-10
AI Technical Summary
Existing chaos testing environments cannot map the operational behavior and data flow status of actual production systems in real time and lack dynamic evolution mechanisms, resulting in insufficient accuracy and authenticity of test results.
By employing a digital twin approach, the system injects faults from the current physical system into a virtual test system, obtains response data, determines repair strategies, repairs the physical system, updates the virtual test system based on the repaired system information, and uses an information change prediction model to maintain system synchronization.
It improves the accuracy and realism of chaos testing, enabling the virtual testing system to change with the physical system and enhancing the dynamic adaptability of the test.
Smart Images

Figure CN122372432A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data, specifically to the field of financial technology, and more specifically to a method, apparatus, equipment, medium, and program product for simulating a chaotic testing environment based on digital twins. Background Technology
[0002] Chaos testing is a testing method that verifies the stability and resilience of a system by simulating system failures. Existing chaos testing environments are inherently static, unable to map the operational behavior, data flow states, and business logic of actual production systems, nor can they adapt to real-time changes in actual production systems, lacking a dynamic evolution mechanism. These shortcomings lead to a failure to map the chaos testing environment to the actual production environment in real time, thus affecting the accuracy and reliability of chaos testing results. Summary of the Invention
[0003] In view of the above problems, this application provides a method, apparatus, device, medium and program product for simulating a chaotic testing environment based on digital twins to improve the accuracy of chaotic testing.
[0004] According to the first aspect of this application, a method for simulating a chaotic testing environment based on digital twins is provided. This method includes repeatedly executing the following operations until preset conditions are met: injecting a fault occurring in the current physical system into the current virtual testing system; obtaining response data from the current virtual testing system, where the current virtual testing system is a digital twin of the current physical system, obtained based on the system information of the physical system at the previous moment and the changes in system information in the current physical system, including system configuration information and operating status information; determining at least one repair strategy from a preset repair strategy set based on the response data; repairing the current virtual testing system according to the repair strategy, and determining a target repair strategy based on the repair result; repairing the current physical system according to the target repair strategy; performing a first update operation on the repaired current virtual testing system based on the system information of the repaired current physical system to obtain an updated current virtual testing system; and, if the preset conditions are not met, using the updated current virtual testing system as the current virtual testing system. The preset conditions include at least one of a preset number of iterations and the number of faults in the current physical system within a preset time period being less than a preset fault threshold.
[0005] According to an embodiment of this application, the current virtual test system is obtained based on the system information of the physical system at the previous moment and the change status of the system information in the current physical system, including: inputting the collected system information of the physical system at the previous moment into their respective corresponding information change prediction models according to a preset collection frequency, wherein the information change prediction models are used to predict the system information that will change in the next moment; in response to the change operation of the system information in the current physical system, performing a second update operation on the initial virtual test system based on the output of the information change prediction models to obtain the current virtual test system.
[0006] According to an embodiment of this application, the information change prediction model includes a configuration change prediction model and a state change prediction model. The configuration change prediction model is used to predict the system configuration information that will change in the next moment, and the state change prediction model is used to predict the operating state information that will change in the next moment. In response to the system information change operation in the current physical system, based on the output of the information change prediction model, a second update operation is performed on the initial virtual test system, including: storing the configuration change data predicted by the configuration change prediction model and the operating state change data predicted by the state change prediction model into the preloaded memory area of the initial virtual test system, respectively.
[0007] In response to a change operation in the system configuration information of the current physical system, the actual configuration change data is obtained, and a first deviation between the actual configuration change data and the predicted configuration change data is determined. In response to a change operation in the operating status information of the current physical system, the actual operating status change data is obtained, and a second deviation between the actual operating status change data and the predicted operating status change data is determined. The configuration change data is corrected using the first deviation, and the operating status change data is corrected using the second deviation. The corrected configuration change data and operating status change data are sent to the running memory area of the initial virtual test system, respectively. The initial virtual test system is updated based on the data in the running memory area.
[0008] According to an embodiment of this application, the initial virtual test system is obtained in the following manner: The interface structure and parameter rules of the application programming interface (API) are extracted from the link tracing data of the physical system at the previous moment to obtain the API specification. The link tracing data indicates the relationship chain of all service nodes involved in the physical system at the previous moment during each request process. The node topology data and a first performance indicator of the physical system at the previous moment are associated to obtain associated data. The node topology data represents the interaction relationship between service nodes, and the first performance indicator represents the performance of the physical system at the previous moment. Entities are extracted from the associated data to construct a directed graph. The directed graph represents the interaction characteristics between service nodes, including call relationships and interface latency during the interaction process. Events and event states are extracted from the system logs of the physical system at the previous moment. Based on the mapping relationship between events and their states, event state change rules are determined. The API specification, the directed graph, and the event state change rules are injected into the image library and instantiated to obtain the initial virtual test system.
[0009] According to an embodiment of this application, a first update operation is performed on the repaired current virtual test system based on the system information of the repaired current physical system, including: determining the difference between the system information of the repaired current physical system and the system information of the repaired current virtual test system; injecting the difference into the image library and instantiating it to obtain the updated current virtual test system.
[0010] According to an embodiment of this application, repairing the current virtual test system according to the repair strategy includes: monitoring the status of each service node through a preset monitoring node, identifying abnormal service nodes, and designating abnormal service nodes that trigger a preset alarm threshold as fault nodes; repairing the fault at the fault node using the repair strategy and adjusting the call weight of the fault node; and restoring the call weight of the fault node after the second performance index of the fault node returns to the preset range.
[0011] According to an embodiment of this application, determining a target repair strategy based on the repair results includes: calculating the comprehensive score of the third performance index of the current virtual test system during the repair process, whereby the third performance index characterizes the performance of the current virtual test system, and each repair strategy corresponds to a comprehensive score; sorting the comprehensive scores and selecting the repair strategy corresponding to the highest comprehensive score as the target repair strategy.
[0012] The second aspect of this application provides a chaotic testing environment simulation device based on digital twins. This device is used to repeatedly execute the operations performed by the following modules until preset conditions are met. The device includes: a fault injection module, used to inject a fault occurring in the current physical system into the current virtual testing system and obtain response data of the current virtual testing system. The current virtual testing system is a digital twin of the current physical system, obtained based on the system information of the physical system at the previous moment and the changes in system information in the current physical system. The system information includes system configuration information and operating status information; a repair strategy acquisition module, used to determine at least one repair strategy from a preset repair strategy set based on the response data; a target repair strategy acquisition module, used to repair the current virtual testing system according to the repair strategy and determine a target repair strategy based on the repair result; a virtual testing system update module, used to repair the current physical system according to the target repair strategy and perform a first update operation on the repaired current virtual testing system based on the system information of the repaired current physical system; and further used to, if preset conditions are not met, use the updated current virtual testing system as the current virtual testing system. The preset conditions include at least one of a preset number of cycles and the number of faults in the current physical system within a preset time period being less than a preset fault threshold.
[0013] A third aspect of this application provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0014] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0015] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description
[0016] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0017] Figure 1 The illustration shows an application scenario of a method, apparatus, device, medium, and program product based on digital twin for simulating a chaotic testing environment according to embodiments of this application.
[0018] Figure 2A flowchart illustrating a method for simulating a chaotic testing environment based on digital twins according to an embodiment of this application is shown schematically.
[0019] Figure 3 The schematic diagram illustrates a flowchart of yet another chaos testing environment simulation method according to an embodiment of this application;
[0020] Figure 4 This illustration schematically shows a method for obtaining information from a current virtual testing system according to an embodiment of this application;
[0021] Figure 5 This illustration schematically shows an update operation method for an initial virtual test system according to an embodiment of this application;
[0022] Figure 6 This illustration schematically shows a method for obtaining an initial virtual test system according to an embodiment of this application;
[0023] Figure 7 A schematic diagram illustrates the structural block diagram of a digital twin-based chaos testing environment simulation device according to an embodiment of this application; and
[0024] Figure 8 A block diagram of an electronic device suitable for implementing a digital twin-based chaotic test environment simulation method is illustrated according to an embodiment of this application. Detailed Implementation
[0025] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0028] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0029] In the technical solution of this application, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0030] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this application all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.
[0031] This application provides a method for simulating a chaotic testing environment based on digital twins. The virtual testing system can be obtained by injecting faults into the physical system based on the system information of the physical system at the previous moment and the changes in the system information of the physical system at the current moment. A target repair strategy with good repair effect is determined based on the response data of the virtual testing system. The physical system is repaired based on the target repair strategy, and the virtual testing system is updated based on the repaired physical system. By continuously updating the virtual testing system based on the system information of the physical system at the previous moment and the changes in the system information of the physical system at the current moment, and by updating the virtual testing system based on the system information of the repaired physical system, the virtual testing system can change with the physical system, improving testing accuracy.
[0032] Figure 1 The diagram illustrates an application scenario of a digital twin-based chaos testing environment simulation method according to an embodiment of this application.
[0033] like Figure 1As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0034] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0035] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0036] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0037] It should be noted that the chaos testing environment simulation method based on digital twins provided in this application embodiment can generally be executed by server 105. Correspondingly, the chaos testing environment simulation device based on digital twins provided in this application embodiment can generally be located in server 105. The chaos testing environment simulation method based on digital twins provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the chaos testing environment simulation device based on digital twins provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0038] It should be understood that Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0039] The following will be based on Figure 1 The described scene, through Figures 2-6 A method for simulating a chaotic testing environment based on digital twins according to embodiments of this application will be described in detail.
[0040] Figure 2 A flowchart illustrating a method for simulating a chaotic testing environment based on digital twins according to an embodiment of this application is shown.
[0041] like Figure 2 As shown, the chaotic test environment simulation method 200 based on digital twin in this embodiment includes operations S210 to S250. The method 200 includes repeatedly executing the following operations until a preset condition is met.
[0042] In operation S210, the fault that occurred in the current physical system is injected into the current virtual test system, and the response data of the current virtual test system is obtained.
[0043] In operation S220, at least one repair strategy is determined from a set of preset repair strategies based on the response data.
[0044] When operating S230, repair the current virtual test system according to the repair strategy, and determine the target repair strategy based on the repair results.
[0045] In operation S240, the current physical system is repaired according to the target repair strategy. Based on the system information of the repaired current physical system, the first update operation is performed on the repaired current virtual test system to obtain the updated current virtual test system.
[0046] When operating S250, if the preset conditions are not met, the updated current virtual test system will be used as the current virtual test system. The preset conditions include at least one of the following: a preset number of cycles and the number of failures of the current physical system within a preset time period being less than a preset failure threshold.
[0047] In some embodiments, during operation S210, the response data may include business response latency, request volume of the faulty node, account request frequency, error code percentage, service restart count, session interruption count, and backup service traffic percentage, etc.
[0048] In some embodiments, during operation S220, the repair strategies in the preset repair strategy set may be service node rate limiting, service node call weight adjustment, backup service node traffic switching strategy, abnormal account temporary freezing strategy, invalid request filtering strategy, and account verification rule upgrade strategy, etc. For example, if the response data is business response delay, the determined repair strategy may be a combination of service node rate limiting and service node call weight adjustment strategies, such as rejecting non-core business requests and reducing the call weight of faulty nodes. If the response data is account request frequency, when the account request frequency exceeds the threshold, the determined repair strategy may be freezing abnormal accounts and blocking subsequent invalid requests from the abnormal accounts.
[0049] In some embodiments, if neither the number of iterations nor the number of failures of the current physical system within a preset time period meets the preset conditions, operations S210 to S250 are executed repeatedly. If the number of iterations reaches the preset number of iterations or the number of failures of the current physical system within the preset time period is less than a preset failure threshold, the loop ends. The preset conditions can be either the preset number of iterations or the number of failures of the current physical system within the preset time period being less than the preset failure threshold; for example, the physical system no longer experiencing failures within the preset time period. For instance, if the current physical system subsequently experiences a failure after the initial repair, the failure is injected into the updated current virtual test system. Following the target repair strategy and the first update operation, the current virtual test system is updated again. Each time the physical system experiences a failure, the failure is injected into the current virtual test system, and the current virtual test system is updated again according to the target repair strategy and the first update operation. This process is repeated until the preset conditions are met.
[0050] According to the embodiments of this application, the virtual test system is continuously updated based on the system information of the physical system at the previous moment and the changes in the system information of the current physical system, and the virtual test system is updated based on the system information of the repaired physical system. This allows the virtual test system to change with the changes in the physical system, thereby improving the accuracy of the test.
[0051] Figure 3 The illustration shows a flowchart of another chaos testing environment simulation method according to an embodiment of this application.
[0052] like Figure 3As shown, the physical system 301 includes a service node 302, first configuration data, and a first operating state 303. Based on the historical operating data of the physical system 301, the link tracing data 304, node topology data, first performance index 305, and system log 306 of the physical system can be obtained. The link tracing data 304, node topology data, first performance index 305, and system log 306 are injected into the image library 307 and instantiated to obtain the initial virtual test system 308. According to the system information that has changed in the current physical system and the output of the information change prediction model, the initial virtual test system 308 is updated to obtain the current virtual test system 309. The current virtual test system 309 includes a virtual service node 310, second configuration data, and a second operating state 311. The current virtual test system and the physical system 301 achieve synchronization of system configuration information and operating state information by using the information change prediction model. That is, executing operation S310 can make the virtual service node correspond to the service node in the physical system, and the two change synchronously. The configuration data and the second configuration data change synchronously, and the first running state and the second running state change synchronously. A fault is injected into the current virtual test system 309, operation S320 is executed, the response data 312 of the current virtual test system is obtained, the target repair strategy 313 is determined based on the response data, and the physical system 301 is repaired according to the target repair strategy. Based on the configuration data and running state of the repaired physical system, the current virtual test system is updated to ensure that the current virtual test system and the physical system change synchronously. In this way, not only can the current virtual test system have the ability to simulate the business logic of the physical system, but the current virtual test system can also change with the changes of the physical system. Chaos testing in the current virtual test system can improve the realism of the test. Moreover, determining the target repair strategy based on the response data of the current virtual test system and then repairing the physical system according to the target repair strategy, this continuous interaction between the physical system and the current virtual test system can improve the efficiency and accuracy of fault repair in the physical system and achieve continuous optimization of the physical system.
[0053] Figure 4 The illustration shows a schematic diagram of a current virtual testing system acquisition method according to an embodiment of this application.
[0054] In some embodiments, the current virtual test system is obtained based on the system information of the physical system at the previous moment and the change status of the system information in the current physical system, including: according to a preset acquisition frequency, inputting the acquired system information of the physical system at the previous moment into their respective corresponding information change prediction models, the information change prediction models being used to predict the system information that will change in the next moment; in response to the change operation of the system information in the current physical system, performing a second update operation on the initial virtual test system based on the output of the information change prediction models to obtain the current virtual test system.
[0055] like Figure 4 As shown, the system information 401 of the physical system at the previous moment is input into the information change prediction model 402 corresponding to that system information. Operation S410 is executed, that is, the system information change operation of the current physical system is performed. Based on the output 403 of the information change prediction model and the execution result of operation S410, operation S420 is executed, that is, the initial virtual test system is updated for the second time to obtain the current virtual test system. Specifically, according to the preset acquisition frequency, the system information of the physical system is acquired once every certain period of time. The acquired system information is input into the information change prediction model corresponding to that system information to predict the probability of the system information changing. When the system information of the physical system actually changes, the initial virtual test system is updated according to the change information and the information output of the information change prediction model to obtain the current virtual test system. In this way, the current virtual test system can keep pace with the current physical system, so that the current virtual test system can more realistically reflect the current physical system.
[0056] According to the embodiments of this application, the information change prediction model can accurately predict the system information of the physical system that will change in the next moment. When the system information of the physical system does change, the system information of the virtual test system can be quickly updated based on the predicted information, thereby improving the synchronization between the virtual test system and the physical system.
[0057] Figure 5 The diagram illustrates an update operation method for an initial virtual test system according to an embodiment of this application.
[0058] In some embodiments, the information change prediction model includes a configuration change prediction model and a state change prediction model. The configuration change prediction model is used to predict system configuration information that will change in the next time step, and the state change prediction model is used to predict operating state information that will change in the next time step. In response to a change operation of system information in the current physical system, a second update operation is performed on the initial virtual test system based on the output of the information change prediction model. This includes: storing the configuration change data predicted by the configuration change prediction model and the operating state change data predicted by the state change prediction model into the preloaded memory area of the initial virtual test system, respectively; in response to a change operation of system configuration information in the current physical system, obtaining actual configuration change data and determining a first deviation between the actual configuration change data and the predicted configuration change data; in response to a change operation of operating state information in the current physical system, obtaining actual operating state change data and determining a second deviation between the actual operating state change data and the predicted operating state change data; correcting the configuration change data using the first deviation and correcting the operating state change data using the second deviation; sending the corrected configuration change data and operating state change data to the operating memory area of the initial virtual test system, respectively; and updating the initial virtual test system based on the data in the operating memory area.
[0059] like Figure 5As shown, the configuration change data 502 predicted by the configuration change prediction model and the running state change data 503 predicted by the state change prediction model are stored in the preloaded memory area 501 of the initial virtual test system, respectively. Operation S510 is executed, which is to perform a change operation on the system configuration information in the current physical system. Operation S520 is executed, which is to perform a change operation on the running state information in the current physical system. Based on operation S510, the actual configuration change data 504 of the current physical system can be obtained. Based on operation S520, the actual running state change data 505 of the current physical system can be obtained. The configuration change data is then compared with the actual running state change data 505. Data 502 and actual configuration change data 504 are compared to obtain the first deviation 506. The configuration change data 502 stored in the preloaded memory area is corrected using the first deviation 506. The running status change data 503 and actual running status change data 505 are compared to determine the second deviation 507. The running status change data 503 stored in the preloaded memory area is corrected using the second deviation. Finally, the corrected configuration change data 502 and the corrected running status change data 503 are sent to the running memory area of the initial virtual test system, and the initial virtual test system is updated based on the data in the running memory area. Furthermore, only the system information that has changed in the initial virtual test system can be updated. Before the system configuration information in the physical system changes, a configuration change prediction model can be used to predict configuration items that may change. If the probability of a configuration item changing is high, the configuration change data for that item is stored in the preloaded memory area of the virtual test system. This method of sending the configuration change data of potentially changing configuration items to the virtual test system in advance can greatly reduce the amount of data transmission when the physical system actually undergoes configuration changes, improve the configuration update efficiency of the virtual test system, and thus improve the synchronization of configuration updates between the virtual test system and the physical system. When the predicted configuration change data actually occurs in the physical system... In the event of a change, the deviation between the actual configuration change data corresponding to the actual change and the predicted configuration change data is determined. Based on this deviation, the configuration change data stored in the preloaded memory area is corrected, and the corrected configuration change data is sent to the runtime memory area of the virtual test system to complete the configuration update of the virtual test system. Based on a similar principle, the runtime status update of the virtual test system can be completed. By using the deviation to correct the configuration change data stored in the preloaded memory area and updating the configuration of the virtual test system based on the corrected configuration change data, the accuracy of the configuration change data can be improved. Thus, while ensuring the accuracy of the configuration change data, the synchronization of the configuration update can also be guaranteed, and the synchronization delay time can be less than 1 minute.
[0060] Furthermore, if the probability of a configuration item changing is less than the preset configuration change probability, or if the configuration item that may change as predicted by the configuration change prediction model differs from the configuration item that actually changes in the physical system, then the actual configuration change data 504 that has changed in the current physical system is directly sent to the runtime memory area of the initial virtual test system. The initial virtual test system is then updated based on the data in the runtime memory area to ensure that the updated virtual test system remains synchronized with the current physical system. Based on a similar principle, the runtime state information that may change is predicted using the state change prediction model. If the probability of the predicted change in the runtime state information is less than the preset state change probability, or if the predicted change in the runtime state information is inconsistent with the actual change in the runtime state information of the physical system, then the actual change in the runtime state information is directly sent to the runtime memory area of the initial virtual test system. The initial virtual test system is then updated based on the data in the runtime memory area. The synchronization of the runtime state of the virtual test system and the physical system can also be achieved by pulling anonymized state snapshots or replaying historical traffic to reconstruct the session state.
[0061] Furthermore, the configuration change prediction model is trained based on the historical actual configuration change data of the physical system, and the state change prediction model is trained based on the historical actual operating state change data of the physical system.
[0062] According to the embodiments of this application, corresponding models are used to predict the configuration data and operating status data of the physical system that may change in the next moment, and the predicted information is saved to the preloaded memory area of the virtual test system for use when updating the virtual test system later. Storing the information that may change in advance in the virtual test system is beneficial to improving the synchronization of changes between the virtual test system and the physical system. Based on the deviation between the predicted information and the actual changes in the physical system, the data stored in the preloaded memory area is corrected, and the virtual test system is updated based on the corrected data, which can improve the accuracy of the update.
[0063] Figure 6 The diagram illustrates a method for obtaining an initial virtual test system according to an embodiment of this application.
[0064] In some embodiments, the initial virtual test system is obtained by: extracting the interface structure and parameter rules of the application programming interface (API) from the link tracing data of the physical system at the previous moment to obtain the API specification; the link tracing data indicates the relationship chain of all service nodes involved in the physical system at the previous moment during each request process; associating the node topology data and the first performance indicator of the physical system at the previous moment to obtain associated data; the node topology data characterizes the interaction relationship between service nodes, and the first performance indicator characterizes the performance of the physical system at the previous moment; extracting entities from the associated data to construct a directed graph; the directed graph characterizes the interaction features between service nodes, including call relationships and interface latency during the interaction process; extracting events and event states from the system logs of the physical system at the previous moment; determining event state change rules based on the mapping relationship between events and their states; and injecting the API specification, the directed graph, and the event state change rules into the image library and instantiating them to obtain the initial virtual test system.
[0065] like Figure 6 As shown, the application programming interface specification 602 can be obtained based on the link tracing data 601 of the physical system at the previous moment. The directed graph 604 can be obtained based on the node topology data and the first performance indicator 603 of the physical system at the previous moment. The first performance indicator can be the 95th percentile latency, the service node call frequency, and the error rate. The event state change rule 606 can be obtained based on the system log 605 of the physical system at the previous moment. The application programming interface specification 602, the directed graph 604, and the event state change rule 606 are injected into the image library and instantiated to obtain the initial virtual test system 607.
[0066] Furthermore, a link tracing probe can be used to collect the relationship chain of all service nodes involved in the physical system during each request using bytecode enhancement technology. Node topology data can be obtained by using a topology probe to capture the interaction relationship between service nodes through the service mesh. Before obtaining the application programming interface specification, directed graph, and event state change rules, the timestamps of link tracing data, node topology data, first performance indicators, and system logs are unified to achieve timestamp alignment and to associate link tracing data, node topology data, first performance indicators, and system logs.
[0067] Furthermore, obtaining the Application Programming Interface (API) specification represents the behavioral logic of the API. Constructing a directed graph and obtaining the call frequency and interface latency of each service node from the directed graph can represent the interaction logic between the service nodes. For example, among all the external call requests initiated by service A, 95% of the requests are sent to service B. During the process of service A initiating a call request to service B, the entire process from service A issuing the call request to service B returning the response takes 50ms ± 10ms. Event state change rules can reflect the mapping relationship between events and event states in the physical system. For example, if the event is a payment event, the event state is a decrease in account balance.
[0068] According to the embodiments of this application, a mapping logic is established based on real data such as link tracing data, node topology data, first performance indicators and system logs of the physical system at the previous moment. This allows the initial virtual test system to have the same underlying architecture and operating logic as the physical system, which can significantly reduce the modeling error of the virtual test system and improve the accuracy and timeliness of subsequent synchronization between the two systems.
[0069] In some embodiments, a first update operation is performed on the repaired current virtual test system based on the system information of the repaired current physical system, including: determining the difference between the system information of the repaired current physical system and the system information of the repaired current virtual test system; injecting the difference into the image library and instantiating it to obtain the updated current virtual test system.
[0070] According to the embodiments of this application, injecting the information differences between the repaired physical system and the virtual test system into the mirror library can provide an accurate basis for updating the virtual test system and avoid deviations between the virtual test system and the physical system caused by blind updates.
[0071] In some embodiments, repairing the current virtual test system according to the repair strategy includes: monitoring the status of each service node through a preset monitoring node, identifying abnormal service nodes, and designating abnormal service nodes that trigger a preset alarm threshold as fault nodes; repairing the fault at the fault node using the repair strategy and adjusting the call weight of the fault node; and restoring the call weight of the fault node after the second performance index of the fault node returns to the preset range.
[0072] In some embodiments, the second performance metric characterizes the performance of the faulty node, such as 95th percentile latency, service node call frequency, and error rate.
[0073] In some embodiments, under a scenario of a massive avalanche caused by a large number of transfer transactions, assuming the injected fault is a 100ms delay injected into the risk control service node, the current virtual test system's fault repair process is as follows: An anomaly is detected in the risk control service node through a preset monitoring node, and if the anomaly indicator exceeds a preset alarm threshold, then the anomaly risk control service node is considered a faulty node. Based on a repair strategy corresponding to this faulty node, a service node rate limiting operation is triggered, i.e., non-core transfer requests are rejected, the call weight of the risk control service node is reduced, traffic is automatically redirected to a backup service node, abnormal accounts are frozen, and invalid requests from abnormal accounts are reduced. These repair strategies can... To restore a faulty node to its original state, the system will restore the call weight of the faulty node to its pre-defined range once the second performance metric of the faulty node returns to the corresponding preset range. During the fault repair process of the current virtual test system, the current virtual test system and the current physical system will remain in state and configuration synchronization. At the same time, by incrementally capturing data such as system logs, message queues and monitoring metrics from the current physical system and mapping this data to the current virtual test system in real time, the data in the current virtual test system and the current physical system will remain synchronized. The monitoring metrics include CPU utilization, request latency and error rate.
[0074] Furthermore, in the aforementioned avalanche scenario, a 100ms delay is injected into the risk control service node of the current virtual test system. The corresponding repair strategy for the current virtual test system can also be: if the thread pool saturation exceeds a preset saturation threshold (e.g., 90%), risky nodes in the service node topology heatmap of the current virtual test system are highlighted. The service node topology heatmap is obtained based on the node topology data of the current virtual test system, and the call weight of faulty nodes is reduced after a sudden increase in error codes is detected. Abnormal nodes are identified through the call frequency between service nodes in the current virtual test system (e.g., the number of transfer requests per second). Based on the relationship between thread pool saturation and the preset saturation threshold, faulty nodes are further identified from the abnormal nodes and marked in the service node topology heatmap. If there is a sudden increase in error codes or an expansion of the response time standard deviation, the call weight of the faulty nodes is further reduced. By adopting repair strategies adapted to the performance indicators of the current virtual test system at different levels (e.g., call frequency between service nodes, number of error codes, and response time standard deviation), faults can be accurately repaired, improving repair efficiency.
[0075] In some embodiments, in a scenario of a cascading failure caused by a transfer, the current virtual testing system's repair strategy can also be as follows: if an excessive transfer amount is injected, the transfer request exceeding the limit is considered an illegal request, and the illegal request can be blocked to avoid it occupying threads; if a delay is injected into the risk control service node, the payment service thread pool is exhausted, reducing payment operations; if an abnormal event is detected, such as a batch of abnormally frozen accounts, a rollback operation is performed to unfreeze the abnormally frozen accounts. Furthermore, accounts with more than a preset number of consecutive failed transactions and a single transfer amount exceeding their own account credit limit are considered abnormal accounts and can be frozen, while the situation of mistakenly freezing normal accounts is considered an abnormal event.
[0076] According to the embodiments of this application, real-time monitoring of service nodes and accurate fault location, and the adoption of repair strategies to repair the fault can quickly block the spread of the fault. During the fault repair period, the call weight of the faulty node is reduced to ensure that the system performance does not degrade significantly. After the fault repair is completed, the call weight of the faulty node is restored, which is conducive to improving the overall service stability and resource utilization.
[0077] In some embodiments, determining the target repair strategy based on the repair results includes: calculating the comprehensive score of the third performance index of the current virtual test system during the repair process, wherein the third performance index characterizes the performance of the current virtual test system, and each repair strategy corresponds to a comprehensive score; sorting the comprehensive scores, and taking the repair strategy corresponding to the highest comprehensive score as the target repair strategy.
[0078] In some embodiments, the third performance metric includes fault recovery time, traffic recovery speed, error rate, and 95th percentile latency.
[0079] According to embodiments of this application, selecting target repair strategies based on a third performance indicator during the fault repair process of a virtual testing system can quantitatively evaluate the repair effects of different strategies, avoid strategy selection bias caused by subjective judgment, and apply the target repair strategy with better repair effects to repair similar faults in the physical system. This can significantly shorten the fault diagnosis and repair cycle and improve repair efficiency. Target repair strategies obtained based on the third performance indicator can improve the accuracy and reliability of physical system fault handling.
[0080] Based on the above-mentioned method for simulating a chaotic testing environment using digital twins, this application also provides a device for simulating a chaotic testing environment using digital twins. The following will combine... Figure 7 The device is described in detail.
[0081] Figure 7 A schematic block diagram of a digital twin-based chaos testing environment simulation device according to an embodiment of this application is shown.
[0082] like Figure 7 As shown, the chaotic test environment simulation device 700 based on digital twin in this embodiment is used to repeatedly execute the operations performed by the following modules until the preset conditions are met. The device 700 includes a fault injection module 710, a repair strategy acquisition module 720, a target repair strategy acquisition module 730, and a virtual test system update module 740.
[0083] The fault injection module 710 is used to inject faults occurring in the current physical system into the current virtual test system and obtain response data from the current virtual test system. The current virtual test system is a digital twin of the current physical system, and is derived based on the system information of the physical system at the previous moment and the changes in the system information in the current physical system. The system information includes system configuration information and operating status information. In one embodiment, the fault injection module 710 can be used to execute the operation S210 described above, which will not be repeated here.
[0084] The repair strategy acquisition module 720 is used to determine at least one repair strategy from a preset repair strategy set based on response data. In one embodiment, the repair strategy acquisition module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0085] The target repair strategy acquisition module 730 is used to repair the current virtual test system according to the repair strategy and determine the target repair strategy based on the repair results. In one embodiment, the target repair strategy acquisition module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0086] The virtual test system update module 740 is used to repair the current physical system according to the target repair strategy, and to perform a first update operation on the repaired current virtual test system based on the system information of the repaired current physical system to obtain the updated current virtual test system. It is also used to, if preset conditions are not met, use the updated current virtual test system as the current virtual test system. The preset conditions include at least one of a preset number of cycles and the number of failures of the current physical system within a preset time period being less than a preset failure threshold. In one embodiment, the virtual test system update module 740 can be used to execute either operation S240 or operation S250 described above, which will not be repeated here.
[0087] According to the embodiments of this application, the device 700 can continuously update the virtual test system based on the system information of the physical system at the previous moment and the changes in the system information of the current physical system, and update the virtual test system based on the system information of the repaired physical system, thereby making the virtual test system change with the changes of the physical system and improving the test accuracy.
[0088] In some embodiments, the fault injection module 710 is specifically used to: input the collected system information of the physical system at the previous moment into their respective corresponding information change prediction models according to a preset acquisition frequency; the information change prediction models are used to predict the system information that will change at the next moment; in response to the change operation of the system information in the current physical system, perform a second update operation on the initial virtual test system based on the output of the information change prediction model to obtain the current virtual test system.
[0089] In some embodiments, the fault injection module 710 is further configured to: store the configuration change data predicted by the configuration change prediction model and the running state change data predicted by the state change prediction model into the preloaded memory area of the initial virtual test system, respectively; in response to a change operation of system configuration information in the current physical system, obtain actual configuration change data and determine a first deviation between the actual configuration change data and the predicted configuration change data; in response to a change operation of running state information in the current physical system, obtain actual running state change data and determine a second deviation between the actual running state change data and the predicted running state change data; correct the configuration change data using the first deviation and correct the running state change data using the second deviation; send the corrected configuration change data and running state change data to the running memory area of the initial virtual test system, respectively; and update the initial virtual test system based on the data in the running memory area; wherein, the information change prediction model includes a configuration change prediction model and a state change prediction model, the configuration change prediction model is used to predict the system configuration information that will change in the next moment, and the state change prediction model is used to predict the running state information that will change in the next moment.
[0090] In some embodiments, the fault injection module 710 is further configured to: extract the interface structure and parameter rules of the application programming interface from the link tracing data of the physical system at the previous moment, obtain the application programming interface specification, and the link tracing data indicates the relationship chain of all service nodes involved in the physical system at the previous moment during each request process; associate the node topology data and the first performance index of the physical system at the previous moment to obtain associated data, the node topology data representing the interaction relationship between service nodes, and the first performance index representing the performance of the physical system at the previous moment; extract entities from the associated data to construct a directed graph, the directed graph representing the interaction characteristics between service nodes, the interaction characteristics including the call relationship and the interface latency during the interaction process; extract events and event states from the system logs of the physical system at the previous moment, and determine the event state change rules based on the mapping relationship between events and their states; inject the application programming interface specification, the directed graph, and the event state change rules into the image library respectively, and instantiate them to obtain the initial virtual test system.
[0091] In some embodiments, the target repair strategy acquisition module 730 is specifically used to: monitor the status of each service node through a preset monitoring node, determine the abnormal service node, and take the abnormal service node that triggers the preset alarm threshold as the fault node; use a repair strategy to repair the fault at the fault node and adjust the call weight of the fault node; and restore the call weight of the fault node after the second performance index of the fault node returns to the preset range.
[0092] In some embodiments, the target repair strategy acquisition module 730 is further configured to: calculate the comprehensive score of the third performance index of the current virtual test system during the repair process, wherein the third performance index represents the performance of the current virtual test system and each repair strategy corresponds to a comprehensive score; sort the comprehensive scores and take the repair strategy corresponding to the highest comprehensive score as the target repair strategy.
[0093] In some embodiments, the virtual test system update module 740 is specifically used to: determine the difference between the system information of the repaired current physical system and the system information of the repaired current virtual test system; inject the difference into the image library and instantiate it to obtain the updated current virtual test system.
[0094] According to embodiments of this application, any multiple modules among the fault injection module 710, repair strategy acquisition module 720, target repair strategy acquisition module 730, and virtual test system update module 740 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the fault injection module 710, repair strategy acquisition module 720, target repair strategy acquisition module 730, and virtual test system update module 740 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the fault injection module 710, the repair strategy acquisition module 720, the target repair strategy acquisition module 730, and the virtual test system update module 740 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0095] Figure 8 A block diagram of an electronic device suitable for implementing a digital twin-based chaotic test environment simulation method is illustrated according to an embodiment of this application.
[0096] like Figure 8 As shown, an electronic device 800 according to an embodiment of this application includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0097] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0098] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0099] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0100] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0101] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the digital twin-based chaos testing environment simulation method provided in the embodiments of this application.
[0102] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0103] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0104] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0105] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0107] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for simulating a chaotic testing environment based on digital twins, characterized in that, The method includes repeatedly performing the following operation until a preset condition is met: Injecting a fault that occurred in the current physical system into the current virtual test system, and obtaining the response data of the current virtual test system, wherein the current virtual test system is a digital twin of the current physical system, and the current virtual test system is obtained based on the system information of the physical system at the previous moment and the change status of the system information in the current physical system, wherein the system information includes system configuration information and operating status information; Based on the response data, at least one repair strategy is determined from a preset repair strategy set; Repair the current virtual test system according to the repair strategy, and determine the target repair strategy based on the repair results; Repair the current physical system according to the target repair strategy, and perform a first update operation on the repaired current virtual test system based on the system information of the repaired current physical system to obtain the updated current virtual test system; If the preset conditions are not met, the updated current virtual test system will be used as the current virtual test system. The preset conditions include at least one of the following: a preset number of cycles and the number of failures of the current physical system within a preset time period being less than a preset failure threshold.
2. The method according to claim 1, characterized in that, The current virtual test system is derived from the system information of the physical system at the previous moment and the changes in the system information in the current physical system, including: According to the preset acquisition frequency, the system information of the physical system at the previous moment is collected and input into the corresponding information change prediction model. The information change prediction model is used to predict the system information that will change at the next moment. In response to a change operation of the system information in the current physical system, a second update operation is performed on the initial virtual test system based on the output of the information change prediction model to obtain the current virtual test system.
3. The method according to claim 2, characterized in that, The information change prediction model includes a configuration change prediction model and a state change prediction model. The configuration change prediction model is used to predict the system configuration information that will change in the next moment, and the state change prediction model is used to predict the operating state information that will change in the next moment. In response to the change operation of the system information in the current physical system, based on the output of the information change prediction model, a second update operation is performed on the initial virtual test system, including: The configuration change data predicted by the configuration change prediction model and the running state change data predicted by the state change prediction model are respectively stored in the preloaded memory area of the initial virtual test system; In response to a change operation of the system configuration information in the current physical system, actual configuration change data is obtained, and a first deviation between the actual configuration change data and the predicted configuration change data is determined; In response to a change operation of the operating status information in the current physical system, actual operating status change data is obtained, and a second deviation between the actual operating status change data and the predicted operating status change data is determined. The configuration change data is corrected using the first deviation, and the operating status change data is corrected using the second deviation; The revised configuration change data and the runtime status change data are respectively sent to the runtime memory area of the initial virtual test system; The initial virtual test system is updated based on the data in the running memory area.
4. The method according to claim 2, characterized in that, The initial virtual test system was obtained through the following methods: The interface structure and parameter rules of the application programming interface are extracted from the link tracing data of the physical system at the previous moment to obtain the application programming interface specification. The link tracing data indicates the relationship chain of all service nodes involved in the physical system at the previous moment during each request. By associating the node topology data of the physical system at the previous time step with the first performance index, associated data is obtained. The node topology data represents the interaction relationship between the service nodes, and the first performance index represents the performance of the physical system at the previous time step. Entity extraction is performed on the associated data to construct a directed graph. The directed graph represents the interaction characteristics between the service nodes, including the call relationship and the interface latency during the interaction process. Extract events and their states from the system log of the physical system at the previous moment, and determine the event state change rules based on the mapping relationship between the events and their states; The application programming interface specification, the directed graph, and the event state change rules are injected into the image library and instantiated to obtain the initial virtual test system.
5. The method according to claim 4, characterized in that, The first update operation on the repaired current virtual test system based on the system information of the repaired current physical system includes: Determine the differences between the system information of the current physical system after repair and the system information of the current virtual test system after repair; The differences are injected into the image library and instantiated to obtain the updated current virtual test system.
6. The method according to claim 4, characterized in that, Repairing the current virtual test system according to the repair strategy includes: The status of each service node is monitored by preset monitoring nodes, and service nodes in abnormal status are identified. The abnormal service nodes that trigger preset alarm thresholds are identified as fault nodes. The fault at the faulty node is repaired using the repair strategy, and the call weight of the faulty node is adjusted. After the second performance metric of the faulty node returns to the preset range, the call weight of the faulty node is restored.
7. The method according to claim 1, characterized in that, The determination of the target repair strategy based on the repair results includes: Calculate the comprehensive score of the third performance index of the current virtual test system during the repair process. The third performance index represents the performance of the current virtual test system, and each repair strategy corresponds to a comprehensive score. The comprehensive scores are sorted, and the repair strategy corresponding to the highest comprehensive score is taken as the target repair strategy.
8. A chaos testing environment simulation device based on digital twins, characterized in that, The device is used to repeatedly execute the operations performed by the following modules until a preset condition is met. The device includes: The fault injection module is used to inject the fault that occurred in the current physical system into the current virtual test system and obtain the response data of the current virtual test system. The current virtual test system is a digital twin system of the current physical system. The current virtual test system is obtained based on the system information of the physical system at the previous moment and the change status of the system information in the current physical system. The system information includes system configuration information and running status information. The repair strategy acquisition module is used to determine at least one repair strategy from a preset repair strategy set based on the response data; The target repair strategy acquisition module is used to repair the current virtual test system according to the repair strategy, and determine the target repair strategy based on the repair results; The virtual test system update module is used to repair the current physical system according to the target repair strategy, and to perform a first update operation on the repaired current virtual test system based on the system information of the repaired current physical system to obtain the updated current virtual test system; it is also used to use the updated current virtual test system as the current virtual test system if the preset conditions are not met, wherein the preset conditions include at least one of a preset number of cycles and the number of failures of the current physical system within a preset time period being less than a preset failure threshold.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.