Page operation playback methods, systems, devices and media

By taking photos and recording data of pages in the financial industry system, combined with sandbox simulation and data processing, the problems of slow system fault location and high traffic consumption were solved, and rapid fault location and traffic optimization were achieved.

CN117785532BActive Publication Date: 2026-11-10SHANGHAI LIANGTOU NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311804708.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2026-11-10
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to quickly locate system failures in the financial industry, and the transmission of error information over the network is time-consuming and data-intensive, which cannot meet the requirements for system stability and security.

Method used

By taking photos and recording data of the page within a preset time period or through N consecutive operations, page photos and operation data are obtained. When a fault occurs, page operations are simulated in a sandbox. Combined with data compression and fragmentation, rapid fault location and traffic optimization are achieved.

Benefits of technology

It enables quick location of the fault when a page malfunctions, reducing bandwidth consumption and improving system stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117785532B_ABST
    Figure CN117785532B_ABST
Patent Text Reader

Abstract

This disclosure provides a page operation playback method, system, device, and medium. The page operation playback method includes: taking photos of the operated page within a preset time period or after N consecutive page operations to obtain page photos; recording page operation data within the time period between every two adjacent photo captures to obtain operation data; and replaying page changes within the corresponding time period based on the page photos and the operation data when a page malfunction occurs; wherein N≥1. This disclosure enables rapid location of the malfunctioning operation with minimal data recording when a page malfunction occurs, thereby improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a method, system, device and medium for page operation playback. Background Technology

[0002] The financial industry, due to its inherent characteristics, has high requirements for system stability and security. Businesses want to minimize the impact on operations when the system fails, which necessitates short fault handling times or early warnings. Traditional front-end monitoring involves sending error stack traces back to the server via HTTP(S) requests, while simultaneously notifying relevant technical personnel via email. Technical personnel then summarize, analyze, and troubleshoot based on the returned error information.

[0003] Many systems in the industry are purchased from third-party vendors. After private deployment, if error alerts are sent directly to internal personnel, they may be unable to resolve the issues due to a lack of system knowledge or technical expertise. Sending error messages back to the third-party vendor's server via the external network would not meet security requirements, and the large data volume would result in time-consuming and bandwidth-intensive transmission.

[0004] This leads to two problems:

[0005] First, some environmental and data-related faults are difficult to reproduce. Technicians have limited operating space and time, making it difficult to quickly locate the faults, and troubleshooting is very time-consuming.

[0006] Secondly, the large amount of error information collected will cause performance and bandwidth consumption issues during network transmission. Summary of the Invention

[0007] The technical problem to be solved by this disclosure is to overcome the shortcomings of existing technologies, such as the inability to quickly locate the operation where the fault occurred and excessive traffic consumption, and to provide a method, system, device and medium for page operation playback.

[0008] This disclosure solves the above-mentioned technical problems through the following technical solution:

[0009] This disclosure discloses a page operation replay method, the page operation replay method comprising:

[0010] Take a picture of the page within a preset time period or when the page is operated on N times in a row to obtain a photo of the page;

[0011] Within the time interval between every two consecutive photo captures, data on page operations is recorded to obtain operation data;

[0012] When a page malfunction occurs, the page changes within the corresponding time period are replayed based on the page photos and the operation data.

[0013] Where N≥1.

[0014] Preferably, the operation data includes: data source, operation type, DOM (Document Object Model) node, unique identifier, and creation time.

[0015] Preferably, the step of replaying page changes within a corresponding time period based on the page photo and the operation data includes:

[0016] When a page failure occurs, retrieve the most recently captured page photo and the operation data of the most recent M page operations;

[0017] The operation data of the M page operations are compressed to obtain the target operation data;

[0018] Based on the page photos and the target operation data, page operations are directly simulated in the sandbox;

[0019] Where 1≤M≤N.

[0020] Preferably, after the step of compressing the operation data of the N page operations, the page operation playback method includes:

[0021] Determine whether the operation data is greater than a preset threshold. If so, divide the operation data into segments so that each segment is less than the preset threshold.

