Page screenshot checking method and device, storage medium and electronic equipment

CN116795607BActive Publication Date: 2026-09-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210266688.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2026-09-22
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

[0006]本申请实施例提供了一种页面截图的校验方法和装置、存储介质及电子设备,以至少解决相关技术中存在的页面截图的效率较低的技术问题

Benefits of technology

[0022]根据本申请实施例的又一方面,还提供了一种电子设备,包括存储器和处理器,上述存储器中存储有计算机程序,上述处理器被设置为通过所述计算机程序执行上述的页面截图的校验方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116795607B_ABST
    Figure CN116795607B_ABST
Patent Text Reader

Abstract

The application discloses a page screenshot checking method and device, a storage medium and an electronic device. The method comprises the following steps: obtaining a page screenshot request message; in the case that the page screenshot request message is used for requesting to take a screenshot of a first page, and the page screenshot request message comprises a first configured page parameter of the first page, obtaining a first actual page parameter of the first page by executing a first page checking script configured in advance; comparing the first actual page parameter with the first configured page parameter to obtain a first checking result; in the case that the first checking result indicates that the first actual page parameter matches the first configured page parameter, performing a screenshot operation on the first page to obtain a target screenshot. The application can be applied to various scenes such as cloud technology, artificial intelligence, intelligent transportation and auxiliary driving. The application solves the technical problem of low efficiency of page screenshot in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for verifying page screenshots, a storage medium, and an electronic device. Background Technology

[0002] Currently, in related technologies, the pages that developers need to inspect are usually compared post-eventally. Based on the images that the developers have already captured, the images are reported to the server for judgment. The specific judgment methods are generally manual review or image recognition. Whether it is manual review or image recognition, it is a post-event inspection method. The page to be inspected needs to be captured first before the inspection can be carried out.

[0003] The above detection methods are insufficient to detect erroneous pages in a timely manner, and they still use resources to capture erroneous pages, resulting in resource waste. When a large number of requests arrive, they will also affect the screenshot processing of normal pages.

[0004] Therefore, there is a technical problem with the low efficiency of page screenshots in related technologies.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This application provides a method and apparatus for verifying page screenshots, a storage medium, and an electronic device, to at least solve the technical problem of low efficiency in page screenshots in related technologies.

[0007] According to one aspect of the embodiments of this application, a method for verifying page screenshots is provided, comprising: obtaining a page screenshot request message, wherein the page screenshot request message includes an identifier of a first page to be screenshotted; when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes a first configuration page parameter pre-configured for the first page, obtaining a first actual page parameter of the first page represented by the identifier by executing a pre-configured first page verification script, comparing the first actual page parameter with the first configuration page parameter to obtain a first verification result; and when the first verification result indicates that the first actual page parameter matches the first configuration page parameter, performing a screenshot operation on the first page to obtain a target screenshot.

[0008] According to another aspect of the embodiments of this application, a page screenshot verification device is also provided, comprising: an acquisition module, configured to acquire a page screenshot request message, wherein the page screenshot request message includes an identifier of a first page to be screenshotted; a verification module, configured to, when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes a first configuration page parameter pre-configured for the first page, obtain a first actual page parameter of the first page represented by the identifier by executing a pre-configured first page verification script, compare the first actual page parameter with the first configuration page parameter, and obtain a first verification result; and a screenshot module, configured to, when the first verification result indicates that the first actual page parameter matches the first configuration page parameter, perform a screenshot operation on the first page to obtain a target screenshot.

[0009] Optionally, the device is further configured to: cancel the screenshot operation on the first page and generate an error message when the first verification result indicates that the first actual page parameters do not match the first configured page parameters.

[0010] Optionally, the apparatus is further configured to: before obtaining the first actual page parameters of the first page represented by the identifier by executing a pre-configured first page verification script, comparing the first actual page parameters with the first configured page parameters, and obtaining the first verification result, generate a screenshot task in response to the page screenshot request message, wherein the screenshot task is used to perform the screenshot operation on the first page; when the task to be executed is the screenshot task, insert the first page verification script into the page code of the first page to obtain the first page code.

[0011] Optionally, the device is configured to obtain a first actual page parameter of the first page represented by the identifier by executing a pre-configured first page verification script, and compare the first actual page parameter with the first configured page parameter to obtain a first verification result: by executing the first page verification script in the first page code, obtaining the first actual page parameter of the first page represented by the identifier, and comparing the first actual page parameter with the first configured page parameter; if the first actual page parameter and the first configured page parameter are the same, generating the first verification result, wherein the first verification result indicates that the first actual page parameter matches the first configured page parameter; if the first actual page parameter and the first configured page parameter are different, generating the first verification result, wherein the first verification result indicates that the first actual page parameter does not match the first configured page parameter; or if the difference between the first actual page parameter and the first configured page parameter is less than or equal to a first preset threshold, generating the first verification result, wherein the first verification result indicates that the first actual page parameter matches the first configured page parameter; if the difference between the first actual page parameter and the first configured page parameter is greater than the first preset threshold, generating the first verification result, wherein the first verification result indicates that the first actual page parameter does not match the first configured page parameter.

[0012] Optionally, the apparatus is further configured to: when the page screenshot request message is used to request a screenshot of the second page, and the page screenshot request message includes a second configuration page parameter pre-configured for the second page, access the first page through the identifier, and perform a target operation on the first page through a pre-configured target trigger to obtain the second page; obtain the second actual page parameter of the second page by executing a pre-configured second page verification script, compare the second actual page parameter with the second configuration page parameter to obtain a second verification result; and when the second verification result indicates that the second actual page parameter matches the second configuration page parameter, perform a screenshot operation on the second page to obtain the target screenshot.

[0013] Optionally, the device is configured to perform a target operation on the first page to obtain the second page by means of a pre-configured target trigger: if the target trigger includes a page click trigger, performing a click operation on a target element displayed on the first page, and updating the first page to the second page in response to the click operation; or if the target trigger includes a response wait trigger, performing a response wait operation on the first page to obtain the second page; or if the target trigger includes a timeout wait trigger, performing a timeout wait operation on the first page to obtain the second page.

[0014] Optionally, the device is configured to perform a response waiting operation on the first page to obtain the second page by: obtaining a target page request on the first page, wherein the target page request is used to request an update from the first page to the second page; and updating the first page to the second page when the target page request response is completed.

[0015] Optionally, the device is configured to perform a timeout waiting operation on the first page to obtain the second page by: waiting for a target duration on the first page; and updating the first page to the second page if the target duration exceeds a preset duration threshold.

[0016] Optionally, the apparatus is further configured to: after obtaining the page screenshot request message, generate a target signature string for identity authentication for the target account that sent the page screenshot request message; perform identity authentication on the target account according to the target signature string to obtain an identity authentication result, wherein the identity authentication result is used to indicate whether the target account is allowed to take a screenshot of the first page; if the target signature string passes the verification, determine that the identity authentication result indicates that the target account is allowed to take a screenshot of the first page.

[0017] Optionally, the device is configured to generate a target signature string for identity authentication for the target account that sends the page screenshot request message by: assigning a globally unique target key to the target account; and generating the target signature string based on the timestamp of the page screenshot request message, the request path of the page screenshot request message, and the target key.

[0018] Optionally, the device is configured to perform a screenshot operation on the first page to obtain a target screenshot in the following ways: when the page screenshot request message requests a screenshot of the entire area of ​​the first page, the device performs a screenshot operation on the entire area of ​​the first page to obtain the target screenshot; or when the page screenshot request message requests a screenshot of a partial area of ​​the first page, the device performs a screenshot operation on a partial area of ​​the first page to obtain the target screenshot; or when the page screenshot request message requests a screenshot of a target element of the first page, the device performs a screenshot operation on the target element to obtain the target screenshot.

[0019] Optionally, the device is further configured to: after taking a screenshot of the first page to obtain a target screenshot, perform data analysis on the target screenshot to obtain analysis results, wherein the analysis results include at least one of the following: number of page views, wherein the number of page views represents the number of times the user viewed the first page; and dwell time, wherein the dwell time represents the duration the user stayed on the first page.

[0020] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described method for verifying page screenshots when it is run.

[0021] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the verification method as shown in the screenshot above.

[0022] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described page screenshot verification method through the computer program.

