Disclosure of Invention
The invention provides a method, a device and a system for acquiring page buried point data in order to solve the technical problems in the background art.
In order to achieve the above object, according to an aspect of the present invention, there is provided a page buried point data collecting method, including:
acquiring a request sent by a browser;
if the request is a service request, forwarding the service request to a WEB service system for service processing;
and if the request is a buried point data collection request, forwarding the buried point data collection request to a buried point collection system so that the buried point collection system stores the buried point data in the buried point data collection request to the local, wherein when the buried point in the page is triggered, the browser collects the buried point data according to the type of the triggered buried point and generates the buried point data collection request according to the collected buried point data.
Optionally, the buried point collecting system includes: an HTTP server;
the forwarding of the buried point data collection request to a buried point collection system specifically includes:
forwarding the buried point data collection request to the HTTP server so that the HTTP server sends the resource requested by the buried point data collection request to the browser, wherein the buried point data collection request is an HTTP request, and the buried point data collection request is used for requesting a target resource in the HTTP server.
Optionally, the buried point collecting system further includes: an application server and a database;
the buried point collecting system stores the buried point data in the buried point data collecting request to the local, and the buried point collecting system specifically comprises:
the HTTP server acquires the buried point data in the buried point data collection request, generates a structured log according to the buried point data, and writes the generated structured log into a preset structured log file; and the application server detects the structured log file, and if the structured log file has a newly added structured log, the newly added structured log is formatted and analyzed and then written into the database.
Optionally, the buried point includes: burying points in a page; and when the page buried point is triggered, the buried point data collected by the browser is page information.
Optionally, the buried point includes: burying points in the control; and when the control buried point is triggered, the data of the buried point collected by the browser is control information.
In order to achieve the above object, according to another aspect of the present invention, there is provided a page burial data collecting apparatus, including:
the request acquisition module is used for acquiring a request sent by a browser;
the first forwarding module is used for forwarding the service request to a WEB service system for service processing if the request is the service request;
and the second forwarding module is used for forwarding the embedded point data collection request to an embedded point data collection system if the request is the embedded point data collection request so as to enable the embedded point data collection system to store the embedded point data in the embedded point data collection request to the local, wherein when the embedded point in the page is triggered, the browser carries out embedded point data collection according to the type of the triggered embedded point, and generates the embedded point data collection request according to the collected embedded point data.
Optionally, the buried point collecting system includes: an HTTP server;
the second forwarding module is specifically configured to forward the buried point data collection request to the HTTP server, so that the HTTP server sends a resource requested by the buried point data collection request to the browser, where the buried point data collection request is an HTTP request, and the buried point data collection request is used to request a target resource in the HTTP server.
Optionally, the buried point collecting system further includes: an application server and a database;
the buried point collecting system stores the buried point data in the buried point data collecting request to the local, and the buried point collecting system specifically comprises:
the HTTP server acquires the buried point data in the buried point data collection request, generates a structured log according to the buried point data, and writes the generated structured log into a preset structured log file; and the application server detects the structured log file, and if the structured log file has a newly added structured log, the newly added structured log is formatted and analyzed and then written into the database.
In order to achieve the above object, according to another aspect of the present invention, there is provided a page burial data collecting system, including:
a forwarding processing system and a buried point acquisition system;
the forwarding processing system is used for receiving a request sent by a browser, forwarding the service request to a WEB service system for service processing when the request is the service request, and forwarding the embedded point data collection request to the embedded point collection system when the request is the embedded point data collection request, wherein when the embedded point in a page is triggered, the browser collects the embedded point data according to the type of the triggered embedded point and generates the embedded point data collection request according to the collected embedded point data;
and the buried point acquisition system is used for storing the buried point data in the buried point data collection request to the local.
Optionally, the buried point collecting system includes: an HTTP server;
the forwarding processing system is specifically configured to forward the buried point data collection request to the HTTP server;
the HTTP server is used for sending the resource requested by the buried point data collection request to the browser, wherein the buried point data collection request is an HTTP request, and the buried point data collection request is used for requesting a target resource in the HTTP server.
Optionally, the buried point collecting system further includes: an application server and a database;
the HTTP server is further used for acquiring the buried point data in the buried point data collection request, generating a structured log according to the buried point data, and writing the generated structured log into a preset structured log file;
and the application server is used for detecting the structured log file, and if the structured log file has a newly added structured log, the newly added structured log is formatted and analyzed and then written into the database.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps in the above method for collecting page-buried data when executing the computer program.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed in a computer processor, implements the steps in the above-described page buried data collecting method.
The invention has the beneficial effects that: when a request sent by a browser is acquired, if the request is a service request, the service request is forwarded to a WEB service system for service processing, and if the request is a buried point data collection request, the buried point data collection request is forwarded to a buried point collection system, so that the buried point collection system stores the buried point data in the buried point data collection request to the local.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and the above-described drawings, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
It should be noted that the present invention can be applied to the financial field, and can also be applied to other technical fields.
The invention provides a method and a system for efficiently acquiring embedded point data of a B/S architecture system page, which can realize the acquisition of setting information such as a client operating system version, a browser version and the like, support the information records such as page browsing, login time and the like of an operator, efficiently and accurately acquire the operation behavior of page elements, and have no negative influence on normal interaction of services when an acquisition system is abnormal.
According to the method, page embedding and control embedding are carried out on a browser page, an operator triggers the embedding, the browser sends and collects embedded data in an asynchronous mode, a forwarding processing system is used for identifying context roots linked with requests, the related requests are forwarded to an HTTP server in an embedded point acquisition system, the HTTP server carries out structured log printing on the collection requests and responds quickly, a background system in the embedded point acquisition system monitors log files, quasi-real-time log record acquisition is carried out, and the log files are analyzed and stored in a warehouse, so that efficient embedded data acquisition without side effects is achieved.
Based on one aspect of the invention, the invention provides a page buried point data acquisition system, which comprises: a forwarding processing system and a buried point acquisition system.
The forwarding processing system is used for receiving a request sent by a browser, forwarding the service request to a WEB service system for service processing when the request is a service request, and forwarding the buried point data collection request to the buried point collection system when the request is a buried point data collection request. When the embedded point in the page is triggered, the browser acquires the embedded point data according to the type of the triggered embedded point and generates the embedded point data collection request according to the acquired embedded point data.
And the buried point acquisition system is used for storing the buried point data in the buried point data collection request to the local.
According to the invention, the embedded point data acquisition is carried out by arranging the embedded point acquisition system independent of the WEB service system, and the operation of the embedded point acquisition system can not cause any influence on the normal business processing of the WEB service system, so that the technical problem that the existing embedded point data acquisition action can cause certain influence on the business processing is solved.
Fig. 3 is an application scenario diagram of the page burial point data collection method according to the embodiment of the invention, and as shown in fig. 3, the application scenario of the page burial point data collection system of the invention includes: the system comprises a browser, a page embedded data acquisition system (a forwarding processing system and an embedded point acquisition system) and a WEB service system.
The browser, specifically a client browser, is mainly used for an operator to perform service interface operation, and perform HTTP mode linking and data interaction with the server.
The forwarding processing system comprises a reverse proxy server, mainly identifies a request initiated by a browser through the reverse proxy server, forwards a service request to a WEB service system for service processing through judging a context root of a request link, and forwards a buried point data collection request to a buried point collection system.
The WEB service system is an application server system which mainly receives service requests and performs transaction processing.
The system for collecting the buried points mainly comprises an HTTP server, a background server and a database, wherein the HTTP server is used for establishing an HTTP service function, performing structured log generation and inputting the log into a disk for storage after receiving a buried point data collection request, monitoring the side face of a log file by the process of the background server, collecting newly-added records in a quasi-real-time manner, analyzing and processing the newly-added records, and inserting the newly-added records into the database.
In an embodiment of the present invention, the embedded points include page embedded points, and the acquired embedded point data is page information when the page embedded points are triggered. In an embodiment of the present invention, the page information may specifically include: product code, product name, current column number, current column Chinese name, current page number, current page Chinese name, customer information, browser version, screen resolution, access source information, access date, access time, and the like.
In an embodiment of the invention, the invention sets page information of related pages in advance, and after the pages are set, a method for triggering page information collection request is added, namely, buried points are set in the pages, and the browser automatically collects the preset page information when the buried points are triggered.
In an embodiment of the present invention, the embedded points further include control embedded points, and the embedded point data collected by the browser is control information when the control embedded points are triggered. In an embodiment of the present invention, the control information may specifically include: control number, control Chinese name, control keyword, etc.
In one embodiment of the invention, control information setting is carried out on control elements on a page in advance, collection of control information is increased when an operator triggers a relevant control, and a buried point data collection request is sent in an asynchronous mode before interaction with a service processing server.
As shown in fig. 3, in one embodiment of the present invention, the buried point collecting system includes: an HTTP server.
The forwarding processing system is specifically configured to forward the buried point data collection request to the HTTP server.
The HTTP server is used for sending the resource requested by the buried point data collection request to the browser, wherein the buried point data collection request is an HTTP request, and the buried point data collection request is used for requesting a target resource in the HTTP server.
In one embodiment of the present invention, the HTTP server deploys the HTTP service and provides the target resource, the buried point data collection request is actually a request for the target resource of the HTTP server, and a request parameter in the buried point data collection request is collected buried point data, so that the buried point data is uploaded to the HTTP server together with the buried point data collection request for processing.
In one embodiment of the present invention, the target resource may be a 1-pixel dot picture resource.
In one embodiment of the invention, the HTTP server sends the resource requested by the buried point data collection request to the browser, and the browser is configured to receive only the resource sent by the HTTP server, but not process the resource sent by the HTTP server.
According to the invention, the high-efficiency processing capacity of the HTTP server on the static resources is utilized, the buried point data is collected while the resource request is carried out, the efficiency of collecting the buried point data is obviously improved, and the problem of resource consumption caused by frequent interaction between the collected information and the server is efficiently solved.
As shown in fig. 3, in an embodiment of the present invention, the buried point collecting system further includes: an application server and a database.
The HTTP server is further used for obtaining the buried point data in the buried point data collection request, generating a structured log according to the buried point data, and writing the generated structured log into a preset structured log file.
And the application server is used for detecting the structured log file, and if the structured log file has a newly added structured log, the newly added structured log is formatted and analyzed and then written into the database.
In an embodiment of the present invention, when receiving a request of a target resource, the HTTP server quickly returns to the target resource, performs structured log processing on a request message and an upload parameter, generates a structured log, and inputs the structured log to a structured log file in a disk to store.
In an embodiment of the invention, the background system monitors the structured log file in the disk in real time, and after finding the newly added structured log, the newly added structured log is acquired in quasi real time. And the background system carries out formatting analysis on the acquired newly added structured log to obtain original buried point data, links the data base and inserts the buried point data into a preset related table record.
Based on the same inventive concept, the invention also provides a page buried point data acquisition method. Because the principle of the page buried point data acquisition method for solving the problem is similar to that of the page buried point data acquisition system, the embodiment of the page buried point data acquisition method can be referred to the embodiment of the page buried point data acquisition system, and repeated parts are not repeated.
Fig. 1 is a flowchart of a page burial point data collection method according to an embodiment of the present invention, and an implementation main body of the page burial point data collection method is a forwarding processing system in the page burial point data collection system, as shown in fig. 1, the page burial point data collection method according to the embodiment of the present invention includes steps S101 to S103.
Step S101, acquiring a request sent by a browser.
Step S102, if the request is a service request, the service request is forwarded to a WEB service system for service processing.
Step S103, if the request is a buried point data collection request, forwarding the buried point data collection request to a buried point collection system so that the buried point collection system stores the buried point data in the buried point data collection request to the local, wherein when the buried point in the page is triggered, the browser collects the buried point data according to the type of the triggered buried point, and generates the buried point data collection request according to the collected buried point data.
In one embodiment of the present invention, the buried point collection system comprises: an HTTP server. The forwarding of the embedded point data collection request to the embedded point collection system in step S103 specifically includes:
forwarding the buried point data collection request to the HTTP server so that the HTTP server sends the resource requested by the buried point data collection request to the browser, wherein the buried point data collection request is an HTTP request, and the buried point data collection request is used for requesting a target resource in the HTTP server.
In an embodiment of the present invention, the buried point collecting system further includes: an application server and a database. As shown in fig. 2, the buried point collecting system in step S103 stores the buried point data in the buried point data collecting request to the local, and specifically includes step S201 and step S202.
Step S201, the HTTP server acquires the buried point data in the buried point data collection request, generates a structured log according to the buried point data, and writes the generated structured log into a preset structured log file;
step S202, the application server detects the structured log file, if a newly added structured log exists in the structured log file, the newly added structured log is formatted and analyzed and then written into the database.
It can be seen from the above embodiments that the present invention can efficiently collect page and control element information of a browser interface, and at least the following beneficial effects are achieved:
1. according to the invention, the efficient processing capacity of the HTTP server on the static resources is utilized, the embedded data is collected while the image resource request is carried out, and the problem of resource consumption caused by frequent interaction between the acquired information and the server is efficiently solved.
2. According to the invention, by means of the asynchronous request sending mode, even when the buried point data acquisition system has a systematic fault, the normal service processing system is not influenced.
3. According to the invention, through carrying out normalized point burying and data acquisition on the page, the data base of the product can be tamped, and the data base becomes an important data source for customer behavior analysis, accurate marketing and 360-degree all-around portrait of the customer.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
Based on the same inventive concept, the embodiment of the present invention further provides a device for acquiring page burial point data, which can be used to implement the method for acquiring page burial point data described in the above embodiments, as described in the following embodiments. Because the principle of the page buried point data acquisition device for solving the problem is similar to that of the page buried point data acquisition method, embodiments of the page buried point data acquisition device can refer to embodiments of the page buried point data acquisition method, and repeated parts are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a structure of a page burial point data collecting device according to an embodiment of the present invention, and as shown in fig. 4, the page burial point data collecting device according to the embodiment of the present invention includes:
the request acquisition module 1 is used for acquiring a request sent by a browser;
the first forwarding module 2 is configured to forward the service request to a WEB service system for performing service processing if the request is a service request;
and the second forwarding module 3 is configured to forward the embedded point data collection request to an embedded point data collection system if the request is the embedded point data collection request, so that the embedded point data collection system stores the embedded point data in the embedded point data collection request to a local area, wherein when the embedded point in the page is triggered, the browser performs embedded point data collection according to the type of the triggered embedded point, and generates the embedded point data collection request according to the collected embedded point data.
In one embodiment of the present invention, the buried point collection system comprises: an HTTP server.
In an embodiment of the present invention, the second forwarding module is specifically configured to forward the buried point data collection request to the HTTP server, so that the HTTP server sends the resource requested by the buried point data collection request to the browser, where the buried point data collection request is an HTTP request, and the buried point data collection request is used to request a target resource in the HTTP server.
In an embodiment of the present invention, the buried point collecting system further includes: an application server and a database.
In an embodiment of the present invention, the storing, by the buried point collecting system, the buried point data in the buried point data collecting request to a local place specifically includes:
the HTTP server acquires the buried point data in the buried point data collection request, generates a structured log according to the buried point data, and writes the generated structured log into a preset structured log file; and the application server detects the structured log file, and if the structured log file has a newly added structured log, the newly added structured log is formatted and analyzed and then written into the database.
To achieve the above object, according to another aspect of the present application, there is also provided a computer apparatus. As shown in fig. 5, the computer device comprises a memory, a processor, a communication interface and a communication bus, wherein a computer program that can be run on the processor is stored in the memory, and the steps of the method of the above embodiment are realized when the processor executes the computer program.
The processor may be a Central Processing Unit (CPU). The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and units, such as the corresponding program units in the above-described method embodiments of the present invention. The processor executes various functional applications of the processor and the processing of the work data by executing the non-transitory software programs, instructions and modules stored in the memory, that is, the method in the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more units are stored in the memory and when executed by the processor perform the method of the above embodiments.
The specific details of the computer device may be understood by referring to the corresponding related descriptions and effects in the above embodiments, and are not described herein again.
In order to achieve the above object, according to another aspect of the present application, there is also provided a computer-readable storage medium storing a computer program which, when executed in a computer processor, implements the steps in the above-described page buried data collecting method. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.