A method and apparatus for processing a page snapshot

By monitoring the data points in real time and calling the page snapshot interface according to preset conditions, only the differences in page snapshots are stored, which solves the problem of large storage space consumption under the JSP framework and improves the flexibility and security of page snapshots.

CN115658605BActive Publication Date: 2026-07-10CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2022-10-28
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In existing technologies, page snapshot methods based on JSP frameworks consume a lot of storage space and cannot be flexibly customized, resulting in low availability.

Method used

By monitoring the data points in real time, the system automatically takes photos by calling the page's photo-taking interface according to preset conditions, storing only the differences between the current photo data and historical photo data, thus reducing redundant storage.

Benefits of technology

It saves storage space, improves the security and flexibility of front-end plugins, and reduces invalid photos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658605B_ABST
    Figure CN115658605B_ABST
Patent Text Reader

Abstract

The application discloses a page snapshot processing method and device, and relates to the technical field of big data. A specific embodiment of the method comprises the following steps: monitoring the page's buried point data in real time; calling a page photographing interface when the buried point data meets a first preset condition; obtaining target registration information of a target page by using the page photographing interface, photographing the target page according to the target registration information, and obtaining current photograph data; obtaining historical photograph data corresponding to the target page from a cache, and storing difference data between the current photograph data and the historical photograph data. The embodiment realizes an automatic page photographing process by calling the photographing interface, reduces the abuse of the photographing function by pre-registration, and improves the security of the front-end plug-in use. In addition, only the difference data between the current photograph data and the historical photograph data is stored, unnecessary repeated storage is reduced, and storage space is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data technology, and in particular to a method and apparatus for processing page snapshots. Background Technology

[0002] In existing technologies, the common approach is to use a JSP framework to convert the captured page into a Document Object Model (DOM) text format for serialization and full storage. This means that a full storage operation is performed for each captured page, consuming significant storage space. Furthermore, the captured page, specific fields to be captured, and the capture time must be written into the code, resulting in a lack of flexibility and low usability. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a method and apparatus for processing page snapshots. By monitoring embedded data in real time, the camera interface can be called according to a pre-configured first preset condition. That is, each time the camera interface is called, an automatic photo is taken, realizing an automated page snapshot process. Furthermore, the target page being photographed is pre-registered and has its registration information stored, which can reduce the abuse of the camera function and improve the security of front-end plugins. Simultaneously, it is not necessary to store all the photo data obtained from each photo; only the difference between the current photo data and historical photo data is stored, reducing unnecessary duplicate storage and saving storage space.

[0004] To achieve the above objectives, according to one aspect of the present invention, a method for processing page snapshots is provided.

[0005] An embodiment of the present invention provides a method for processing page snapshots, comprising: real-time monitoring of embedded data on a page; when the embedded data meets a first preset condition, calling a page photo capture interface; using the page photo capture interface to obtain target registration information of a target page, and taking a photo of the target page according to the target registration information to obtain current photo data; obtaining historical photo data corresponding to the target page from a cache, and storing the difference data between the current photo data and the historical photo data.

[0006] Optionally, before calling the page photo capture interface, the method further includes: registering one or more pages and determining the registration information corresponding to the pages when the data tracking data meets the second preset condition; wherein the registration information includes: page ID and one or more photo capture areas.

[0007] Optionally, the step of obtaining the target registration information of the target page using the page photo capture interface and taking a photo of the target page according to the target registration information includes: determining the target registration information from one or more registration information according to the target page ID corresponding to the target page; and taking a photo of the target page according to one or more photo capture areas in the target registration information.

[0008] Optionally, the method further includes: storing the current photo data in the cache corresponding to the page ID, and deleting the historical photo data with the longest storage time from the cache, so that the total number of photo data stored in the cache does not exceed a preset threshold.

[0009] Optionally, storing the difference data between the current photo data and the historical photo data includes: if there are multiple historical photo data, determining the target historical photo data that is closest to the time of the current photo data based on the shooting time corresponding to the historical photo data; and storing the difference data between the current photo data and the target historical photo data.