[0022] This disclosure discloses a page operation playback system, the page operation playback system comprising:

[0023] The camera module is used to take pictures of the page within a preset time period or when the page is operated on N times in a row, so as to obtain a picture of the page.

[0024] The recording module is used to record page operations within the time interval between every two adjacent photo captures in order to obtain operation data;

[0025] The playback module is used to replay page changes within a corresponding time period based on the page photo and the operation data when a page failure occurs.

[0026] Where N≥1.

[0027] Preferably, the operation data includes: data source, operation type, DOM node, unique identifier, and creation time.

[0028] Preferably, the playback module includes:

[0029] The first acquisition unit is used to acquire the most recently captured page photo and the operation data of the most recent N page operations when a page failure occurs.

[0030] The second acquisition unit is used to compress the operation data of the N page operations to obtain the target operation data.

[0031] The simulation unit is used to directly simulate page operations in a sandbox based on the page photo and the target operation data.

[0032] Where 1≤M≤N.

[0033] Preferably, the playback system includes:

[0034] The judgment module is used to determine whether the operation data is greater than a preset threshold. If so, the slicing module is called.

[0035] The sharding module is used to shard the operation data so that each shard of operation data is less than a preset threshold.

[0036] This disclosure discloses an electronic device including a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein the processor executes the computer program to implement the page operation playback method as described above.

[0037] This disclosure discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the page operation playback method described above.

[0038] The positive and progressive effects of this disclosure are as follows:

[0039] This disclosure is based on taking photos of the page within a preset time period or after N consecutive page operations, and recording operation data within the time interval between each two adjacent photos. By replaying the page changes within the corresponding time period, it enables rapid location of the operation causing the page failure with minimal data consumption, thereby improving the user experience. Attached Figure Description

[0040] Figure 1 This is a flowchart of the page operation playback method of Embodiment 1 of this disclosure;

[0041] Figure 2 This is a schematic diagram of page recording for Embodiment 1 of this disclosure;

[0042] Figure 3 This is a flowchart of step S103 in Embodiment 1 of this disclosure;

[0043] Figure 4 This is a schematic diagram of the page operation playback system of Embodiment 2 of this disclosure;

[0044] Figure 5 This is a schematic diagram of the playback module in Embodiment 2 of this disclosure;

[0045] Figure 6 This is a schematic diagram of the structure of the electronic device according to Embodiment 3 of this disclosure. Detailed Implementation

[0046] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.

[0047] Example 1

[0048] like Figure 1 As shown, this embodiment discloses a page operation playback method, which includes:

[0049] Step S101: Take a picture of the page within a preset time period or when the page is operated on N times in a row to obtain a page photo;

[0050] In one specific embodiment, for example, a photo of the operation page is taken every 3 minutes. Alternatively, a photo of the operation page is taken every 10 operations performed on the operation page. Specifically, operations on the operation page include DOM changes, mouse interactions, page or element scrolling, window resizing, information input, and mouse movement. Among these, DOM changes include node creation and destruction, node attribute changes, and text changes.

[0051] Step S102: Record the page operations within the time interval between every two adjacent photo captures to obtain operation data;

[0052] Specifically, the operation data includes: data source, operation type, DOM node, unique identifier, and creation time. For example... Figure 2 As shown, in this scheme, each page operation is recorded as an incremental change.

[0053] In a specific implementation, for example, taking a button as an example, assuming a user clicks once, data such as data source, operation type, DOM node, unique identifier, and creation time will be generated. In this solution, the operation data is serialized and stored in the form of a JSON data structure. For operations involving recording the creation and subsequent destruction of DOM nodes, the batch asynchronous callbacks provided by the browser's MutationObserver (an interface provided by the browser) are used to record the data. Specifically, after a series of DOM changes occur, these changes are passed out as a mutation (a data structure) record array through a one-time callback. This array is then stored in the form of a JSON data structure.

[0054] Step S103: When a page malfunction occurs, based on the page photo and the operation data, replay the page changes within the corresponding time period.

