Method, device and equipment for counting webpage people flow and storage medium
By automatically extracting web page frames and using the AI big data platform to identify polygonal areas, it solves the problems of low identification efficiency and high cost in the existing technology, and achieves fast and efficient web page traffic statistics with flexibility and low cost.
Patent Information
- Application Number
- CN202410681708.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-17
AI Technical Summary
It is difficult for the existing technology to quickly and efficiently identify web page traffic, and the cost of developing new interfaces and adding equipment is high, and the identification efficiency is low.
By automatically extracting the frame at the preset time in the multi-threaded web page, customizing the selection area, determining the vertex coordinates, and inputting the frame address, client ID, client key, access token and vertex coordinates into the AI big data platform , using the AI platform to identify polygonal areas to count people flow.
It can quickly and efficiently count the number of people in multiple web pages, and can change the required web pages at any time, which is convenient, flexible and low-cost.
Smart Images

Figure CN118658111A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a method, device, equipment and storage medium for counting web page traffic. Background Art
[0002] Crowd flow identification is an important technology and management method that can help us better understand the flow of people, optimize resource allocation, and improve management efficiency. For example, counting the flow of people in factories and parks can help organizers better plan activity processes, arrange service personnel, and manage the use of facilities; at different times, crowd flow identification can help security personnel identify potential safety hazards, such as crowding, illegal gatherings, etc., so as to take preventive measures to ensure public safety.
[0003] Nowadays, most civilian and commercial cameras can be accessed in the form of web pages, and the video data of the camera can be observed by accessing the web page. Most existing manufacturers do not provide access to the underlying source code of video data. In addition, most methods directly output data through the back-end interface and then implement it through algorithms. Usually, developing a new interface and adding equipment costs a lot of manpower and material resources, and the recognition efficiency is low.
[0004] Therefore, how to quickly and efficiently identify web page traffic is a technical problem that urgently needs to be solved. Summary of the invention
[0005] The main purpose of the present invention is to provide a method, device, equipment and storage medium for counting the number of people on a web page, which can quickly and efficiently count the number of people on multiple web pages and can replace the required web pages at any time, which is convenient, flexible and low-cost.
[0006] In a first aspect, the present application provides a method for counting web page traffic, wherein the method comprises the steps of:
[0007] Automatically extracting a picture frame at a preset time in a multi-threaded web page, and customizing a frame selection area of the picture frame;
[0008] Determine the vertex coordinates of the frame selection area;
[0009] The address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the selected area are input into the AI big data platform to count the web page traffic.
[0010] In combination with the first aspect, as an optional implementation method, verify the accuracy of the address of the picture frame, the client ID, the client key, the access token, and the vertex coordinates of the selected area;
[0011] If any of the verifications fails, the default is to count the number of people in the entire frame;
[0012] If all the checks are successful, the vertex coordinates of the framed area are connected end to end in a counterclockwise direction to form a polygonal area on the picture frame;
[0013] The AI big data platform is used to identify polygonal areas to count the traffic on the page.
[0014] In combination with the first aspect above, as an optional implementation method, determining whether the current webpage has a login page;
[0015] If there is no login page, directly extract the current screen frame;
[0016] If there is a login page, use the plug-in in the automated testing tool selenium to log in to the current page, and after entering the page, determine whether all the elements in the current page appear, where the elements include: labels, text, pictures, links, buttons, forms, videos and audios;
[0017] If it does not appear within the preset time, the picture frame extraction process is terminated and an error message is fed back for maintenance.
[0018] In combination with the first aspect, as an optional implementation method, a network link URL corresponding to the screen frame to be captured is defined, and the screen frame in the multi-threaded web page is automatically extracted at a preset time using the automated testing tool selenium through the URL.
[0019] In combination with the first aspect above, as an optional implementation method, the frame selection area of the picture frame is set manually or automatically according to needs.
[0020] In combination with the first aspect, as an optional implementation method, based on the extracted picture frame, the vertex coordinates of the selection area are determined in units of pixels of the picture frame.
[0021] In combination with the first aspect above, as an optional implementation method, the extracted picture frames are cached as pictures in a preset format and stored in a set path.
[0022] In a second aspect, the present application provides a device for counting web page traffic, the device comprising:
[0023] An execution module, which is used to automatically extract a picture frame at a preset time in a multi-threaded web page, and customize a frame selection area of the picture frame;
[0024] A determination module, which is used to determine the vertex coordinates of the frame selection area;
[0025] The processing module is used to input the address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the selected area into the AI big data platform to count the web page traffic.
[0026] In a third aspect, the present application further provides an electronic device, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method described in any one of the first aspects is implemented.
[0027] In a fourth aspect, the present application further provides a computer-readable storage medium storing computer program instructions, which, when executed by a computer, enables the computer to execute any of the methods described in the first aspect.
[0028] The present application provides a method, device, equipment and storage medium for counting the number of people on a web page, wherein the method includes the steps of automatically extracting a preset time frame in a multi-threaded web page, and customizing a frame selection area of the frame; determining the vertex coordinates of the frame selection area; inputting the address of the frame, the client ID, the client key, the access token and the vertex coordinates of the frame selection area into an AI big data platform to count the number of people on the web page. The present application can quickly and efficiently identify the number of people on multiple web pages, and can change the required web pages at any time, which is convenient, flexible and low-cost.
[0029] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0031] Figure 1 A flow chart of a method for counting web page traffic provided in an embodiment of the present application;
[0032] Figure 2 A schematic diagram of a device for counting web page traffic provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram of counting human traffic provided in an embodiment of the present application;
[0034] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application;
[0035] Figure 5 A schematic diagram of a computer-readable program medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0037] Furthermore, the drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the blocks shown in the drawings are functional entities and do not necessarily correspond to physically or logically separate entities.
[0038] The embodiments of the present application provide a method, device, equipment and storage medium for counting the number of people on a web page, which can quickly and efficiently identify the number of people on multiple web pages and can replace the required web pages at any time, which is convenient, flexible and low-cost.
[0039] In order to achieve the above technical effects, the general idea of this application is as follows:
[0040] A method for counting web page traffic, the method comprising the steps of:
[0041] S101: automatically extracting a picture frame at a preset time in a multi-threaded web page, and customizing a frame selection area of the picture frame.
[0042] S102: Determine the vertex coordinates of the selected area.
[0043] S103: Input the address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the selected area into the AI big data platform to count the web page traffic.
[0044] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0045] Reference Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for counting web page traffic provided by the present invention. Figure 1 As shown, the method comprises the steps of:
[0046] Step S101: automatically extracting a picture frame at a preset time in a multi-threaded web page, and customizing a frame selection area of the picture frame.
[0047] Specifically, a network link URL corresponding to a screen frame to be captured is defined, and the screen frame in the multi-threaded web page is automatically extracted at a preset time by using the automated testing tool selenium through the URL.
[0048] The frame selection area of the picture frame is set manually or automatically according to the requirements. It is understandable that after the picture frame is extracted, the identification area can be manually or automatically framed according to the actual requirements.
[0049] For easier understanding, an example is given. Install the automated testing tool selenium on the computer device, define the network link URL and screenshot ID list corresponding to the frame to be captured, and complete it through a custom webpage_screenshot function. The screenshot ID list is used to facilitate subsequent parameter transmission and changes.
[0050] Then, the automated testing tool selenium is used to automatically extract the screen frames in the multi-threaded web page at a preset time. For example, if you want to extract the screen frame at 12 o'clock, then set the running program for capturing the screen frame at 12 o'clock, and the automated testing tool will automatically extract the screen frame at the set time, that is, capture the image.
[0051] It should be noted that multithreading means that you can operate on multiple pages at the same time, for example, at 12 o'clock, you can capture the screen frames (images) of multiple pages at the same time. It can be understood that multithreading can improve CPU utilization, and when operating multiple threads to open multiple web pages at the same time, the program will not freeze or become unresponsive when performing tedious operations.
[0052] In one embodiment, it is determined whether the current web page has a login page; if there is no login page, the current screen frame is directly extracted; if there is a login page, a plug-in in the automated testing tool selenium is used to log in to the current page, and after entering the page, it is determined whether all elements in the current page appear, wherein the elements include: labels, texts, pictures, links, buttons, forms, videos and audios; if they do not appear within a preset time, the screen frame extraction process is terminated, and an error message is fed back for maintenance.
[0053] It can be understood that before automatically extracting the picture frame at the preset time in the multi-threaded web page, it is determined whether the current web page has a login interface. If there is no login page, the current picture frame is directly captured. If there is a login page, the find_element method of the webDriver (chormDriver) control in selenium is used to find the control for the required input data, and the send_keys method is used to pass the data and submit the form. After entering the web page, the EC.visibility_of_element_located method is used to determine whether all elements in the current page appear. If they do, the picture frame is automatically extracted, where the elements include: HTML tags, text, pictures, links, buttons, forms, videos, audios, and any other content that can be displayed on the web page.
[0054] In one embodiment, the extracted picture frames are cached as png picture data and stored in a set path. It should be noted that the purpose of storing in a specified path is to facilitate data acquisition and data transmission.
[0055] Step S102: Determine the vertex coordinates of the selected area.
[0056] Specifically, based on the extracted picture frame, the vertex coordinates of the selected area are determined in units of pixels of the picture frame. It can be understood that the selected area is a polygon, and the vertex coordinates of the polygon can be determined by calculating the vertex coordinates in units of pixels of the picture frame. Optionally, the vertex coordinates can also be obtained through software.
[0057] Step S103: Input the address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the selected area into the AI big data platform to count the web page traffic.
[0058] Specifically, verify the accuracy of the address of the picture frame, the client ID (clientid), the client secret (clientsecret), the access token (accesstoken) and the vertex coordinates of the selected area;
[0059] If any of the verifications fails, the default is to count the number of people in the entire frame;
[0060] If all the checks are successful, the vertex coordinates of the framed area are connected end to end in a counterclockwise direction to form a polygonal area on the picture frame;
[0061] The AI big data platform is used to identify polygonal areas to count the traffic on the page.
[0062] Among them, the data of the picture frame address, client ID, client key, and access token have all been obtained in advance.
[0063] It should be noted that the address of the picture frame has a corresponding relationship with the framed area, which can be understood as the address of image A corresponding to the captured image A in page A.
[0064] In one embodiment, the region coordinates can be customized to achieve polygonal region setting. A maximum of 10 regions are supported. If more than 10 regions are input, the first 10 regions are intercepted for recognition.
[0065] In one embodiment, the coordinate principle of the irregular polygon input AI big data platform is counterclockwise, with the upper left corner of the image as the coordinate zero point, the right is the X-axis direction, and the downward is the Y-axis direction. If the coordinate is empty or there is no coordinate, or the area parameter is set incorrectly, the number of people in the entire picture is recognized by default. It can be understood that if there are four vertex coordinates in the framed area, and one of the coordinates is wrongly checked, then the flow of people in the entire picture frame is counted by default. If all the checks are passed, the flow of people in the framed area is identified and counted.
[0066] Examples of incorrect coordinate settings include: a certain coordinate is greater than or equal to the original image size, the x and y coordinates do not appear in pairs, etc. When multiple areas are set, if any coordinate setting is incorrect, the area parameter is considered incorrect and invalid. It should be explained that the area parameter can be understood as the vertex coordinates of the selected area.
[0067] The area parameter setting format: multiple areas are separated by English semicolons ";". Coordinates in the same area are separated by English commas "," and are closed by default. A single polygon area: x1, y1, x2, y2, x3, y3... xn, yn, where xn, yn can be understood as a single polygon vertex.
[0068] Multiple polygonal regions:
[0069] xa1, ya1, xa2, ya2, xa3, ya3... xan, yan; xb1, yb1, xb2, yb2, xb3, yb3... xbn, ybn; It is understandable that if there are two polygons in the selected area in the picture frame, then the two are separated by ";" and then entered into the AI big data platform. It needs to be explained that, for example, after verifying that xa1 and ya1 are correct, if there is a problem with the coordinates, then xa2 and ya2 are entered. By default, the flow of people in the entire picture frame is counted. It is understandable that the image is represented by a coordinate system, and the points in the coordinate system are connected end to end to form an irregular area. If the points passed in are not enough to form a closed figure or the format is wrong, an error is reported, and the algorithm considers that the coordinates are invalid, that is, the selected area is reflected in the program in the form of coordinates for statistical identification.
[0070] In one embodiment, based on the automated testing tool selenium installed on the computer, the required web page data (the address of the screen frame, the client ID, the client key, the access token and the vertex coordinates of the selected area) is extracted through a custom algorithm and stored in the local computer. Subsequently, the extracted required web page data is transmitted to the cloud. After receiving the transmitted data, the cloud verifies whether the parameters are correct. If so, the correct data is fed back to the computer. If not, an error code is generated and the error code is verified. When the access token is wrong, an error is reported and manual maintenance is performed. If there is no error in the access platform, the AI big data platform is used to count the flow of people in the selected area in the picture.
[0071] Reference Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a device for counting web page traffic provided by the present invention. Figure 2 As shown, the device comprises:
[0072] Execution module 201: It is used to automatically extract the picture frame at a preset time in the multi-threaded web page, and customize the frame selection area of the picture frame.
[0073] Determination module 202: used to determine the vertex coordinates of the frame selection area.
[0074] Processing module 203: It is used to input the address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the selected area into the AI big data platform to count the web page traffic.
[0075] Furthermore, in a possible implementation manner, the processing module is further used to verify the accuracy of the address of the picture frame, the client ID, the client key, the access token, and the vertex coordinates of the frame selection area;
[0076] If any of the verifications fails, the default is to count the number of people in the entire frame;
[0077] If all the checks are successful, the vertex coordinates of the framed area are connected end to end in a counterclockwise direction to form a polygonal area on the picture frame;
[0078] The AI big data platform is used to identify polygonal areas to count the traffic on the page.
[0079] Furthermore, in a possible implementation manner, the processing module is further used to determine whether the current webpage has a login page;
[0080] If there is no login page, directly extract the current screen frame;
[0081] If there is a login page, use the plug-in in the automated testing tool selenium to log in to the current page, and after entering the page, determine whether all the elements in the current page appear, where the elements include: labels, text, pictures, links, buttons, forms, videos and audios;
[0082] If it does not appear within the preset time, the picture frame extraction process is terminated and an error message is fed back for maintenance.
[0083] Furthermore, in a possible implementation, the execution module is further used to define a network link URL corresponding to the screen frame to be captured, and automatically extract the screen frame in the multi-threaded web page at a preset time using the automated testing tool selenium through the URL.
[0084] Furthermore, in a possible implementation manner, the processing module is further configured to set the frame selection area of the picture frame manually or automatically according to demand.
[0085] Furthermore, in a possible implementation manner, the determination module is further configured to determine the vertex coordinates of the frame selection area based on the extracted picture frame in units of pixels of the picture frame.
[0086] Furthermore, in a possible implementation manner, the processing module is further configured to cache the extracted picture frames as pictures in a preset format and store them in a set path.
[0087] Reference Figure 3 , Figure 3 FIG. 1 is a schematic diagram of the method for counting the flow of people provided by the present invention, as shown in FIG. Figure 3 As shown:
[0088] When determining the vertex coordinates of the selected area and inputting them into the AI big data platform, the principle of coordinates is counterclockwise, with the upper left corner of the image as the coordinate zero point, the right direction as the X-axis direction, and the downward direction as the Y-axis direction. It can be understood that Figure 3 It can be understood as the captured frame
[0089] In the regular rectangle on the left side of the figure, check the coordinates ①, input them into the AI big data platform after success, and then input ② counterclockwise, the same process as ①, that is, check first, then input, and then go to ④ in sequence. If any vertex coordinate check fails, the flow of people in the entire frame will be counted by default. If all the checks are successful, the input platform will be x1, y1, x2, y2, x3, y3, x4, y4. The platform displays the box selection area composed of four coordinates. The same is true for the irregular polygon on the right.
[0090] It needs to be explained that if there is only a single polygon in the picture frame, it is expressed by x1, y1, x2, y2, x3, y3...xn, yn.
[0091] And like Figure 3 When there are two or more polygons, they are expressed as xa1, ya1, xa2, ya2, xa3, ya3... xan, yan; xb1, yb1, xb2, yb2, xb3, yb3... xbn, ybn; .... It is understandable that after these expressions are input into the AI big data platform, they will form a frame selection area, and the big data platform will count the flow of people in the frame selection area.
[0092] Refer to the following Figure 4 An electronic device 400 according to this embodiment of the present invention will be described. Figure 4 The electronic device 400 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0093] like Figure 4 As shown, the electronic device 400 is in the form of a general computing device. The components of the electronic device 400 may include but are not limited to: at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).
[0094] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 executes the steps according to various exemplary embodiments of the present invention described in the above “Embodiment Method” section of this specification.
[0095] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .
[0096] The storage unit 420 may also include a program / utility 424 having a set (at least one) of program modules 425, such program modules 425 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0097] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0098] The electronic device 400 may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 450. Furthermore, the electronic device 400 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0099] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0100] According to the solution of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present invention described in the above "Exemplary Method" section of the present specification.
[0101] refer to Figure 5 As shown, a program product 500 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0102] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0103] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0104] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0105] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0106] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0107] In summary, the present application provides a method, device, equipment and storage medium for counting the number of people on a web page, wherein the method includes the steps of: automatically extracting a preset time frame in a multi-threaded web page, and customizing a framed area of the frame; determining the vertex coordinates of the framed area; inputting the address of the frame, the client ID, the client key, the access token and the vertex coordinates of the framed area into the AI big data platform to count the number of people on the web page. The present application can quickly and efficiently count the number of people on multiple web pages, and the required web pages can be changed at any time, which is convenient, flexible and low-cost.
[0108] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
[0109] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
Claims
1. A method for counting web page traffic, characterized in that: include: Automatically extracting a picture frame at a preset time in a multi-threaded web page, and customizing a frame selection area of the picture frame; Determine the vertex coordinates of the frame selection area; The address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the selected area are input into the AI big data platform to count the web page traffic.
2. The method according to claim 1, characterized in that The address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the frame selection area are input into the AI big data platform to count the web page traffic, including: Verifying the accuracy of the address of the picture frame, the client ID, the client key, the access token, and the vertex coordinates of the selected area; If any of the verifications fails, the default is to count the number of people in the entire frame; If all the checks are successful, the vertex coordinates of the framed area are connected end to end in a counterclockwise direction to form a polygonal area on the picture frame; The AI big data platform is used to identify polygonal areas to count the traffic on the page.
3. The method according to claim 1, characterized in that Before the automatic extraction of the preset time frame in the multi-threaded webpage, the method includes: Determine whether the current web page has a login page; If there is no login page, directly extract the current screen frame; If there is a login page, use the plug-in in the automated testing tool selenium to log in to the current page, and after entering the page, determine whether all elements in the current page appear, where the elements include: labels, text, pictures, links, buttons, forms, videos and audios; If it does not appear within the preset time, the picture frame extraction process is terminated and an error message is fed back for maintenance.
4. The method according to claim 1, characterized in that , the automatic extraction of the preset time frame in the multi-threaded web page includes: Define the network link URL corresponding to the screen frame to be captured, and use the automated testing tool selenium through the URL to automatically extract the screen frame in the multi-threaded web page at a preset time.
5. The method according to claim 1, characterized in that The customizing of the frame selection area of the picture frame includes: The frame selection area of the picture frame is set manually or automatically according to the requirements.
6. The method according to claim 1, characterized in that The determining the vertex coordinates of the frame selection area includes: Based on the extracted picture frame, the vertex coordinates of the selection area are determined in units of pixels of the picture frame.
7. The method according to claim 1, characterized in that Also includes: The extracted picture frames are cached as pictures in a preset format and stored in a set path.
8. A device for counting web page traffic, characterized in that: include: An execution module, which is used to automatically extract a picture frame at a preset time in a multi-threaded web page, and customize a frame selection area of the picture frame; A determination module, which is used to determine the vertex coordinates of the frame selection area; The processing module is used to input the address of the picture frame, the client ID, the client key, the access token and the vertex coordinates of the selected area into the AI big data platform to count the web page traffic.
9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer program instructions are stored therein, and when the computer program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Webpage animation implementation method and device, electronic equipment and storage medium
CN108256062A
Monitoring method and device, electronic equipment and storage medium
CN114490277A