[0010] Optionally, storing the difference data between the current photo data and the target historical photo data includes: determining the difference fields and corresponding difference field values ​​based on the fields and field values ​​in the current photo data and the historical photo data; and storing the difference fields, difference field values, and the shooting time corresponding to the current photo data to the hard disk.

[0011] Optionally, the registration information further includes: a service code corresponding to one or more photo areas; the step of storing the difference field, the difference field value, and the photo sequence number corresponding to the current photo data to the hard disk includes: for each service code: according to the photo time, storing the difference field and the difference field value corresponding to the service code in a chain to the hard disk.

[0012] Optionally, the method further includes: accepting a query request; the query request including a business code to be queried; obtaining a chain record corresponding to the business code from the hard disk; the chain record indicating a difference field and a difference field value stored sequentially according to the photo capture time; and outputting the chain record in response to the query request.

[0013] Optionally, the first preset condition is that the user operation in the embedded data satisfies the preset operation and there is registration information corresponding to the embedded data.

[0014] Optionally, the second condition is that the Uniform Resource Locator in the embedded data matches a preset resource locator.

[0015] Optionally, when multiple pages correspond to the same Uniform Resource Locator (URL), registering one or more pages and determining the registration information corresponding to the pages includes: registering the multiple pages separately and determining the registration information corresponding to each page; wherein each page corresponds to a different page ID.

[0016] Alternatively, a method for taking photos of the page can be implemented using the jQuery framework.

[0017] To achieve the above objectives, according to another aspect of the present invention, a page snapshot processing apparatus is provided.

[0018] An embodiment of the present invention provides a page snapshot processing apparatus comprising: a monitoring module for real-time monitoring of embedded data on a page; a calling module for calling a page snapshot interface when the embedded data meets a first preset condition; a snapshot module for obtaining target registration information of a target page using the page snapshot interface, and taking a picture of the target page according to the target registration information to obtain current photo data; and a storage module for obtaining historical photo data corresponding to the target page from a cache, and storing the difference data between the current photo data and the historical photo data.

[0019] To achieve the above objectives, according to another aspect of the present invention, an electronic device for processing page snapshots is provided.

[0020] An electronic device for processing page snapshots according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a method for processing page snapshots according to an embodiment of the present invention.

[0021] To achieve the above objectives, according to another aspect of the present invention, a computer-readable storage medium is provided.

[0022] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a page snapshot processing method according to an embodiment of the present invention.

[0023] One embodiment of the above invention has the following advantages or beneficial effects: By monitoring the embedded data in real time, the photo-taking interface can be called according to the pre-configured first preset conditions. That is, each time the photo-taking interface is called, an automatic photo is taken, realizing an automated page photo-taking process. Furthermore, the target page being photographed is pre-registered and has its registration information stored, which can reduce the abuse of the photo-taking function and improve the security of front-end plugin usage. At the same time, it is not necessary to store all the photo data obtained each time; only the difference between the current photo data and historical photo data is stored, reducing unnecessary duplicate storage and saving storage space.

[0024] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0025] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

[0026] Figure 1 This is a flowchart illustrating a method for processing page snapshots according to an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram of the process of taking a picture of a target page according to an embodiment of the present invention;

[0028] Figure 3 This is a schematic diagram of a cache container storing current photo data according to an embodiment of the present invention;

[0029] Figure 4 This is a schematic diagram of the process for storing differential data according to an embodiment of the present invention;

[0030] Figure 5 This is a flowchart illustrating the process of determining difference data according to an embodiment of the present invention;

[0031] Figure 6 This is a schematic diagram of the process for querying photographic data according to an embodiment of the present invention;

[0032] Figure 7 This is a schematic diagram of the main modules of a page snapshot processing apparatus according to an embodiment of the present invention;

[0033] Figure 8 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0034] Figure 9 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0035] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0036] It should be noted that, unless otherwise specified, the embodiments of the present invention and the technical features thereof can be combined with each other.