[0055] This solution replays page changes within a specific time period by combining page photos with operation data. Specifically, based on photos taken of the page within a preset time period or after N consecutive page operations, and operation data recorded between each pair of adjacent photos, the solution replays page changes within the corresponding time period. This enables rapid identification of the operation causing the failure when a page malfunctions, while minimizing data consumption.

[0056] like Figure 3 As shown, in one implementable manner, the step of replaying page changes within a corresponding time period based on the page photograph and the operation data includes:

[0057] Step S1031: When a page failure occurs, obtain the most recently captured page photo and the operation data of the most recent M page operations; where 1≤M≤N.

[0058] In one specific embodiment, the page is photographed every minute at times such as 9:01, 9:02, 9:03, 9:04, and so on. If the page malfunctions at 9:00, the page photo taken at 9:01 and the operation data from the 10 operations prior to 9:00 are acquired. Which operations' data prior to the page malfunction need to be acquired in this solution can be determined based on specific practical needs.

[0059] Step S1032: Compress the operation data of the M page operations to obtain the target operation data;

[0060] Step S1033: Based on the page photo and the target operation data, directly simulate page operations in the sandbox.

[0061] Specifically, the steps to directly simulate page operations in the sandbox are as follows:

[0062] The first step is to build a sandbox in the browser using an iframe (inline frame element), and then reconstruct the page image into the corresponding DOM tree within the sandbox environment.

[0063] The second step is to arrange the page operations according to their timestamps and put them into an operation queue.

[0064] The third step is to start a timer to check the operation queue in real time, retrieve the page operations that have reached their time limit, and execute the page operations.

[0065] In this solution, `setTimeout` is not used primarily to avoid delays caused by main thread blocking. For playback functionality, such unpredictable delays are unacceptable and can lead to various exceptions. A real-time calibrated timer is implemented using `requestAnimationFrame` to ensure that the replay delay does not exceed one frame.

[0066] In one implementable manner, after the step of compressing the operation data of the N page operations, the page operation playback includes:

[0067] Determine whether the operation data is greater than a preset threshold. If so, divide the operation data into segments so that each segment is less than the preset threshold.

[0068] Specifically, in one embodiment, the data fragmentation process is as follows: the operational data is converted into binary data and divided into 50 equal parts. The first three bytes of each part are extracted, and the extracted data are used to form sample data. The sample data is then hashed (using a hash function) to obtain the complete content hash, constructing a data structure that includes the order of the current fragment, the content of the fragment, and the hash of the complete content. Then, the fragmented data is uploaded in parallel. After the data upload is complete, for each collected data piece, the first three bytes are extracted in sequence and re-hashed. The new hash value is checked against the transmitted hash value; if they are equal, it indicates that the file is complete and has not been tampered with. Finally, the fragments are merged to generate the complete original data.

[0069] This solution segments the operation data to ensure that each segment is small enough, thus avoiding performance issues during data transmission.

[0070] Example 2

[0071] like Figure 4 As shown, this embodiment discloses a page operation playback system, which includes:

[0072] The photo-taking module 1 is used to take a photo of the page within a preset time period or when the page is operated on N times consecutively, so as to obtain a photo of the page; where N≥1.

[0073] In one specific embodiment, for example, a photo of the operation page is taken every 3 minutes. Alternatively, a photo of the operation page is taken every 10 operations performed on the operation page.

[0074] Specifically, operations on the page include DOM (Document Object Model) modifications, mouse interactions, page or element scrolling, viewport resizing, information input, and mouse movement. DOM modifications include node creation and destruction, node attribute changes, and text changes.

[0075] Recording module 2 is used to record page operations within the time interval between every two adjacent photo captures to obtain operation data; specifically, the operation data includes: data source, operation type, DOM node, unique identifier, and creation time.

