CN113657076A - Page operation record table generation method and device, electronic equipment and storage medium - Google Patents
Page operation record table generation method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113657076A CN113657076A CN202110942933.2A CN202110942933A CN113657076A CN 113657076 A CN113657076 A CN 113657076A CN 202110942933 A CN202110942933 A CN 202110942933A CN 113657076 A CN113657076 A CN 113657076A
- Authority
- CN
- China
- Prior art keywords
- page
- module
- dynamic
- static
- record table
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000003068 static effect Effects 0.000 claims abstract description 119
- 230000008859 change Effects 0.000 claims abstract description 59
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012163 sequencing technique Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 9
- 238000007726 management method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/117—Tagging; Marking up; Designating a block; Setting of attributes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
- G06F40/143—Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/174—Form filling; Merging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
- G06F40/18—Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the field of cloud storage, and discloses a method for generating a page operation record table, which comprises the following steps: creating a webpage snapshot of the operation page by using the DOM tree of the operation page; setting a dynamic identifier for a dynamic module in the DOM tree and setting a static identifier for a static module in the DOM tree according to the attribute identifier of the DOM tree; replacing a static module in the webpage snapshot with a static identifier to obtain a target snapshot; when the operation page is detected to be changed, a change timestamp is generated, and a dynamic module which is changed in the operation page is positioned; acquiring a dynamic identifier of a dynamic module which is changed, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identifier; and combining the operation log and the target snapshot to obtain a page operation record table. The invention also provides a device and equipment for generating the page operation record table and a readable storage medium. The invention can reduce the cost of uploading and storing the webpage data.
Description
Technical Field
The invention relates to the field of cloud storage, in particular to a method and a device for generating a page operation record table, electronic equipment and a storage medium.
Background
With the rapid development of internet technology, many businesses or transactions in people's daily life are developed on the internet, for example: application of insurance, shopping, etc. Thus, it is becoming increasingly important to record user actions on the network.
The current operation of recording the user on the network is mainly to report all contents in the whole page operated by the user when the user opens the network operation page. However, when the operation record is uploaded by the scheme, the content of the static module and the content of the dynamic module in the page are indiscriminately reported, so that the transmission and storage capacity of data are increased. As the cardinality of the user is greater, the transmission and storage costs required are also higher, greatly expending resources.
Disclosure of Invention
The invention provides a method and a device for generating a page operation record table, electronic equipment and a computer readable storage medium, and mainly aims to reduce the uploading and storing cost of data and save resources.
In order to achieve the above object, a method for generating a page operation record table provided by the present invention includes:
acquiring a DOM tree of an operation page, and creating a webpage snapshot of the operation page by using the DOM tree;
splitting the operation page into a static module set and a dynamic module set according to the attribute identification of each node in the DOM tree;
setting a dynamic identifier for each dynamic module in the dynamic module set, and setting a static identifier for each static module in the static module set;
replacing a corresponding static module in the webpage snapshot with the static identifier to obtain a target snapshot;
when the operation page is detected to be changed, generating a change timestamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the dynamic module which is changed, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identifier;
and combining the operation log and the target snapshot to obtain a page operation record table.
Optionally, the setting a dynamic identifier for each dynamic module in the dynamic module set and setting a static identifier for each static module in the static module set includes:
respectively sequencing the static modules and the dynamic modules according to the positions of the static modules and the dynamic modules in the DOM tree;
and setting a static identifier for the static module and a dynamic identifier for the dynamic module according to the sequence of the static module and the dynamic module.
Optionally, the generating an operation log by using the change content, the change timestamp, and the dynamic identifier includes:
executing the duplicate removal operation on the changed contents of all the dynamic modules by using the dynamic identification;
and time calibration is carried out on the changed content after the duplication is removed by utilizing the change timestamp to obtain the operation log.
Optionally, the creating, by using the DOM tree, a web page snapshot of the operation page includes:
traversing the node state of each node of the DOM tree to obtain the webpage instantaneous state of the operation page;
and generating the web page snapshot according to the web page instantaneous state.
Optionally, the combining the operation log and the target snapshot to obtain a page operation record table includes:
constructing field columns for filling the operation logs and the target snapshot to obtain a blank record table;
and filling the operation log and the target snapshot into the blank record table to obtain the page operation record table.
Optionally, after obtaining the page operation record table, the method further includes:
receiving a page backtracking instruction, and extracting a static identifier in the target snapshot according to the page backtracking instruction;
replacing the static identifier with a static module corresponding to the extracted static identifier to obtain the webpage snapshot, and rebuilding a DOM tree according to the webpage snapshot;
and reproducing the operation log in the DOM tree to obtain a backtracking page.
Optionally, the replaying the operation log in the DOM tree to obtain a backtracking page includes:
sorting the changed contents in the operation log according to the time sequence by using the changed time stamp to obtain a changed queue;
and sequentially extracting the changed contents in the change queue, and reproducing the changed contents in the DOM tree to obtain a backtracking page.
In order to solve the above problem, the present invention further provides a device for generating a page operation record table, where the device includes:
the DOM tree splitting module is used for acquiring a DOM tree of an operation page, creating a webpage snapshot of the operation page by using the DOM tree, and splitting the operation page into a static module set and a dynamic module set according to the attribute identification of each node in the DOM tree;
the page module identification module is used for setting a dynamic identification for each dynamic module in the dynamic module set and setting a static identification for each static module in the static module set;
the target snapshot generating module is used for replacing a corresponding static module in the webpage snapshot with the static identifier to obtain a target snapshot;
the operation log generation module is used for generating a change timestamp when detecting that the operation page is changed, positioning the changed dynamic module in the operation page, acquiring a dynamic identifier of the changed dynamic module, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identifier;
and the page operation record table generating module is used for combining the operation log and the target snapshot to obtain a page operation record table.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and the processor executes the computer program stored in the memory to realize the generation method of the page operation record table.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the above method for generating a page operation record table.
The operation page is divided into a static module and a dynamic module, the static identification of the static module is used for replacing the static module in the webpage snapshot to obtain the target snapshot, an operation log is generated through the change content, the change timestamp and the dynamic identification corresponding to the changed dynamic module, and the page operation record table is obtained according to the combination of the target snapshot and the operation log. When the method, the device, the electronic equipment and the storage medium for generating the page operation record table are used for uploading and storing the page operation record, the static module is replaced by the static identifier, so that the problem of high data uploading and storing pressure of a system is solved, the data uploading and storing cost is reduced, and resources are saved.
Drawings
Fig. 1 is a schematic flowchart of a method for generating a page operation record table according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of an apparatus for generating a page operation record table according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an internal structure of an electronic device for generating a page operation record table according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a method for generating a page operation record table. The execution subject of the method for generating the page operation record table includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for generating the page operation record table may be executed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server side can be an independent server, and can also be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data and an artificial intelligence platform.
Referring to fig. 1, which is a schematic flow chart of a method for generating a page operation record table according to an embodiment of the present invention, in an embodiment of the present invention, the method for generating a page operation record table includes:
s1, acquiring a DOM tree of an operation page, and creating a web page snapshot of the operation page by using the DOM tree;
in the embodiment of the present invention, the DOM tree refers to a tree structure of a Document Object Model (DOM for short) of the operation page, the DOM tree provides an access Model for the entire operation page, the operation page is taken as a tree structure, and each node of the tree represents an HTML tag or a text item in the tag. The web page snapshot is a backup of web pages which are captured by the search engine and cached in the server when the search engine collects the web pages.
In this embodiment of the present invention, the creating a web page snapshot of the operation page using the DOM tree includes:
traversing the node state of each node of the DOM tree to obtain the webpage instantaneous state of the operation page;
and generating the web page snapshot according to the web page instantaneous state.
In one embodiment of the present invention, before the obtaining the DOM tree of the operation page, the method further includes:
receiving a page operation instruction input by a user;
and analyzing the page operation instruction to obtain an operation page.
In the embodiment of the present invention, the page operation instruction is an instruction that needs to change content in a page and is input by a user, for example: page jump instructions, input text instructions, option determination instructions, and the like.
In detail, the page operation instruction includes information of a target page operated by the page operation instruction, and a corresponding operation page can be acquired by analyzing the page operation instruction.
S2, splitting the operation page into a static module set and a dynamic module set according to the attribute identification of each node in the DOM tree;
the attribute identifier is used for identifying a dynamic or static attribute corresponding to each tree node of the DOM tree, and can be divided according to a service scene when a page is developed.
Wherein the static module set refers to a set of all modules of the operation page which do not change in a certain period. For example: FLASH animation, characters, images, etc. The dynamic module set refers to a set of all modules which are changed correspondingly according to the operation of a user in a certain period of time in the operation page. For example: animation in a web page, content in a text entry box, etc.
S3, setting a dynamic identifier for each dynamic module in the dynamic module set, and setting a static identifier for each static module in the static module set;
in the embodiment of the invention, the static modules and the dynamic modules are respectively sequenced according to the positions of the static modules and the dynamic modules in the DOM tree; and setting a static identifier for the static module and a dynamic identifier for the dynamic module according to the sequence of the static module and the dynamic module.
In detail, the static modules and the dynamic modules may be sorted from top to bottom and from left to right, and the static modules and the dynamic modules may be set with identifiers by using a method of self-increment of the combined IDs of the sorted static modules and dynamic modules. For example: if the first module after sorting is a static module and the second module is a dynamic module, the identifier of the first module may be a static identifier JT0001, and the identifier of the second module may be a dynamic identifier DT 0002.
S4, replacing the corresponding static module in the web page snapshot with the static identification to obtain a target snapshot;
in the embodiment of the present invention, the target snapshot is a snapshot obtained by replacing a static module in the web page snapshot with the static identifier.
In detail, in the embodiment of the present invention, the obtaining a target snapshot by replacing a corresponding static module in the web page snapshot with the static identifier includes:
constructing a static identification comparison table according to the corresponding relation between the static module and the static identification;
and matching the static module in the web page snapshot with the static module in the static identification comparison table, extracting the static identification corresponding to the static module in the web page snapshot, and replacing the static module with the static identification to obtain the target snapshot.
S5, generating a change timestamp when detecting that the operation page is changed, and positioning a dynamic module which is changed in the operation page;
in the embodiment of the present invention, the change timestamp is a time point when the page operation instruction is received. Furthermore, the embodiment of the invention positions the changed dynamic module by analyzing the changed operation page.
S6, acquiring the dynamic identification of the changed dynamic module, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identification;
in the embodiment of the present invention, the operation log is a record table for recording change content, a change timestamp, and a dynamic identifier corresponding to the dynamic module.
In this embodiment of the present invention, the generating an operation log by using the change content, the change timestamp, and the dynamic identifier includes:
executing the duplicate removal operation on the changed contents of all the dynamic modules by using the dynamic identification;
and time calibration is carried out on the changed content after the duplication is removed by utilizing the change timestamp to obtain the operation log.
In the embodiment of the invention, the deduplication operation is to perform deduplication on the changed content, and eliminate repeated interaction generated when the dynamic module interacts. For example: the operation one is to create a dynamic module A, add the dynamic module A to the DOM tree, create a dynamic module B, and add the dynamic module B to the dynamic module A. And operation two is to create a dynamic module A and a dynamic module B, add the dynamic module B to the dynamic module A, and then add the dynamic module A to the DOM tree. Operation one and operation two will produce the same DOM tree structure, but operation one will produce the node change record of two DOM trees, namely add dynamic module A and dynamic module B, operation two will produce the node change record of one DOM tree, namely add dynamic module A. And the second operation is the duplicate removal of the first operation.
And S7, combining the operation log and the target snapshot to obtain a page operation record table.
In the embodiment of the present invention, the page operation record table is a record table for recording a corresponding relationship between the operation log and the target snapshot. For example: and if the operation log A is operated under the DOM tree corresponding to the target snapshot B, the operation log A and the target snapshot B have a corresponding relation.
In this embodiment of the present invention, the combining the operation log and the target snapshot to obtain a page operation record table includes:
constructing field columns for filling the operation logs and the target snapshot to obtain a blank record table;
and filling the operation log and the target snapshot into the blank record table to obtain the page operation record table.
In another embodiment of the present invention, after obtaining the page operation record table, if the user needs to play back the changed content of the operation page, after obtaining the page operation record table, the method further includes:
receiving a page backtracking instruction, and extracting a static identifier in the target snapshot according to the page backtracking instruction;
replacing the static identifier with a static module corresponding to the extracted static identifier to obtain the webpage snapshot, and rebuilding a DOM tree according to the webpage snapshot;
and reproducing the operation log in the DOM tree to obtain a backtracking page.
In the embodiment of the present invention, the backtracking page refers to a page for playing back the changed content of the operation page.
In this embodiment of the present invention, the retrieving the operation log in the DOM tree to obtain a backtracking page includes:
sorting the changed contents in the operation log according to the time sequence by using the changed time stamp to obtain a changed queue;
and sequentially extracting the changed contents in the change queue, and reproducing the changed contents in the DOM tree to obtain a backtracking page.
In the embodiment of the invention, the operation page is divided into the static module and the dynamic module, the static identification of the static module is used for replacing the static module in the webpage snapshot to obtain the target snapshot, the operation log is generated through the change content, the change timestamp and the dynamic identification corresponding to the changed dynamic module, and the page operation record list is obtained according to the combination of the target snapshot and the operation log. When the method, the device, the electronic equipment and the storage medium for generating the page operation record table are used for uploading and storing the page operation record, the static module is replaced by the static identifier, so that the problem of high data uploading and storing pressure of a system is solved, the data uploading and storing cost is reduced, and resources are saved.
Fig. 2 is a functional block diagram of the apparatus for generating a page operation record table according to the present invention.
The apparatus 100 for generating a page operation record table according to the present invention may be installed in an electronic device. According to the implemented functions, the apparatus 100 for generating a page operation record table may include a DOM tree splitting module 101, a page module identification module 102, a target snapshot generating module 103, an operation log generating module 104, and a page operation record table generating module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the DOM tree splitting module 101 is configured to obtain a DOM tree of an operation page, create a web page snapshot of the operation page using the DOM tree, and split the operation page into a static module set and a dynamic module set according to an attribute identifier of each node in the DOM tree;
the page module identifier module 102 is configured to set a dynamic identifier for each dynamic module in the dynamic module set, and set a static identifier set for each static module in the static module set;
the target snapshot generating module 103 is configured to replace a corresponding static module in the web page snapshot with the static identifier to obtain a target snapshot;
the operation log generating module 104 is configured to generate a change timestamp when detecting that the operation page is changed, locate a changed dynamic module in the operation page, obtain a dynamic identifier of the changed dynamic module, record change content of the dynamic module, and generate an operation log by using the change content, the change timestamp, and the dynamic identifier;
the page operation record table generating module 105 is configured to combine the operation log and the target snapshot to obtain a page operation record table.
Each module in the apparatus 100 for generating a page operation record table according to the embodiment of the present invention can use the same method as the method for generating a page operation record table shown in fig. 1, and specific implementation steps are not described herein again, and technical effects generated by functions of each module/unit are the same as those of the method for generating a page operation record table shown in fig. 1.
Fig. 3 is a schematic structural diagram of an electronic device for generating a page operation record table according to the present invention.
The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a generation program of a page operation record table.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (for example, executing a program for generating a page operation record table, etc.) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a program for generating a page operation record table, but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the electronic device may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The page operation record table generating program stored in the memory 11 of the electronic device is a combination of a plurality of computer programs, and when running in the processor 10, can realize:
acquiring a DOM tree of an operation page, and creating a webpage snapshot of the operation page by using the DOM tree;
splitting the operation page into a static module set and a dynamic module set according to the attribute identification of each node in the DOM tree;
setting a dynamic identifier for each dynamic module in the dynamic module set, and setting a static identifier for each static module in the static module set;
replacing a corresponding static module in the webpage snapshot with the static identifier to obtain a target snapshot;
when the operation page is detected to be changed, generating a change timestamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the dynamic module which is changed, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identifier;
and combining the operation log and the target snapshot to obtain a page operation record table.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring a DOM tree of an operation page, and creating a webpage snapshot of the operation page by using the DOM tree;
splitting the operation page into a static module set and a dynamic module set according to the attribute identification of each node in the DOM tree;
setting a dynamic identifier for each dynamic module in the dynamic module set, and setting a static identifier for each static module in the static module set;
replacing a corresponding static module in the webpage snapshot with the static identifier to obtain a target snapshot;
when the operation page is detected to be changed, generating a change timestamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the dynamic module which is changed, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identifier;
and combining the operation log and the target snapshot to obtain a page operation record table.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any accompanying claims should not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A method for generating a page operation record table is characterized by comprising the following steps:
acquiring a DOM tree of an operation page, and creating a webpage snapshot of the operation page by using the DOM tree;
splitting the operation page into a static module set and a dynamic module set according to the attribute identification of each node in the DOM tree;
setting a dynamic identifier for each dynamic module in the dynamic module set, and setting a static identifier for each static module in the static module set;
replacing a corresponding static module in the webpage snapshot with the static identifier to obtain a target snapshot;
when the operation page is detected to be changed, generating a change timestamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the dynamic module which is changed, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identifier;
and combining the operation log and the target snapshot to obtain a page operation record table.
2. The method for generating a page operation record table according to claim 1, wherein the setting of the dynamic identifier for each dynamic module in the dynamic module set and the setting of the static identifier for each static module in the static module set comprises:
respectively sequencing the static modules and the dynamic modules according to the positions of the static modules and the dynamic modules in the DOM tree;
and setting a static identifier for the static module and a dynamic identifier for the dynamic module according to the sequence of the static module and the dynamic module.
3. The method for generating page operation record table according to claim 1, wherein said generating operation log by using said change content, change time stamp and said dynamic identification comprises:
executing the duplicate removal operation on the changed contents of all the dynamic modules by using the dynamic identification;
and time calibration is carried out on the changed content after the duplication is removed by utilizing the change timestamp to obtain the operation log.
4. The method for generating page operation record table according to claim 1, wherein said creating a web page snapshot of said operation page using said DOM tree comprises:
traversing the node state of each node of the DOM tree to obtain the webpage instantaneous state of the operation page;
and generating the web page snapshot according to the web page instantaneous state.
5. The method for generating a page operation record table according to claim 1, wherein the combining the operation log and the target snapshot to obtain a page operation record table comprises:
constructing field columns for filling the operation logs and the target snapshot to obtain a blank record table;
and filling the operation log and the target snapshot into the blank record table to obtain the page operation record table.
6. The method for generating a page operation record table according to claim 1, after obtaining the page operation record table, the method further comprising:
receiving a page backtracking instruction, and extracting a static identifier in the target snapshot according to the page backtracking instruction;
replacing the static identifier with a static module corresponding to the extracted static identifier to obtain the webpage snapshot, and rebuilding a DOM tree according to the webpage snapshot;
and reproducing the operation log in the DOM tree to obtain a backtracking page.
7. The method for generating a page operation record table according to claim 6, wherein the retrieving the operation log in the DOM tree to obtain a backtracking page comprises:
sorting the changed contents in the operation log according to the time sequence by using the changed time stamp to obtain a changed queue;
and sequentially extracting the changed contents in the change queue, and reproducing the changed contents in the DOM tree to obtain a backtracking page.
8. An apparatus for generating a page operation record table, the apparatus comprising:
the DOM tree splitting module is used for acquiring a DOM tree of an operation page, creating a webpage snapshot of the operation page by using the DOM tree, and splitting the operation page into a static module set and a dynamic module set according to the attribute identification of each node in the DOM tree;
the page module identification module is used for setting a dynamic identification for each dynamic module in the dynamic module set and setting a static identification for each static module in the static module set;
the target snapshot generating module is used for replacing a corresponding static module in the webpage snapshot with the static identifier to obtain a target snapshot;
the operation log generation module is used for generating a change timestamp when detecting that the operation page is changed, positioning the changed dynamic module in the operation page, acquiring a dynamic identifier of the changed dynamic module, recording the change content of the dynamic module, and generating an operation log by using the change content, the change timestamp and the dynamic identifier;
and the page operation record table generating module is used for combining the operation log and the target snapshot to obtain a page operation record table.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores computer program instructions executable by the at least one processor to enable the at least one processor to perform a method of generating a page operation record table according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for generating a page operation record table according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110942933.2A CN113657076B (en) | 2021-08-17 | 2021-08-17 | Page operation record table generation method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110942933.2A CN113657076B (en) | 2021-08-17 | 2021-08-17 | Page operation record table generation method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113657076A true CN113657076A (en) | 2021-11-16 |
CN113657076B CN113657076B (en) | 2023-08-22 |
Family
ID=78480044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110942933.2A Active CN113657076B (en) | 2021-08-17 | 2021-08-17 | Page operation record table generation method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113657076B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101984429A (en) * | 2010-11-04 | 2011-03-09 | 百度在线网络技术(北京)有限公司 | Method and device for acquiring destination page, search engine and browser |
JP2011128968A (en) * | 2009-12-18 | 2011-06-30 | Accelia Inc | Server device for providing web page, terminal device, web server device, program, and web page data |
CN102880607A (en) * | 2011-07-15 | 2013-01-16 | 舆情(香港)有限公司 | Dynamic network content grabbing method and dynamic network content crawler system |
US20130125143A1 (en) * | 2010-08-09 | 2013-05-16 | Hitachi Ltd. | Method and system for recording operations in a web application |
US20160026611A1 (en) * | 2014-07-25 | 2016-01-28 | Qualcomm Incorporated | Fast rendering of websites containing dynamic content and stale content |
US20170031871A1 (en) * | 2014-09-29 | 2017-02-02 | Yandex Europe Ag | Method of and system for processing content of a web resource in a browser application |
CN111783000A (en) * | 2020-06-30 | 2020-10-16 | 中国工商银行股份有限公司 | Portal website staticizing processing method and device |
CN111818123A (en) * | 2020-05-28 | 2020-10-23 | 中国平安财产保险股份有限公司 | Network front-end remote playback method, device, equipment and storage medium |
CN112148573A (en) * | 2020-09-21 | 2020-12-29 | 青岛窗外科技有限公司 | Method and device for recording and playing back webpage operation process |
CN112445757A (en) * | 2020-09-08 | 2021-03-05 | 微民保险代理有限公司 | Visual log storage and backtracking method and device and computer equipment |
-
2021
- 2021-08-17 CN CN202110942933.2A patent/CN113657076B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011128968A (en) * | 2009-12-18 | 2011-06-30 | Accelia Inc | Server device for providing web page, terminal device, web server device, program, and web page data |
US20130125143A1 (en) * | 2010-08-09 | 2013-05-16 | Hitachi Ltd. | Method and system for recording operations in a web application |
CN101984429A (en) * | 2010-11-04 | 2011-03-09 | 百度在线网络技术(北京)有限公司 | Method and device for acquiring destination page, search engine and browser |
CN102880607A (en) * | 2011-07-15 | 2013-01-16 | 舆情(香港)有限公司 | Dynamic network content grabbing method and dynamic network content crawler system |
US20160026611A1 (en) * | 2014-07-25 | 2016-01-28 | Qualcomm Incorporated | Fast rendering of websites containing dynamic content and stale content |
US20170031871A1 (en) * | 2014-09-29 | 2017-02-02 | Yandex Europe Ag | Method of and system for processing content of a web resource in a browser application |
CN111818123A (en) * | 2020-05-28 | 2020-10-23 | 中国平安财产保险股份有限公司 | Network front-end remote playback method, device, equipment and storage medium |
CN111783000A (en) * | 2020-06-30 | 2020-10-16 | 中国工商银行股份有限公司 | Portal website staticizing processing method and device |
CN112445757A (en) * | 2020-09-08 | 2021-03-05 | 微民保险代理有限公司 | Visual log storage and backtracking method and device and computer equipment |
CN112148573A (en) * | 2020-09-21 | 2020-12-29 | 青岛窗外科技有限公司 | Method and device for recording and playing back webpage operation process |
Also Published As
Publication number | Publication date |
---|---|
CN113657076B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111651453B (en) | User history behavior query method and device, electronic equipment and storage medium | |
CN114185776A (en) | Big data point burying method, device, equipment and medium for application program | |
CN114386509A (en) | Data fusion method and device, electronic equipment and storage medium | |
CN114398194A (en) | Data collection method and device, electronic equipment and readable storage medium | |
CN114138784A (en) | Information tracing method and device based on storage library, electronic equipment and medium | |
CN113282854A (en) | Data request response method and device, electronic equipment and storage medium | |
CN114547696A (en) | File desensitization method and device, electronic equipment and storage medium | |
CN113722533A (en) | Information pushing method and device, electronic equipment and readable storage medium | |
CN111538768A (en) | Data query method and device based on N-element model, electronic equipment and medium | |
CN113657076B (en) | Page operation record table generation method and device, electronic equipment and storage medium | |
CN114911479A (en) | Interface generation method, device, equipment and storage medium based on configuration | |
CN114547010A (en) | Data analysis method and device, electronic equipment and storage medium | |
CN114185588A (en) | Incremental package generation method, device, equipment and storage medium | |
CN114840388A (en) | Data monitoring method and device, electronic equipment and storage medium | |
CN114518993A (en) | System performance monitoring method, device, equipment and medium based on business characteristics | |
CN112686759A (en) | Account checking monitoring method, device, equipment and medium | |
CN115543214B (en) | Data storage method, device, equipment and medium in low-delay scene | |
CN113672483B (en) | Device log storage method and device, electronic device and medium | |
CN113360505B (en) | Time sequence data-based data processing method and device, electronic equipment and readable storage medium | |
CN116414708A (en) | Project testing method and device, electronic equipment and storage medium | |
CN114491007A (en) | Data exposure method, device, equipment and storage medium | |
CN114238278A (en) | Data partitioning method and device, electronic equipment and storage medium | |
CN115017054A (en) | Data synchronization test method and device, electronic equipment and storage medium | |
CN115658781A (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN115480842A (en) | Secondary development service method and device for product application, electronic equipment 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |