CN112148571B - Webpage operation process recording and playback method and device - Google Patents
Webpage operation process recording and playback method and device Download PDFInfo
- Publication number
- CN112148571B CN112148571B CN202010651352.9A CN202010651352A CN112148571B CN 112148571 B CN112148571 B CN 112148571B CN 202010651352 A CN202010651352 A CN 202010651352A CN 112148571 B CN112148571 B CN 112148571B
- Authority
- CN
- China
- Prior art keywords
- data
- webpage
- server
- operation process
- record
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 348
- 230000008569 process Effects 0.000 title claims abstract description 262
- 238000012545 processing Methods 0.000 claims description 45
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 13
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 230000000694 effects Effects 0.000 claims description 12
- 238000013500 data storage Methods 0.000 claims description 8
- 238000007405 data analysis Methods 0.000 claims description 3
- 230000008901 benefit Effects 0.000 abstract description 5
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000003993 interaction Effects 0.000 description 22
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 10
- 230000006399 behavior Effects 0.000 description 5
- 238000007689 inspection Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 239000000470 constituent Substances 0.000 description 2
- 238000013075 data extraction Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 101150046362 BTN1 gene Proteins 0.000 description 1
- 230000005587 bubbling Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3438—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a method for recording and playing back a webpage operation process, which is applied to a webpage operation process recording device and a webpage operation process playing device. By the webpage operation process playback method disclosed by the application, the recorded data of the webpage operation process is read and analyzed, the calling time of the data record is generated according to the time information arrangement of the data record based on the data record contained in the recorded data, the webpage operation instruction contained in the data record is executed based on the calling time of the data record, and the original webpage operation process is restored. The method is beneficial to completely storing the webpage operation process record, and the generated data has the advantages of small volume and tamper resistance.
Description
Technical Field
The invention relates to the field of communication, in particular to a method and a device for recording and playing back webpage operation processes.
Background
In the process of web page browsing and operation, a situation that browsing and operation information of a user needs to be recorded is often encountered, for example, the browsed content is illustrated and sent to a third party, so that the third party can execute web page playback, and the content, the key point and the operation process contained in the web page are fully known. In addition, in some special requirements, it is required to strictly record the browsing and operation processes of the web page and generate web page operation process record data for inspection, meanwhile, the integrity of the recorded data needs to be considered, and tampering is not allowed, for example, in the notification about retrospective management of the internet insurance sales behavior issued by the silver-guard meeting, retrospective operation processes of the internet insurance sales behavior is explicitly required to be performed, that is, the operation processes of the web page sales are completely recorded and stored to generate data for inspection, and it is emphasized that retrospective data of the internet insurance sales behavior should be restored to an effective file for inspection, and the sales page should be restored to an effective picture or video for inspection for use.
In the prior art, a mode of generating videos by screen recording is adopted for webpage operation process recording, and the method has the characteristics of large volume, inconvenient recording and difficult checking, generally, the operation time is calculated according to 10 minutes in the webpage operation process of internet application, the size of the generated recording file is more than 500M, a user is required to install screen recording software to complete the application process, and the behavior of the user is limited; a check is made on the recorded video that it is not possible to locate something quickly (e.g. the signature part of the user in the health notification item).
Therefore, aiming at effective and accurate recording in the web browsing and operation process, a data record for inspection is generated, and the problem needs to be solved by using a new technical scheme.
Disclosure of Invention
The embodiment of the application provides a webpage operation process recording and playback method, which solves the problems of webpage browsing and recording of operation processes and generates complete webpage operation process recording data.
In a first aspect, the present application provides a method for recording a web page operation procedure, which is applied to a web page operation procedure recording device, and the method includes:
Based on an HTML Event (HTML DOM Event) occurring in the webpage, generating the HTML Event and/or processing information corresponding to the HTML Event as a webpage operation instruction;
Recording and adding the webpage operation instruction and the time information of the HTML event to webpage operation instruction sequence data according to the corresponding relation;
The webpage operation instruction is used for being called when the webpage is replayed so as to restore the execution effect of the corresponding HTML event; the webpage operation instruction sequence data are used for playing back the webpage operation process, the call time of the data record is generated according to the time information arrangement of the data record based on the data record contained in the webpage operation instruction sequence data, and the webpage operation instruction contained in the data record is executed based on the call time.
In the technical solution provided in the first aspect, because each webpage operation or webpage change has a corresponding HTML event, the present application generates a webpage operation instruction based on the HTML event occurring in the webpage.
According to the technical scheme provided by the first aspect, the operation process of the webpage is recorded based on the HTML event occurring in the webpage, and webpage operation instruction sequence data containing time information is generated, namely, the data record of what is done in the webpage is recorded, and complete data is provided for playback of the whole operation process of the webpage and restoration of single-step webpage operation.
In a possible implementation manner of the first aspect, according to the first loading of the web page, acquiring data sent from a server to a client in the loading process, or reading data in a local browser after the web page is loaded, and recording the data as web page basic access data; the webpage basic access data are used as initialization data in the playback process of the webpage operation process.
In this possible implementation manner, the web page basic access data is data obtained from a server request in the first web page loading process, that is, all data locally contained in the browser after the web page is loaded for the first time, and the obtained data content is basically the same by the two obtaining methods provided above.
In this possible implementation manner, the complete web page data is recorded at the time point when the first loading of the web page is completed, and then, after the web page enters the operation state, the HTML event and/or the processing information corresponding to the HTML event are generated as the web page operation instruction based on the HTML event occurring in the web page. According to the method, corresponding processing methods are adopted according to the characteristics of different stages of webpage access, so that efficient and convenient generation of complete initial data is performed.
In a possible implementation manner of the first aspect, according to an HTML event that occurs in the web page, when processing information corresponding to the HTML event is a request sent to a server, recording the request information and the server return information according to a corresponding relationship, and generating server request record data.
With reference to this possible implementation manner, optionally, the web page operation instruction (the web page operation instruction generated based on the HTML event or the corresponding processing information thereof) and the server return information are recorded according to the corresponding relationship, and server request record data is generated.
The possible implementation manner solves the problem of confusion caused by interaction of the webpage and the server in the webpage operation process playback process, and ensures that the playback process is not dependent on the server environment when the webpage operation process is recorded any more, and playback can be normally executed even if the original server environment does not exist. Meanwhile, the data and the situation of interaction with the server when the webpage operation process is recorded are accurately restored. In addition, the server is used for requesting the record data to simulate output, and the simulation providing server returns data, so that the playback efficiency is improved.
In a possible implementation manner of the first aspect, the operation environment information of the web page is obtained, and the web page operation environment data is generated; the webpage running environment information comprises one or more of Web server information, client operating system information, network information, browser information and running environment information, webpage information and geographic position information provided by a browser for a webpage.
The above possible implementation manner records the running environment information of the web page, and is used for setting the recording program provided by the application in the web page operation recording process, analyzing, judging and setting the running environment of the played web page in the web page playback process, and providing information support for the executive playback player.
In a possible implementation manner of the first aspect, the browser collects audio and/or video data of the current external environment, and generates external environment data of the webpage operation process.
According to the possible implementation mode, the new recording dimension is increased by recording the external environment data in the webpage operation process, the purpose of the generated recording data is widened, and a new security authentication mode is provided.
In a possible implementation manner of the first aspect, one or more of the webpage operation instruction sequence data, the webpage basic access data, the server request record data, the running environment data and the webpage operation process external environment data are stored in a structured manner, so as to generate webpage operation process record data.
The stored and generated webpage operation process record data has the characteristics of small volume and easy storage, and meanwhile, due to the adoption of the structured storage, various data extraction requirements can be met, and data on a certain aspect can be extracted quickly.
In a possible implementation manner of the first aspect, according to the web page operation process record data, a message digest algorithm is applied to generate a message digest for the data; the message abstract is used for verifying the integrity of the data of the webpage operation process and identifying the webpage operation process.
The possible implementation mode is that the generated message abstract is short and easy to store, is convenient for verifying the authenticity and integrity of the recorded data and the data contained in the recorded data in the webpage operation process, and has the advantage of tamper resistance.
The second aspect of the present application provides a method for playing back a web page operation process, which is applied to a device for playing back a web page operation process, and the method comprises:
Reading webpage operation process record data;
Analyzing the webpage operation process record data to obtain one or more of webpage basic access data, webpage operation instruction sequence data, server request record data, webpage operation environment data and webpage operation process external environment data contained in the webpage operation process record data;
When the analyzed data contains webpage running environment data, judging whether the currently played webpage running environment meets playback requirements according to the data contained in the webpage running environment data, and setting the webpage running environment according to the data contained in the webpage running environment data;
when the analyzed and obtained data are determined to contain the external environment data in the webpage operation process, playing the contained audio and/or video content in the browser according to the external environment data in the webpage operation process;
when the analyzed data are determined to contain webpage basic access data, displaying a webpage according to the webpage basic access data;
And reading the data record in the webpage operation instruction sequence data, arranging and generating the calling time of the data record according to the time information of the data record, and executing the webpage operation instruction contained in the data record based on the calling time of the data record.
In the technical solution provided in the second aspect, playback is performed on the basis of the webpage operation process record data generated in the technical solution provided in the first aspect, and according to the parsed data, based on the data content contained therein, operations such as performing webpage operation environment judgment and setting, performing audio and video playing contained in external environment data, initializing webpage content according to webpage base access data, and performing corresponding webpage operation instructions with reference to time information when the webpage operation process record is performed are performed. Moreover, based on the advantage that the web page operation process record data adopts structured storage, the method can be flexibly controlled according to playback requirements in the playback process, such as: and removing the play operation aiming at the webpage running environment data.
In a possible implementation manner of the second aspect, when it is determined that the web page operation instruction includes sending a request to a server, the following steps are performed:
Capturing a request currently sent to a server;
based on the current webpage operation instruction or the current request information, acquiring corresponding server request record data;
Acquiring server return data contained in the record data from the server request record data;
and returning the server return data to the webpage as the data returned by sending the request to the server.
In this possible implementation manner, according to the generation manner of the server request record data, server return data contained in the server request record data is obtained from the server request record data. If the server request record data is recorded according to the corresponding relation between the request information and the server return information, searching and obtaining the server return data in the corresponding relation according to the captured server request information; and if the server requests to record the data according to the corresponding relation between the webpage operation instruction and the server return information, searching and obtaining the server return data in the corresponding relation according to the webpage operation instruction which is executed currently.
In the possible implementation manner, the request is sent to the server to be captured in the playback process, the returned data is searched and provided from the server request record data to serve as the data returned after the request is sent to the server, the implementation manner enables the webpage operation process playback to be independent of the server environment when the webpage operation process is recorded, and the mode of providing the server returned data is simulated by using the server request record data, so that the playback efficiency is improved, and the problem of interaction confusion with the server can be avoided.
A third aspect of the present application provides a web page operation procedure recording apparatus for performing the method of the first aspect or any possible implementation manner of the first aspect. Specifically, the web page operation process recording device includes:
the operation environment information acquisition module is used for acquiring operation environment information of the webpage;
The webpage operation process external environment data acquisition module is used for acquiring audio and/or video data of the current external environment through the browser in the webpage operation process;
The webpage data acquisition module is used for acquiring data sent from the server to the client in the first webpage loading process, or reading data in a local browser after webpage loading is completed, and storing the data as webpage basic access data;
the webpage operation monitoring module is used for monitoring an HTML event occurring in a webpage and calling the webpage operation instruction generating module after the HTML event is monitored;
The webpage operation instruction generation module is used for generating the HTML event and/or the processing information corresponding to the HTML event into a webpage operation instruction according to the HTML event occurring in the webpage, and recording and adding the webpage operation instruction and the time information of the HTML event to webpage operation instruction sequence data according to the corresponding relation;
The server request processing module is used for recording the request information and the server return information according to the corresponding relation and generating server request record data when the processing information corresponding to the HTML event comprises a request sent to a server, or recording the webpage operation instruction and the server return information according to the corresponding relation and generating server request record data;
The data storage module is used for carrying out structural storage on one or more of the webpage operation instruction sequence data, the webpage basic access data, the server request record data, the running environment data and the webpage operation process external environment data to generate webpage operation process record data; and is further configured to store the message digest information generated by the message digest generation module;
And the message digest generation module is used for generating a message digest by applying a message digest algorithm according to the webpage operation process record data stored by the data storage module.
A fourth aspect of the present application provides a web page operation procedure playback device for performing the method of the second aspect or any possible implementation of the second aspect. Specifically, the webpage operation process playback device comprises:
The data reading module is used for reading the webpage operation process record data;
the data analysis module is used for analyzing the webpage operation process record data and the data contained in the webpage operation process record data, wherein the webpage operation process data comprises one or more of webpage operation instruction sequence data, webpage basic access data, server request record data, operation environment data and webpage operation process external environment data;
the running environment information setting module is used for judging whether the current running environment meets playback requirements or not based on the running environment data, and setting a webpage running environment based on the running environment data;
The webpage data writing module is used for writing webpage data into the browser to restore and display a webpage based on the webpage basic access data;
The webpage operation instruction execution module is used for reading the data record in the webpage operation instruction sequence data, generating the calling time of the data record according to the time information arrangement of the data record, and executing the webpage operation instruction contained in the data record based on the calling time of the data record;
The server request operation execution module is used for capturing a request currently sent to the server when the webpage operation instruction is determined to contain a request sent to the server, and calling the server request proxy service module to process the request;
the server request proxy service module is used for acquiring corresponding server request record data based on a current webpage operation instruction or current request information, acquiring server return data contained in the server request record data from the server request record data, taking the server return data as return data after the request is sent to a server at this time, and returning the return data to the webpage;
And the external environment audio and video data playing module is used for playing audio and/or video data contained in the external environment data in the webpage operation process.
In a fifth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the web page operation recording method as in any one of the first aspects and/or the web page operation playback method as in any one of the second aspects.
In a sixth aspect, the present application provides a computer program for executing the web page operation procedure recording method as in any one of the first aspects and/or the web page operation procedure playback method as in any one of the second aspects, when the computer program is executed by a computer.
Therefore, in the aspects, the webpage operation process record data is recorded and generated in the webpage operation process, the webpage data and the webpage operation process are completely recorded, and the data are independent; playback is performed based on the data, the playback process avoids the same interaction with the server as when recorded, and the restored web page operation process image quality is completely lossless.
Drawings
FIG. 1 is a flowchart illustrating a method for generating data of a sequence of web page operation instructions according to an embodiment of the present application;
FIG. 2 is an activity diagram of a record of a web page operation process according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of two kinds of basic access data of generating web pages according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for generating a webpage operation instruction according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for generating web page running environment data according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a conventional web page running environment according to an embodiment of the present application;
FIG. 7 is a schematic flow chart of generating external environment data in a web page operation process according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a generation relationship of recording data of a web page operation process according to an embodiment of the present application;
FIG. 9 is a flowchart of generating a message digest for web page operation process record data according to an embodiment of the present application;
FIG. 10 is an activity diagram of a record of a web page operation process according to an embodiment of the present application;
FIG. 11 is an activity diagram of playback of a web page operation process according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a playback webpage operation instruction execution flow according to an embodiment of the present application;
FIG. 13 is a schematic diagram of a recording device for web page operation process according to an embodiment of the present application;
Fig. 14 is a schematic structural diagram of a playback device for a web page operation process according to an embodiment of the present application.
Detailed Description
The description of the embodiments of the application is intended to be illustrative of the application and is not intended to be limiting.
Embodiments of the present application will now be described with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the present application. As one of ordinary skill in the art can know, with the development of technology and the appearance of new scenes, the technical scheme provided by the embodiment of the application is also applicable to similar technical problems.
The following is a description of some of the terms used in the present application to facilitate understanding by those skilled in the art:
1) HTML events, i.e., HTML DOM events, include events of HTML elements as well as global events.
2) The webpage operation instruction is generated when the webpage operation process is recorded, is called when the webpage operation process is replayed, and is a computer program (such as a function, a method, an instruction, a program code and the like) which can be executed in the webpage. It is generated based on HTML events, the execution effect being equivalent to the HTML events.
3) The system comprises webpage operation instruction sequence data, wherein the webpage operation instruction sequence data is a set, and each element of the set comprises webpage operation instruction information and related information of occurrence time of an HTML event corresponding to the webpage operation instruction.
4) The webpage basic access data are data which are obtained from a server request in the first webpage loading process, namely all data locally contained in a browser after the webpage is loaded for the first time. The data included in the initial web page state obtained after the loading of the web page is completed after the web page is opened for the first time can be colloquially understood as data generated by using the "save as" function of the browser after the loading is completed after the web page is opened by the existing browser. Wherein the data is all data related to the webpage, including but not limited to webpage HTML code, webpage script program, js file, css style file, picture, font file and the like.
5) The server requests to record data, which is used for recording data transmitted and received during the interaction with the server in the webpage operation process, wherein the data content can include one or more of, but is not limited to, request information transmitted to the server, return information of the server, webpage operation instructions, HTML events, processing information corresponding to the HTML events, request time and return time.
6) The webpage running environment data is generated according to the collected webpage running environment information, and the webpage running environment information comprises one or more of Web server information, client side operating system information, network information, browser information and running environment information, webpage information and geographic position information provided by a browser for a webpage.
7) The external environment data of the webpage operation process refers to the acquired audio and/or video data of the current external environment can be acquired through a browser while the webpage operation process is recorded, and the external environment data of the webpage operation process is generated according to the acquired data.
8) The web page operation process record data is used for recording a web page operation process, and refers to data generated by carrying out structural storage on one or more of web page operation instruction sequence data, web page basic access data, server request record data, operation environment data and web page operation process external environment data.
9) And/or, the association relation describing the association object indicates that three relations can exist. For example, a and/or B may represent: the three cases of a alone, B alone, and both a and B exist, and the character "/" generally indicates that the front-to-back associated object is an "or" relationship.
The application provides a webpage operation process recording method which is applied to recording the browsing and operation processes of a user on a webpage and finally generating recording data capable of being used for playing back the operation process.
In the browsing and operating process of the web page, corresponding HTML events are generated every time the web page operation or the web page changes, so the method provided by the application collects data in the web page operation process based on the HTML events in the web page, generates a web page operation instruction based on the collection of the generated HTML events, and then generates the obtained web page operation instruction into web page operation instruction sequence data.
FIG. 1 shows a possible flow diagram for generating data of a sequence of web page operation instructions, comprising the steps of:
s101, monitoring an HTML event;
s102, generating an HTML event and/or processing information corresponding to the HTML event as a webpage operation instruction;
S103, recording and adding the webpage operation instruction and the time information of the HTML event to webpage operation instruction sequence data according to the corresponding relation;
the following is a detailed description of the above steps:
In S101, the acquisition of the HTML event may be implemented by means of monitoring the HTML DOM, for example, using JavaScriptHTML DOM event monitors, and monitoring is established by means of addEventListener () method. In a preferred implementation, interception is directly established on documents, and because when a web page is loaded, a browser creates a document object model (DOM, documentObjectModel) of the page, the documents are root nodes of DOM, and all elements in the web page are child nodes of the documents, interception of all elements in the web page can be realized by adopting the method according to the bubbling mechanism of the web page event.
In S102, the HTML event and/or the processing information corresponding to the HTML event are generated as the web page operation instruction, and the execution effect of the generated web page operation instruction is equal to the execution effect of the HTML event or the processing information corresponding to the HTML event. Therefore, the technical scheme provided by the application mainly uses the webpage operation instruction to restore the recorded webpage operation or the change of the webpage, and the principle for realizing the point is as follows: any operation performed in the web page (i.e., any HTML event) can be accomplished using a JavaScript-like program. Preferably, the webpage operation instruction adopts JavaScript statements, functions, programs and the like, such as: the HTML event is that a click event occurs on button "btn", and the operation instruction is: the document. Getelementbyid ("btn"). Click (), i.e., the "btn" button is first retrieved and then its click () function is executed. In this embodiment, two ways of generating a web page operation instruction corresponding to an HTML event are provided, one way is based on the HTML event corresponding generation, for example, the above button click event is generated as a click () instruction executed on the button; another processing information generation based on HTML event correspondence, such as: the HTML event is a click event occurring on the button btn, and after the click event is clicked, the function helloWord () is executed, and the processing information corresponding to the HTML event is: executing a function helloWord (), so that the corresponding generated webpage operation instruction is: helloWord ().
In a specific embodiment, when the HTML event and/or the processing information corresponding to the HTML event is generated as a web page operation instruction in S102, the method further includes recording data information related to the HTML event or the processing information corresponding to the HTML event, and storing the data information independently or in combination with the web page operation instruction, where the data information is used when the web page operation instruction is executed. If the data content is input in the input element, when the corresponding webpage operation instruction is executed, the data content is required to be written into the input, and the effect of inputting the input element is restored when the webpage is replayed.
In a possible implementation manner, in the step S102, when it is determined that the HTML event and/or the processing information corresponding to the HTML event includes sending a request to the server or generating an interaction with the server, a web page operation instruction that does not include sending a request to the server and does not generate an interaction with the server is generated based on a result of the request to the server or the interaction with the server. For example, if a certain HTML event execution sends a request to a server, and the server returns a subscription number 100 and writes a web page element input1, the content of the generated web page operation instruction is: the number 100 is written to the netpage element input1.
In S103, the data of the sequence of web page operation instructions is a set, and each element stored in the data of the sequence of web page operation instructions includes web page operation instruction information and related information of time of occurrence of an HTML event corresponding to the web page operation instruction, where the time information includes, but is not limited to, time of occurrence of the HTML event, duration of time of occurrence of the HTML event from start time of recording of web page operation, duration of interval with last HTML occurrence time, and the like.
Through the above embodiment, the operation process of the web page is recorded based on the HTML event occurring in the web page, and the web page operation instruction sequence data containing time information is generated, that is, the data of what is done in the web page is recorded, and the complete data is provided for the playback of the whole operation process of the web page, and the single-step web page operation is restored.
In one possible implementation scenario, considering the characteristics of each stage in the web page access process, different recording modes are adopted for different stages, namely, a mode of web page data recording is adopted based on loading of web pages, and a mode of web page operation instruction recording is adopted based on operation for web pages. Please refer to the example implementation steps in fig. 2:
s201, opening a webpage;
S202, loading a webpage;
S203, acquiring basic access data of a webpage;
S204, monitoring an HTML event;
S205, generating the HTML event and/or processing information corresponding to the HTML event as a webpage operation instruction;
s206, recording and adding the webpage operation instruction and the time information of the HTML event to the webpage operation instruction sequence data according to the corresponding relation.
In the above step S203, there are two ways to obtain the basic access data of the web page:
in a first manner, according to the first loading of the web page, data sent from the server to the client in the loading process is obtained, please refer to the steps shown in fig. 3 for details: s301, completing webpage loading; s302, acquiring data sent from a server to a client in the first loading process of a webpage; s303, storing the data as webpage basic access data;
In a second mode, the data in the local browser after the web page loading is completed is read, please refer to the steps shown in fig. 3 for details: s304, loading the webpage is completed; s305, reading data in a local browser after the webpage loading is completed; and S306, storing the data as webpage basic access data.
In one embodiment, the first time the web page is loaded includes data requested from the server, including but not limited to: recording all data sent to the client browser by the Web server, and generating the recorded data into basic webpage access data (optionally sending the data to the client) after the webpage is loaded; after the webpage loading is started, a webpage operation process recording program provided for realizing the method is firstly loaded, then a data recording method in the webpage operation process recording program is called, and in the webpage loading process, the data which is requested to be obtained from a server is recorded and webpage basic access data is generated.
In this implementation scenario, when the web page is loaded for the first time, the step S203 records and obtains complete web page data, then, after the web page enters an operation state, step S204 is executed to start monitoring HTML events, and based on the HTML events occurring in the web page, the HTML events and/or processing information corresponding to the HTML events are generated as web page operation instructions.
The execution content of the steps S205 and S206 is the same as that of the previous embodiments S102 and S103, and will not be described again.
The implementation scene is divided into two stages of loading and operating, and the implementation scene is processed by adopting a data recording mode and an instruction recording mode respectively aiming at the two stages. In the process of loading the webpage, the method is mainly characterized in that data transmission and webpage content initialization display are carried out, the data recording mode is very suitable in this stage, namely, the mode of recording webpage data to generate webpage initialization access data is adopted, and meanwhile, the method is beneficial to loading related programs for realizing the method, preparing for acquisition in the follow-up webpage operation process, in addition, the data content contained after the webpage loading is completed usually enters a relatively stable state, and the webpage initialization access data can be recorded completely. In the webpage operation process, the method is mainly characterized in that a user browses, operates the webpage and interacts with a server, and the generated behaviors are mainly embodied as actions, so that the mode of recording webpage operation instructions (namely steps S204, S205 and S206) is more suitable at the stage, the webpage operation instructions are generated based on the HTML event records generated in the webpage, and the purpose of recording the webpage operation process is achieved.
Through the embodiment, the mode of recording the initial state and each step of interaction is adopted, and the proper processing method is adopted according to the characteristics of different stages of webpage access, so that the processing logic is clear, and the generated data structure is clear and has high stability.
In a specific implementation scenario, when the processing content corresponding to the HTML event occurring in the web page interacts with the server, the web page operation instruction generated according to the processing content corresponds to the processing content, for example, when the processing is executed in the playback process, the processing content will send a request to the server again (the request is the same as the server request in the web page operation recording process), so that the problem of confusion of interaction with the server is caused. For example: when the webpage operation process is recorded, the total number of orders currently stored by the server is 10, the execution content of the HTML event comprises the steps of sending request information of increasing the number of orders by 1 to the server, processing and returning the current total number of orders to be 11 according to the received information by the server, and executing the webpage operation playback process according to the information: when the total number of orders currently stored by the server is 11 and the webpage operation instruction is executed, the request information of 'order number increased by 1' is sent to the server, so that an error return result 'the total number of the current orders is 12', which is different from the result in recording, and the data stored by the server are destroyed. The present application provides another embodiment to solve the above-mentioned problems, please refer to fig. 4, which comprises the following steps:
S401, monitoring an HTML event;
S402, judging whether the processing information corresponding to the HTML event comprises a request sent to a server;
S403, recording the request information and the server return information according to the corresponding relation and generating server request record data, or recording the webpage operation instruction and the server return information according to the corresponding relation and generating server request record data;
S404, generating the HTML event and/or processing information corresponding to the HTML event as a webpage operation instruction.
According to the above steps, after the HTML event is monitored in S401, it is determined in step S402 whether the HTML event has interacted with the server, if yes, step S403 is executed to generate server request record data, and step S404 is executed to generate a web page operation instruction; if the determination result is no, step S404 is directly executed to generate a web page operation instruction. Note that, in the case where the determination result is yes, the execution order of step S403 and step S404 is not particularly limited.
According to the above steps, when the processing content corresponding to the HTML event occurring in the web page interacts with the server, the request content sent to the server and the return content of the server are recorded, and the server request record data is generated.
In the above embodiment, the recorded server requests the recording data to be applied to the playback process, and when the request is sent to the server in the playback process, the original server is not required to be requested, and the result is directly searched and returned from the server request recording data, so that the interaction with the original server is avoided again, and the problem of confusion of interaction with the server is not caused. Therefore, the method provided by the embodiment enables the playback process not to depend on the original server on the basis of storing the interaction record of the webpage and the server, and enhances the independence of the playback process.
In one possible implementation manner, the running environment information of the web page is recorded, and specifically referring to fig. 5, the steps are as follows:
s501, opening a webpage;
S502, acquiring the operation environment information of the webpage;
s503, generating webpage running environment data.
In the above embodiment, the Web page running environment is a hardware and software supporting environment required for running a Web page, referring to a schematic diagram of an existing Web page running environment structure shown in fig. 6, a general Web page running needs a server to provide a Web service, data is transmitted through a network, a client terminal receives data, and a browser runs the Web page, so the Web page running environment information includes, but is not limited to, web server information, client operating system information, network information, browser information, running environment information provided by the browser for the Web page, information of the Web page itself, geographical location information, and the like.
According to the above embodiment, the running environment information of the web page is recorded, so that parameters and running modes of a recording program (a computer program provided for implementing the method in the application) are set according to the running environment information in the web page operation recording process, such as differences between a mobile browser and a PC browser, and differences between related HTML events and functions exist, and setting the parameters and running modes of the recording program is beneficial to specific processing of the recording program for the running environment information, such as using web page operation instructions compatible with the running environment. In addition, the running environment information of the web page is recorded, and the running environment information is also used for judging and setting the running environment of the web page used for playing back the current web page in the process of playing back the web page, judging whether the current running environment has the necessary condition for playing back the web page or not, and setting the running environment to obtain the optimal playback effect. Meanwhile, the recorded webpage running environment information is also used for providing information support for the execution playbacks, such as: server information at the time of performing recording, a version number of a web page, geographical location information of a recorder, etc. are provided.
In another possible implementation manner, during the operation of the web page, the current external environment data is collected, and referring specifically to fig. 7, the steps are as follows:
S701, opening a webpage;
S702, acquiring audio and/or video data of the current external environment through a browser;
S703, generating external environment data of the webpage operation process.
At the beginning of the recording of the web page operation process, S702 collects audio and/or video data of the current external environment using the browser, and S703 generates web page operation process external environment data, which is synchronized with the web page operation process.
The method provided by the above embodiment can be used to solve the following problems:
The webpage operation process and the external environment data are mutually authenticated so as to authenticate the authenticity of an operator for executing the webpage operation process and the authenticity of the environment, namely, a user executes a certain webpage operation in a certain external environment or the user is in a certain environment under the condition of executing a certain webpage operation;
The method has the advantages that interaction can be generated between the external environment data and the webpage operation process, for example, when a user executes certain confidential operation, a section of characters are read according to requirements to confirm the operation as the user operation, and in the mode, the recorded webpage operation process and voice confirmation in the external environment data are at the same moment, so that the information verification problem that a person does something at a certain moment can be realized, for example, the fact that a certain network application process is the operation of the user can be confirmed;
The web page browsing and operating process is illustrated by the external environment data in the web page operating process, and the functions of web page playback are enhanced, such as: and operating and explaining the webpage content in the webpage operation process record, and realizing operation playing and explaining aiming at the webpage content in the playback process, for example, recording an example internet application process for learning by clients.
According to the possible implementation mode, the webpage operation recording effect is improved by recording the external environment data in the webpage operation process, the new application is increased, and a new security authentication mode is provided.
In another possible implementation manner, various data recorded in the web page operation process are stored in a structured manner to generate web page operation process record data, please refer to a schematic diagram of a data generation relationship shown in fig. 8, and one or more of the web page operation instruction sequence data, the web page basic access data, the server request record data, the running environment data and the web page operation process external environment data are stored in a structured manner to generate the web page operation process record data.
In this possible implementation manner, based on the requirements of recording and playback of the web page operation process, selecting and structuring storage is performed according to the data generated in the web page operation process, wherein the stored data, namely the web page operation process recording data, is used for playback of the web page operation process and recovery of single-step web page operation.
Based on the above embodiment, optionally, the web page operation procedure record data is stored integrally, and a separate file for playback is generated.
Based on the above embodiment, optionally, the data generated in the web page operation process or the web page operation process record data are stored in an encrypted manner.
In a specific implementation scenario, the web page operation process record data may include the following storage cases according to storage requirements:
Storing the webpage operation process record data at a server;
Storing the webpage operation process record data at a client;
storing the webpage operation process record data at the same time of the server and the client;
and storing the operation process record data in part at the client, storing in part at the server, and logically forming structured integral data by the data stored at the two ends.
Compared with a video file generated by common screen recording, the webpage operation process record data stored and generated by the embodiment of the application has the characteristics of small volume and easy storage, tens of megabytes of video data can be generated by common screen recording for 1 minute, the data generated by the method provided by the application can be controlled within 100K, and the generated play picture is completely lossless in the process of executing playback. In addition, due to the adoption of the structured storage, various related data extraction requirements can be met, and certain data can be extracted rapidly, such as operation fragment data when a user clicks a button.
In another possible implementation, the message digest is generated according to the generated web page operation procedure record data, specifically referring to fig. 9, the steps are as follows:
s901, reading the webpage operation process record data;
s902, a message digest algorithm is applied to generate a message digest for the webpage operation procedure record data.
In this embodiment, the Message digest algorithm in S902, such as the MD5Message digest algorithm (MD 5 Message-DigestAlgorithm), may generate a 128-bit (16-byte) hash value, record data for different web page operations, and the generated hash value (i.e., the generated Message digest) is unique and thus may be used as a unique identifier for the web page operation. On the basis of the generation of the webpage operation record data, the realization mode is applied to generate and store (for example, the block chain is adopted for storage), when the subsequent data is stored and playback is executed, the webpage operation record data which is currently being executed is generated into the message digest, the message digest is compared with the message digest stored when the previous record is executed, namely, the message digest is completely identical, namely, the data is complete and is not tampered, and the integrity of the data can be verified through the message digest.
In combination with the above embodiment, in a specific implementation scenario, a message digest algorithm is used to generate a message digest for sub-item data included in the webpage operation process record data, and the message digest is used to verify the integrity of the sub-item data and establish a separate identifier for the sub-item data; or respectively using a message digest algorithm to the data stored in the server and the data stored in the client to generate a message digest for verifying the integrity of the data stored in one end and establishing an identification for the data of one end. Optionally, the method further comprises generating a new message digest for the message digest by applying a message digest algorithm to a plurality of message digests on the basis of generating the message digest for a plurality of data, and using the new message digest as the message digest of the webpage operation process record data.
The implementation manner provided by the embodiment uses the message digest algorithm to generate the message digest for the webpage operation process record data, is short and easy to store, is convenient for verifying the authenticity and the integrity of the webpage operation process record data and the sub-data contained in the webpage operation process record data, and has the advantage of tamper resistance.
Further, web page operation process record data is generated according to the above embodiments, and the generated message digest is stored using blockchain techniques to generate permanent, non-tamperable web page operation process record data.
In the following, several embodiments are combined with each other to describe an implementation manner of the present invention in the recording of the web page operation process, and referring to fig. 10, the main steps are as follows:
S1001, opening a webpage;
s1002, acquiring the operation environment information of the webpage;
S1003, collecting audio and/or video data of the current external environment;
S1004, collecting basic access data of the webpage;
S1005, monitoring an HTML event;
s1006, judging whether the processing information corresponding to the HTML event comprises a request sent to a server;
S1007, recording the request information and the server return information according to the corresponding relation and generating server request record data;
s1008, generating the HTML event and/or processing information corresponding to the HTML event as a webpage operation instruction;
S1009, recording and adding the webpage operation instruction and the time information of the HTML event to webpage operation instruction sequence data according to the corresponding relation;
S1010, generating webpage operation process record data;
the data involved include: webpage operation instruction sequence data 801, webpage basic access data 802, server request record data 803, running environment data 804, webpage operation process external environment data 805, and webpage operation process record data 806.
In a specific implementation scenario, S1002, S1003, S1004 in this embodiment are optional implementation steps, and may be selected and adopted according to requirements of a web page operation procedure record. The storage manner, storage location, storage property of the related data contents (801 to 806) in this embodiment are not particularly limited, and include, but are not limited to, storage by using a storage manner such as a program variable, a database, a file, a cache, a local storage, etc., and storage at a server side or a client side according to actual requirements, and in addition, temporary storage or permanent storage may be selected, preferably, the web page operation procedure record data 806 is finally generated web page operation procedure record data, and is permanently stored by using a manner such as a file, a database, etc. Preferably, the method for implementing the present application in the web page is packaged by using a JS library, where the JS library is first loaded after the web page is opened in S1001.
In optional step S1002, running environment information of the current web page is obtained, and running environment data 804 is generated based on the information, where the running environment information is further used to set parameters and running modes of the current recording program, and the generated data is further used to set a web page running environment when playback is performed.
In optional step S1003, at the start time of the web page operation process recording, an audio and/or video data acquisition program is started, and the acquired data is generated as web page operation process external environment data 805, preferably, the acquisition of the audio and/or video data is stopped at the end time point of the web page closing or web page operation process recording, and the web page operation process external environment data 805 of the whole process is generated.
Optional step S1004, executed after the first loading or the complete loading of the web page, collects the basic access data of the web page by one of the following ways: and acquiring data sent from a server to a client in the loading process, or reading data stored in a local browser after the webpage is loaded.
After the web page is loaded for the first time, step S1005 is executed, where the HTML event listener is started on the web page, preferably, the listening is directly established on the document of the DOM object of the current web page (i.e. the listening is established on the window).
Based on the monitored HTML event, step S1006 is executed to determine whether the currently executed content interacts with the server (except for the server interaction generated for implementing the method of the present application), for example, whether the execution content corresponding to the monitored HTML event has a form submission, whether a page get mode request is monitored, and so on. In addition, in a specific implementation scenario, the method further comprises judging whether interaction with the server is generated according to whether a WebSocket connection exists or not and whether TCP data transmission exists or not.
When it is determined that there is no interaction with the server, step S1008 is executed to generate the HTML event and/or processing information corresponding to the HTML event as a web page operation instruction; when it is judged that there is an interaction with the server, step S1007 is executed first, and the server request record data 803 is generated, and then the operation of generating the web page operation instruction of step S1008 is executed.
In the above step S1007, the server request record data is generated mainly based on the returned result of the current request to the server, and the data as the query condition for realizing the search of the server request record data includes, but is not limited to, one or more of the request information, the request web address, the request method, the request time, the protocol type, the transmitted data, the web page operation instruction, the HTML event, the processing content corresponding to the HTML event, and the like, which are transmitted to the server. Note that, in the case where it is determined at S1006 that there is an interaction with the server and the generation of the web page operation instruction at step S1008 does not depend on the generation of the server request record data at step S1007, the execution order of step S1007 and step S1008 is not particularly limited. In an alternative embodiment, when step S1006 determines that there is interaction with the server, step S1007 and step S1008 are combined, that is, a web page operation instruction including a return result of the server and/or processing the return result is generated.
According to the web page operation instruction generated in the above step S1008, step S1009 is executed to generate a data record by combining the web page operation instruction with the corresponding time information, and add the data record to the sequence data of the web page operation instruction. The web page operation instruction sequence data is essentially a set.
The steps S1005 to S1009 correspond to the browsing and operation process after the web page loading is completed, and are executed when the HTML event or the web page change is monitored, and are finished when the web page is closed or the web page operation process record is stopped.
Step S1010 is executed to generate web page operation process record data 806 according to the web page basic access data 802, the web page operation instruction sequence data 801, the server request record data 803, the operation environment data 804, and the web page operation process external environment data 805 generated by the above records. Preferably, the generated web page operation procedure record data 806 of step S1010 is permanently stored.
To facilitate an understanding of the methods provided by the several embodiments above, FIG. 13 illustrates one possible web page operation process recording device configuration, the device comprising: the system comprises a webpage operation monitoring module 1301, a webpage operation instruction generation module 1302, a server request processing module 1303, a webpage data acquisition module 1304, a webpage operation process external environment data acquisition module 1305, an operation environment information acquisition module 1306, a data storage module 1307 and a message digest generation module 1308. It will be appreciated by those skilled in the art that the configuration of the web page operation procedure recording apparatus shown in fig. 13 is not limiting of the web page operation procedure recording, and the web page operation procedure recording apparatus provided in the embodiments of the present application may include more or less modules than those shown, or may be combined with some modules, or may be arranged with different modules.
The following describes each constituent module of the web page operation process recording apparatus specifically with reference to fig. 13:
an operation environment information obtaining module 1306, configured to obtain operation environment information of the web page;
the web page operation process external environment data acquisition module 1305 is configured to acquire audio and/or video data of a current external environment and other external environment data through a browser during a web page operation process;
The webpage data acquisition module 1304 is configured to acquire data sent from a server to a client in a first loading process of a webpage, or read data in a local browser after the webpage is loaded, and store the data as webpage base access data;
The webpage operation monitoring module 1301 is configured to monitor an HTML event occurring in a webpage, and call a webpage operation instruction generating module after the HTML event is monitored;
The web page operation instruction generating module 1302 is configured to generate, according to an HTML event occurring in the web page, the HTML event and/or processing information corresponding to the HTML event as a web page operation instruction, and record and add the web page operation instruction and time information of occurrence of the HTML event to web page operation instruction sequence data according to a corresponding relationship;
The server request processing module 1303 is configured to record the request information and the server return information according to a corresponding relationship and generate server request record data, or record the web page operation instruction and the server return information according to a corresponding relationship and generate server request record data when the processing information corresponding to the HTML event includes sending a request to a server;
The data storage module 1307 is configured to store one or more of the webpage operation instruction sequence data, the webpage basic access data, the server request record data, the running environment data, and the webpage operation process external environment data in a structured manner, so as to generate webpage operation process record data; and is further configured to store the message digest information generated by the message digest generation module;
Message digest generation module 1308 is configured to apply a message digest algorithm to generate a message digest according to the web page operation procedure record data stored in the data storage module.
The application also provides a webpage operation process playback method, which is based on webpage operation process record data, plays back webpage browsing and operation processes and restores single-step webpage operation.
FIG. 11 shows a schematic flow diagram of one possible playback of a web page operation process, including the steps of:
S1101, reading webpage operation process record data;
S1102, analyzing the webpage operation process record data to obtain one or more of webpage basic access data, webpage operation instruction sequence data, server request record data, webpage operation environment data and webpage operation process external environment data contained in the webpage operation process record data;
S1103, setting a webpage running environment according to the data contained in the webpage running environment data;
S1104, playing the contained audio and/or video content in the browser according to the external environment data in the webpage operation process;
S1105, displaying a webpage according to the webpage basic access data;
s1106, judging whether the unexecuted instruction in the webpage operation instruction sequence data is empty;
s1107, reading a webpage operation instruction to be executed according to the execution time requirement;
s1108, executing the webpage operation instruction according to the execution time requirement.
In the above, step S1102 analyzes the structure adopted when the web page operation process record data is stored. When the obtained data includes the web page running environment data, step S1103 is executed, optionally, before setting the web page running environment based on the data, the current web page running environment is firstly judged, whether the web page playback requirement is met (generally, the playback of the web page is not completely consistent with the recorded running environment requirement) is judged, when the playback cannot be executed, prompt information is given, otherwise, the web page running environment is set according to the data included in the web page running environment data. When it is determined that the data obtained by the parsing in S1102 includes the external environment data in the web page operation process, step S1104 is executed, and the corresponding playing program is executed according to the external environment data type. When it is determined that the data obtained by parsing in S1102 includes the web page basic access data, step S1105 is executed to display a web page using the data, and optionally, the data content included in the web page basic access data is used to replace the data content in the current web page. The order of execution of the steps S1104 and S1105 is not particularly limited.
The above steps S1101 to S1105 complete the web page initialization portion when the web page is replayed, then, step S1106 is executed to determine whether the web page operation command record in the web page operation command sequence data is empty, and if yes, playback is finished, otherwise, step S1107 is executed to parse and obtain the web page operation command information and time information in the web page operation command record read according to the order of execution, calculate the command execution time required by the record according to the time information, start a timer inside the web page, execute step S1108, and execute the web page operation command according to the specified time point. After each execution of S1108 is completed, the process jumps to step S1106 to execute circularly until all the web page operation instructions are executed. In a specific implementation scenario, step 1108 searches for and obtains a specific webpage element according to the webpage element information included in the webpage operation instruction, executes the webpage operation instruction based on the webpage element, and when the webpage operation instruction is executed and needs to use related data, executes the webpage operation instruction based on the data information required by the webpage operation instruction.
In one possible implementation, the above embodiment step S1107 reads a web page operation instruction, and then executes different processes according to whether the web page operation instruction contains an interaction requirement with the server, please refer to fig. 12, the detailed steps are as follows:
S1201, reading a webpage operation instruction;
S1202, judging when the execution of the webpage operation instruction sends a request to a server;
S1203, capturing a request currently sent to a server;
S1204, acquiring corresponding server request record data based on the current webpage operation instruction or the current request information;
s1205, acquiring server return data contained in the record data from the server request;
S1206, the server return data is used as return data for sending a request to a server at this time, and the return is carried out to the webpage;
s1207, executing the webpage operation instruction according to the execution time requirement.
In the above steps, when it is determined that the current webpage operation instruction needs to interact with the server, a request sent to the original server is captured first, and then corresponding returned content is obtained from the server request record data. The method provided by the embodiment enables the playback of the webpage operation process to be independent of the original server providing the Web service, and the playback can be independently executed.
In another possible implementation manner, when the webpage operation process is recorded, according to the content of interaction with the server and the related execution content, generating webpage operation instructions based on the execution content and the result, thereby avoiding sending a request to the server during playback. For example: in the webpage recording process, the 'total number of orders 10' is currently stored in the server, the button btn is clicked, the 'number of orders 5 this time' is sent to the server, the server processes and returns the 'total number of orders 15', then the result is written into the label1, and the webpage operation instruction content generated in the above operation process is as follows: btn1 plays the click effect, and the number 15 is written in the label 1.
To facilitate an understanding of the methods provided by the several web page operation process playback embodiments above, FIG. 14 illustrates one possible web page operation process playback device architecture, comprising: the system comprises a data reading module 1401, a data analyzing module 1402, a running environment information setting module 1403, a webpage data writing module 1404, a webpage operation instruction execution module 1405, a server request operation execution module 1406, an external environment audio and video data playing module 1407 and a server request proxy service module 1408. It will be appreciated by those skilled in the art that the configuration of the web page operation process playback apparatus shown in fig. 14 is not limiting of the web page operation playback process, and that the web page operation process playback apparatus provided by the embodiments of the present application may include more or less modules than those shown, or may be combined with certain modules, or may be arranged with different modules.
The following describes each constituent module of the playback device for web page operation process specifically with reference to fig. 14:
A data reading module 1401, configured to read webpage operation process record data;
The data analysis module 1402 is configured to analyze the web page operation process record data and the data contained therein, where the web page operation process data includes one or more of web page operation instruction sequence data, the web page basic access data, the server request record data, the operation environment data, and the web page operation process external environment data;
an operation environment information setting module 1403, configured to determine whether the current operation environment meets a playback requirement based on the operation environment data, and set a web page operation environment based on the operation environment data;
a web page data writing module 1404, configured to write web page data in the browser to restore and display a web page based on the web page basic access data;
The webpage operation instruction execution module 1405 is configured to read a data record in the webpage operation instruction sequence data, schedule and generate a call time of the data record according to time information of the data record, and execute a webpage operation instruction included in the data record based on the call time of the data record;
The server request operation executing module 1406 is configured to capture a request currently sent to the server and call a server request proxy service module to process the request when it is determined that the web page operation instruction includes sending a request to the server;
The server request proxy service module 1408 is configured to obtain corresponding server request record data based on a current web page operation instruction or current request information, obtain server return data contained in the server request record data from the server request record data, use the server return data as return data of a request sent to a server at this time, and return the return data to the web page;
And the external environment audio and video data playing module 1407 is used for playing audio and/or video data contained in the external environment data in the webpage operation process.
In a possible implementation manner of the application, the webpage operation procedure recording device and the webpage operation procedure playback device provided by the above embodiments are implemented in combination with a browser, that is, the modules included in the device are partially or completely integrated in the browser or loaded in a browser plug-in manner, and the function of the browser itself can be expanded to generate a "source file" capable of recording the webpage operation browsing procedure, and the "source file" is simultaneously applied to playback.
The embodiment of the application also provides a computer readable storage medium, in which a computer program is stored, which when running on a computer, causes the computer to execute the webpage operation procedure recording and playback method described in the above embodiment.
In addition, an embodiment of the present application further provides a computer program product, where the computer program product includes a computer program, when running on a computer, causes the computer to execute the method for recording and playing back the web page operation procedure described in the foregoing embodiment.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk SolidState Disk), etc.
The foregoing is merely a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the embodiment of the present application, and the changes or substitutions are covered by the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
Claims (9)
1. A web page operation process recording method, which is applied to a web page operation process recording device, the method comprising:
acquiring data sent from a server to a client in the first webpage loading process, or reading data in a local browser after the webpage loading is completed, and recording the data as webpage basic access data;
Based on the HTML event occurring in the webpage, generating the HTML event and/or processing information corresponding to the HTML event as a webpage operation instruction; recording and adding the webpage operation instruction and the time information of the HTML event to webpage operation instruction sequence data according to the corresponding relation;
According to the HTML event occurring in the webpage, when the processing information corresponding to the HTML event is confirmed to be a request sent to a server, recording the request information and the server return information according to the corresponding relation and generating server request record data, or recording the webpage operation instruction and the server return information according to the corresponding relation and generating server request record data;
The webpage basic access data are used as initialization data for playback in the webpage operation process; the webpage operation instruction is used for being called when the webpage is replayed so as to restore the execution effect of the corresponding HTML event; the webpage operation instruction sequence data are used for playing back the webpage operation process, the call time of the data record is generated according to the time information arrangement of the data record based on the data record contained in the webpage operation instruction sequence data, and the webpage operation instruction contained in the data record is executed based on the call time.
2. The method of claim 1, wherein when accessing the web page, further comprising:
Acquiring the operation environment information of the webpage and generating webpage operation environment data;
The webpage running environment information comprises one or more of Web server information, client operating system information, network information, browser information and running environment information, webpage information and geographic position information provided by a browser for a webpage.
3. The method of claim 2, further comprising, during operation of the web page:
And acquiring audio and/or video data of the current external environment through the browser, and generating external environment data in the webpage operation process.
4. A method according to claim 3, further comprising:
And carrying out structural storage on one or more of the webpage operation instruction sequence data, the webpage basic access data, the server request record data, the running environment data and the webpage operation process external environment data to generate webpage operation process record data.
5. The method as recited in claim 4, further comprising:
According to the webpage operation process record data, a message digest algorithm is applied to generate a message digest for the webpage operation process record data; the message abstract is used for verifying the integrity of the data of the webpage operation process and identifying the webpage operation process.
6. A web page operation process playback method, applied to a web page operation process playback apparatus, the method comprising:
Reading webpage operation process record data;
Analyzing the webpage operation process record data to obtain one or more of webpage basic access data, webpage operation instruction sequence data, server request record data, webpage operation environment data and webpage operation process external environment data contained in the webpage operation process record data;
when the analyzed data contains webpage running environment data, judging whether the currently played webpage running environment meets playback requirements according to the data contained in the webpage running environment data, and setting the webpage running environment according to the data contained in the webpage running environment data;
When the analyzed data are determined to contain the external environment data in the webpage operation process, playing the contained audio and/or video content according to the external environment data in the webpage operation process;
when the analyzed data are determined to contain webpage basic access data, displaying a webpage according to the webpage basic access data;
Reading a data record in the webpage operation instruction sequence data, arranging and generating the calling time of the data record according to the time information of the data record, and executing the webpage operation instruction contained in the data record based on the calling time of the data record;
The webpage operation process recording data are generated by a webpage operation process recording device, and the generation process comprises the following steps: when the webpage is loaded for the first time, acquiring data sent from a server to a client in the loading process, or reading data in a local browser after the webpage is loaded, and recording the data as webpage basic access data; based on an HTML event occurring in a webpage, generating the HTML event and/or processing information corresponding to the HTML event as a webpage operation instruction; recording and adding the webpage operation instruction and the time information of the HTML event to webpage operation instruction sequence data according to the corresponding relation; when the processing information corresponding to the HTML event is a request sent to a server, recording the request information and the server return information according to a corresponding relation and generating server request record data, or recording the webpage operation instruction and the server return information according to a corresponding relation and generating server request record data; acquiring the operation environment information of the webpage and generating the webpage operation environment data; collecting audio and/or video data of the current external environment through a browser, and generating external environment data in the webpage operation process; and carrying out structural storage on one or more of the webpage operation instruction sequence data, the webpage basic access data, the server request record data, the running environment data and the webpage operation process external environment data to generate webpage operation process record data.
7. The method of claim 6, wherein when determining that the web page operation instruction comprises sending a request to a server, further comprising:
Capturing a request currently sent to a server;
based on the current webpage operation instruction or the current request information, acquiring corresponding server request record data;
Acquiring server return data contained in the record data from the server request record data;
And taking the server return data as return data for sending the request to the server at this time, and returning to the webpage.
8. A web page operation process recording and playback apparatus, the web page operation process recording apparatus comprising:
the operation environment information acquisition module is used for acquiring operation environment information of the webpage;
The webpage operation process external environment data acquisition module is used for acquiring audio and/or video data of the current external environment through the browser in the webpage operation process;
The webpage data acquisition module is used for acquiring data sent from the server to the client in the first webpage loading process, or reading data in a local browser after webpage loading is completed, and storing the data as webpage basic access data;
the webpage operation monitoring module is used for monitoring an HTML event occurring in a webpage and calling the webpage operation instruction generating module after the HTML event is monitored;
The webpage operation instruction generation module is used for generating the HTML event and/or the processing information corresponding to the HTML event into a webpage operation instruction according to the HTML event occurring in the webpage, and recording and adding the webpage operation instruction and the time information of the HTML event to webpage operation instruction sequence data according to the corresponding relation;
The server request processing module is used for recording the request information and the server return information according to the corresponding relation and generating server request record data when the processing information corresponding to the HTML event comprises a request sent to a server, or recording the webpage operation instruction and the server return information according to the corresponding relation and generating server request record data;
The data storage module is used for carrying out structural storage on one or more of the webpage operation instruction sequence data, the webpage basic access data, the server request record data, the running environment data and the webpage operation process external environment data to generate webpage operation process record data; and is further configured to store the message digest information generated by the message digest generation module;
The message digest generation module is used for generating a message digest by applying a message digest algorithm according to the webpage operation process record data stored by the data storage module;
The webpage operation process playback device comprises:
The data reading module is used for reading the webpage operation process record data;
The data analysis module is used for analyzing the webpage operation process record data and the data contained in the webpage operation process record data, wherein the webpage operation process data comprises one or more of webpage operation instruction sequence data, webpage basic access data, server request record data, operation environment data and webpage operation process external environment data;
The running environment information setting module is used for judging whether the current running environment meets playback requirements or not based on the running environment data, and setting a webpage running environment based on the running environment data;
The webpage data writing module is used for writing webpage data into the browser to restore and display a webpage based on the webpage basic access data;
The webpage operation instruction execution module is used for reading the data record in the webpage operation instruction sequence data, generating the calling time of the data record according to the time information arrangement of the data record, and executing the webpage operation instruction contained in the data record based on the calling time of the data record;
The server request operation execution module is used for capturing a request currently sent to the server when the webpage operation instruction is determined to contain a request sent to the server, and calling the server request proxy service module to process the request;
The server request proxy service module is used for acquiring corresponding server request record data based on a current webpage operation instruction or current request information, acquiring server return data contained in the server request record data from the server request record data, taking the server return data as return data of the current request to the server, and returning the return data to the webpage;
And the external environment audio and video data playing module is used for playing audio and/or video data contained in the external environment data in the webpage operation process.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program when executed by a processor implements the steps of the method according to any one of claims 1 to 5, or the program when executed by a processor implements the steps of the method according to any one of claims 6 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010651352.9A CN112148571B (en) | 2020-07-08 | 2020-07-08 | Webpage operation process recording and playback method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010651352.9A CN112148571B (en) | 2020-07-08 | 2020-07-08 | Webpage operation process recording and playback method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112148571A CN112148571A (en) | 2020-12-29 |
CN112148571B true CN112148571B (en) | 2024-07-02 |
Family
ID=73888248
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010651352.9A Active CN112148571B (en) | 2020-07-08 | 2020-07-08 | Webpage operation process recording and playback method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112148571B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112835776A (en) * | 2021-02-22 | 2021-05-25 | 广州虎牙科技有限公司 | Page event reproduction method, page event acquisition method, page event reproduction device and electronic equipment |
CN113342629B (en) * | 2021-06-08 | 2023-03-07 | 微民保险代理有限公司 | Operation track restoration method and device, computer equipment and storage medium |
CN113821748B (en) * | 2021-09-26 | 2023-11-07 | 杭州米络星科技(集团)有限公司 | Webpage-based data recording method, server, electronic equipment and medium |
CN113987393A (en) * | 2021-10-09 | 2022-01-28 | 上海艺赛旗软件股份有限公司 | Web page operation recorder, system, device and method |
CN115357820B (en) * | 2022-10-17 | 2023-01-13 | 北京大学 | Digital object packaging and entity access method and system based on record playback |
CN117632885B (en) * | 2024-01-25 | 2024-04-16 | 太平金融科技服务(上海)有限公司 | Resource synchronization method, device, equipment and medium in backtracking system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104714948A (en) * | 2013-12-11 | 2015-06-17 | 部落邦(北京)科技有限责任公司 | Method, system and thermodynamic diagram display device for replaying user web page operation behavior |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104951504B (en) * | 2015-05-20 | 2018-08-14 | 深圳创维-Rgb电子有限公司 | A kind of web page processing method and system |
CN106897347B (en) * | 2016-08-15 | 2021-12-24 | 创新先进技术有限公司 | Webpage display method, operation event recording method and device |
CN110324410B (en) * | 2019-06-18 | 2022-04-05 | 中国南方电网有限责任公司 | Method, device, computer equipment and storage medium for initiating webpage request |
-
2020
- 2020-07-08 CN CN202010651352.9A patent/CN112148571B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104714948A (en) * | 2013-12-11 | 2015-06-17 | 部落邦(北京)科技有限责任公司 | Method, system and thermodynamic diagram display device for replaying user web page operation behavior |
Also Published As
Publication number | Publication date |
---|---|
CN112148571A (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112148571B (en) | Webpage operation process recording and playback method and device | |
US10430212B1 (en) | Method for recording, editing and reproduction of computer session | |
US8335848B2 (en) | Method and apparatus for monitoring and synchronizing user interface events with network data | |
US20110066892A1 (en) | Visual test automation tool for message-based applications, web applications and SOA systems | |
US20100058118A1 (en) | Storage medium recording information reacquisition procedure generation program and information reacquisition procedure generation apparatus | |
JP5560180B2 (en) | Operation log collection method and apparatus | |
CN111078519A (en) | Method and device for backtracking abnormal monitoring behaviors and electronic equipment | |
CN108040045B (en) | Access flow file generation method and device, server and storage medium | |
CN114398243A (en) | Backtracking method and system about user operation track | |
CN114692049A (en) | Browser-based screen recording method and device, electronic equipment and storage medium | |
CN103152363B (en) | For the method and system that the self adaptation of state snapshot produces | |
CN113987393A (en) | Web page operation recorder, system, device and method | |
CN112131085B (en) | Method, system and device for recording and playing back internet business process | |
CN113051095B (en) | Method and device for reproducing operation errors of client, electronic equipment and storage medium | |
CN113485909A (en) | Test method, test device, computing device, and medium | |
KR101111956B1 (en) | System for providing substance about monitoring of computing device and method thereof | |
CN117235400A (en) | Unified multi-platform portal system based on Kafka technology | |
CN100410921C (en) | Apparatus and method for reproducing content and information storage medium therefor | |
JP2007200047A (en) | Access log-displaying system and method | |
CN116484137A (en) | Data recovery method and device, electronic equipment and storage medium | |
Horsman et al. | A forensic exploration of the Microsoft Windows 10 timeline | |
CN109101429A (en) | A kind of method and device of the browser page debugging of set-top box | |
CN114022116A (en) | On-cloud inspection law enforcement evidence collection method and device based on browser | |
Engelhardt | Smart speaker forensics | |
CN107749892B (en) | Network reading method and device for conference record, intelligent tablet and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Country or region after: China Address after: 266041 room 602, unit 3, building 19, Jingyuan xinju, 1046 Jinshui Road, Licang District, Qingdao City, Shandong Province Applicant after: Qingdao Huazi Biotechnology Co.,Ltd. Address before: 266041 room 602, unit 3, building 19, Jingyuan xinju, 1046 Jinshui Road, Licang District, Qingdao City, Shandong Province Applicant before: Qingdao Window Technology Co.,Ltd. Country or region before: China |
|
GR01 | Patent grant |