[0037] It should be noted that the collection, analysis, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate and reasonable purposes, and are not shared, disclosed, or sold outside of these legitimate uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to such personal information data, ensure that personnel authorized to access personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once this user personal information data is no longer needed, the risk should be minimized by restricting or even prohibiting data collection and / or deleting the data.

[0038] When applicable, including in certain relevant applications, data deidentification is used to protect user privacy, such as by removing specific identifiers (e.g., date of birth), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than at the specific address level), controlling how data is stored, and / or other methods of deidentification.

[0039] The existing page capture technologies include the following methods:

[0040] (1) Canvas screenshot. html2Canvas is a JavaScript library that uses some new features of HTML5 and CSS3. It clones the page's DOM and style information, then redraws the copy on the Canvas, and finally renders it as a Canvas image, thus realizing the function of taking a screenshot of the page.

[0041] (2) SVG Screenshot. SVG and Canvas implementations differ slightly, but the core idea is the same: both draw the DOM onto a Canvas and then output the image through the Canvas. Specifically, the DOM and style information of the page are traversed and cloned. Then, the DOM is nested as an external resource within the SVG using the SVG's foreignObject property. This SVG is then redrawn on the Canvas, and the styles are applied to the corresponding drawing elements according to the DOM. Finally, the image is generated through the Canvas.

[0042] (3) Screenshots based on rrweb. rrweb is a snapshot recording package based on native JavaScript. It captures changes to the page's DOM, serializes them, and then records and replays them. The view state in the page can be described in the form of a DOM tree, that is, it records the state of the DOM tree at various points in time, and generates photo data each time the state is recorded. HTML has actually implemented deep copying of DOM objects into memory, but this object itself is not serializable, so we cannot save it as a specific text format (such as JSON) for transmission, and therefore cannot achieve remote recording.

[0043] (4) Page snapshots based on new lightweight front-end frameworks. In lightweight front-end frameworks such as Vue, Angular, and React, data and page templates have been separated compared to traditional frameworks. Furthermore, global state managers such as VueX and ReactX can centrally store data. This allows us to leverage the features of these frameworks to quickly and easily create snapshot functionality, and even easily implement undo and redo functions.

[0044] However, all of the above methods have certain drawbacks. Specifically, screenshots obtained using Canvas cannot render cross-domain resources, Canvas does not support iframes and Flash, and SVG cannot render lazy-loaded resources. Furthermore, storing photo data requires support from unstructured databases, resulting in significant storage space requirements. Screenshots based on rrweb require serialized full storage, which poses considerable challenges for storage and subsequent access, even in structured databases. While page snapshots designed using new lightweight front-end frameworks are simple and flexible to develop, a significant portion of the systems on the market still use JSP frameworks based on jQuery, making them incompatible with new lightweight front-end frameworks and limiting their application. Therefore, this invention, based on the jQuery framework, uses data tracking for incremental storage, solving the storage space requirements of full unstructured data while avoiding the problems associated with Canvas screenshots.

[0045] Figure 1 This is a schematic diagram illustrating the main steps of a page snapshot processing method according to an embodiment of the present invention.

[0046] like Figure 1 As shown, the page snapshot processing method of this invention mainly includes the following steps:

[0047] Step S101: Monitor the embedded data points on the page in real time;

[0048] Step S102: If the data tracking meets the first preset condition, call the page camera interface;

[0049] Step S103: Use the page photo capture interface to obtain the target registration information of the target page, and take a photo of the target page according to the target registration information to obtain the current photo data;

[0050] Step S104: Retrieve historical photo data corresponding to the target page from the cache, and store the difference data between the current photo data and the historical photo data.

[0051] It's important to note that a page snapshot refers to the backup process a search engine performs when indexing a webpage. Typically, the backed-up webpage data (photo data) is stored in the server's cache. When a user clicks the "webpage snapshot" link in the search engine, the search engine displays the previously captured and saved webpage content. The target page in step S103 is the page that needs to be photographed (backed up).