[0023] In this embodiment, a page screenshot request message is used. This message includes an identifier of the first page to be screenshotted. When the screenshot request message requests a screenshot of the first page and includes pre-configured first page parameters, a pre-configured first page verification script is executed to obtain the first actual page parameters of the first page represented by the identifier. These parameters are then compared with the first configured page parameters to obtain a first verification result. If the first verification result indicates a match between the first actual page parameters and the first configured page parameters, a screenshot is taken of the first page to obtain the target screenshot. This approach provides a unified service interface, supports developers in capturing images, and allows for customized accuracy checks on the screenshot content, returning verification results instantly. By performing accuracy checks on the first page before screenshotting, the accuracy of screenshot requests for erroneous pages is reduced. This improves resource utilization and increases the efficiency of page screenshots, thus solving the problem of low efficiency in related technologies. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0025] Figure 1 This is a schematic diagram of an application environment for an optional page screenshot verification method according to an embodiment of this application;

[0026] Figure 2 This is a flowchart illustrating an optional method for verifying page screenshots according to an embodiment of this application;

[0027] Figure 3 This is a schematic diagram of an optional page screenshot verification method according to an embodiment of this application;

[0028] Figure 4 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0029] Figure 5 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0030] Figure 6 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0031] Figure 7 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0032] Figure 8 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0033] Figure 9 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0034] Figure 10 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0035] Figure 11 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0036] Figure 12 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0037] Figure 13 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0038] Figure 14 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0039] Figure 15 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0040] Figure 16 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application;

[0041] Figure 17 This is a schematic diagram of the structure of an optional page screenshot verification device according to an embodiment of this application;

[0042] Figure 18 This is a schematic diagram of the structure of a verification product, which is an optional page screenshot according to an embodiment of this application;

[0043] Figure 19 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0044] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0045] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0046] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0047] Built-in browser: A web browser that is built into the system background.

[0048] NodeJS: A JavaScript runtime environment.

[0049] Puppeteer: A Node.js utility library that provides a series of high-level APIs to control the built-in browser via the DevTools protocol.

[0050] JavaScript (JS) is a scripting language standardized by Ecma International (formerly the European Computer Manufacturers Association) through ECMA-262, primarily used in web development.

[0051] The present application will be described below with reference to embodiments:

[0052] According to one aspect of the embodiments of this application, a method for verifying page screenshots is provided. Optionally, in this embodiment, the above-described method for verifying page screenshots can be applied to, for example... Figure 1 The hardware environment shown consists of server 101 and terminal device 103. For example... Figure 1As shown, server 101 is connected to terminal 103 via a network and can be used to provide services for terminal devices or applications installed on terminal devices. Applications can be video applications, instant messaging applications, browser applications, educational applications, game applications, etc. Database 105 can be set up on the server or independently of the server to provide data storage services for server 101, such as a page data storage server. The network can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes Bluetooth, Wi-Fi, and other networks that enable wireless communication. Terminal device 103 can be a terminal configured with applications and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, PDAs, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, and other computer devices. The server can be a single server, a server cluster consisting of multiple servers, or a cloud server. Application 107 using the above-mentioned page screenshot verification method is displayed through terminal device 103 or other connected display devices.

[0053] Combination Figure 1 As shown, the verification method for the above page screenshot can be implemented on terminal device 103 through the following steps:

[0054] S1, Obtain a page screenshot request message on terminal device 103, wherein the page screenshot request message includes the identifier of the first page to be screenshotted;

[0055] S2, when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes the first configuration page parameters pre-configured for the first page, the terminal device 103 executes the pre-configured first page verification script to obtain the first actual page parameters of the first page represented by the identifier, compares the first actual page parameters with the first configuration page parameters, and obtains the first verification result.

[0056] S3, if the first verification result indicates that the first actual page parameters match the first configured page parameters, a screenshot operation is performed on the first page on the terminal device 103 to obtain the target screenshot.

[0057] Optionally, in this embodiment, the above-mentioned method for verifying page screenshots can also be implemented through a server, for example, Figure 1 It can be implemented in server 101 shown; or it can be implemented jointly by the user terminal and the server.

[0058] The above is merely an example, and this embodiment does not impose any specific limitations.

[0059] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the verification methods for the above page screenshots include:

[0060] S202, Obtain a page screenshot request message, wherein the page screenshot request message includes the identifier of the first page to be screenshotted;

[0061] S204, when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes a first configuration page parameter pre-configured for the first page, the first actual page parameter of the first page represented by the identifier is obtained by executing the pre-configured first page verification script, and the first actual page parameter is compared with the first configuration page parameter to obtain the first verification result;

[0062] S206, if the first verification result indicates that the first actual page parameters match the first configured page parameters, a screenshot operation is performed on the first page to obtain the target screenshot.

[0063] Optionally, in the embodiments of this application, the above-mentioned method for verifying page screenshots can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. This application can also be applied to the verification process of advertising pages in various applications, mini-programs, and web pages.

[0064] Optionally, in this embodiment, the aforementioned screenshot request message may include, but is not limited to, a request message generated by the user on the client, used to request a screenshot of the first page to obtain the target screenshot. The aforementioned screenshot request message specifically includes, but is not limited to, the identifier of the first page, and pre-configured first configuration page parameters associated with the first page.

[0065] It should be noted that the request path of the first page mentioned above can be obtained, including but not limited to, through the page screenshot request message, and the parameters of the first configuration page corresponding to the first page mentioned above can also be obtained.

[0066] Optionally, in the embodiments of this application, the first page may include, but is not limited to, the display page of a preset application, mini-program, webpage, etc., and the identifier of the first page may include, but is not limited to, the URL (Uniform Resource Locator) of the first page, and may also include, but is not limited to, the index number, jump code, etc. of the first page that can be used to find the first page.

[0067] For example, Figure 3This is a schematic diagram of an optional page screenshot verification method according to an embodiment of this application. The first page mentioned above may include, but is not limited to, the following: Figure 3 As shown, taking the application as an example, in the initial page of the built-in browser, the identifier http: / / x.11 associated with the first page is entered according to the page screenshot request message. At this time, the display screen of the first page is displayed in the built-in browser, including but not limited to control elements and image elements. The control elements and image elements are determined by the actual page parameters of the page.

[0068] Optionally, in the embodiments of this application, the first configuration page parameters pre-configured for the first page may include, but are not limited to, the configuration page parameters configured by the user when creating the first page, and may also include, but are not limited to, the configuration page parameters configured by the user when maintaining the first page.

[0069] For example, Figure 4 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application. The first page mentioned above may include, but is not limited to, the following: Figure 4 As shown, page 402 is the page obtained according to the first configured page parameters pre-configured by the user. Pages 404 and 406 are the pages corresponding to the first actual page parameters obtained by the backend system after the user sends a page screenshot request message and the identifier of the first page is entered into the built-in browser. Figure 4 It can be seen that page 402 is the same as page 404, but different from page 406. This is because the first configuration page parameter corresponding to page 402 matches the first actual page parameter corresponding to page 404, but the first configuration page parameter corresponding to page 402 does not match the first actual page parameter corresponding to page 406.

[0070] Optionally, in this embodiment of the application, the first page verification script is a page verification script pre-configured by the user, used to compare the current first actual page parameters of the first page according to the first configured page parameters.

[0071] It should be noted that the aforementioned first-page verification script may include, but is not limited to, JS scripts. By using JS scripts as the carrier for rule definition and fully adopting standard JS specifications, users can easily define page detection rules, greatly reducing the barrier to entry. By utilizing the JS dynamic insertion mechanism, the detection script is dynamically inserted into the first page, and the accuracy of the first page is verified before taking a screenshot.

[0072] Specifically, this may include, but is not limited to, comparing whether the parameter values ​​of the page elements included in the first actual page parameters are the same as those of the page elements included in the first configured page parameters, such as the size value and coordinate value of the page elements. It may also include, but is not limited to, comparing whether the number of page elements included in the first actual page parameters and the first configured page parameters are equal.

[0073] Optionally, in the embodiments of this application, the first verification result may include, but is not limited to, indicating whether the first actual page parameter matches or does not match the first configured page parameter, and may also include, but is not limited to, some page parameters in the first actual page parameter match some page parameters in the first configured page parameter, and some page parameters in the first actual page parameter do not match some page parameters in the first configured page parameter.