[0076] In a specific implementation, for example, taking a button as an example, assuming a user clicks once, data such as data source, operation type, DOM node, unique identifier, and creation time will be generated. In this solution, the operation data is serialized and stored in the form of a JSON data structure. For operations involving recording the creation and subsequent destruction of DOM nodes, the batch asynchronous callbacks provided by the browser's MutationObserver are used to record the data. Specifically, after a series of DOM changes occur, these changes are passed out as a mutation record array through a one-time callback. This array is then stored in a JSON data structure.

[0077] Playback module 3 is used to replay page changes within a corresponding time period based on the page photo and the operation data when a page failure occurs.

[0078] This solution replays page changes within a specific time period by combining page photos with operation data. Specifically, based on photos taken of the page within a preset time period or after N consecutive page operations, and operation data recorded between each pair of adjacent photos, the solution replays page changes within the corresponding time period. This enables rapid identification of the operation causing the failure when a page malfunctions, while minimizing data consumption.

[0079] like Figure 5 As shown, in one implementable embodiment, the playback module 3 includes:

[0080] The first acquisition unit 31 is used to acquire the most recently captured page photo and the operation data of the most recent M page operations when a page failure occurs; where 1≤M≤N.

[0081] In one specific embodiment, the page is photographed every minute at times such as 9:01, 9:02, 9:03, 9:04, and so on. If the page malfunctions at 9:00, the page photo taken at 9:01 and the operation data from the 10 operations prior to 9:00 are acquired. Which operations' data prior to the page malfunction need to be acquired in this solution can be determined based on specific practical needs.

[0082] The second acquisition unit 32 is used to compress the operation data of the M page operations to obtain the target operation data.

[0083] Simulation unit 33 is used to directly simulate page operations in a sandbox based on the page photo and the target operation data;

[0084] Specifically, the steps to directly simulate page operations in the sandbox are as follows:

[0085] The first step is to build a sandbox in the browser using an iframe, and then reconstruct the corresponding DOM tree from the page images within the sandbox environment.

[0086] The second step is to arrange the page operations according to their timestamps and put them into an operation queue.

[0087] The third step is to start a timer to check the operation queue in real time, retrieve the page operations that have reached their time limit, and execute the page operations.

[0088] In this solution, `setTimeout` is not used for the timer, primarily to avoid delays caused by main thread blocking. For playback functionality, such unpredictable delays are unacceptable, as they can trigger various exceptions. A real-time calibrated timer is implemented using `requestAnimationFrame` to ensure that the replay delay does not exceed one frame.

[0089] like Figure 4 As shown, in one implementable embodiment, the playback system includes:

[0090] Module 4 is used to determine whether the operation data is greater than a preset threshold. If so, the slicing module is called.

[0091] The sharding module 5 is used to shard the operation data so that each shard of operation data is less than a preset threshold.

[0092] Specifically, in one embodiment, the data fragmentation process is as follows: the operational data is converted into binary data and divided into 50 equal parts. The first three bytes of each part are extracted, and the extracted data are used to form sample data. The sample data is then hashed, and a data structure is constructed including the order of the current fragment, the content of the fragment, and the hash of the complete content. Then, the fragmented data is uploaded in parallel. After the data upload is complete, for each collected data piece, the first three bytes are extracted in sequence and re-hashed. The new hash value is checked against the transmitted hash value; if they are equal, it indicates that the file is complete and has not been tampered with. Finally, the fragments are merged to generate the complete original data.

[0093] This solution segments the operational data to ensure that each segment is small enough, allowing customers to obtain operational data on demand while avoiding excessive performance or bandwidth consumption during data transmission.

[0094] Example 3

[0095] Figure 6 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of this disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the page operation playback method provided in Embodiment 1. Figure 6 The electronic device 40 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0096] like Figure 6 As shown, the electronic device 40 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 40 may include, but are not limited to: at least one processor 41, at least one memory 42, and a bus 43 connecting different system components (including memory 42 and processor 41).

[0097] Bus 43 includes a data bus, an address bus, and a control bus.

[0098] The memory 42 may include volatile memory, such as random access memory (RAM) 421 and / or cache memory 422, and may further include read-only memory (ROM) 423.

