A non-invasive policy reconstruction method and device based on traffic recording and playback
Patent Information
- Application Number
- CN202211114988.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-14
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-09-14
AI Technical Summary
[0029] The various technical solutions provided in the embodiments of this specification non-intrusively intercept one or more data requests initiated to create a plan tree, categorize the data requests according to the plan tree, generate call records with recording identifiers based on the data request names corresponding to the plan tree and the business data corresponding to the data requests, receive traffic playback requests, query call records according to their corresponding recording identifiers, traverse each data request in the call records and obtain the corresponding business data, and generate a visual strategy flowchart in the canvas. By recording and playing back, the operation plan can be quickly reconstructed without repeated operations, effectively preserving the original traffic without modification or loss, thus improving the efficiency of strategy reconstruction and reducing the error rate.
Smart Images

Figure CN115391223B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and in particular to a non-intrusive policy reconstruction method and apparatus based on traffic recording and playback. Background Technology
[0002] Regression testing refers to retesting modified code to confirm that the changes did not introduce new errors or cause errors in other code. In many intelligent operations scenarios, regression testing often requires testers to manually recreate each strategy in a previously created canvas on the page and observe whether the creation process is normal. This process is repetitive, tedious, error-prone, and inefficient.
[0003] Therefore, it is necessary to provide a new non-intrusive strategy reconstruction method to improve the efficiency of regression testing and reduce the error rate. Summary of the Invention
[0004] This specification provides a non-intrusive strategy reconstruction method and apparatus based on traffic recording and playback, which can improve regression testing efficiency and reduce error rate.
[0005] This specification provides an embodiment of a non-intrusive strategy reconstruction method based on traffic recording and playback, including:
[0006] Receive a traffic recording request, non-intrusively intercept one or more data requests initiated by creating a plan tree according to the traffic recording request, classify the data requests according to the plan tree, record the data request name corresponding to the plan tree and the business data corresponding to the data request, and generate a call record with a recording identifier according to the data request name and the business data corresponding to the data request.
[0007] Receive a traffic replay request, query the call record according to the recording identifier corresponding to the traffic replay request, traverse each data request in the call record and obtain the corresponding business data, and generate a visual strategy flowchart.
[0008] Preferably, classifying the data requests according to the plan tree includes:
[0009] Extract tree identifiers from data requests, categorize multiple data requests according to the tree identifiers, and group data requests containing the same tree identifier into the same category.
[0010] Preferably, a call record with a recording identifier is generated based on multiple data request names corresponding to the plan tree and the business data corresponding to the data requests, including:
[0011] Replace the fields with unique index restrictions in the plan tree with dynamic variables and record the context information of the plan tree. The dynamic variables are dynamic variables with timestamps generated based on the current time.
[0012] A call record with a recording identifier is generated based on the dynamic variables after the plan tree is replaced, the corresponding multiple data request names, and the business data corresponding to the data requests.
[0013] Preferably, the step of receiving a traffic playback request and querying the call record based on the recording identifier corresponding to the traffic playback request includes:
[0014] Based on the plan tree query component, determine the tree identifier to be replayed corresponding to the traffic replay request, and determine the recording identifier and call record corresponding to the traffic replay request based on the tree identifier.
[0015] Preferably, after querying the call record based on the recording identifier corresponding to the traffic playback request, the method further includes:
[0016] The dynamic variable is replaced with the tree identifier based on the context information of the plan tree described in the call record.
[0017] Preferred options also include:
[0018] By utilizing each data request and its corresponding business data, plan tree nodes are created in the canvas according to the calling relationship and order between different data requests, generating a visual operation plan flowchart.
[0019] Preferred options also include:
[0020] The call records with recording identifiers will be stored in the database in a timely manner.
[0021] Traffic playback request Traffic playback request Traffic playback request Traffic playback request Traffic playback request This specification embodiment also provides a non-intrusive policy reconstruction device based on traffic recording and playback, including:
[0022] The recording module receives traffic recording requests, intercepts one or more data requests initiated by creating a plan tree in a non-intrusive manner according to the traffic recording requests, classifies the data requests according to the plan tree, records the data request name corresponding to the plan tree and the business data corresponding to the data request, and generates a call record with a recording identifier based on the data request name and the business data corresponding to the data request.
[0023] The playback module receives traffic playback requests, queries call records based on the recording identifier corresponding to the traffic playback request, traverses each data request in the call records and obtains the corresponding business data, and generates a visual strategy flowchart.
[0024] Specifically, the recording module is used to: extract tree identifiers from data requests, classify multiple data requests according to the tree identifiers, and group data requests containing the same tree identifier into the same category.
[0025] This specification also provides an electronic device, wherein the electronic device includes:
[0026] Processor; and,
[0027] A memory that stores computer-executable instructions, which, when executed, cause the processor to perform any of the methods described above.
[0028] This specification also provides a computer-readable storage medium that stores one or more instructions that, when executed by a processor, implement any of the methods described above.
[0029] The various technical solutions provided in the embodiments of this specification non-intrusively intercept one or more data requests initiated to create a plan tree, categorize the data requests according to the plan tree, generate call records with recording identifiers based on the data request names corresponding to the plan tree and the business data corresponding to the data requests, receive traffic playback requests, query call records according to their corresponding recording identifiers, traverse each data request in the call records and obtain the corresponding business data, and generate a visual strategy flowchart in the canvas. By recording and playing back, the operation plan can be quickly reconstructed without repeated operations, effectively preserving the original traffic without modification or loss, thus improving the efficiency of strategy reconstruction and reducing the error rate. Attached Figure Description
[0030] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0031] Figure 1 A schematic diagram illustrating the principle of a non-intrusive strategy reconstruction method based on traffic recording and playback, provided in the embodiments of this specification;
[0032] Figure 2 A schematic diagram of a non-intrusive strategy reconstruction method based on traffic recording and playback provided in the embodiments of this specification;
[0033] Figure 3 A schematic diagram of a non-intrusive strategy reconstruction device based on traffic recording and playback, provided for an embodiment of this specification;
[0034] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Detailed Implementation
[0035] Exemplary embodiments of the invention will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limiting the invention to the embodiments set forth herein. Rather, these exemplary embodiments are provided to make the invention more comprehensive and complete, and to facilitate a full communication of the inventive concept to those skilled in the art. The same reference numerals in the drawings denote the same or similar elements, components, or parts, and therefore repeated descriptions of them will be omitted.
[0036] Subject to the technical concept of this invention, the features, structures, characteristics or other details described in a particular embodiment may be combined in one or more other embodiments in a suitable manner.
[0037] In the description of specific embodiments, the features, structures, characteristics, or other details described in this invention are intended to enable those skilled in the art to fully understand the embodiments. However, it is not excluded that those skilled in the art can practice the technical solutions of this invention without one or more of the specific features, structures, characteristics, or other details.
[0038] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0039] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0040] The terms “and / or” or “and / or” include all combinations of any one or more of the listed items.
[0041] Figure 1 This is a schematic diagram illustrating the principle of a non-intrusive strategy reconstruction method based on traffic recording and playback, as provided in the embodiments of this specification. The method may include:
[0042] S101: Based on the traffic recording request, non-intrusive interception is performed on one or more data requests initiated to create a plan tree. The data requests are classified according to the plan tree, and the data request name corresponding to the plan tree and the business data corresponding to the data request are recorded. A call record with a recording identifier is generated based on the data request name and the business data corresponding to the data request.
[0043] In a real-world scenario, business personnel receive a business requirement and create and deploy module A in the intelligent operations plan. Module A contains a non-public function for sending messages. Later, the business personnel receive another business requirement and create module B, which also involves message sending functionality. For code reusability, the business personnel extract the message sending functionality as a public function. At this point, they modify the code in module A to call the public function and execute the message sending function, even though module A itself has not changed its requirements. In such cases, regression testing of the business functionality of module A is necessary. Furthermore, as business scenarios become increasingly complex, the need for such regression testing will become more and more frequent.
[0044] In this situation, recording and replaying call logs can assist operations personnel in rebuilding strategies, i.e., regression testing.
[0045] In the embodiments of this specification, an operational plan may contain one or more plan trees, currently supporting traffic replay down to a more granular plan tree level. Each plan tree corresponds to a flowchart in the canvas. Module a may include a plan tree. Regression testing involves retesting after modifying old code to confirm that the modifications have not introduced new errors or caused problems in other code. Traffic replay is used to quickly create operational plans and complete regression testing. This can be done by testing the entire operational plan or by testing a single plan tree represented by each module, thereby quickly confirming that code modifications have not introduced new errors or caused problems in other code, avoiding the manual creation process and improving regression testing efficiency. A plan tree corresponds to a recording identifier and also to an entire call record. Since it is a "record," it means that an entire call record usually involves multiple calls. A plan tree contains multiple strategies, including audience selection, audience filtering, triggering methods, etc., and these strategies are flexibly configurable. The process of creating a plan tree, or strategy creation, involves initiating an HTTP request each time a strategy is created. Traffic is recorded during this process, and merging multiple strategy HTTP requests constitutes the creation of a plan tree. Finally, this plan is saved as an operational plan (which can contain one or more plan trees) and stored in the database. To automatically recreate the plan tree after its creation, one or more data requests initiated during plan tree creation can be non-intrusively intercepted.
[0046] Interception can be a non-intrusive runtime AOP interception.
[0047] In practical implementation, secondary development and modification can be carried out based on the open-source jvm-sandbox-repeater. The core modules include the replay-web application, the replay-app application, and the replay-agent application. The replay-web and replay-app applications are web and app clients separated from the server-side. After testers interact with the page, the web client is triggered, and an RPC (Remote Procedure Call) remotely calls the app client to retrieve data from the database, returns it to the web client, and displays the retrieved data on the page.
[0048] During startup, a cron job is started on the Linux server where iops-web (the web application of the intelligent operation platform) resides, and a shell script is executed periodically to listen for the iops-web process. When iops-web starts or restarts, replay-agent automatically detects the JVM (virtual machine) of iops-web. Then, replay-agent creates a JVM sandbox on the JVM of iops-web using reflection. The sandbox starts modules such as HTTP and Dubbo (distributed service) through a serial peripheral interface, which are used to intercept and record HTTP data requests later.
[0049] During the traffic recording process, when testers create a plan tree on the intelligent operations platform, replay-agent uses bytecode instrumentation technology to enhance the code, intercept calls, and record the business data corresponding to the data requests (such as input parameters and return values). Then, it generates a recording identifier based on the corresponding call type (e.g., Dubbo, HTTP). When the call is completed, replay-agent has collected the call records for the entire operations plan, facilitating later troubleshooting for anomalies such as duplicate recorded requests.
[0050] After intercepting the call records of the entire operation plan, the call records can be serialized and sent to the server for storage.
[0051] Before storing data, the server can pre-create storage space to store the data.
[0052] The entire operation plan's call record is actually a combination of multiple individual plan trees. In order to accurately perform regression testing on individual plan trees, it is necessary to classify data requests according to individual plan trees.
[0053] To distinguish between different plan trees during subsequent queries, a tree identifier can be generated for a single plan tree, serving as an index for storing multiple data requests.
[0054] Specifically, in the embodiments of this specification, the categorization of multiple data requests according to the plan tree may include:
[0055] Extract tree identifiers from data requests, categorize multiple data requests according to the tree identifiers, and group data requests containing the same tree identifier into the same category.
[0056] After classification, multiple data request names corresponding to the plan tree and the business data corresponding to the data requests can be extracted. Based on the multiple data request names corresponding to the plan tree and the business data corresponding to the data requests, a call record with a recording identifier can be generated.
[0057] Each HTTP request has a unique ID, a plan ID, and a tree ID. During traffic recording, requests with the same plan ID and tree ID are grouped together. During traffic playback, the corresponding HTTP requests can be found based on the plan ID and tree ID, and subsequent HTTP requests can be replayed.
[0058] In one application, if the database uses the tree identifier as the unique index field of the plan tree (unique index restriction means that data with the same index value is not allowed), then during traffic replay, if the field value retrieved by the program is the same as the field value when the plan was created, an error will be directly reported when adding a new plan. Therefore, during traffic replay, the ID of the data request in the traffic recording HTTP data needs to be replaced with a unique value that changes over time so that the data request can be created on the backend.
[0059] For example, if a tester creates an operations plan named 0414-JS-Replay, during traffic recording, because operations plan names cannot be duplicated in the business logic and there are unique index restrictions in the database, an error will occur if it is not replaced during traffic playback. A dynamic variable with a timestamp can be generated based on the current time. The plan name is then replaced with the dynamic variable AUTO-PLAN-#{timestamp} (unassigned). During traffic playback, AUTO-PLAN-#{timestamp} is then replaced with the actual value of the plan name: AUTO-PLAN-1653013332 (assigning a value to the timestamp dynamic variable). Here, AUTO-PLAN is the plan tree name, and the plan name refers to the individual plan name created by the tester. During the process of creating an operations plan, the tester will initiate multiple HTTP requests. The context information records the data passed before and after these multiple HTTP requests during the plan creation process during traffic recording. For example, a tester creates a policy in a plan tree, which is an HTTP request. Each policy's node ID must be unique. During traffic replay, the policy node ID in the recorded HTTP data needs to be replaced with a unique UUID before creating the policy on the backend. Simultaneously, this policy node ID needs to be saved in the context information. This is because subsequent calls to the HTTP interface that saves the plan tree also require this policy node ID, which can be obtained from the context information. The request name of the data request can be obtained from the context information, and the request name may include the data request ID. Therefore, in this embodiment, generating a call record with a recording identifier based on the data request name corresponding to the plan tree and the business data corresponding to the data request may include:
[0060] Replace the fields with unique index restrictions in the plan tree with dynamic variables and record the context information of the plan tree. The dynamic variables are dynamic variables with timestamps generated based on the current time.
[0061] A call record with a recording identifier is generated based on the dynamic variables after the plan tree is replaced, the corresponding multiple data request names, and the business data corresponding to the data requests.
[0062] The embodiments in this specification also include:
[0063] The call records with recording identifiers will be stored in the database in a timely manner.
[0064] In practice, this can be done by parsing the plan ID and tree ID in the request body on the server side, classifying each request into the plan ID and tree ID dimension, replacing the fields with unique index restrictions in the database with dynamic variables, recording the context records for creating each plan and tree ID, and finally storing them in the DB (database).
[0065] Of course, if a table field in the database does not have a unique index, then there is no need to replace it.
[0066] S102: Receive a traffic playback request, query the call record according to the recording identifier corresponding to the traffic playback request, traverse each data request in the call record and obtain the corresponding business data, and generate a visual strategy flowchart.
[0067] In this embodiment of the specification, receiving a traffic playback request and querying the call record based on the recording identifier corresponding to the traffic playback request includes:
[0068] Based on the plan tree query component, determine the tree identifier to be replayed corresponding to the traffic replay request, and determine the recording identifier and call record corresponding to the traffic replay request based on the tree identifier.
[0069] In this embodiment of the specification, after querying the call record based on the recording identifier corresponding to the traffic playback request, the method further includes:
[0070] The dynamic variable is replaced with the tree identifier based on the context information of the plan tree described in the call record.
[0071] Based on the aforementioned scheme, the backend can be invoked to create a data request according to the tree identifier.
[0072] In the embodiments of this specification, plan tree nodes are created in the canvas according to the calling relationship and calling order between different data requests, using each data request and the corresponding business data, to generate a visual operation plan flowchart.
[0073] In practice, the traffic replay process can be as follows: After the user selects the environment, plan name, and tree name to be replayed on the operation page of replay-web (online traffic replay web application), the replay is triggered, and a replay request is sent to replay-app (online traffic replay app application). In replay-app, the database is queried to select the call records of a set of traffic recording requests corresponding to the plan ID and tree ID. The dynamic variables in the data request are replaced with actual values. Then, the data requests of the plan ID and tree ID are traversed, and replay-agent is called one by one to replay the data, rebuild the operation plan, and observe whether the newly created operation plan is normal. If it is normal, the regression test can be completed. In this case, when traversing the data requests of the plan ID and tree ID, the process is performed on a single plan name, traversing and querying all HTTP requests corresponding to the plan ID and tree ID selected by the user, and performing traffic replay. Figure 2 This is a schematic diagram illustrating the principle of a non-intrusive strategy reconstruction method based on traffic recording and playback, as provided in the embodiments of this specification. The method may include:
[0074] Users create operational plans on iops-web and store them in the database via ipss-app. At the same time, replay-agent automatically detects the target service (traffic recording request) of the JVM on iops-web, intercepts and records the HTTP data request, intercepts the call records of the interface for the data request, and sends the call records to the replay-agent frontend according to the recording and playback request event, and then stores them in the database (traffic recording database).
[0075] During the replay phase, users initiate replay requests through the web interface of replay-agent. The replay-app triggers the replay request, retrieves call records from the traffic recording library, reconstructs the operation plan, and performs regression testing by observing the operation plan flowchart.
[0076] The operation page for initiating a replay request may include an environment selection component, a plan name component, and a tree name component. By selecting options from these components or entering index conditions, the searched call records can be displayed on the page. The call records can carry information such as environment information, application name information, plan number, plan name, tree number, and traffic entry point.
[0077] The solutions implemented in this specification effectively improve test coverage and sufficiency. By recording traffic replay, it ensures that unmodified interfaces and modified interfaces meet expectations, enabling rapid automated regression testing. The traffic replay system conveniently obtains mirrored traffic data from test and production environments, effectively preserving the original traffic without modification or loss, while also solving the time-consuming problem of manually constructed test data. Developing and using the traffic replay system frees up testing resources for intelligent operation scenarios. During requirement iteration, the traffic replay platform automatically identifies defects and facilitates rapid requirement iteration and deployment.
[0078] Figure 3 This specification provides a schematic diagram of a non-intrusive strategy reconstruction device based on traffic recording and playback, which may include:
[0079] The recording module 201 non-intrusively intercepts multiple data requests initiated by creating a plan tree, categorizes the multiple data requests according to the plan tree, records the names of the multiple data requests corresponding to the plan tree and the business data corresponding to the data requests, and generates a call record with a recording identifier based on the names of the multiple data requests corresponding to the plan tree and the business data corresponding to the data requests.
[0080] The playback module 202 receives a traffic playback request, queries the call record according to the recording identifier corresponding to the traffic playback request, traverses each data request in the call record and obtains the corresponding business data, and generates a visual operation plan flowchart.
[0081] This device non-intrusively intercepts one or more data requests initiated to create a plan tree, categorizes the data requests according to the plan tree, records the data request name corresponding to the plan tree and the corresponding business data, generates call records with recording identifiers, receives traffic playback requests, queries call records based on their corresponding recording identifiers, traverses each data request in the call records and obtains the corresponding business data, and generates a visualized operation plan flowchart. By recording and replaying, the operation plan can be quickly reconstructed without repetitive operations, thus improving regression testing efficiency and reducing the error rate.
[0082] Another embodiment of the present invention relates to an electronic device, such as... Figure 4 As shown, it includes at least one processor 302; and a memory 301 communicatively connected to at least one processor 302; wherein the memory 301 stores instructions executable by at least one processor 302, the instructions being executed by at least one processor 302 to enable at least one processor 302 to execute any of the above method embodiments.
[0083] The memory 301 and processor 302 are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors 302 and memory 301. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 302 is transmitted over a wireless medium via an antenna, which also receives and transmits data to processor 302. Processor 302 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 301 can be used to store data used by processor 302 during operation.
[0084] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements any of the above-described method embodiments. That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. The program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0085] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the present invention is not inherently related to any specific computer, virtual device, or electronic device, and various general-purpose devices can also implement the present invention. The above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0086] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0087] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A non-intrusive strategy reconstruction method based on traffic recording and playback, characterized in that, include: Upon receiving a traffic recording request, and based on the non-intrusive runtime AOP interception technology developed by jvm-sandbox-repeater, non-intrusive interception is performed on one or more data requests initiated in the creation of a plan tree in the intelligent operation scenario according to the traffic recording request. The non-intrusive interception includes: building a core module comprising a replay-web application, a replay-app application, and a replay-agent application. The replay-web and replay-app applications split the server into a web client and an app client. The replay-agent application automatically detects the virtual machine corresponding to the intelligent operation platform process. On the virtual machine of the intelligent operation platform, the replay-agent application creates a sandbox file through reflection. The sandbox file starts the HTTP and distributed service modules through a serial peripheral interface for subsequent interception and recording of HTTP data requests. The replay-agent application enhances the code based on bytecode instrumentation technology to achieve call interception. The tree identifier is extracted from the data request. The tree identifier includes a plan ID and a tree ID. Multiple data requests are categorized according to the tree identifier, and data requests containing the same tree identifier are grouped into the same category. The data request name corresponding to the plan tree and the business data corresponding to the data request are recorded. The business data includes the input parameters and return value of the data request. The fields restricted by the database unique index in the plan tree are replaced with dynamic variables, and the context information of the plan tree is recorded. The dynamic variables are timestamped dynamic variables generated based on the current time. The replacement is used to avoid errors caused by unique index conflicts during playback. The context information is the data transmitted before and after multiple HTTP requests during the creation of a plan, and the context information stores the policy node ID to support subsequent HTTP interface calls. A call record with a recording identifier is generated based on the dynamic variables after the plan tree replacement, the corresponding multiple data request names, and the business data corresponding to the data requests. The call record is serialized and then sent to the server for storage. Based on the plan tree query component, the tree identifier to be replayed corresponding to the traffic replay request is determined. Based on the tree identifier, the recording identifier and call record corresponding to the traffic replay request are determined. Each data request in the call record is traversed. In the replay-app application, the database query is called to select a set of call records for traffic recording requests corresponding to the plan ID and tree ID. Based on the context information of the plan tree in the call record, the dynamic variable is replaced with the tree identifier. The data requests of plan ID and tree ID are traversed. The replay-agent application is called one by one to replay, rebuild the operation plan, obtain the corresponding business data, and use each data request and the corresponding business data to create plan tree nodes in the canvas according to the call relationship and call order between different data requests, generating a visual strategy flowchart.
2. The method according to claim 1, characterized in that, Also includes: The call records with recording identifiers will be stored in the database in a timely manner.
3. A non-intrusive strategy reconstruction device based on traffic recording and playback, characterized in that, include: The recording module receives traffic recording requests and uses non-intrusive runtime AOP interception technology, which is based on the secondary development of jvm-sandbox-repeater, to non-intrusively intercept one or more data requests initiated by creating a plan tree in the intelligent operation scenario according to the traffic recording requests. The non-intrusive interception includes: building a core module comprising a replay-web application, a replay-app application, and a replay-agent application. The replay-web and replay-app applications split the server into a web client and an app client. The replay-agent application automatically detects the virtual machine corresponding to the intelligent operation platform process. On the virtual machine of the intelligent operation platform, the replay-agent application creates a sandbox file through reflection. The sandbox file starts the HTTP and distributed service modules through a serial peripheral interface for subsequent interception and recording of HTTP data requests. The replay-agent application enhances the code based on bytecode instrumentation technology to achieve call interception. The tree identifier is extracted from the data request. The tree identifier includes a plan ID and a tree ID. Multiple data requests are categorized according to the tree identifier, and data requests containing the same tree identifier are grouped into the same category. The data request name corresponding to the plan tree and the business data corresponding to the data request are recorded. The business data includes the input parameters and return value of the data request. The fields restricted by the database unique index in the plan tree are replaced with dynamic variables, and the context information of the plan tree is recorded. The dynamic variables are timestamped dynamic variables generated based on the current time. The replacement is used to avoid errors caused by unique index conflicts during playback. The context information is the data transmitted before and after multiple HTTP requests during the creation of a plan, and the context information stores the policy node ID to support subsequent HTTP interface calls. A call record with a recording identifier is generated based on the dynamic variables after the plan tree replacement, the corresponding multiple data request names, and the business data corresponding to the data requests. The call record is serialized and then sent to the server for storage. The replay module, based on the plan tree query component, determines the tree identifier to be replayed for the traffic replay request, determines the recording identifier and call record corresponding to the traffic replay request based on the tree identifier, traverses each data request in the call record, and calls the database in the replay-app application to select a set of traffic recording request call records corresponding to the plan ID and tree ID. Based on the context information of the plan tree in the call record, the dynamic variable is replaced with the tree identifier. The data requests with plan ID and tree ID are traversed, and the replay-agent application is called one by one for replay, reconstructing the operation plan, obtaining the corresponding business data, and using each data request and the corresponding business data, plan tree nodes are created in the canvas according to the call relationship and call order between different data requests to generate a visual strategy flowchart.
4. An electronic device, wherein, The electronic device includes: A processor; and a memory storing computer-executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1-2.
5. A computer-readable storage medium, wherein, The computer-readable storage medium stores one or more instructions, which, when executed by a processor, implement the method of any one of claims 1-2.