[0074] Specifically, it may include, but is not limited to, representing a result code, which is used to query the corresponding first verification result in a preset database. It may also include, but is not limited to, representing an error message, so as to inform the user of the specific reason for the mismatch between the first actual page parameters and the first configured page parameters in the event of a mismatch.

[0075] Optionally, in the embodiments of this application, the above screenshot operation may include, but is not limited to, taking screenshots of the entire area or a part of the first page or a certain page element, which can be determined according to the page screenshot request message.

[0076] For example, Figure 5 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application. The aforementioned first page may include, but is not limited to, the following: Figure 5 As shown, taking an application as an example, the first page display includes control elements and image elements. The control elements and image elements are represented by the code of the page. The user pre-configures the image elements and control elements included in the first page to obtain the first configuration page parameters that meet the business requirements. When the first page needs to be applied to the application, the page code corresponding to the first page is obtained, and the pre-configured first page verification script is inserted into the page code. When a screenshot operation is required on the first page, the first page verification script is executed to obtain the current actual page parameters of the first page as the first actual page parameters. The first actual page parameters are compared with the first configuration page parameters to obtain the first verification result. If the first verification result indicates that the first actual page parameters match the first configuration page parameters, a screenshot operation is performed on the first page to obtain the target screenshot.

[0077] It should be noted that after obtaining the above target screenshots, they can be uploaded to a data analysis server for data analysis, such as analysis of page views, dwell time, page click-through rate, and page conversion rate.

[0078] This application's embodiments employ a method of obtaining a page screenshot request message, wherein the page screenshot request message includes an identifier of the first page to be screenshotted. When the page screenshot request message requests a screenshot of the first page and includes pre-configured first page parameters for the first page, a pre-configured first page verification script is executed to obtain the first actual page parameters of the first page represented by the identifier. The first actual page parameters are compared with the first configured page parameters to obtain a first verification result. If the first verification result indicates that the first actual page parameters match the first configured page parameters, a screenshot operation is performed on the first page to obtain the target screenshot. This method provides a unified service interface to support developers in capturing images and performing customized accuracy checks on the screenshot content, returning verification results instantly. By performing accuracy checks on the first page before screenshotting, the accuracy of screenshot requests for erroneous pages is reduced, thereby improving resource utilization and increasing the efficiency of page screenshots. This solves the technical problem of low page screenshot efficiency in related technologies.

[0079] As an alternative approach, the method also includes:

[0080] If the first verification result indicates that the parameters of the first actual page do not match the parameters of the first configured page, the screenshot operation on the first page is canceled, and an error message is generated.

[0081] Optionally, in this embodiment of the application, the above-mentioned cancellation of the screenshot operation on the first page may include, but is not limited to, canceling the screenshot task of taking a screenshot of the first page, and the above-mentioned generation of error message may include, but is not limited to, generating a message that can identify the reason why the parameters of the first actual page do not match the parameters of the first configured page.

[0082] For example, Figure 6 This is a schematic diagram of another optional page screenshot verification method according to an embodiment of this application. The aforementioned first page may include, but is not limited to, the following: Figure 6As shown, taking an application as an example, the first page includes control elements and image elements. Users pre-configure the image elements and control elements included in the first page to obtain the first page corresponding to the first configured page parameters that meet business requirements. When the first page needs to be applied to the application, the elements in the first page may be changed due to other users or other factors, causing changes in the page parameters such as the size and position of the image elements or control elements in the first page. At this time, the first page cannot be displayed according to the first configured page parameters. That is, when the first actual page parameters are different from the first configured page parameters, the screenshot operation on the first page is canceled to avoid taking screenshots of invalid or incorrect pages.

[0083] This application's embodiments employ a method that cancels the screenshot operation on the first page and generates an error message when the first verification result indicates a mismatch between the first actual page parameters and the first configured page parameters. By providing a unified service interface, developers can capture images and perform customized accuracy checks on the screenshot content. When the verification result indicates a mismatch, the screenshot operation can be canceled promptly, shortening the page screenshot cycle and detecting page errors early. Simultaneously, it filters out non-compliant pages, reducing screenshot requests for erroneous pages and improving resource utilization.

[0084] As an optional approach, before obtaining the first actual page parameters representing the first page by executing a pre-configured first page verification script, comparing the first actual page parameters with the first configured page parameters, and obtaining the first verification result, the method further includes:

[0085] In response to a page screenshot request message, a screenshot task is generated, wherein the screenshot task is used to take a screenshot of the first page;

[0086] If the current task to be executed is a screenshot task, insert the first page validation script into the page code of the first page to obtain the first page code.

[0087] Optionally, in this embodiment of the application, the screenshot task is generated by the backend system after receiving a page screenshot request message. After generating the screenshot task, it can be stored in CMQ. CMQ (Cloud Message Queue) is a distributed message queue service that provides a reliable message-based asynchronous communication mechanism. It can store messages sent and received between different distributed applications (or different components of the same application) in a reliable and effective CMQ queue, preventing message loss. CMQ supports simultaneous reading and writing by multiple processes without interference between sending and receiving, and does not require each application or component to be constantly running. When the task to be executed in CMQ is the screenshot task, the screenshot task is retrieved from CMQ, and the first page verification script is inserted into the page code of the first page to obtain the first page code.

[0088] It should be noted that when the built-in browsing area of ​​the backend system runs the code for the first page, it begins to search for the first page based on the identifier of the first page and compares whether the parameters of the first actual page match the parameters of the first configured page.

[0089] Optionally, in the embodiments of this application, the page code that inserts the first page verification script into the first page can be implemented, including but not limited to, by dynamic insertion. Specifically, the JS verification script is inserted into the page before the page is captured using the built-in browser's JS dynamic insertion mechanism. Then, the script execution command is sent through the control engine Puppeteer to execute the script content. Finally, the script execution result is returned to the backend system for classification and processing.

[0090] In this embodiment, a screenshot task is generated in response to a page screenshot request message. The screenshot task is used to take a screenshot of a first page. When the task to be executed is a screenshot task, the first page verification script is inserted into the page code of the first page to obtain the first page code. The first verification script can be inserted into the current page. Since the execution environment of the first verification script and the first page is the same, the first verification script can obtain all the content of the first page. Developers can easily perform various subsequent judgments, which improves the efficiency of page screenshot.

[0091] As an optional approach, by executing a pre-configured first page verification script, the first actual page parameters representing the first page are obtained, and the first actual page parameters are compared with the first configured page parameters to obtain the first verification result, including:

[0092] By executing the first page verification script in the first page code, the first actual page parameters of the first page represented by the identifier are obtained, and the first actual page parameters are compared with the first configuration page parameters.

[0093] If the first actual page parameter is the same as the first configured page parameter, a first verification result is generated, indicating that the first actual page parameter matches the first configured page parameter; if the first actual page parameter is different from the first configured page parameter, a first verification result is generated, indicating that the first actual page parameter does not match the first configured page parameter; or

[0094] If the difference between the first actual page parameter and the first configured page parameter is less than or equal to a first preset threshold, a first verification result is generated, wherein the first verification result indicates that the first actual page parameter matches the first configured page parameter; if the difference between the first actual page parameter and the first configured page parameter is greater than the first preset threshold, a first verification result is generated, wherein the first verification result indicates that the first actual page parameter does not match the first configured page parameter.

[0095] Optionally, in this embodiment of the application, the execution of the first page verification script in the first page code to obtain the first actual page parameters of the first page represented by the identifier may include, but is not limited to, executing the first page verification script to obtain the first actual page parameters of the first page. Specifically, it may include, but is not limited to, jumping to the first page in the built-in browser of the background system according to the identifier to obtain the first actual page parameters.

[0096] Optionally, in this embodiment, the matching of the first actual page parameter and the first configuration page parameter may include, but is not limited to, the first actual page parameter and the first configuration page parameter being the same. For example, when the first actual page parameter and the first configuration page parameter each include multiple parameters, and each of the multiple parameters is the same, then the first actual page parameter and the first configuration page parameter match. It may also include, but is not limited to, the difference between the first actual page parameter and the first configuration page parameter being less than or equal to a first preset threshold. For example, when the first actual page parameter and the first configuration page parameter each include multiple parameters, and the difference between some or all of the multiple parameters is less than or equal to the first preset threshold, then the first actual page parameter and the first configuration page parameter match.