[0099] The memory 42 may also include a program / utility 425 having a set (at least one) of program modules 424, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0100] The processor 41 executes various functional applications and data processing by running computer programs stored in the memory 42, such as the page operation playback method provided in Embodiment 1 of this disclosure.

[0101] Electronic device 40 can also communicate with one or more external devices 44 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 45. Furthermore, the model-generated device 40 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 46. As shown, network adapter 46 communicates with other modules of the model-generated device 40 via bus 43. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the model-generated device 40, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0102] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0103] Example 4

[0104] This embodiment provides a computer-readable storage medium storing a computer program thereon, wherein the program is executed by a processor to perform the page operation playback method provided in Embodiment 1.

[0105] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0106] In a possible implementation, this disclosure can also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to execute the page operation playback method provided in Embodiment 1.

[0107] The program code for executing this disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0108] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.

Claims

1. A method for replaying page operations, characterized in that, The page operation replay includes: Within a preset time period or after N consecutive page operations, take a photo of the page to obtain a page image, where N... 1; Within the time interval between every two adjacent photo captures, data is recorded on page operations to obtain operation data. The operation data includes data source, operation type, DOM node, unique identifier, and creation time. Among them, for DOM node creation and destruction operations, batch asynchronous callbacks provided by the browser's MutationObserver interface are recorded. After a series of DOM changes occur, a mutation record array is obtained through a one-time callback, and the mutation record array is serialized and stored in a JSON data structure. When a page failure occurs, retrieve the most recently captured page image and the operation data from the most recent M page operations, where 1 M ; The operation data of the M page operations are compressed to obtain the target operation data; If the target operation data is greater than a preset threshold, the target operation data is segmented so that each segment is less than the preset threshold. The segmentation process includes: converting the target operation data into binary data and dividing it equally; extracting the first three bytes of each segment to form sample data; generating a hash value of the complete content based on the sample data; constructing a data structure containing the current segment order, segment content, and hash value of the complete content; and transmitting each segment in parallel. The receiving end extracts the corresponding bytes according to the segment order, regenerates the hash value, verifies that it is consistent with the transmitted hash value, and merges the segments to obtain the complete target operation data. Based on the page photos and the target operation data, page operations are directly simulated in the sandbox, and page changes within the corresponding time period are replayed.

2. A page operation playback system, characterized in that, The page operation playback system includes: The camera module is used to take pictures of the page within a preset time period or after N consecutive page operations, so as to obtain a page image. 1; The recording module is used to record page operations within the time interval between two adjacent photo captures to obtain operation data. The operation data includes data source, operation type, DOM node, unique identifier, and creation time. Among them, the creation and destruction of DOM nodes are recorded through batch asynchronous callbacks provided by the browser's MutationObserver interface. After a series of DOM changes occur, a mutation record array is obtained through a one-time callback, and the mutation record array is serialized and stored in a JSON data structure. The playback module includes: The first acquisition unit is used to acquire the most recently captured page image and the operation data of the most recent M page operations when a page failure occurs, wherein 1 M ; The second acquisition unit is used to compress the operation data of the M page operations to obtain the target operation data. The judgment module is used to determine whether the target operation data is greater than a preset threshold. If so, the slicing module is called. The sharding module is used to shard the target operation data so that each shard is less than a preset threshold. The sharding process includes: converting the target operation data into binary data and dividing it evenly; extracting the first three bytes of each shard to form sample data; generating a hash value for the complete content based on the sample data; constructing a data structure containing the current shard order, shard content, and the hash value of the complete content; and transmitting each shard in parallel. The receiving end extracts the corresponding bytes according to the shard order, regenerates the hash value, verifies that it matches the transmitted hash value, and then merges the shards to obtain the complete target operation data. The simulation unit is used to directly simulate page operations in a sandbox based on the page photos and the target operation data, and replay the page changes within the corresponding time period.

3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the page operation playback method as described in claim 1.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the page operation playback method as described in claim 1.

Citation Information

Patent Citations

  • Network front-end remote playback method and device, equipment and storage medium

    CN111818123A