[0052] Among them, event tracking data refers to the data stored when a user triggers a preset event, recording the user's triggering action and the corresponding trigger time. In practical applications, data product managers, data operations, and data analysts typically develop event tracking for each user behavior event based on business needs (e.g., counting the number of clicks for each ad slot in CPC pay-per-click advertising) and product needs (e.g., the number of exposures and clicks for recommended products in a recommendation system). They then report the event tracking data results through an SDK (software development kit) to obtain event tracking data for subsequent analysis, driving product optimization, or guiding operations.

[0053] In an optional embodiment, the first preset condition is that the user operation in the event tracking data satisfies a preset operation and that registration information corresponding to the event tracking data exists. The existence of registration information corresponding to the event tracking data can be understood as meaning that only pages that have pre-registered and generated registration information have corresponding registration information. The preset operation can include: single click, double click, long press, drag, etc. That is, step S102 only targets pages that have already been registered; when the user completes the specified operation, the page photo-taking interface is called once. By limiting the conditions for calling the interface, it is possible to avoid taking photos of invalid pages (such as pop-up ads), only requiring photos of already registered pages, reducing the abuse of front-end plugins and improving security.

[0054] In a further optional embodiment, a registration process is included before calling the page photo capture interface, specifically including: registering one or more pages when the data tracking meets the second preset condition, and determining the registration information corresponding to the page; wherein, the registration information includes: page ID and one or more photo capture areas.

[0055] The second preset condition can be set according to actual conditions to limit the pages that need to be registered. In an optional embodiment of the present invention, the second preset condition can be that the Uniform Resource Locator (URL) in the event tracking data matches a preset URL. Since the event tracking data usually records the user's operation, operation area, operation time, and the page's URL, pages can be filtered based on the URL. By comparing it with the preset URL, only the pages corresponding to the event tracking data that exist in the preset URL are registered.

[0056] Through the above process, pages can be registered selectively. The registration process itself implements matching and verification, preventing the registration of invalid or abnormal pages. Furthermore, the registered pages allow for further restrictions on which pages require photo capture. The page photo capture interface can be called only when all registered pages are opened, or only when some registered pages are opened. This further filters the pages to be photographed, reducing invalid photos and their data consumption on storage space and improving the security of the front-end plugin.

[0057] It should be noted that during the page registration process, multiple registration information related to the page are generated, including a page ID and one or more photo-taking areas. The page ID can be understood as a unique code corresponding to each opened page. In this embodiment of the invention, regardless of whether it is the same page or different pages, a new ID is generated for each page opened, regardless of the page content. That is, when multiple pages correspond to the same Uniform Resource Locator (URL), the process of determining the registration information corresponding to the page includes: registering multiple pages separately and determining the registration information corresponding to each page; wherein each page corresponds to a different page ID. The photo-taking area indicates the area of ​​the entire page that needs to be photographed; it can be the entire page or a part of the page.

[0058] Step S103 can only be performed after the page registration process is completed. In one optional embodiment, step S103 is as follows: Figure 2 As shown, it further includes:

[0059] Step S201: Determine the target registration information from one or more registration information based on the target page ID corresponding to the target page;

[0060] Step S202: Take a picture of the target page according to one or more photo areas in the target registration information.

[0061] After registering pages that meet the second preset condition, the registration information corresponding to each page is stored uniformly. Specifically, it can be stored according to the association between page ID and registration information. When the tracking data meets the first preset condition, it indicates that the registered target page needs to be photographed. Therefore, step S201 is required to first obtain the corresponding target registration information from multiple registration information based on the target page ID, and then photograph the target page according to the photographing area in the target registration information.

[0062] After taking a picture of the target page, the current photo data needs to be stored. In one optional embodiment of the present invention, the current photo data is first stored in a cache, then compared with historical photo data, and the difference data obtained from the comparison is stored in the hard disk. This storage method allows for permanent full storage of all photo data on the hard disk. Since the files stored in the cache are temporary files, the present invention aims to minimize the amount of data stored in the cache. Specifically, in one optional embodiment, after taking a picture of the page, the method further includes: storing the current photo data in the cache corresponding to the page ID, and deleting the historical photo data with the longest storage time from the cache, so that the total number of photo data stored in the cache does not exceed a preset threshold.