[0097] Optionally, in this embodiment, the mismatch between the first actual page parameter and the first configured page parameter may include, but is not limited to, the first actual page parameter and the first configured page parameter being different. For example, when the first actual page parameter and the first configured page parameter each include multiple parameters, if any of the multiple parameters are different, then the first actual page parameter and the first configured page parameter are mismatched. It may also include, but is not limited to, the difference between the first actual page parameter and the first configured page parameter being greater than a first preset threshold. For example, when the first actual page parameter and the first configured page parameter each include multiple parameters, if the difference between some or all of the multiple parameters is greater than the first preset threshold, then the first actual page parameter and the first configured page parameter are mismatched.

[0098] It should be noted that during the comparison of the first actual page parameters and the first configured page parameters, the user can pre-configure the first preset threshold. For example, when the first actual page parameters include the first coordinate value M of element A and the first configured page parameters include the second coordinate value N of element A, the first actual page parameters match the first configured page parameters when the difference between M and N is less than or equal to the first preset threshold, and the first actual page parameters do not match the first configured page parameters when the difference between M and N is greater than the first preset threshold.

[0099] By employing the first page verification script in the first page code to obtain the first actual page parameters of the first page represented by the identifier, and comparing the first actual page parameters with the first configured page parameters to determine whether the first actual page parameters match the first configured page parameters, users can operate according to the access documentation without having to contact the backend system contact person separately. This reduces intermediate processes, improves access efficiency, and enables the definition of a standardized access process, thereby improving the efficiency of page screenshots.

[0100] In addition, users can customize the first preset threshold to adjust the influence of different page parameters on the verification results, avoid verification failures due to minor differences, and improve the fault tolerance of page screenshots.

[0101] As an alternative approach, the method also includes:

[0102] When a screenshot request message is used to request a screenshot of the second page, and the screenshot request message includes pre-configured second page parameters for the second page, the first page is accessed by an identifier, and the target operation is executed on the first page through a pre-configured target trigger to obtain the second page;

[0103] By executing the pre-configured second page verification script, the second actual page parameters of the second page are obtained, and the second actual page parameters are compared with the second configured page parameters to obtain the second verification result;

[0104] If the second verification result indicates that the parameters of the second actual page match the parameters of the second configured page, a screenshot is taken of the second page to obtain the target screenshot.

[0105] Optionally, in this embodiment, the second page is obtained by performing a target operation on the first page using a pre-configured target trigger. The target trigger may include, but is not limited to, element click triggers, response wait triggers, timeout wait triggers, etc.

[0106] Optionally, in the embodiments of this application, the second configuration page parameters pre-configured for the second page may include, but are not limited to, the configuration page parameters configured by the user when creating the second page, and may also include, but are not limited to, the configuration page parameters configured by the user when maintaining the second page.

[0107] For example, Figure 7 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 7 As shown, taking an application as an example, the first page includes image elements. The user pre-configures the target trigger (e.g., a response wait trigger, triggered upon receiving a "request to join" message) and pre-configures the image and control elements included in the second page to obtain second configuration page parameters that meet business requirements. When the second page needs to be applied to the application, the user first enters the first page through an identifier, then updates the first page to the second page through the target trigger, and obtains the page code corresponding to the second page. The pre-configured second page verification script is inserted into the page code of the second page. When a screenshot operation is required on the second page, the user executes the second page verification script to obtain the current actual page parameters of the second page as the second actual page parameters, and compares the second actual page parameters with the second configuration page parameters to obtain the second verification result. If the second verification result indicates that the second actual page parameters match the second configuration page parameters, a screenshot operation is performed on the second page to obtain the target screenshot.

[0108] This application's embodiments employ a method where, in cases where a screenshot request message is used to request a screenshot of a second page, and the screenshot request message includes pre-configured second page parameters for the second page, the first page is accessed via an identifier, and a target operation is executed on the first page using a pre-configured target trigger to obtain the second page. A pre-configured second page verification script is executed to obtain the second actual page parameters of the second page, which are then compared with the second configuration page parameters to obtain a second verification result. If the second verification result indicates that the second actual page parameters match the second configuration page parameters, a screenshot operation is performed on the second page to obtain the target screenshot. This method provides a unified service interface to support developers in capturing images and performing customized accuracy checks on the screenshot content, returning verification results instantly. By performing accuracy checks on the updated second page before taking a screenshot, the method reduces screenshot requests for erroneous pages, thereby improving resource utilization and increasing the efficiency of page screenshots. This solves the technical problem of low page screenshot efficiency in related technologies.

[0109] As an optional approach, a target operation can be executed on the first page using a pre-configured target trigger to generate the second page, including:

[0110] If the target trigger includes a page click trigger, a click operation is performed on the target element displayed on the first page, and in response to the click operation, the first page is updated to the second page; or

[0111] If the target trigger includes a response wait trigger, perform a response wait operation on the first page to obtain the second page; or

[0112] If the target trigger includes a timeout wait trigger, perform a timeout wait operation on the first page to obtain the second page.

[0113] Optionally, in the embodiments of this application, the page click trigger may include, but is not limited to, triggering a click operation on a target element included in the first page on the first page to update the first page to the second page. The target element may include, but is not limited to, image elements, text elements, control elements, etc. on the first page.

[0114] For example, Figure 8 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 8 As shown, in response to a page click trigger, a click instruction is generated for the "team" control on the first page, so that the click operation of the "team" control updates the first page to the second page.

[0115] Optionally, in this embodiment of the application, the above-mentioned response wait trigger waits on the first page until a page request of a preset type is received, and then updates the first page to the second page. The above-mentioned timeout wait trigger performs a timeout wait operation on the first page until the waiting time exceeds a preset time, and then updates the first page to the second page.

[0116] As an optional solution, a response wait operation is performed on the first page to obtain the second page, which includes:

[0117] Obtain the target page request on the first page, where the target page request is used to request an update from the first page to the second page;

[0118] When the request to the target page is completed, update the first page to the second page.

[0119] Optionally, in the embodiments of this application, the above-mentioned response wait trigger may include, but is not limited to, performing a response wait operation on the first page, waiting for the target page request to be completed, so as to update the first page to the second page, and the above-mentioned target page request may include, but is not limited to, the received trigger request, etc.

[0120] For example, Figure 9 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 9 As shown, in response to the response wait trigger, a response wait instruction for the first page is generated. When a "team request" request message is received, the first page is updated to the second page in response to the "team request" request message.

[0121] As an optional solution, a timeout wait is performed on the first page to retrieve the second page, which includes:

[0122] Waiting for the target duration on the first page;

[0123] If the target duration exceeds the preset duration threshold, the first page will be updated to the second page.

[0124] Optionally, in the embodiments of this application, the timeout wait trigger may include, but is not limited to, performing a timeout wait operation on the first page, waiting for a first preset duration on the first page to update the first page to the second page, and the first preset duration may include, but is not limited to, being pre-configured by the user.

[0125] For example, Figure 10 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 10As shown, in response to the timeout wait trigger, a timeout wait instruction for the first page is generated. When the wait time on the first page exceeds a first preset time, the first page is updated to the second page.

[0126] As an alternative approach, the method also includes:

[0127] After obtaining the page screenshot request message, a target signature string for identity authentication is generated for the target account that sent the page screenshot request message;

[0128] The target account is authenticated based on the target signature string to obtain the authentication result. The authentication result indicates whether the target account is allowed to take a screenshot of the first page.

[0129] If the target signature string passes the verification, the identity authentication result indicates that the target account is allowed to take a screenshot of the first page.

[0130] Optionally, in this embodiment, the target signature string is a temporary signature string generated after obtaining the page screenshot request message. The authentication of the target account based on the target signature string is performed after obtaining the page screenshot request message but before generating the screenshot task. When the authentication result indicates that the target account is allowed to take a screenshot of the first page, the screenshot task is generated, and the first page verification script begins verification. The target account is the user, the account that sent the page screenshot request message.

[0131] For example, Figure 11 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 11 As shown, the steps may include, but are not limited to, the following:

