A system test operation scene mirror recovery method and device and storage medium
By embedding tracking components and containerized testing environments on different platforms, the problems of data integration and version control in existing technologies are solved, enabling centralized management of data across multiple platforms and accurate location of the root cause of problems, thus improving the efficiency and accuracy of the recovery process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YUNXING ONLINE SOFTWARE DEV CO LTD
- Filing Date
- 2025-07-28
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies can only collect and store data within a single system or platform, lacking the ability to integrate data across multiple platforms and dimensions. This makes it difficult to centrally manage and trace data, and version control is simple, making it impossible to effectively distinguish the data sources and scenarios of different versions. The recovery process also makes it difficult to locate the root cause of the problem.
By embedding tracking components on different platforms, deploying containerized testing environments, loading slicing mechanisms for image mapping and data collection, analyzing system error logs, obtaining system runtime data at the time of errors, and performing scenario recovery and automated operation restoration.
It enables centralized management and traceability of data across multiple platforms, accurately pinpoints the root cause of problems, and improves the efficiency and accuracy of the recovery process.
Smart Images

Figure CN120909843B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of test scene restoration technology, specifically to a method, device, and storage medium for restoring a system test operation scene image. Background Technology
[0002] During software development, debugging, and testing, we often encounter situations where we need to reproduce software error scenarios in development, testing, or pre-release environments. However, due to environmental factors, caching issues, data problems, or other system issues, these problems may occur sporadically and require specific scenarios to trigger reproduction.
[0003] Existing technologies typically only collect and store data within a single system or platform, lacking the ability to integrate data from multiple platforms and dimensions. This makes it difficult to centrally manage and trace data back, and version control is relatively simple, failing to effectively distinguish the data sources and scenarios of different versions. Furthermore, existing technologies cannot effectively trace back specific data sources and operational scenarios, making it difficult to pinpoint the root cause of problems during the recovery process. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a system test operation scenario image recovery method, device and storage medium to solve the problems in the prior art, which can only collect and store data within a single system or platform, lacks the ability to integrate multi-platform and multi-dimensional data, making it difficult to centrally manage and trace back data, and is relatively simple in version control, unable to effectively distinguish the data source and scenario of different versions; at the same time, the prior art cannot effectively trace back the specific data source and operation scenario, making it difficult to locate the root cause in the recovery process.
[0005] According to a first aspect of the present invention, a method for restoring a system test operation scenario image is provided, the method comprising:
[0006] Embed tracking components in software for different platforms;
[0007] Deploy the test environment for the software to be tested, and containerize all services of the software to be tested according to different versions and different environments;
[0008] The pre-defined slicing mechanism is loaded to perform the testing process of the software under test. During the test, the tracking component is used to obtain the tracking data, the container is mapped in a time-series manner through the pre-defined slicing mechanism, and the image information data of different time sequences is saved; at the same time, the system operation data during the test is obtained.
[0009] Analyze the system error logs in the image information data at different time series to obtain the service that caused the error and the corresponding time of the error;
[0010] Scene recovery is performed based on system operation data and image information data at the time of the error.
[0011] In the recovery scenario, automated operations are performed to restore the system by collecting data from embedded points at the time of the error.
[0012] Preferably,
[0013] The preset slicing mechanism includes:
[0014] Information collection tool: used to acquire image information data, which includes: image time, image size, image service name, image service running status, service performance indicators, and system error logs;
[0015] Also includes:
[0016] Scheduled task: The scheduled task is used to perform image mapping in the container of the corresponding version and environment according to the test operation information at the set task time.
[0017] Preferably,
[0018] The event tracking component is a collection of functions and methods that use JavaScript listening technology and probe principles to record front-end behavior.
[0019] Preferably,
[0020] The data collected by the tracking points includes: obtaining data by monitoring user operations through the tracking point component, marking and monitoring the elements operated by the user.
[0021] Preferably,
[0022] The system operation data is obtained through a preset information monitoring component. The system operation data includes: system load, CPU utilization, system operation logs, and service operation information.
[0023] Preferably,
[0024] The automated operation restoration based on data collected from embedded points at the time of the error includes:
[0025] Acquire the data collected from the tracking points at the time of the error, including element location and operation type, and convert the element location and operation type into an operation script implemented by WebDriver;
[0026] In the restored scenario, the operation script is executed to replay and restore the defective scenario.
[0027] Preferably,
[0028] The different platforms include mobile phones, computers, or tablets.
[0029] According to a second aspect of the present invention, a system test operation scenario mirror recovery device is provided, the device comprising:
[0030] Tracking embedding module: Used to embed tracking components into software on different platforms;
[0031] Containerization module: Used to deploy the test environment for the software under test. All services of the software under test are deployed in containers according to different versions and different environments.
[0032] Image mapping module: Used to load the preset slicing mechanism and carry out the testing process of the software under test. During the test, the tracking component obtains the tracking data, performs time-series image mapping of the container through the preset slicing mechanism, and saves the image information data at different times; at the same time, it obtains the system running data during the test.
[0033] Defect Analysis Module: Used to analyze system error logs in image information data at different time series to obtain the service that caused the error and the corresponding time of the error;
[0034] Scene restoration module: used to restore the scene based on system operation data and image information data at the time of the error;
[0035] Operation restoration module: Used to automatically restore operations in recovery scenarios by collecting data from embedded points at the time of the error.
[0036] According to a third aspect of the present invention, a storage medium is provided, the storage medium storing a computer program, which, when executed by a host controller, implements the steps of the above-described method.
[0037] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0038] This application acquires operational data from multiple platforms by embedding tracking components into software on different platforms; it deploys test environments for the software under test, and containersizes all services of the software under test according to different versions and environments; this effectively distinguishes the data sources and scenarios of different versions, avoiding confusion and misoperation during image restoration; by loading a preset slicing mechanism, during the testing process, the tracking component acquires tracking data, performs time-series image mapping of containers through the preset slicing mechanism, and saves image information data at different time sequences, while simultaneously acquiring system operation data during the testing process; it analyzes system error logs in the image information data at different time sequences to obtain the services that erroneously occurred and the corresponding error times; it performs scenario restoration based on the system operation data and image information data at the time of the error; in the restored scenario, it performs automated operation restoration using the tracking data acquired at the time of the error; thus effectively tracing back to the specific data source and operational scenario, and accurately locating the root cause of the problem.
[0039] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0041] Figure 1 This is a flowchart illustrating a system test operation scenario image restoration method according to an exemplary embodiment;
[0042] Figure 2 This is a system schematic diagram of a system test operation scenario mirror recovery device according to another exemplary embodiment;
[0043] In the attached diagram: 1-Embedded tracking module, 2-Containerization module, 3-Mirror mapping module, 4-Defect analysis module, 5-Scene restoration module, 6-Operation restoration module. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0045] Example 1
[0046] Figure 1This is a flowchart illustrating a system test operation scenario image restoration method according to an exemplary embodiment, such as... Figure 1 As shown, the method includes:
[0047] S1, embeds tracking components into software on different platforms;
[0048] S2 is used to deploy the test environment for the software under test, and to containerize all services of the software under test according to different versions and different environments.
[0049] S3 loads the preset slicing mechanism to carry out the testing process of the software under test. During the test, the tracking component acquires the tracking data, the preset slicing mechanism performs time-series image mapping of the container, and saves the image information data of different time sequences; at the same time, the system running data during the test is acquired.
[0050] S4 analyzes the system error logs in the image information data at different time series to obtain the service that caused the error and the corresponding error time.
[0051] S5 performs scene recovery based on system operation data and image information data at the time of the error;
[0052] S6, in the recovery scenario, automatically restores the system by collecting data from the embedded points at the time of the error;
[0053] It is understandable that, in order to facilitate understanding of this application, it is necessary to know the following:
[0054] Data collection: Data collection is a technique that embeds a data acquisition module into software or a system to collect various data in real time during the operation of devices, servers or systems. This data can include device status, performance indicators, error logs, user behavior, etc., to help the system understand its current operating status in a timely manner.
[0055] Container image: A container image is a packaged software and its runtime environment (such as dependent packages, scripts, configuration files, etc.) into a single entity that can be quickly copied and deployed on different servers. Container images typically contain complete software code, dependencies and environment configuration information. Developers only need to deploy the image to the target server without having to manually copy and configure all dependent packages. Container images can improve development efficiency, simplify the deployment process and ensure the stability and compatibility of software in different environments.
[0056] Virtualization: Virtualization technology abstracts physical hardware resources (such as CPU, memory, and storage devices) into virtualized resources (such as virtualized CPU, virtualized memory, and virtualized storage), and uses software to isolate, share, and optimize the management of these virtual resources. Virtualization technology enables efficient resource utilization, improves resource efficiency, and supports more complex computing and storage needs.
[0057] This embodiment specifically includes:
[0058] Embedding event tracking components in software across different platforms, including mobile phones, computers, and tablets, event tracking components are a collection of functions and methods that use JavaScript listening technology and probe principles to record front-end elements and their behaviors, including app and web elements. Through the listening mechanism, user operations are monitored, the elements operated on by the user are marked and monitored, and the operation data is transmitted to the data collection system through the event tracking service.
[0059] Deploy the test environment for the software to be tested, and containerize all services according to different versions and environments, including data services, to facilitate later environment and data recovery;
[0060] A slicing mechanism is implemented, which includes an information collection tool and a scheduled task. The information collection tool is used to acquire mirror information data for each time sequence, while the scheduled task is used to perform mirror mapping in the corresponding version and environment container at specified times based on the test operation information. Simply put, if mirror mapping is set to be performed every 5 minutes, and the test task starts at 9:00, then a mirror mapping will be performed in the corresponding version and environment container at 9:05. Mirror mapping is to restore the user's actual test operation in the container and acquire the mirror information data of this mirror mapping through the information collection tool. Mirror mapping will be performed again at 9:10.
[0061] The testing operation is performed manually. During the testing process, the container is mapped to an image in a time sequence through a slicing mechanism, and the image information data for each image mapping is saved, including image time, image size, image service name, image service running status, service performance indicators, and system error logs.
[0062] At the same time, the system operation information data during the test process is obtained through the preset information collection components, including system load, CPU utilization, system operation logs and service operation information;
[0063] The system integrates and manages the data collection data, mirror information data, and system operation information data. The system cleans, stores, classifies, and labels the input data. It analyzes the system error logs in the mirror information data to identify which service is experiencing an error. It also maps the log analysis results to the affected services and integrates the system operation information data, the mirror information data at the corresponding error time, and the data collection operation data for later scenario recovery and automated operation script generation.
[0064] Scene restoration is performed based on system operation information data and image information data at the time of the error;
[0065] The data from the event tracking points at the time of the error is transformed into an executable automated operation script. This is mainly done by locating the elements and the operation type in the tracking logs and then converting them into an operation script implemented by WebDriver.
[0066] Execute operation scripts in the restored service and data environments to fully replay and restore defective scenarios, achieve rapid and efficient recovery and problem localization, and realize fully automated operations, thereby improving the overall level of automation.
[0067] The containerization technology used in this application supports multi-container operation, allowing users to select different containers to run according to their needs, while optimizing resource utilization and further improving the real-time performance and accuracy of image recovery. Containerization technology enables rapid image building and deployment, supports image recovery in large-scale scenarios, and enhances system scalability. It also achieves a unified image environment, simplifies version selection, resolves version inconsistency issues, and ensures that the restored image environment matches the actual operating environment. Furthermore, containerization technology simplifies the image recovery process and significantly improves recovery efficiency through automated image deployment.
[0068] This application uses data acquisition modules embedded in various components and platforms of a device or system through data tracking technology to collect device operation data in real time without the need for additional hardware.
[0069] This application achieves centralized storage and management of data by integrating data scattered across different systems, platforms, or devices into a unified data management platform.
[0070] Example 2:
[0071] Figure 2 This is a schematic diagram of a system test operation scenario mirror recovery device according to another exemplary embodiment, the device comprising:
[0072] Tracking Embedding Module 1: Used to embed tracking components into software on different platforms;
[0073] Containerization Module 2: Used to deploy the test environment for the software under test. All services of the software under test are deployed in containers according to different versions and different environments.
[0074] Image mapping module 3: Used to load the preset slicing mechanism and carry out the test process of the software under test. During the test, the tracking component obtains the tracking data, performs time-series image mapping of the container through the preset slicing mechanism, and saves the image information data of different time sequences; at the same time, it obtains the system running data during the test.
[0075] Defect Analysis Module 4: Used to analyze system error logs in image information data at different time series to obtain the service that caused the error and the corresponding error time.
[0076] Scene restoration module 5: Used to restore the scene based on the system operation data and image information data at the time of the error;
[0077] Operation Restore Module 6: Used to automatically restore operations in recovery scenarios by collecting data from embedded points at the time of the error.
[0078] Example 3:
[0079] This embodiment provides a storage medium storing a computer program, which, when executed by a host controller, implements the various steps in the above method.
[0080] It is understood that the storage medium mentioned above can be a read-only memory, a hard disk, or an optical disk, etc.
[0081] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0082] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a small number of sparsely distributed" means at least two.
[0083] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or fewer sparsely distributed executable instructions for implementing a particular logical function or process, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0084] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, a small number of sparsely distributed steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0085] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0086] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0087] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0088] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or a small number of sparsely distributed embodiments or examples.
[0089] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for restoring a system test operation scenario from an image, characterized in that, The method includes: Embed tracking components for software on different platforms; the tracking components are a collection of functions and methods that use JavaScript listening technology and probe principles to record front-end behavior; Deploy the test environment for the software to be tested, and containerize all services of the software to be tested according to different versions and different environments; The pre-defined slicing mechanism is loaded to perform the testing process of the software under test. During the test, the tracking component is used to obtain the tracking data, the container is mapped in a time-series manner through the pre-defined slicing mechanism, and the image information data of different time sequences is saved; at the same time, the system operation data during the test is obtained. The preset slicing mechanism includes: Information collection tool: used to acquire image information data, which includes: image time, image size, image service name, image service running status, service performance indicators, and system error logs; The preset slicing mechanism also includes: Scheduled task: The scheduled task is used to perform image mapping in the container of the corresponding version and environment according to the test operation information at the set task time; The data collected by the tracking points includes: obtaining data by monitoring user operations through the tracking point component, marking and monitoring the elements of the user operations; Analyze the system error logs in the image information data at different time series to obtain the service that caused the error and the corresponding time of the error; Scene recovery is performed based on system operation data and image information data at the time of the error. Automated operation restoration is performed by collecting data from embedded points at the time of the error, including: Acquire the data collected from the tracking points at the time of the error, including element location and operation type, and convert the element location and operation type into an operation script implemented by WebDriver; In the recovery scenario, the operation script is executed to realize the playback and recovery of the defective scenario; In the recovery scenario, automated operations are performed to restore the system by collecting data from embedded points at the time of the error.
2. The method according to claim 1, characterized in that, The system operation data is obtained through a preset information monitoring component, and the system operation data includes: system load and system operation log.
3. The method according to claim 2, characterized in that, The different platforms include mobile phones, computers, or tablets.
4. A system test operation scenario mirror recovery device, characterized in that, The device includes: Tracking Embedding Module: Used to embed tracking components into software on different platforms; the tracking components are a collection of functions and methods that use JavaScript listening technology and probe principles to record front-end behavior; Containerization module: Used to deploy the test environment for the software under test. All services of the software under test are deployed in containers according to different versions and different environments. Image mapping module: Used to load the preset slicing mechanism and carry out the testing process of the software under test. During the test, the tracking component obtains the data collected by the tracking point, performs time-series image mapping of the container through the preset slicing mechanism, and saves the image information data of different time sequences; at the same time, it obtains the system running data during the test. The preset slicing mechanism includes: Information collection tool: used to acquire image information data, which includes: image time, image size, image service name, image service running status, service performance indicators, and system error logs; The preset slicing mechanism also includes: Scheduled task: The scheduled task is used to perform image mapping in the container of the corresponding version and environment according to the test operation information at the set task time; The data collected by the tracking points includes: obtaining data by monitoring user operations through the tracking point component, marking and monitoring the elements of the user operations; Defect Analysis Module: Used to analyze system error logs in image information data at different time series to obtain the service that caused the error and the corresponding time of the error; Scene restoration module: used to restore the scene based on system operation data and image information data at the time of the error; Automated operation restoration is performed by collecting data from embedded points at the time of the error, including: Acquire the data collected from the tracking points at the time of the error, including element location and operation type, and convert the element location and operation type into an operation script implemented by WebDriver; In the recovery scenario, the operation script is executed to realize the playback and recovery of the defective scenario; Operation restoration module: Used to automatically restore operations in recovery scenarios by collecting data from embedded points at the time of the error.
5. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by the main controller, implements each step of the system test operation scenario mirror recovery method as described in any one of claims 1-3.
Citation Information
Patent Citations
Compatibility test method and apparatus, computer device and medium
CN109446069A
Method and system for recovering test environment
CN115203029A
Abnormality analysis method and device, electronic equipment and computer program product
CN119862062A