[0063] Specifically, two cache containers can be set up in the cache, such as Figure 3 As shown, whenever new current photo data needs to be stored, the oldest historical photo data is deleted to ensure that there are always two stored records in the cache. In this way, the storage space in the cache can be saved as much as possible by deleting useless or outdated historical photo data in a timely manner and only storing the most recent historical photo.

[0064] It should be noted that when the cache in the cache container is empty, it means that the target page has not been photographed and there is no corresponding historical photo data. In this case, the current photo data can be directly stored as the first cached data. When the target page has been photographed multiple times, there will be multiple historical photo data in the cache container. In this case, the process of storing the difference data in step S104 can further include:

[0065] Step S401: Based on the shooting time corresponding to the historical photo data, determine the target historical photo data that is closest to the current photo data time;

[0066] Step S402: Store the difference data between the current photo data and the target historical photo data.

[0067] Among them, the target historical photo data is the data that is closest to the current historical photo data in time. By comparing the current photo data of each photo with the nearest target historical photo data, the difference data between two photos can be obtained. By storing the difference data between two photos, the changes of the page after each user operation at different time points can be obtained. For the target page, incremental chained storage is realized.

[0068] In a further optional embodiment, the process of determining the difference data in step S402 is as follows: Figure 5 As shown, it includes:

[0069] Step S501: Based on the fields and field values ​​in the current photo data and historical photo data, determine the difference fields and their corresponding difference field values;

[0070] Step S502: Store the difference field, the difference field value, and the corresponding photo capture time to the hard disk.

[0071] By recording the fields and values ​​in the photo data obtained each time a photo is taken, the changes on the page can be obtained. Therefore, by simply storing the difference fields and their values ​​in correspondence with the current photo data, the photo data of each photo can be completely recorded on the hard drive.

[0072] In a further optional embodiment, the registration information may also include: a service code corresponding to one or more photo-taking areas. That is, during the storage process in step S502, for each service code, the difference field corresponding to the service code and the difference field value chain can be stored to the hard disk according to the photo-taking time. By setting service codes, separate storage according to service can be achieved, so that the photo-taking data of the page corresponding to each service can be directly queried according to the service code later.

[0073] Specifically, the query process is as follows: Figure 6 As shown, it includes:

[0074] Step S601: Accept the query request; the query request includes the business code to be queried;

[0075] Step S602: Retrieve the chain record corresponding to the business code from the hard disk; the chain record indicates the difference field and the difference field value stored sequentially according to the photo capture time;

[0076] Step S603: In response to the query request, output a chain of records.

[0077] The query request can be entered by the user or sent by another terminal. If it is entered by the user, the chain of records can be displayed directly through the interface. If it is sent by another terminal, the chain of records only needs to be sent back to that terminal.

[0078] To match existing system pages, this embodiment of the invention implements a method for taking photos of pages based on the jQuery framework.

[0079] According to the page snapshot processing method of this invention, by real-time monitoring of embedded data, the camera interface can be called according to a pre-configured first preset condition. That is, each time the camera interface is called, an automatic photo is taken, thus automating the page snapshot process. Furthermore, the target page being photographed is pre-registered and has its registration information stored, which reduces the abuse of the camera function and improves the security of front-end plugins. Simultaneously, it eliminates the need to store all photo data obtained from each shot; only the differences between the current photo data and historical photo data are stored, reducing unnecessary duplicate storage and saving storage space.

[0080] Figure 7 This is a schematic diagram of the main modules of a page snapshot processing apparatus according to an embodiment of the present invention.

[0081] like Figure 7 As shown, the page snapshot processing apparatus 700 of this embodiment includes:

[0082] The monitoring module 701 is used to monitor the embedded data points on the page in real time.

[0083] The calling module 702 is used to call the page photo interface when the embedded data meets the first preset condition;