[0132] S1, the target account initiates a screenshot request message, and the backend system receives the above screenshot request message;

[0133] S2 performs anti-fraud verification on the target account (e.g., image verification code verification), where a Redis database can be preset to complete the verification;

[0134] S3 performs identity authentication on target accounts that have successfully passed anti-fraud verification.

[0135] S4 generates a screenshot task associated with the screenshot request message for the target account that has successfully authenticated its identity.

[0136] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0137] Through the embodiments of this application, the account to be screenshotted can be authenticated before the screenshot operation is performed, thereby improving the security of page data.

[0138] As an optional approach, a target signature string for authentication is generated for the target account sending the screenshot request message, including:

[0139] Assign a globally unique target key to the target account;

[0140] Generate the target signature string based on the timestamp of the screenshot request message, the request path of the screenshot request message, and the target key.

[0141] Optionally, in the embodiments of this application, the above-mentioned allocation of a globally unique target key to the target account may include, but is not limited to, allocating a temporary globally unique target key to the target account after receiving a page screenshot request message, or may include, but is not limited to, allocating a fixed globally unique target key to the target account before receiving a page screenshot request message when the target account is pre-registered.

[0142] Optionally, in this embodiment of the application, the above-mentioned generation of the target signature string based on the timestamp of the page screenshot request message, the request path of the page screenshot request message, and the target key can be implemented by steps including but not limited to the following:

[0143] S1, assign a unique key to each account: secret_key (corresponding to the aforementioned target key);

[0144] S2, using the Hmac cryptographic digest generation tool and the SHA1 algorithm, combines the current timestamp and the key to obtain the intermediate encrypted string: signkey.

[0145] S3, use url_encode to encode the current request path (corresponding to the aforementioned request path or identifier) ​​to obtain the encoded address: url

[0146] S4. Using the Hmac cryptographic digest generation tool and the SHA1 algorithm, combine the results obtained in steps S2 and S3 to generate the final encrypted string (corresponding to the aforementioned target signature string).

[0147] As an optional solution, a screenshot of the first page can be taken to obtain the target screenshot, including:

[0148] When the screenshot request message requests a screenshot of the entire first page, the entire first page is captured to obtain the target screenshot; or

[0149] When a screenshot request message is used to request a screenshot of a portion of the first page, a screenshot operation is performed on that portion of the first page to obtain the target screenshot; or

[0150] When a screenshot request message is used to request a screenshot of a target element on the first page, the screenshot operation is performed on the target element to obtain the target screenshot.

[0151] Optionally, in this embodiment of the application, taking a screenshot of the entire area of ​​the first page may include, but is not limited to, taking a screenshot of the entire first page; taking a screenshot of a partial area of ​​the first page may include, but is not limited to, taking a screenshot of a selected partial area of ​​the first page; and taking a screenshot of a target element of the first page may include, but is not limited to, taking a screenshot of a selected control element, image element, text element, etc. on the first page.

[0152] It should be noted that the above selection methods may include, but are not limited to, inputting dimensions or coordinates, or selecting by touch operation.

[0153] Through the embodiments of this application, screenshots can be taken of the entire page, a specified area of ​​the page, or a specific element of the page. This allows for targeted screenshot operations and improves the efficiency of page screenshots.

[0154] As an optional approach, after taking a screenshot of the first page to obtain the target screenshot, the method also includes:

[0155] Perform data analysis on the target screenshot to obtain analysis results, which include at least one of the following:

[0156] Page views reached, where the number of page views reached represents the number of times a user viewed the first page;

[0157] Dwell time, where dwell time refers to the length of time a user stays on the first page.

[0158] Optionally, in this embodiment of the application, the number of page views mentioned above is used to represent the number of times the user triggers the browsing of the first page. For example, the number of times the user clicks on the target screenshot can be obtained to analyze and obtain the number of times the user browses the first page.

[0159] For example, Figure 12 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 12 As shown, after taking a screenshot of the first page, the target screenshot is obtained. Based on the target screenshot, it is checked whether the user has left after viewing the target screenshot, and thus the number of times the user has viewed the first page is determined.

[0160] Optionally, in this embodiment of the application, the above-mentioned dwell time is used to represent the duration of time spent on the first page. For example, the duration of time a user spends on the target screenshot can be obtained to analyze and obtain the duration of time the user spends on the first page.

[0161] For example, Figure 13 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 13 As shown, after taking a screenshot of the first page, a target screenshot is obtained. Based on the target screenshot, the duration of the user's stay on the target screenshot is queried, and thus, the duration of the user's stay on the first page is determined.

[0162] The following specific examples will further explain this application:

[0163] This application can include, but is not limited to, addressing web developers' needs for page screenshotting and accuracy monitoring. By providing a unified service interface, it supports developers in capturing images from different dimensions, such as the entire page or a specified area of ​​the page, and performs customized monitoring of the accuracy of the screenshot content, returning the monitoring results in real time to assist developers in handling error pages.

[0164] This application utilizes the browser's JS dynamic insertion mechanism and leverages the browser's control engine to dynamically insert the developer's page verification script into the screenshot page. It then detects differences in the page to be captured in real time and immediately reports pages that do not meet expectations, thereby achieving the purpose of monitoring the accuracy of page screenshots.

[0165] This application decouples the definition and execution of detection rules, delegating rule definition to the system user while the system only handles rule execution. Leveraging the versatility of JavaScript in web development, it uses JavaScript as the carrier for rule definition, fully adopting standard JavaScript specifications. This allows users to easily define page detection rules, significantly lowering the barrier to entry.

[0166] This application allows for pre-emptive detection by dynamically inserting validation scripts into the screenshot page using a JavaScript dynamic insertion mechanism. This enables accuracy verification of the page content before screenshotting, allowing for early detection of page errors. Simultaneously, it filters out non-compliant pages, reducing screenshot requests for erroneous pages and improving resource utilization.

[0167] This application allows for the definition of a standardized access process, enabling users to follow the access documentation without needing to contact the system administrator separately. This reduces intermediate steps and improves access efficiency. By decoupling the rule definitions and isolating the variable parts of the entire access process, the remaining parts are all controllable and changeable, thus allowing for the definition of a standardized access process.

[0168] The page screenshot and accuracy detection system designed in this application is applied in actual products as follows:

[0169] Figure 14 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 14 As shown, the access configuration process includes, but is not limited to, the following steps:

[0170] S1, Register and access the application / obtain appid and secret_key;

[0171] S2, Configure the page validation script.

[0172] Figure 15 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 15 As shown, the process of taking a screenshot of a page includes, but is not limited to, the following steps:

[0173] S1, the user initiates a screenshot request;

[0174] S2, perform page validation / screenshot;

[0175] S3, Report the page verification results / Upload a screenshot of the page;

[0176] S4 returns the screenshot data.

[0177] The above verification system will inspect and take a screenshot of the requested page, and return the following data:

[0178] 1) Screenshot: An image of the entire page, a specified area of ​​the page, or a specific element of the page;

[0179] 2) Monitoring results: such as result codes, monitoring error messages, etc.

[0180] It should be noted that the page screenshots obtained by users can be used for page browsing and dwell time analysis, and the monitoring results can be connected to the alarm system to provide real-time feedback on the screenshots.

[0181] The hardware environment for this application may include, but is not limited to, a Linux system server.

[0182] The screenshot detection system of this application is based on a built-in browser and uses the built-in browser control engine Puppeteer to send page control instructions to the browser, thereby realizing page operation, page detection and page screenshot capabilities.

[0183] Figure 16 This is a schematic diagram illustrating another optional page screenshot verification method according to an embodiment of this application, such as... Figure 16 As shown, the end-to-end design of the screenshot detection system includes, but is not limited to, the following steps:

[0184] S1, the user logs into the client using the target account;

[0185] S2, the user sends a screenshot request message to the screenshot detection system's arousal page through the target account;

[0186] S3 performs anti-fraud verification on the target account;

[0187] S4, if the anti-fraud verification of the target account passes, then perform identity authentication on the target account;

[0188] S5, after successfully authenticating the target account, generates a screenshot task corresponding to the page screenshot request message and sends it to the CMQ queue;

[0189] S6, when the task to be executed in the CMQ queue is a screenshot task, retrieve the screenshot task;

