CN113657076B - 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
- CN113657076B CN113657076B CN202110942933.2A CN202110942933A CN113657076B CN 113657076 B CN113657076 B CN 113657076B CN 202110942933 A CN202110942933 A CN 202110942933A CN 113657076 B CN113657076 B CN 113657076B
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 230000003068 static effect Effects 0.000 claims abstract description 121
- 230000008859 change Effects 0.000 claims abstract description 58
- 238000004590 computer program Methods 0.000 claims description 12
- 230000001052 transient effect Effects 0.000 claims description 6
- 238000012163 sequencing technique Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000007 visual 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
- 238000000802 evaporation-induced self-assembly Methods 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
- 230000008569 process Effects 0.000 description 1
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 application 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 utilizing the DOM tree of the operation page; setting a dynamic identifier for a dynamic module in a DOM tree and 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 the static identification to obtain a target snapshot; when detecting that the operation page is changed, generating a change time stamp, and positioning a dynamic module which is changed in the operation page; 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 time stamp and the dynamic identifier; and combining the operation log with the target snapshot to obtain a page operation record table. The application also provides a device and equipment for generating the page operation record table and a readable storage medium. The application can reduce the cost of uploading and storing the webpage data.
Description
Technical Field
The present application relates to the field of cloud storage, and in particular, to a method and apparatus for generating a page operation record table, an electronic device, and a storage medium.
Background
With the rapid development of internet technology, many businesses or transactions in daily life of people are performed on a network, for example: application, shopping, etc. Thus, it is becoming increasingly important to record the user's operations on the network.
The current record of the operation of the user on the network is mainly that when the user opens a network operation page, all contents in the whole page operated by the user are reported. However, when the scheme uploads the operation record, the content of the static module and the dynamic module in the page are reported indiscriminately, so that the data transmission and the storage capacity are increased. The more cardinality of a user, the higher the transmission and storage costs required, which is a significant resource drain.
Disclosure of Invention
The application provides a method, a device, electronic equipment and a computer readable storage medium for generating a page operation record table, which mainly aim to reduce the uploading and saving cost of data and save resources.
In order to achieve the above object, the present application provides a method for generating a page operation record table, including:
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 detecting that the operation page is changed, generating a change time stamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the changed dynamic module, recording the changed content of the dynamic module, and generating an operation log by using the changed content, the changed time stamp and the dynamic identifier;
and combining the operation log with 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:
sequencing the static module and the dynamic module according to the positions of the static module and the dynamic module in the DOM tree;
and setting a static identifier for the static module and a dynamic identifier for the dynamic module according to the ordering 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:
performing deduplication operation on the changed contents generated by all the dynamic modules by utilizing the dynamic identifiers;
and performing time calibration on the duplicate-removed change content by using the change time stamp to obtain the operation log.
Optionally, the creating, using the DOM tree, a web page snapshot of the operation page includes:
traversing the node states of all nodes of the DOM tree to obtain the web page transient state of the operation page;
and generating the webpage snapshot according to the webpage transient state.
Optionally, the combining the operation log with the target snapshot to obtain a page operation record table includes:
constructing a field column for filling the operation log 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 the 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 by using the static module corresponding to the extracted static identifier to obtain the webpage snapshot, and reconstructing a DOM tree according to the webpage snapshot;
and reproducing the operation log in the DOM tree to obtain a backtracking page.
Optionally, the reproducing the operation log in the DOM tree to obtain a backtracking page includes:
sorting the change content in the operation log according to the time sequence by utilizing the change time stamp to obtain a change queue;
and sequentially extracting the change contents in the change queue, and reproducing the change contents in the DOM tree to obtain a backtracking page.
In order to solve the above problem, the present application further provides a method and apparatus for generating a page operation record table, where the apparatus includes:
the system comprises a DOM tree splitting module, a static module set and a dynamic module set, wherein 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 utilizing the DOM tree, and splitting the operation page into the static module set and the dynamic module set according to the attribute identification of each node in the DOM tree;
the page module identification module is used for setting dynamic identifications for each dynamic module in the dynamic module set and setting static identifications 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 by the static identification to obtain a target snapshot;
the operation log generation module is used for generating a change time stamp when the operation page is detected to be changed, 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 time stamp and the dynamic identifier;
and the page operation record table generation module is used for combining the operation log with the target snapshot to obtain a page operation record table.
In order to solve the above-mentioned problems, the present application also provides an electronic apparatus 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-described problems, the present application also provides a computer-readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-described page operation record table generation method.
The method comprises the steps of dividing an operation page into a static module and a dynamic module, replacing the static module in the webpage snapshot by utilizing a static identification of the static module, obtaining the target snapshot, generating an operation log by changing contents, a changing timestamp and a dynamic identification corresponding to the changed dynamic module, and obtaining the page operation record table according to the combination of the target snapshot and the operation log. By using the method, the device, the electronic equipment and the storage medium for generating the page operation record table, which are disclosed by the embodiment of the application, when uploading and saving the page operation record, the static module is replaced by the static identifier, so that the problem of high pressure of uploading and saving data of a system is solved, the cost of uploading and saving the data is reduced, and resources are saved.
Drawings
FIG. 1 is a flowchart illustrating a method for generating a page operation record table according to an embodiment of the present application;
FIG. 2 is a schematic block diagram of an apparatus for generating a page operation record table according to an embodiment of the present application;
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 application;
the achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a method for generating a page operation record table. The execution main body of the page operation record table generation method includes, but is not limited to, at least one of a server side, a terminal and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the method for generating the page operation record table may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flowchart of a method for generating a page operation record table according to an embodiment of the present application is shown, where in the embodiment of the present application, the method for generating a page operation record table includes:
s1, acquiring a DOM tree of an operation page, and creating a webpage snapshot of the operation page by using the DOM tree;
in the embodiment of the application, the DOM tree refers to a tree structure of a document object model (Document Object Model DOM for short) of the operation page, the DOM tree provides an access model for the whole operation page, the operation page is used as a tree structure, and each node of the tree represents an HTML tag or text item in the tag. The web page snapshot is a backup of web pages which are cached in the server by capturing web page contents when the search engine records the web pages.
In the embodiment of the present application, the creating the web page snapshot of the operation page by using the DOM tree includes:
traversing the node states of all nodes of the DOM tree to obtain the web page transient state of the operation page;
and generating the webpage snapshot according to the webpage transient state.
In one embodiment of the present application, 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 application, the page operation instruction is an instruction input by a user that needs to change the content in the page, for example: page jump instructions, input text instructions, option determination instructions, etc.
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 obtained 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 dynamic or static attributes corresponding to each tree node of the DOM tree, and can be divided according to service scenes when developing pages.
Wherein the static module set refers to a set of all modules that exist in the operation page and do not change in a certain period. For example: FLASH animation, text, images, etc. The dynamic module set refers to a set of all modules which exist in the operation page and can be changed correspondingly according to the operation of a user in a certain period. For example: animation in a web page, content in a text input box, and the like.
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 application, the static module and the dynamic module are respectively sequenced according to the positions of the static module and the dynamic module in the DOM tree; and setting a static identifier for the static module and a dynamic identifier for the dynamic module according to the ordering of the static module and the dynamic module.
In detail, the static modules and the dynamic modules may be sequenced from top to bottom and from left to right, and the static modules and the dynamic modules after sequencing may be combined with ID self-increasing mode to set identifiers for the static modules and the dynamic modules. For example: the first module after sequencing is a static module, the second module is a dynamic module, the identifier of the first module can be a static identifier JT0001, and the identifier of the second module can be a dynamic identifier DT0002.
S4, replacing a corresponding static module in the webpage snapshot by using the static identifier to obtain a target snapshot;
in the embodiment of the application, the target snapshot is a snapshot obtained by replacing a static module in the webpage snapshot with the static identifier.
In detail, in the embodiment of the present application, the replacing the corresponding static module in the web page snapshot with the static identifier to obtain the target snapshot 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 webpage snapshot with the static module in the static identification comparison table, extracting a static identification corresponding to the static module in the webpage snapshot, and replacing the static module with the static identification to obtain the target snapshot.
S5, when the operation page is detected to be changed, generating a change time stamp, and positioning a dynamic module which is changed in the operation page;
in the embodiment of the application, the change time stamp is the time point when the page operation instruction is received. Further, the embodiment of the application locates the changed dynamic module by analyzing the changed operation page.
S6, acquiring the dynamic identification of the changed dynamic module, recording the changed content of the dynamic module, and generating an operation log by using the changed content, the changed time stamp and the dynamic identification;
in the embodiment of the application, the operation log is a record table for recording the change content, the change time stamp and the dynamic identification corresponding to the dynamic module.
In the embodiment of the present application, the generating the operation log by using the change content, the change timestamp and the dynamic identifier includes:
performing deduplication operation on the changed contents generated by all the dynamic modules by utilizing the dynamic identifiers;
and performing time calibration on the duplicate-removed change content by using the change time stamp to obtain the operation log.
In the embodiment of the application, the deduplication operation is to perform deduplication on the changed content, and exclude repeated interaction generated when the dynamic modules interact. 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 secondly, creating a dynamic module A and a dynamic module B, adding the dynamic module B into the dynamic module A, and then adding the dynamic module A into the DOM tree. The first operation and the second operation can generate the same DOM tree structure, but the first operation can generate node change records of two DOM trees, namely the dynamic module A and the dynamic module B are added, and the second operation can generate node change records of one DOM tree, namely the dynamic module A is added. The second operation is the de-duplication of the first operation.
And S7, combining the operation log with the target snapshot to obtain a page operation record table.
In the embodiment of the application, the page operation record table is a record table for recording the corresponding relation between the operation log and the target snapshot. For example: and the operation log A is operated under the DOM tree corresponding to the target snapshot B, and the operation log A and the target snapshot B have a corresponding relation.
In the embodiment of the present application, the step of combining the operation log and the target snapshot to obtain a page operation record table includes:
constructing a field column for filling the operation log 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 application, after the page operation record table is obtained, if the user needs to play back the changed content of the operation page, 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 by using the static module corresponding to the extracted static identifier to obtain the webpage snapshot, and reconstructing 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 application, the backtracking page refers to a page for playing back the changed content of the operation page.
In the embodiment of the present application, the step of reproducing the operation log in the DOM tree to obtain a backtracking page includes:
sorting the change content in the operation log according to the time sequence by utilizing the change time stamp to obtain a change queue;
and sequentially extracting the change contents in the change queue, and reproducing the change contents in the DOM tree to obtain a backtracking page.
In the embodiment of the application, an operation page is split into a static module and a dynamic module, the static module in the webpage snapshot is replaced by the static identification of the static module, the target snapshot is obtained, an operation log is generated through the changing content, the changing time stamp 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. By using the method, the device, the electronic equipment and the storage medium for generating the page operation record table, which are disclosed by the embodiment of the application, when uploading and saving the page operation record, the static module is replaced by the static identifier, so that the problem of high pressure of uploading and saving data of a system is solved, the cost of uploading and saving the data is reduced, and resources are saved.
As shown in fig. 2, a functional block diagram of the page operation record table device according to the present application is shown.
The page operation record table generating apparatus 100 of the present application may be installed in an electronic device. Depending on the implemented functions, the generating device 100 of the 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 application, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning 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 snapshot of the operation page by 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 identification 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 a 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.
The modules in the generating device 100 for a page operation record table provided in the embodiment of the present application can adopt the same means based on the generating method for a page operation record table shown in fig. 1 when in use, and specific implementation steps are not repeated herein, and technical effects generated by functions of the modules/units are the same as those of the generating method for a page operation record table shown in fig. 1.
As shown in fig. 3, a schematic structural diagram of an electronic device for generating a page operation record table according to the present application is shown.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a page operation record table generation program, stored in the memory 11 and executable on the processor 10.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects respective components of the entire electronic device using various interfaces and lines, executes or executes programs or modules stored in the memory 11 (for example, executes a page operation record table generation program or the like), and invokes data stored in the memory 11 to perform various functions of the electronic device and process data.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or 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 for storing application software installed in an electronic device and various types of data, such as codes of a generation program of a page operation record table, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including 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.), 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), or alternatively 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, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 is not limiting of the electronic device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source 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 implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
Further, the electronic device may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically 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, an input unit, such as a Keyboard (Keyboard), or 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, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The page operation record table generation program stored in the memory 11 in the electronic device is a combination of a plurality of computer programs, which when executed 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 detecting that the operation page is changed, generating a change time stamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the changed dynamic module, recording the changed content of the dynamic module, and generating an operation log by using the changed content, the changed time stamp and the dynamic identifier;
and combining the operation log with the target snapshot to obtain a page operation record table.
In particular, the specific implementation method of the processor 10 on the computer program may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
Further, the electronic device integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a 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 from the use of blockchain nodes, and the like.
The present application also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can 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 detecting that the operation page is changed, generating a change time stamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the changed dynamic module, recording the changed content of the dynamic module, and generating an operation log by using the changed content, the changed time stamp and the dynamic identifier;
and combining the operation log with the target snapshot to obtain a page operation record table.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application 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 diagram representation in the claims should not be considered as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.
Claims (5)
1. A method for generating a page operation record table, the method comprising:
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 detecting that the operation page is changed, generating a change time stamp, and positioning a dynamic module which is changed in the operation page;
acquiring a dynamic identifier of the changed dynamic module, recording the changed content of the dynamic module, and generating an operation log by using the changed content, the changed time stamp and the dynamic identifier;
combining the operation log with the target snapshot to obtain a page operation record table;
wherein the setting of the dynamic identifier for each dynamic module in the set of dynamic modules and the setting of the static identifier for each static module in the set of static modules includes: sequencing the static module and the dynamic module according to the positions of the static module and the dynamic module in the DOM tree; setting a static identifier for the static module and a dynamic identifier for the dynamic module according to the ordering of the static module and the dynamic module;
the generating an operation log by using the change content, the change time stamp and the dynamic identifier includes: performing deduplication operation on the changed contents generated by all the dynamic modules by utilizing the dynamic identifiers; performing time calibration on the duplicate removed change content by using the change time stamp to obtain the operation log;
combining the operation log with the target snapshot to obtain a page operation record table, wherein the page operation record table comprises: constructing a field column for filling the operation log and the target snapshot to obtain a blank record table; filling the operation log and the target snapshot into the blank record table to obtain the page operation record table;
after the page operation record table is obtained, the method further comprises: receiving a page backtracking instruction, and extracting a static identifier in the target snapshot according to the page backtracking instruction; replacing the static identifier by using the static module corresponding to the extracted static identifier to obtain the webpage snapshot, and reconstructing a DOM tree according to the webpage snapshot; reproducing the operation log in the DOM tree to obtain a backtracking page;
and the operation log is reappeared in the DOM tree to obtain a backtracking page, which comprises the following steps: sorting the change content in the operation log according to the time sequence by utilizing the change time stamp to obtain a change queue; and sequentially extracting the change contents in the change queue, and reproducing the change contents in the DOM tree to obtain a backtracking page.
2. The method for generating a page operation record table according to claim 1, wherein creating a web page snapshot of the operation page using the DOM tree comprises:
traversing the node states of all nodes of the DOM tree to obtain the web page transient state of the operation page;
and generating the webpage snapshot according to the webpage transient state.
3. A page operation record table generating apparatus for implementing the page operation record table generating method according to any one of claims 1 to 2, characterized in that the apparatus comprises:
the system comprises a DOM tree splitting module, a static module set and a dynamic module set, wherein 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 utilizing the DOM tree, and splitting the operation page into the static module set and the dynamic module set according to the attribute identification of each node in the DOM tree;
the page module identification module is used for setting dynamic identifications for each dynamic module in the dynamic module set and setting static identifications 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 by the static identification to obtain a target snapshot;
the operation log generation module is used for generating a change time stamp when the operation page is detected to be changed, 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 time stamp and the dynamic identifier;
and the page operation record table generation module is used for combining the operation log with the target snapshot to obtain a page operation record table.
4. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
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 the method of generating a page operation record table according to any one of claims 1 to 2.
5. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method of generating a page operation record table according to any one of claims 1 to 2.
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 CN113657076A (en) | 2021-11-16 |
CN113657076B true 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 (7)
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 |
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 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5325177B2 (en) * | 2010-08-09 | 2013-10-23 | 株式会社日立製作所 | Web application operation recording method and system |
US9753904B2 (en) * | 2014-07-25 | 2017-09-05 | Qualcomm Incorporated | Fast rendering of websites containing dynamic content and stale content |
RU2595524C2 (en) * | 2014-09-29 | 2016-08-27 | Общество С Ограниченной Ответственностью "Яндекс" | Device and method for processing content of web resource in browser |
-
2021
- 2021-08-17 CN CN202110942933.2A patent/CN113657076B/en active Active
Patent Citations (7)
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 |
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 |
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 |
---|---|
CN113657076A (en) | 2021-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111651453B (en) | User history behavior query method and device, electronic equipment and storage medium | |
CN114386509A (en) | Data fusion method and device, electronic equipment and 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 | |
CN116362684A (en) | Library cluster-based book management method, library cluster-based book management device, library cluster-based book management equipment and storage medium | |
CN114357337A (en) | Cache management method, device, equipment and storage medium | |
CN114066533A (en) | Product recommendation method and device, electronic equipment and storage medium | |
CN114138243A (en) | Function calling method, device, equipment and storage medium based on development platform | |
CN113657076B (en) | Page operation record table generation method and device, electronic equipment and storage medium | |
CN114756564B (en) | Data processing method, device, equipment and medium for stream computing | |
CN115048920A (en) | Front-end data exporting method, device, equipment and storage medium | |
CN114840388A (en) | Data monitoring method and device, electronic equipment and storage medium | |
CN115016754A (en) | Method and device for synchronously displaying pages among devices, electronic device and medium | |
CN114911479A (en) | Interface generation method, device, equipment and storage medium based on configuration | |
CN115174555A (en) | File transmission method and device, electronic equipment and storage medium | |
CN114942855A (en) | Interface calling method and device, electronic equipment and storage medium | |
CN114518993A (en) | System performance monitoring method, device, equipment and medium based on business characteristics | |
CN113887198A (en) | Project splitting method, device and equipment based on topic prediction and storage medium | |
CN113672483B (en) | Device log storage method and device, electronic device and medium | |
CN112686759A (en) | Account checking monitoring method, device, equipment and medium | |
CN113434365B (en) | Data characteristic monitoring method and device, electronic equipment and storage medium | |
CN113360505B (en) | Time sequence data-based data processing method and device, electronic equipment and readable storage medium | |
CN113342379B (en) | Micro-service upgrading method and device, electronic equipment and storage medium | |
CN115268980A (en) | Method, device, equipment and storage medium for judging optimization of act component | |
CN116414708A (en) | Project testing method and device, 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 |