[0084] The camera module 703 is used to obtain the target registration information of the target page using the page camera interface, and take a picture of the target page according to the target registration information to obtain the current photo data;

[0085] The storage module 704 is used to retrieve historical photo data corresponding to the target page from the cache and store the difference data between the current photo data and the historical photo data.

[0086] In an optional embodiment of the present invention, the processing device 700 further includes a registration module, which is used to register one or more pages before calling the page photo capture interface, provided that the data points meet a second preset condition, and to determine the registration information corresponding to the page; wherein the registration information includes: page ID and one or more photo capture areas.

[0087] In an optional embodiment of the present invention, the camera module 703 further includes: determining target registration information from one or more registration information based on the target page ID corresponding to the target page; and taking a picture of the target page based on one or more camera areas in the target registration information.

[0088] In an optional embodiment of the present invention, the storage module 704 is further configured to store the current photo data in the cache corresponding to the page ID, and delete the historical photo data with the longest storage time from the cache, so that the total number of photo data stored in the cache is not greater than a preset threshold.

[0089] In an optional embodiment of the present invention, the storage module 704 is further configured to, when there are multiple historical photo data, determine the target historical photo data that is closest to the time of the current photo data based on the shooting time corresponding to the historical photo data; and store the difference data between the current photo data and the target historical photo data.

[0090] In an optional embodiment of the present invention, the storage module 704 is further configured to determine the difference field and the corresponding difference field value based on the fields and field values ​​in the current photo data and the historical photo data; and store the difference field, the difference field value and the shooting time corresponding to the current photo data to the hard disk.

[0091] In an optional embodiment of the present invention, the registration information further includes: a service code corresponding to one or more photo areas respectively; the storage module 704 is further configured to, for each service code: store the difference field and the difference field value chain corresponding to the service code to the hard disk according to the photo time.

[0092] In an optional embodiment of the present invention, the device further includes a query module for accepting a query request; the query request includes a business code to be queried; a chain record corresponding to the business code is obtained from the hard disk; the chain record indicates a difference field and a difference field value stored sequentially according to the photo capture time; and the chain record is output in response to the query request.

[0093] In an optional embodiment of the present invention, the first preset condition is that the user operation in the embedded data satisfies the preset operation and there is registration information corresponding to the embedded data.

[0094] In an optional embodiment of the present invention, the second condition is that the Uniform Resource Locator in the embedded data matches a preset resource locator.

[0095] In an optional embodiment of the present invention, when multiple pages correspond to the same Uniform Resource Locator, the registration module is further configured to register the multiple pages separately and determine the registration information corresponding to each page; wherein each page corresponds to a different page ID.

[0096] In an optional embodiment of the present invention, the device 700 implements a method for taking photos of a webpage based on the jQuery framework.

[0097] The page snapshot processing apparatus according to an embodiment of the present invention, by real-time monitoring of embedded data, can call the photo-taking interface according to a pre-configured first preset condition, that is, each time the photo-taking interface is called, an automatic photo is taken, realizing an automated page photo-taking process. Furthermore, the target page being photographed is pre-registered and has its registration information stored, which can reduce the abuse of the photo-taking function and improve the security of front-end plugin usage. At the same time, it is not necessary to store all the photo data obtained each time; only the difference data between the current photo data and historical photo data is stored, reducing unnecessary duplicate storage and saving storage space.

[0098] Figure 8 An exemplary system architecture 800 is shown, to which the page snapshot processing method or page snapshot processing apparatus of embodiments of the present invention can be applied.

[0099] like Figure 8As shown, system architecture 800 may include terminal devices 801, 802, and 803, a network 804, and a server 805. Network 804 serves as the medium for providing communication links between terminal devices 801, 802, and 803 and server 805. Network 804 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0100] Users can use terminal devices 801, 802, and 803 to interact with server 805 via network 804 to receive or send data. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and social media platforms.