[0190] S7 performs page validation on the first page to be screenshotted;

[0191] S8. If the page verification fails (corresponding to the aforementioned mismatch between the first configured page parameters and the first actual page parameters), an error message is generated.

[0192] S9. If the page verification is successful (corresponding to the first configuration page parameters and the first actual page parameters matching as mentioned above), perform the screenshot operation to obtain the target screenshot;

[0193] S10, upload the target screenshot to the COS server;

[0194] S11 returns a screenshot or the result of analyzing the screenshot to the client.

[0195] To facilitate user interaction with the page before taking a screenshot, the system provides several types of triggers that users can use to perform specific operations:

[0196] 1. Element click trigger: Click on an element on the screenshot page.

[0197] 2. Response wait trigger: Waits for the specified request to complete.

[0198] 3. Timeout wait trigger: Waits for a specified period of time to complete.

[0199] During the page operation phase, the system will execute the above triggers in sequence, using the control engine Puppeteer to convert user-defined operations into corresponding control commands and send them to the built-in browser to execute page operations.

[0200] During the page validation phase, the JS validation script provided by the user during integration is dynamically inserted into the page for execution. After the script completes execution, the user returns the validation result to the system according to the system-defined interface specifications. The system then selects whether to take a screenshot of the page or report an error based on the result code.

[0201] This application also includes, but is not limited to, the following specific embodiments:

[0202] 1. Signature string generation and verification algorithm

[0203] The signature string is used for identity verification upon system access and is fundamental to the secure and stable operation of the system. Generating a unique signature string for each access user involves several important factors:

[0204] a) Assign a unique key to each user as a factor in the generated string.

[0205] b) Introduce the current Unix timestamp as a factor in the generated string.

[0206] c) Use the current request path as a factor in the generated string.

[0207] Signature string generation process description:

[0208] a) Assign a unique secret key to each user.

[0209] b) Using the Hmac cryptographic digest generator and the SHA1 algorithm, combine the current timestamp and the key to obtain the intermediate encrypted string: signkey.

[0210] c) Encode the current request path using url_encode to obtain the encoded address: url

[0211] d) Using the Hmac cryptographic digest generator and the SHA1 algorithm, combine the results obtained in steps b) and c) to generate the final encrypted string.

[0212] The complete JavaScript program for generating the encrypted string is shown below:

[0213] const crypto=require(′crypto′);

[0214] const signtime=Math.floor(Date.now() / 1000).toString();

[0215] const signKey=crypto.createHmac(′sha1′, secret_key).update(signtime).digest(′hex′);

[0216] const uri=encodeURIComponent(request_path);

[0217] const signature=crypto.createHmac(′sha1′,signKey).update(uri).digest(′hex′);

[0218] const token=`signtime=${signtime}&signature=${signature}`;

[0219] 2. Implementation methods for page validation

[0220] Utilizing the browser's dynamic JavaScript insertion mechanism, a JavaScript validation script is inserted into the page before screenshotting. The Puppeteer control engine then sends execution commands to the script, executing its content. Finally, the execution results are returned to the system for processing. Because the JavaScript validation script resides on the current page, its execution environment is identical to the page to be captured, allowing it to capture the entire content of the current page. This enables developers to easily perform various checks. The validation script's interface definition and sample input are as follows:

[0221]

[0222] Example script:

[0223]

[0224] 3. Implementation methods of page triggers

[0225] Page triggers are a series of preset browser-triggered actions. The system provides a unified and easy-to-use trigger interface, and users define their own actions according to the interface. During execution, the system obtains the user's trigger configuration, converts it into Puppeteer control instructions, and then the control engine Puppeteer delivers them to the browser for execution.

[0226] a) Page click trigger:

[0227] Interface definition:

[0228] {type: 'click', selector: element identifier}

[0229] Trigger example:

[0230] {type: 'click', selector: '.coupon-single-use-btn'}

[0231] Execution code:

[0232]

[0233] b) Response Wait Trigger

[0234] Interface definition:

[0235] {type: 'response', url: request link}

[0236] Trigger example:

[0237] {type: ′response′, url: ′https: / / xxx′}

[0238] Execution code:

[0239]

[0240] c) Timeout wait trigger

[0241] Interface definition:

[0242] {type: 'timeout', timeout: waiting time}

[0243] Trigger example:

[0244] {type: 'timeout', timeout: 100}

[0245] Execution code:

[0246] this.page.waitForTimeout(trigger.timeout)

[0247] .then(()=>prevResults)

[0248] .catch(e=>throwTriggerError(TRIGGER_TYPE.TIMEOUT,e));

[0249] This application can easily expand user monitoring rules, reduce platform intervention costs, lower the barrier to entry for developers, effectively reduce monitoring lead time, obtain error information faster than the original solution, and shorten the exposure time of error pages. This application can realize a complete solution from page detection to page screenshot, expand the external service capabilities of the advertising landing page component platform, and enhance the platform's influence.

[0250] It is understood that in the specific implementation of this application, data such as user information and page parameters are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0251] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0252] According to another aspect of the embodiments of this application, a page screenshot verification device is also provided for implementing the above-described page screenshot verification method. For example... Figure 17 As shown, the device includes:

[0253] The acquisition module 1702 is used to acquire a page screenshot request message, wherein the page screenshot request message includes an identifier of the first page to be screenshotted;

[0254] The verification module 1704 is used to, when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes a first configuration page parameter pre-configured for the first page, execute a pre-configured first page verification script to obtain the first actual page parameter of the first page represented by the identifier, compare the first actual page parameter with the first configuration page parameter, and obtain a first verification result.

[0255] The screenshot module 1706 is used to perform a screenshot operation on the first page to obtain a target screenshot when the first verification result indicates that the first actual page parameters match the first configured page parameters.

[0256] As an optional solution, the device is further configured to: cancel the screenshot operation on the first page and generate an error message when the first verification result indicates that the first actual page parameters do not match the first configured page parameters.

[0257] As an optional solution, the device is further configured to: before obtaining the first actual page parameters of the first page represented by the identifier by executing a pre-configured first page verification script, comparing the first actual page parameters with the first configured page parameters, and obtaining a first verification result, generate a screenshot task in response to the page screenshot request message, wherein the screenshot task is used to perform the screenshot operation on the first page; when the task to be executed is the screenshot task, insert the first page verification script into the page code of the first page to obtain the first page code.

[0258] As an optional solution, the device is used to obtain the first actual page parameters of the first page represented by the identifier by executing a pre-configured first page verification script, and compare the first actual page parameters with the first configured page parameters to obtain a first verification result: by executing the first page verification script in the first page code, obtaining the first actual page parameters of the first page represented by the identifier, and comparing the first actual page parameters with the first configured page parameters; if the first actual page parameters are the same as the first configured page parameters, generating the first verification result, wherein the first verification result is used to indicate that the first actual page parameters match the first configured page parameters; in the case of the first actual page... If the actual page parameters differ from the first configured page parameters, the first verification result is generated, indicating that the actual page parameters do not match the first configured page parameters; or if the difference between the actual page parameters and the first configured page parameters is less than or equal to a first preset threshold, the first verification result is generated, indicating that the actual page parameters match the first configured page parameters; or if the difference between the actual page parameters and the first configured page parameters is greater than the first preset threshold, the first verification result is generated, indicating that the actual page parameters do not match the first configured page parameters.

[0259] As an optional solution, the apparatus is further configured to: when the page screenshot request message is used to request a screenshot of the second page, and the page screenshot request message includes a second configuration page parameter pre-configured for the second page, access the first page through the identifier, and perform a target operation on the first page through a pre-configured target trigger to obtain the second page; obtain the second actual page parameter of the second page by executing a pre-configured second page verification script, compare the second actual page parameter with the second configuration page parameter to obtain a second verification result; and when the second verification result indicates that the second actual page parameter matches the second configuration page parameter, perform a screenshot operation on the second page to obtain the target screenshot.

[0260] As an optional solution, the device is used to perform a target operation on the first page to obtain the second page by means of a pre-configured target trigger: if the target trigger includes a page click trigger, a click operation is performed on a target element displayed on the first page, and in response to the click operation, the first page is updated to the second page; or if the target trigger includes a response wait trigger, a response wait operation is performed on the first page to obtain the second page; or if the target trigger includes a timeout wait trigger, a timeout wait operation is performed on the first page to obtain the second page.