[0101] Terminal devices 801, 802, and 803 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0102] Server 805 can be a server that provides various services, such as a backend management server that supports the tracking data monitored by users using terminal devices 801, 802, and 803. The backend management server can analyze and process the received tracking data, query requests, and other data, and feed back the processing results (such as photo data and chained records) to the terminal devices.

[0103] It should be noted that the page snapshot processing method provided in the embodiments of the present invention is generally executed by terminal devices 801, 802, and 803, and correspondingly, the page snapshot processing device is generally set in terminal devices 801, 802, and 803.

[0104] It should be understood that Figure 8 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0105] The following is for reference. Figure 9 It shows a schematic diagram of the structure of a computer system 900 suitable for implementing a terminal device of the present invention. Figure 9 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0106] like Figure 9As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 902 or programs loaded from storage section 908 into random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the system 900. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0107] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 910 as needed so that computer programs read from it can be installed into storage section 908 as needed.

[0108] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs the functions defined above in the system of this invention.

[0109] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0111] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a module, a calling module, a camera module, and a storage module. The names of these modules do not necessarily limit the module itself; for example, a monitoring module can also be described as a "module for real-time monitoring of embedded data on a page."

[0112] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: real-time monitoring of embedded data on a page; invoking a page photo-taking interface when the embedded data meets a first preset condition; using the page photo-taking interface to obtain target registration information of a target page, and taking a photo of the target page according to the target registration information to obtain current photo data; retrieving historical photo data corresponding to the target page from a cache, and storing the difference data between the current photo data and the historical photo data.

[0113] According to the technical solution of this invention, by monitoring the embedded data in real time, the camera interface can be called according to a pre-configured first preset condition. That is, each time the camera interface is called, an automatic photo is taken, realizing an automated page photo-taking process. Furthermore, the target page being photographed is pre-registered and has its registration information stored, which can reduce the abuse of the camera function and improve the security of front-end plugins. At the same time, it is not necessary to store all the photo data obtained each time; only the difference between the current photo data and historical photo data is stored, reducing unnecessary duplicate storage and saving storage space.

[0114] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for processing page snapshots, characterized in that, include: Real-time monitoring of the embedded data points on the page; When the event tracking data meets the first preset condition, the page photo capture interface is called; wherein, the first preset condition is that the user operation in the event tracking data of the page meets the preset operation and there is registration information corresponding to the event tracking data; wherein, the existence of registration information corresponding to the event tracking data is only for pages that have completed registration in advance and generated registration information. The method of calling the page photo capture interface includes: for a page that has been registered, when the user completes a specified operation, calling the page photo capture interface once; Before calling the page camera interface, the process of registering the page includes: registering one or more pages when the data points meet the second preset condition, and determining the registration information corresponding to the page; wherein, the registration information includes: page identifier and one or more camera areas in the page; The second preset condition is that the Uniform Resource Locator (URL) in the page's tracking data matches a preset URL. The tracking data includes records of user actions on the page, the action area, the action time, and the page's URL. Pages are filtered based on their URLs and compared with preset URLs to register pages corresponding to the tracking data for the preset URLs. Each time a page is opened, a new page identifier is generated, independent of the page content. For cases where multiple pages have the same URL, the process of determining the registration information for each page includes: registering multiple pages separately and determining the registration information for each page; each page corresponds to a different page identifier; the photo-taking area indicates the area on the entire page that needs to be photographed, which can be the entire page or a portion of the page. The target registration information of the target page is obtained using the page photo capture interface, and the target page is photographed according to the target registration information to obtain the current photo data; Retrieve historical photo data corresponding to the target page from the cache, and store the differences between the current photo data and the historical photo data.

2. The method according to claim 1, characterized in that, The step of obtaining target registration information of a target page using the page capture interface and taking a picture of the target page based on the target registration information includes: Based on the target page ID corresponding to the target page, determine the target registration information from one or more registration information; The target page is photographed based on one or more photographing areas in the target registration information.

3. The method according to claim 2, characterized in that, Also includes: The current photo data is stored in the cache corresponding to the page ID, and the historical photo data with the longest storage time is deleted from the cache, so that the total number of photo data stored in the cache does not exceed a preset threshold.

4. The method according to claim 1, characterized in that, The storage of the difference data between the current photo data and the historical photo data includes: If there are multiple historical photo data sets, the target historical photo data set that is closest to the current photo data set in time is determined based on the shooting time corresponding to the historical photo data set. The difference data between the current photo data and the target historical photo data is stored.

5. The method according to claim 4, characterized in that, The storage of the difference data between the current photo data and the target historical photo data includes: Based on the fields and field values ​​in the current photo data and the historical photo data, determine the difference fields and their corresponding difference field values; The difference field, the difference field value, and the shooting time corresponding to the current photo data are stored to the hard disk.

6. The method according to claim 5, characterized in that, The registration information also includes: a business code corresponding to one or more photo areas; storing the difference field, the difference field value, and the photo sequence number corresponding to the current photo data to the hard disk includes: For each of the aforementioned business codes: according to the photo capture time, the difference fields and value chains of the difference fields corresponding to the business codes are stored to the hard disk.

7. The method according to claim 6, characterized in that, Accept the query request; the query request includes the business code to be queried; Retrieve a chain of records corresponding to the business code from the hard disk; the chain of records indicates the difference fields and their values ​​stored sequentially according to the photo capture time. In response to the query request, the chain of records is output.

8. The method according to claim 1, characterized in that, When multiple pages correspond to the same Uniform Resource Locator (URL), registering one or more pages and determining the registration information corresponding to those pages includes: Register each of the multiple pages separately and determine the registration information corresponding to each page; wherein each page corresponds to a different page ID.

9. The method according to any one of claims 1 to 8, characterized in that, A method for implementing webpage photography using the jQuery framework.

10. A processing device for capturing images of web pages, characterized in that, include: The monitoring module is used to monitor the embedded data points on the page in real time. The calling module is used to call the page photo interface when the tracking data meets the first preset condition; wherein, the first preset condition is that the user operation in the tracking data of the page meets the preset operation and there is registration information corresponding to the tracking data; wherein, the existence of registration information corresponding to the tracking data is only for pages that have completed registration in advance and generated registration information. The method of calling the page photo capture interface includes: for a page that has been registered, when the user completes a specified operation, calling the page photo capture interface once; Before calling the page camera interface, the process of registering the page includes: registering one or more pages when the data points meet the second preset condition, and determining the registration information corresponding to the page; wherein, the registration information includes: page identifier and one or more camera areas in the page; The second preset condition is that the Uniform Resource Locator (URL) in the page's tracking data matches a preset URL. The tracking data includes records of user actions on the page, the action area, the action time, and the page's URL. Pages are filtered based on their URLs and compared with preset URLs to register pages corresponding to the tracking data for the preset URLs. Each time a page is opened, a new page identifier is generated, independent of the page content. For cases where multiple pages have the same URL, the process of determining the registration information for each page includes: registering multiple pages separately and determining the registration information for each page; each page corresponds to a different page identifier; the photo-taking area indicates the area on the entire page that needs to be photographed, which can be the entire page or a portion of the page. The camera module is used to obtain the target registration information of the target page using the page camera interface, and take a picture of the target page according to the target registration information to obtain the current photo data; The storage module is used to retrieve historical photo data corresponding to the target page from the cache and store the difference data between the current photo data and the historical photo data.

11. The apparatus according to claim 10, characterized in that, The storage module is also used to store the current photo data in the cache corresponding to the page ID, and delete the historical photo data with the longest storage time from the cache, so that the total number of photo data stored in the cache does not exceed a preset threshold.

12. The apparatus according to claim 10, characterized in that, The storage module is further configured to, when there are multiple historical photo data, determine the target historical photo data that is closest to the time of the current photo data based on the shooting time corresponding to the historical photo data; and store the difference data between the current photo data and the target historical photo data.

13. An electronic device for processing page snapshots, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-9.

14. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-9.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • CN111813629A

  • CN113590246A

  • CN113722273A