[0261] As an optional solution, the device is used to perform a response waiting operation on the first page to obtain the second page by: obtaining a target page request on the first page, wherein the target page request is used to request an update from the first page to the second page; and updating the first page to the second page when the target page request response is completed.

[0262] As an optional solution, the device is used to perform a timeout waiting operation on the first page to obtain the second page by: waiting for a target duration on the first page; and updating the first page to the second page if the target duration exceeds a preset duration threshold.

[0263] As an optional solution, the device is further configured to: after obtaining the page screenshot request message, generate a target signature string for identity authentication for the target account that sent the page screenshot request message; perform identity authentication on the target account according to the target signature string to obtain an identity authentication result, wherein the identity authentication result is used to indicate whether the target account is allowed to take a screenshot of the first page; if the target signature string passes the verification, determine that the identity authentication result indicates that the target account is allowed to take a screenshot of the first page.

[0264] As an optional solution, the device is used to generate a target signature string for identity authentication for the target account that sends the page screenshot request message by: assigning a globally unique target key to the target account; and generating the target signature string based on the timestamp of the page screenshot request message, the request path of the page screenshot request message, and the target key.

[0265] As an optional solution, the device is used to perform a screenshot operation on the first page in the following ways to obtain a target screenshot: when the page screenshot request message requests a screenshot of the entire area of ​​the first page, the device performs a screenshot operation on the entire area of ​​the first page to obtain the target screenshot; or when the page screenshot request message requests a screenshot of a partial area of ​​the first page, the device performs a screenshot operation on a partial area of ​​the first page to obtain the target screenshot; or when the page screenshot request message requests a screenshot of a target element of the first page, the device performs a screenshot operation on the target element to obtain the target screenshot.

[0266] As an optional solution, the device is further configured to: after taking a screenshot of the first page to obtain a target screenshot, perform data analysis on the target screenshot to obtain analysis results, wherein the analysis results include at least one of the following: number of page views, wherein the number of page views represents the number of times the user views the first page; and dwell time, wherein the dwell time represents the duration the user stays on the first page.

[0267] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable media 1811. When the computer program is executed by central processing unit 1801, it performs various functions provided in embodiments of this application.

[0268] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0269] Figure 18 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0270] It should be noted that, Figure 18 The computer system 1800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0271] like Figure 18 As shown, the computer system 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1802 or programs loaded from storage section 1808 into random access memory (RAM). The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An input / output interface 1805 (I / O interface) is also connected to the bus 1804.

[0272] The following components are connected to the input / output interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a local area network card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1180 is also connected to the input / output interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1180 as needed so that computer programs read from them can be installed into the storage section 1808 as needed.

[0273] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application 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 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit 1801, it performs various functions defined in the system of this application.

[0274] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described page screenshot verification method is also provided. This electronic device may be... Figure 1 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 19 As shown, the electronic device includes a memory 1902 and a processor 1904. The memory 1902 stores a computer program, and the processor 1904 is configured to execute the steps of any of the above method embodiments via the computer program.

[0275] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0276] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0277] S1, obtain the page screenshot request message, wherein the page screenshot request message includes the identifier of the first page to be screenshotted;

[0278] S2, when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes the first configuration page parameters pre-configured for the first page, the first actual page parameters of the first page represented by the identifier are obtained by executing the pre-configured first page verification script, and the first actual page parameters are compared with the first configuration page parameters to obtain the first verification result;

[0279] S3, if the first verification result indicates that the parameters of the first actual page match the parameters of the first configured page, then take a screenshot of the first page to obtain the target screenshot.

[0280] Alternatively, as those skilled in the art will understand, Figure 19The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 19 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 19 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 19 The different configurations shown.

[0281] The memory 1902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the page screenshot verification method and apparatus in this embodiment. The processor 1904 executes various functional applications and data processing by running the software programs and modules stored in the memory 1902, thereby implementing the aforementioned page screenshot verification method. The memory 1902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1902 may further include memory remotely located relative to the processor 1904, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1902 may be used, but is not limited to, to store information such as configuration page parameters and page verification scripts. As an example, such as... Figure 19 As shown, the memory 1902 may include, but is not limited to, the acquisition module 1702, verification module 1704, and screenshot module 1706 in the page screenshot verification device. Furthermore, it may include, but is not limited to, other module units in the page screenshot verification device, which will not be elaborated upon in this example.

[0282] Optionally, the aforementioned transmission device 1906 is used to receive or send data via a network. Specific examples of the network may include wired and wireless networks. In one example, the transmission device 1906 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1906 is a Radio Frequency (RF) module used for wireless communication with the Internet.

[0283] In addition, the aforementioned electronic device also includes: a display 1908 for displaying the aforementioned target screenshot; and a connection bus 1910 for connecting the various module components in the aforementioned electronic device.

[0284] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0285] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the page screenshot verification method provided in various alternative implementations of the page screenshot verification aspect described above.

[0286] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0287] S1, obtain the page screenshot request message, wherein the page screenshot request message includes the identifier of the first page to be screenshotted;

[0288] S2, when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes the first configuration page parameters pre-configured for the first page, the first actual page parameters of the first page represented by the identifier are obtained by executing the pre-configured first page verification script, and the first actual page parameters are compared with the first configuration page parameters to obtain the first verification result;

[0289] S3, if the first verification result indicates that the parameters of the first actual page match the parameters of the first configured page, then take a screenshot of the first page to obtain the target screenshot.

[0290] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0291] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0292] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0293] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0294] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0295] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0296] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0297] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for verifying page screenshots, characterized in that, include: Obtain a page screenshot request message, wherein the page screenshot request message includes an identifier of the first page to be screenshotted; When the page screenshot request message is used to request a screenshot of the first page, and the page screenshot request message includes a first configuration page parameter pre-configured for the first page, the first actual page parameter of the first page represented by the identifier is obtained by executing the pre-configured first page verification script, and the first actual page parameter is compared with the first configuration page parameter to obtain the first verification result. If the first verification result indicates that the first actual page parameters match the first configured page parameters, a screenshot operation is performed on the first page to obtain the target screenshot. The method further includes: when the page screenshot request message is used to request a screenshot of the second page, and the page screenshot request message includes a second configuration page parameter pre-configured for the second page, accessing the first page through the identifier, and performing a target operation on the first page through a pre-configured target trigger to obtain the second page; obtaining the second actual page parameter of the second page by executing a pre-configured second page verification script, comparing the second actual page parameter with the second configuration page parameter to obtain a second verification result; and when the second verification result indicates that the second actual page parameter matches the second configuration page parameter, performing a screenshot operation on the second page to obtain the target screenshot.

2. The method according to claim 1, characterized in that, The method further includes: If the first verification result indicates that the first actual page parameters do not match the first configured page parameters, the screenshot operation on the first page is canceled, and an error message is generated.

3. The method according to claim 1, characterized in that, Before obtaining the first actual page parameters of the first page represented by the identifier by executing a pre-configured first page verification script, and comparing the first actual page parameters with the first configured page parameters to obtain the first verification result, the method further includes: In response to the page screenshot request message, a screenshot task is generated, wherein the screenshot task is used to perform the screenshot operation on the first page; If the task to be executed is the screenshot task, the first page verification script is inserted into the page code of the first page to obtain the first page code.

4. The method according to claim 3, characterized in that, The step of obtaining the first actual page parameters of the first page represented by the identifier by executing a pre-configured first page verification script, comparing the first actual page parameters with the first configured page parameters, and obtaining the first verification result includes: By executing the first page verification script in the first page code, the first actual page parameters of the first page represented by the identifier are obtained, and the first actual page parameters are compared with the first configuration page parameters. If the first actual page parameter is the same as the first configured page parameter, the first verification result is generated, wherein the first verification result is used to indicate that the first actual page parameter matches the first configured page parameter; or If the difference between the first actual page parameter and the first configured page parameter is less than or equal to a first preset threshold, the first verification result is generated, wherein the first verification result indicates that the first actual page parameter matches the first configured page parameter; or If the difference between the first actual page parameter and the first configured page parameter is greater than the first preset threshold, the first verification result is generated, wherein the first verification result is used to indicate that the first actual page parameter and the first configured page parameter do not match.

5. The method according to claim 1, characterized in that, The step of executing a target operation on the first page through a pre-configured target trigger to obtain the second page includes: When the target trigger includes a page click trigger, a click operation is performed on the target element displayed on the first page, and in response to the click operation, the first page is updated to the second page; or If the target trigger includes a response wait trigger, perform a response wait operation on the first page to obtain the second page; or If the target trigger includes a timeout wait trigger, a timeout wait operation is performed on the first page to obtain the second page.

6. The method according to claim 5, characterized in that, The step of performing a response waiting operation on the first page to obtain the second page includes: Obtain a target page request on the first page, wherein the target page request is used to request an update from the first page to the second page; When the target page request response is completed, the first page is updated to the second page.

7. The method according to claim 5, characterized in that, The step of performing a timeout wait operation on the first page to obtain the second page includes: Wait for the target duration on the first page; If the target duration exceeds a preset duration threshold, the first page will be updated to the second page.

8. The method according to claim 1, characterized in that, The method further includes: After obtaining the page screenshot request message, a target signature string for identity authentication is generated for the target account that sent the page screenshot request message; The target account is authenticated based on the target signature string to obtain an authentication result, wherein the authentication result is used to indicate whether the target account is allowed to take a screenshot of the first page; If the target signature string passes the verification, the identity authentication result indicates that the target account is allowed to take a screenshot of the first page.

9. The method according to claim 8, characterized in that, The step of generating a target signature string for identity authentication for the target account that sent the page screenshot request message includes: Assign a globally unique target key to the target account; The target signature string is generated based on the timestamp of the screenshot request message, the request path of the screenshot request message, and the target key.

10. The method according to any one of claims 1 to 9, characterized in that, The step of taking a screenshot of the first page to obtain the target screenshot includes: When the screenshot request message requests a screenshot of the entire first page, a screenshot operation is performed on the entire first page to obtain the target screenshot; or When the screenshot request message requests a screenshot of a portion of the first page, a screenshot operation is performed on the portion of the first page to obtain the target screenshot; or When the screenshot request message is used to request a screenshot of a target element of the first page, a screenshot operation is performed on the target element to obtain the target screenshot.

11. The method according to any one of claims 1 to 9, characterized in that, After taking a screenshot of the first page to obtain the target screenshot, the method further includes: Data analysis is performed on the target screenshot to obtain analysis results, wherein the analysis results include at least one of the following: The number of page views reached indicates the number of times the user viewed the first page. Duration of stay, whereby the duration of stay refers to the length of time the user stays on the first page.

12. A device for verifying page screenshots, characterized in that, include: The acquisition module is used to acquire a page screenshot request message, wherein the page screenshot request message includes an identifier of the first page to be screenshotted; The verification module is configured to, when the page screenshot request message is used to request a screenshot of the first page and the page screenshot request message includes a first configuration page parameter pre-configured for the first page, obtain the first actual page parameter of the first page represented by the identifier by executing a pre-configured first page verification script, compare the first actual page parameter with the first configuration page parameter, and obtain a first verification result. The screenshot module is used to take a screenshot of the first page when the first verification result indicates that the first actual page parameters match the first configured page parameters, and obtain the target screenshot. The apparatus is further configured to: when the page screenshot request message is used to request a screenshot of the second page, and the page screenshot request message includes a second configuration page parameter pre-configured for the second page, access the first page through the identifier, and perform a target operation on the first page through a pre-configured target trigger to obtain the second page; obtain the second actual page parameter of the second page by executing a pre-configured second page verification script, compare the second actual page parameter with the second configuration page parameter to obtain a second verification result; and when the second verification result indicates that the second actual page parameter matches the second configuration page parameter, perform a screenshot operation on the second page to obtain the target screenshot.

13. The apparatus according to claim 12, characterized in that, The device is also used for: If the first verification result indicates that the first actual page parameters do not match the first configured page parameters, the screenshot operation on the first page is canceled, and an error message is generated.

14. The apparatus according to claim 12, characterized in that, Before obtaining the first actual page parameters of the first page represented by the identifier by executing a pre-configured first page verification script, comparing the first actual page parameters with the first configured page parameters, and obtaining the first verification result, the device is further configured to: In response to the page screenshot request message, a screenshot task is generated, wherein the screenshot task is used to perform the screenshot operation on the first page; If the task to be executed is the screenshot task, the first page verification script is inserted into the page code of the first page to obtain the first page code.

15. The apparatus according to claim 14, characterized in that, The device is used to obtain the first actual page parameters of the first page represented by the identifier by executing a pre-configured first page verification script, and compare the first actual page parameters with the first configured page parameters to obtain a first verification result: By executing the first page verification script in the first page code, the first actual page parameters of the first page represented by the identifier are obtained, and the first actual page parameters are compared with the first configuration page parameters. If the first actual page parameter is the same as the first configured page parameter, the first verification result is generated, wherein the first verification result is used to indicate that the first actual page parameter matches the first configured page parameter; or If the difference between the first actual page parameter and the first configured page parameter is less than or equal to a first preset threshold, the first verification result is generated, wherein the first verification result indicates that the first actual page parameter matches the first configured page parameter; or If the difference between the first actual page parameter and the first configured page parameter is greater than the first preset threshold, the first verification result is generated, wherein the first verification result is used to indicate that the first actual page parameter and the first configured page parameter do not match.

16. The apparatus according to claim 12, characterized in that, The device is configured to execute a target operation on the first page via a pre-configured target trigger to obtain the second page: When the target trigger includes a page click trigger, a click operation is performed on the target element displayed on the first page, and in response to the click operation, the first page is updated to the second page; or If the target trigger includes a response wait trigger, perform a response wait operation on the first page to obtain the second page; or If the target trigger includes a timeout wait trigger, a timeout wait operation is performed on the first page to obtain the second page.

17. The apparatus according to claim 16, characterized in that, The device is used to perform a response waiting operation on the first page to obtain the second page in the following manner: Obtain a target page request on the first page, wherein the target page request is used to request an update from the first page to the second page; When the target page request response is completed, the first page is updated to the second page.

18. The apparatus according to claim 16, characterized in that, The device is used to perform a timeout waiting operation on the first page to obtain the second page in the following manner: Wait for the target duration on the first page; If the target duration exceeds a preset duration threshold, the first page will be updated to the second page.

19. The apparatus according to claim 12, characterized in that, The device is also used for: After obtaining the page screenshot request message, a target signature string for identity authentication is generated for the target account that sent the page screenshot request message; The target account is authenticated based on the target signature string to obtain an authentication result, wherein the authentication result is used to indicate whether the target account is allowed to take a screenshot of the first page; If the target signature string passes the verification, the identity authentication result indicates that the target account is allowed to take a screenshot of the first page.

20. The apparatus according to claim 19, characterized in that, The device is used to generate a target signature string for identity authentication for the target account that sends the page screenshot request message in the following manner: Assign a globally unique target key to the target account; The target signature string is generated based on the timestamp of the screenshot request message, the request path of the screenshot request message, and the target key.

21. The apparatus according to any one of claims 12 to 20, characterized in that, The device is used to take a screenshot of the first page in the following manner to obtain a target screenshot: When the screenshot request message is used to request a screenshot of the entire area of ​​the first page, a screenshot operation is performed on the entire area of ​​the first page to obtain the target screenshot; or When the screenshot request message is used to request a screenshot of a portion of the first page, a screenshot operation is performed on a portion of the first page to obtain the target screenshot; or When the screenshot request message is used to request a screenshot of a target element of the first page, a screenshot operation is performed on the target element to obtain the target screenshot.

22. The apparatus according to any one of claims 12 to 20, characterized in that, After taking a screenshot of the first page to obtain the target screenshot, the device is further used to: Data analysis is performed on the target screenshot to obtain analysis results, wherein the analysis results include at least one of the following: The number of page views reached indicates the number of times the user viewed the first page. Duration of stay, whereby the duration of stay refers to the length of time the user stays on the first page.

23. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or computer at runtime as described in any one of claims 1 to 11.

24. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 11.

25. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 11 through the computer program.

Citation Information

Patent Citations

  • Webpage screenshot method and device, storage medium and electronic equipment

    CN112579948A