CN108900563B - Data transmission method and device, computer equipment and storage medium - Google Patents

Data transmission method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN108900563B
CN108900563B CN201810277668.9A CN201810277668A CN108900563B CN 108900563 B CN108900563 B CN 108900563B CN 201810277668 A CN201810277668 A CN 201810277668A CN 108900563 B CN108900563 B CN 108900563B
Authority
CN
China
Prior art keywords
webpage
user interaction
interaction data
data
unsent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810277668.9A
Other languages
Chinese (zh)
Other versions
CN108900563A (en
Inventor
莫伟德
谢安涛
杨鹏
张颖
潘浩
赵子颖
黄蕾
江莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Digital Life Technology Co Ltd
Original Assignee
CENTURY DRAGON INFORMATION NETWORK CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CENTURY DRAGON INFORMATION NETWORK CO LTD filed Critical CENTURY DRAGON INFORMATION NETWORK CO LTD
Priority to CN201810277668.9A priority Critical patent/CN108900563B/en
Publication of CN108900563A publication Critical patent/CN108900563A/en
Application granted granted Critical
Publication of CN108900563B publication Critical patent/CN108900563B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention provides a data transmission method, a data transmission device, computer equipment and a storage medium. The method comprises the following steps: if the operation of accessing the first webpage of the website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage; and if so, sending the unsent user interaction data to an acquisition server. The method can be used for supplementing and sending the unsent user interaction data stored on all the second webpages in the user interaction data set to the acquisition server when detecting the operation of accessing the first webpages of the website to be analyzed by the user, thereby effectively preventing the data loss condition, improving the integrity of the data acquired by the client and further improving the accuracy of the statistical analysis result of the acquisition server.

Description

Data transmission method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data transmission method, an apparatus, a computer device, and a storage medium.
Background
With the continuous development of internet technology, various types of websites are multiplied like bamboo shoots in spring after rain. In order to obtain the operation data (which may include user interaction data, website traffic data, website browsing manner data of the user, and webpage abnormal data) of the various types of websites, a website analysis tool is also developed accordingly. The website analysis tool may include a collection script and a collection server storing the collection script. The website analysis tool can collect and analyze the operation data of the website and provide the analysis result for website constructors, so that the website constructors can optimize the construction of the website according to the analysis result, and the construction of the website can meet the requirements of users better.
In the conventional technology, a collection code is embedded in each webpage contained in a website to be analyzed in advance, when a user opens the website to be analyzed through a browser running on a client, the collection code is embedded in each webpage in the website to be analyzed, so that the client can load a collection script through the indication of the collection code, and after the collection script is loaded, the client can collect relevant data of the currently opened webpage and send the collected data to a collection server, so that the collection server can perform statistical analysis according to the data collected by the client. Generally, when a user browses an opened current webpage, user interaction data generated on the current webpage may be more, and for this situation, after the user interaction data acquired on the current webpage meets a certain condition, the client sends the acquired user interaction data to the acquisition server.
However, before the client sends the user interaction data acquired on the current webpage to the acquisition server, if the user closes the current webpage, the user interaction data acquired by the client is lost, so that the data acquired by the client is incomplete, and the accuracy of the statistical analysis result of the acquisition server is low.
Disclosure of Invention
Based on this, it is necessary to provide a data sending method, an apparatus, a computer device, and a storage medium for solving the problem that the accuracy of the statistical analysis result of the collecting server is low due to the fact that the data collected by the client is incomplete after the current webpage is closed in the conventional technology.
In a first aspect, an embodiment of the present invention provides a data sending method, including:
if the operation of accessing the first webpage of the website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
and if so, sending the unsent user interaction data to an acquisition server.
According to the data sending method provided by the embodiment, when the operation of accessing the first webpage of the website to be analyzed is detected, the client determines whether unsent user interaction data exist in the preset user interaction data set, and if unsent user interaction data exist in the user interaction data set, the client sends the unsent user interaction data in the user interaction data set to the acquisition server. The unsent data on all the second webpages of the website to be analyzed are stored in the preset user interaction data set, and when the client detects that the user accesses the first webpage of the website to be analyzed, the client can additionally send the unsent user interaction data on all the second webpages stored in the user interaction data set to the acquisition server. The method effectively prevents the data loss condition, thereby improving the integrity of the data acquired by the client and further improving the accuracy of the statistical analysis result of the acquisition server.
In a second aspect, an embodiment of the present invention provides an apparatus for transmitting data, including:
the analysis method comprises the steps that a first determining module is used for determining whether unsent user interaction data exist in a preset user interaction data set when the operation of accessing a first webpage of a website to be analyzed is detected; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
and the sending module is used for sending the unsent user interaction data to the acquisition server when the first determining module determines that the unsent user interaction data exists in the preset user interaction data set.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
if the operation of accessing the first webpage of the website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
and if so, sending the unsent user interaction data to an acquisition server.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps:
if the operation of accessing the first webpage of the website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
and if so, sending the unsent user interaction data to an acquisition server.
The data sending device, the computer device, and the readable storage medium provided in this embodiment can determine whether unsent user interaction data exists in a preset user interaction data set when detecting an operation of accessing a first webpage of a website to be analyzed, and send unsent user interaction data in the user interaction data set to the collection server when determining that unsent user interaction data exists in the user interaction data set. The unsent data on all the second webpages of the website to be analyzed are stored in the preset user interaction data set, and the unsent user interaction data stored on all the second webpages in the user interaction data set can be sent to the acquisition server in a supplementing mode when the operation that the user visits the first webpage of the website to be analyzed is detected. The data sending device, the computer equipment and the readable storage medium provided by the embodiment effectively prevent the data loss condition, thereby improving the integrity of the data acquired by the client and further improving the accuracy of the statistical analysis result of the acquisition server.
Drawings
Fig. 1 is a system architecture diagram of a data transmission method application provided in an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for sending data according to an embodiment;
fig. 3 is a schematic flowchart of a data transmission method according to another embodiment;
fig. 4 is a schematic flowchart of a data transmission method according to another embodiment;
fig. 5a is a schematic flowchart of a data transmission method according to another embodiment;
fig. 5b is a schematic flowchart of a data transmission method according to another embodiment;
fig. 6 is a schematic flowchart of a data transmission method according to another embodiment;
fig. 7 is a flowchart illustrating a method for sending data according to another embodiment;
fig. 8 is a flowchart illustrating a method for sending data according to another embodiment;
fig. 9 is a schematic structural diagram of a data transmitting apparatus according to an embodiment;
fig. 10 is a schematic structural diagram of a data transmitting apparatus according to another embodiment;
fig. 11 is a schematic structural diagram of a data transmitting apparatus according to another embodiment;
fig. 12 is a schematic structural diagram of a data transmitting apparatus according to another embodiment;
fig. 13 is a schematic internal structural diagram of a computer device according to an embodiment.
Detailed Description
The data transmission method provided by the embodiment of the present invention may be applied to a system shown in fig. 1, where as shown in fig. 1, the system includes a client 10, a website server 11, and an acquisition server 12. The client 10 may access a website to be analyzed on the website server 11 through an installed browser, and the acquisition server 12 stores an acquisition script for acquiring page data on a webpage in the website to be analyzed. When the client 10 detects that the user accesses any web page in the website to be analyzed on the website server 11, the client 10 may load the collection script on the collection server 12, and after the collection script is loaded, the client 10 may collect page data on the currently opened web page through the collection script and send the collected page data to the collection server 12, so that the collection server 12 performs statistical analysis to obtain indexes such as a flow index of the website to be analyzed, a user interaction index, a website browsing manner of the user, and the like. Alternatively, the client 10 may be an electronic device having an internet function, such as a Personal Computer (PC), a smart phone, a smart watch, and a portable device, and capable of interacting with an external device or a user. Alternatively, the website server 11 may be an independent server, or may be a server cluster formed by a plurality of servers. Alternatively, the collection server 12 may be an independent server and a server cluster composed of a plurality of servers, and other electronic devices having a data processing function. The embodiment of the present invention is not limited to the specific form of the client 10, the website server 11, and the acquisition server 12.
When a user browses a currently opened webpage, there may be more user interaction data generated on the current webpage (for introduction of the user interaction data, refer to the following embodiments), and in a data acquisition process, in order to not affect the user to normally browse the current webpage, in a conventional technology, after a number of user interactions acquired on the current webpage meets a preset threshold, a client sends the user interaction data generated by the user interactions to an acquisition server. And if the user interaction times acquired on the current webpage do not meet the preset threshold, the client does not send the user interaction data generated by the user interaction to the acquisition server. However, before the client sends the acquired part of the user interaction data to the acquisition server, if the user closes the current webpage, the part of the user interaction data acquired by the client is lost, so that the data acquired by the client is incomplete, and the accuracy of the result of statistical analysis by the acquisition server is low. Therefore, the embodiment of the present invention provides a data transmission method, which aims to solve the technical problems in the conventional technologies.
It should be noted that the execution subject of the method embodiments described below may be a data transmission apparatus, and the apparatus may be implemented as part of or all of a computer device by software, hardware, or a combination of software and hardware. Optionally, the computer device may be the client. The following embodiments of the method are described with reference to a computer device as an example.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention are further described in detail by the following embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 2 is a flowchart illustrating a method for sending data according to an embodiment. The embodiment relates to a specific process of how the client side sends the unsent data on all the second webpages accessed before the first webpage to the acquisition server in a supplementing way. Specifically, as shown in fig. 2, the method may include:
s101, if the operation of accessing a first webpage of a website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set or not; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage.
Specifically, the first webpage is a webpage currently accessed by the user, and the second webpage is a webpage accessed by the user before the first webpage. Optionally, the user may access the first webpage of the website to be analyzed by inputting the address of the website to be analyzed in the address bar of the browser of the client; the first webpage of the website to be analyzed can also be accessed by clicking the address of the collected website to be analyzed in the favorite of the browser of the client; the first webpage of the website to be analyzed can be accessed by clicking the address link of the website to be analyzed on the navigation page of the browser. The specific way in which the user accesses the first webpage of the website to be analyzed is not limited in this embodiment, as long as the client can detect that the user accesses the first webpage of the website to be analyzed.
The preset user interaction data set is stored in a local cache of the client, and unsent user interaction data on all second webpages accessed before the first webpage are stored in the user interaction data set. The user interaction data is interaction data between a user and a client, and optionally, the user interaction data may be user click data, user sliding data, user touch data, and the like. Optionally, the user interaction data may include at least one of an access address of each second web page accessed by the user, a cumulative number of user interactions on each second web page, a user operation position on each second web page, a cumulative number of user interactions at each user operation position, and whether a hyperlink address exists at each user operation position.
And S102, if yes, sending the unsent user interaction data to an acquisition server.
Illustratively, the first web page is web page G of the website to be analyzed, and the second web page is web page a of the website to be analyzed and web page B of the website to be analyzed. When a user accesses the webpage A, if the user carries out interactive operation on the webpage A, the client stores user interactive data generated by the current interactive operation on the webpage A in a preset user interactive data set in real time. Similarly, when the user accesses the web page B, if the user performs an interactive operation on the web page B, the client may also store the user interaction data generated by the current interactive operation on the web page B in the preset user interaction data set in real time. When the sum of the user interaction operation times on the webpage A and the webpage B which are stored in the preset user interaction data set meets a preset time threshold, the client side sends the part of user interaction data to the acquisition server. Alternatively, the preset number threshold is usually 10 times. If the user performs 3 times of interactive operation on the webpage A and 2 times of interactive operation on the webpage B, the sum of the times of the user interactive operation on the webpage A and the webpage B which are stored in the preset user interactive data set does not meet the preset time threshold, and therefore the client side cannot send the user interactive data generated by the 3 times of interactive operation on the webpage A and the user interactive data generated by the 2 times of interactive operation on the webpage B to the acquisition server. At this time, if the user closes the web pages a and B, there are 3 times of unsent user interaction data on the web page a, and 2 times of unsent user interaction data on the web page B. After a client detects that a user accesses a webpage G of a website to be analyzed, the client determines whether unsent user interaction data exist in a preset user interaction data set, and because unsent user interaction data on a webpage A and unsent user interaction data on a webpage B are stored in the preset user interaction data set, the client can determine that unsent user interaction data exist in the preset user interaction data set and send unsent 3 times of user interaction data on the webpage A and unsent 2 times of user interaction data on the webpage B which are stored in the preset user interaction data set to a collection server.
According to the data sending method provided by the embodiment, when the operation of accessing the first webpage of the website to be analyzed is detected, the client determines whether unsent user interaction data exist in the preset user interaction data set, and when it is determined that unsent user interaction data exist in the user interaction data set, the client sends the unsent user interaction data in the user interaction data set to the acquisition server. The unsent data on all the second webpages of the website to be analyzed are stored in the preset user interaction data set, and when the client detects that the user accesses the first webpage of the website to be analyzed, the client can additionally send the unsent user interaction data on all the second webpages stored in the user interaction data set to the acquisition server. The method effectively prevents the data loss condition, thereby improving the integrity of the data acquired by the client and further improving the accuracy of the statistical analysis result of the acquisition server.
The above embodiments mainly describe a supplementary transmission process for unsent data on the second web page. In the actual data statistics process, there is also a case of data loss: i.e., page redirection resulting in loss of page data for the redirected web page. Specifically, assume that the user clicks on the access address of web page C on web page B, and the browser of the client displays the page of web page D, but does not display the page of web page C. I.e., web page C is redirected to web page D, web page C being a redirected web page. Based on the example, since the client has not successfully loaded the collection script of the web page C and the web page C has been redirected to the web page D, the client cannot collect the page data of the web page C, which results in the loss of the page data of the web page C, and thus results of statistical analysis by the collection server are low in accuracy. The embodiment shown in fig. 3 described below is intended to solve this technical problem, and further avoid the problem of data loss.
Fig. 3 is a flowchart illustrating a method for sending data according to another embodiment. The embodiment relates to a specific process of how the client side sends the page data of the redirected webpage to the acquisition server in a supplementary mode. On the basis of the foregoing embodiment, optionally, as shown in fig. 3, after S102, the method further includes:
s201, acquiring an access address of a first upstream source webpage of the first webpage from a webpage access path; and the page access path stores the access address of the upstream source webpage of the currently accessed webpage.
Specifically, the first webpage is a webpage currently visited by the user, and the upstream source webpage represents a webpage from which the currently visited webpage is linked. Optionally, the page access path may be a referrer sent by the browser of the client to the website server 11 when the user accesses the first webpage, where the referrer stores an access address of a first upstream source webpage of the first webpage, that is, the referrer identifies a webpage from which the first webpage is linked. That is, the client may obtain the access address of the first upstream source webpage of the first webpage from the referrer sent by the client.
S202, determining whether the website to be analyzed has a redirected webpage or not according to a local access record and the access address of the first upstream source webpage, and sending page data of the redirected webpage to the acquisition server when determining that the redirected webpage exists.
The local access record comprises an access address of the first webpage, access time of the first webpage, an access address of a second upstream source webpage related to the first webpage in the second webpage and access time of the second upstream source webpage, and the access addresses in the local access record are sorted according to the access time; the page data of the redirected webpage comprises an access address of the redirected webpage and an access time of the redirected webpage.
Specifically, the local access record is used for storing a record of the user accessing the website to be analyzed, which is collected by the client. Suppose that a user accesses the web page a through the client, then clicks the access address of the web page B on the page of the web page a, and clicks the access address of the web page C on the page of the open web page B, it is the web page C that should be opened in response originally, but the web page C is redirected to the web page D. At this time, the local access record stores the access address of the web page a, the access time of the web page a, the access address of the web page B, the access time of the web page B, the access address of the web page D and the access time of the web page D according to the sequence of the web page access times. Based on this example, web page D is a first web page, and web pages A and B are second upstream source web pages related to web page D.
After the client acquires the access address of the first upstream source webpage of the first webpage from the page access path, the client can determine whether the website to be analyzed has the redirected webpage or not according to the comparison result by comparing the record stored in the local access record with the access address of the first upstream source webpage of the first webpage acquired from the page access path, and send the page data of the redirected webpage to the acquisition server when the redirected webpage is determined to exist. The page data of the redirected webpage comprises an access address of the redirected webpage and an access time of the redirected webpage.
As a possible implementation manner of the foregoing S202, the client may determine whether the website to be analyzed has a redirected web page by determining whether the local access record has an access address of the first upstream source web page acquired in the page access path, and if not, determine that the website to be analyzed has the redirected web page, and determine that the first upstream source web page is the redirected web page
Specifically, continuing with the example in S202, the access address of the first upstream source webpage of the first webpage, which is acquired by the client from the page access path, is the access address of the webpage C, and the access addresses of the webpage a, the webpage B, and the webpage D are stored in the local access record according to the sequence of the webpage access times. Accordingly, the client can determine that the access address of the webpage C does not exist in the local access record, and then the client determines that the website to be analyzed has the redirected webpage and determines that the webpage C is the redirected webpage.
As another possible implementation of S202, the client may further determine whether there is a redirected web page in the website to be analyzed through the following process shown in fig. 4, and determine which web page is the redirected web page. As shown in fig. 4, the above S202 may include S301 to S304:
s301, obtaining a source webpage adjacent to the first webpage in the second upstream source webpage.
Specifically, because the access address of the first web page, the access time of the first web page, the access address of the second upstream source web page related to the first web page in the second web page, and the access time of the second upstream source web page are stored in the local access record according to the sequence of the web page access times, the client can obtain the source web page adjacent to the first web page from the second upstream source web page in the local access record. Continuing with the example in S202, the local access record stores the access address of web page a, the access address of web page B, and the access address of web page D. Based on this example, the web page D is a first web page, the web pages a and B are second upstream source web pages of the web page D, and the source web page adjacent to the first web page, which is acquired by the client from the second upstream source web pages (web pages a and B), is the web page B.
S302, judging whether the addresses of the source webpage adjacent to the first webpage and the first upstream source webpage are the same or not. If so, go to step S303, otherwise, go to step S304.
S303, determining that the redirected webpage does not exist in the website to be analyzed.
S304, determining that the redirected webpage exists in the website to be analyzed.
Continuing with the example in S202, the access address of the first upstream source webpage of the first webpage (webpage D) acquired by the client from the page access path is the access address of webpage C, and the source webpage adjacent to the first webpage (webpage D) acquired by the client from the local access record is webpage B. Accordingly, the client can determine that the address of the source webpage adjacent to the first webpage is different from the address of the first upstream source webpage of the first webpage, and then the client determines that the website to be analyzed has the redirected webpage, and determines that the webpage C is the redirected webpage.
S305, sending the page data of the redirected webpage to the acquisition server.
Specifically, the page data of the redirected web page includes an access address of the redirected web page and an access time of the redirected web page. Optionally, S305 may specifically be: and the client determines the access time of the redirected webpage according to the access time of the first webpage, and sends the access time of the redirected webpage and the access address of the redirected webpage to the acquisition server.
The access address of the redirected webpage is the access address of the first upstream source webpage of the first webpage. Optionally, the client may determine the access time of the redirected webpage according to the access time of the first webpage. For example, the client may obtain the access time of the first web page from the local access record, and then determine the access time of the redirected web page according to a difference between the obtained access time of the first web page and the time required by the page redirection process.
In the data sending method provided by this embodiment, the client first obtains a source web page adjacent to the first web page in the second upstream source web page, then determines whether the address of the source web page adjacent to the first web page is the same as the address of the first upstream source web page, and if it is determined that the address of the source web page adjacent to the first web page is not the same as the address of the first upstream source web page, the client determines that a redirected web page exists in the website to be analyzed, determines the first upstream source web page as a redirected web page, further determines page data of the redirected web page, and finally sends the page data of the redirected web page to the acquisition server. When the fact that the user visits the first webpage of the website to be analyzed is detected, the client side can determine whether the redirected webpage exists in the website to be analyzed, and when the redirected webpage exists in the website to be analyzed, page data of the redirected webpage can be sent to the acquisition server in a supplementary mode. The method effectively prevents the page data of the redirected webpage from being lost, thereby improving the integrity of the data collected by the client and further improving the accuracy of the statistical analysis result of the collection server. Meanwhile, in the process of determining the redirected webpage, the client can combine the local access record with the first upstream source webpage of the first webpage acquired from the page access path for analysis, and the access time of the redirected webpage is determined according to the access time of the first webpage stored in the local access record, so that the accuracy of the page data of the redirected webpage, which is supplemented and sent to the acquisition server by the client, is higher, and the accuracy of the statistical analysis result of the acquisition server is further improved.
On the basis of the foregoing embodiment, optionally, the source link address linking the first web page may not exist on the second web page. Optionally, the second webpage may also have a source link address for linking the first webpage. The following further describes how the client sends unsent user interaction data to the collection server for these two cases. Specifically, fig. 5a below is directed to a scenario where no source link address linking the first web page exists on the second web page, and fig. 5b is directed to a scenario where a source link address linking the first web page exists on the second web page.
For a scenario in which a source link address linking the first web page does not exist on the second web page, specifically, as shown in fig. 5a, the method may include:
s401, if the operation of accessing the first webpage of the website to be analyzed is detected, whether unsent user interaction data exist in a preset user interaction data set or not is determined.
It should be noted that, in this embodiment, reference may be made to the description in S101 in the above embodiment for a specific process of how the client detects an operation of the user accessing the first webpage of the website to be analyzed, and a specific process of how the client determines whether the unsent user interaction data exists in the preset user interaction data set, which is not described herein again.
And S402, if so, sending the unsent user interaction data to a collection server by adopting the collection script of the first webpage.
Specifically, since the second web page does not have a source link address linking with the first web page, when the client detects that the user accesses the first web page, the client may send the unsent data on all second web pages accessed before the first web page to the acquisition server through the acquisition script of the first web page. For example, in a possible implementation manner, the user stores unsent data on all second webpages in the user interaction data set, and after all second webpages are closed, if the client detects that the user reopens one first webpage, the client may send unsent data on all previously accessed second webpages to the acquisition server through the acquisition script of the first webpage in a supplementary manner. For example, the first webpage is a webpage G of a website to be analyzed, the second webpage is a webpage a of the website to be analyzed and a webpage B of the website to be analyzed, a source link address for linking the webpage G does not exist on the webpage a and the webpage B, user interaction data which are not sent exist on the webpage a and the webpage B, and the user interaction data which are not sent on the webpage a and the webpage B are stored in a preset user interaction data set in real time. Therefore, after the webpage A and the webpage B are closed, when the client detects that the user accesses the webpage G, the client can send unsent data in the webpage A and the webpage B which are stored in the preset user interaction data set to the acquisition server through the acquisition script of the webpage G in a supplementing mode, and the user interaction data of the webpage A and the webpage B are prevented from being lost along with the closing of the webpage A and the webpage B.
In another possible implementation manner, the user stores unsent data on all second webpages in the user interaction data set, all second webpages are not closed, and if the client detects that the user reopens a first webpage, the client can also send unsent data on all second webpages accessed before to the acquisition server through the acquisition script of the first webpage in a supplementing manner, so that the problem that the user interaction data of the webpages A and B are lost if the webpages A and B are closed is avoided.
In the data sending method provided in this embodiment, when a source link address linking the first webpage does not exist on the second webpage, if the client detects that the user accesses the first webpage and determines that unsent user interaction data exists in the preset user interaction data set, the client sends unsent user interaction data on the second webpage to the collection server through the collection script of the first webpage. When the client detects that the user accesses the first webpage, the client can supplement and send unsent user interaction data on all second webpages to the acquisition server through the acquisition script of the first webpage, so that the data loss condition of the second webpages is effectively prevented, the integrity of the data acquired by the client is improved, and the accuracy of the statistical analysis result of the acquisition server is improved.
For a scenario in which a source link address linking to a first web page exists on a second web page, specifically, as shown in fig. 5b, the method may include:
s501, if the operation of accessing the first webpage of the website to be analyzed is detected, whether unsent user interaction data exist in a preset user interaction data set or not is determined.
And S502, if so, sending the unsent user interaction data to the acquisition server by adopting the acquisition script of the second webpage.
Specifically, because the second webpage has the source link address linked to the first webpage, when the client detects that the user accesses the first webpage through the source link address on the second webpage, the client can send the user interaction data, which is not sent on the second webpage having the source link address linked to the first webpage, to the collection server through the collection script of the second webpage. For example, the first webpage is a webpage G of a website to be analyzed, the second webpage is a webpage a of the website to be analyzed, a source link address of the link webpage G exists on the webpage a, unsent user interaction data exists on the webpage a before the client detects that the user accesses the webpage G through the source link address on the webpage a, and the unsent user interaction data on the webpage a is stored in a preset user interaction data set. Therefore, when the client detects that the user accesses the webpage G through the source link address on the webpage A, the client can send the unsent user interaction data on the webpage A, which are stored in the preset user interaction data set, and the user interaction data of the current clicked hyperlink address to the acquisition server through the acquisition script of the webpage A.
In the data sending method provided in this embodiment, when the second webpage has a source link address for linking the first webpage, if the client detects that the user accesses the first webpage and determines that unsent user interaction data exists in the preset user interaction data set, the client sends unsent user interaction data on the second webpage to the collection server through the collection script of the second webpage. Because the acquisition script of the second webpage is successfully loaded, when the client detects that the user accesses the first webpage through the source link address on the second webpage, the client sends the user interaction data which is not sent on the second webpage by adopting the acquisition script of the second webpage, so that the acquisition server can acquire the data of the website to be analyzed earlier, and the accuracy of the statistical analysis result of the acquisition server is further improved.
Fig. 6 is a flowchart illustrating a method for sending data according to another embodiment. The present embodiment relates to a process of how a client constructs a user interaction data set. Optionally, on the basis of the foregoing embodiment, as shown in fig. 6, before S101, the method further includes:
s601, when the operation of accessing the second webpage is detected, acquiring a collection script corresponding to the second webpage from a collection server.
Specifically, in order to acquire the operation data of the website to be analyzed, an acquisition code needs to be embedded in each webpage included in the website to be analyzed in advance, and when the client detects that the user accesses the second webpage of the website to be analyzed, the acquisition code is embedded in the second webpage, so that the client can acquire the acquisition script corresponding to the second webpage from the acquisition server through the instruction of the acquisition code. Generally, in order not to affect the user to browse the second webpage, the client obtains the acquisition script corresponding to the second webpage in an asynchronous request mode.
S602, collecting user interaction data on the second webpage in real time according to the collection script, and storing the user interaction data on the second webpage to the user interaction data set in real time.
Wherein the user interaction data of the second webpage comprises: at least one of the access address of the second webpage, the accumulated number of user interactions on the second webpage, the user operation position on the second webpage, the accumulated number of user interactions on the user operation position, and whether the hyperlink address exists in the user operation position.
Specifically, after the client acquires the acquisition script of the second webpage, the client can acquire the user interaction data on the second webpage in real time through the acquisition script. And the client stores the acquired user interaction data in a user interaction data set in real time. The user interaction data set may include access addresses of a plurality of second web pages and user interaction data within each second web page. For example, if the client detects that the user performs the user interaction operation on the second webpage a for the first time and the position of the user interaction operation this time is a, the client stores at least one of the access address of the second webpage a, the position coordinate of the position a, the accumulated number of user interactions (1) of the position a, whether the position a has a hyperlink address, and the accumulated number of user interactions (1) on the second webpage a into the user interaction dataset. And then, if the client detects that the user carries out user interaction operation on the second webpage A again and the position of the user interaction operation is b, the client stores at least one of the position coordinate of the position b, the user interaction accumulated times (1 time) of the position b, whether the position b has a hyperlink address and the user interaction accumulated times (2 times) on the second webpage A into the user interaction data set. And then, if the client detects that the user carries out user interaction operation on the second webpage A again and the position of the user interaction operation is a, the client updates the user interaction accumulated times (2 times) of the position a in the user interaction data set and the user interaction accumulated times (3 times) of the second webpage A.
It should be noted that, when the client detects that the user accesses the second webpage B, the storage manner of the user interaction data on the second webpage B may refer to the storage manner of the user interaction data on the second webpage a, which is not described herein again in this embodiment.
Optionally, when the client detects that the sum of the cumulative user interaction times on all second webpages in the user interaction data set reaches the preset time threshold, the method further includes S603:
s603, if the sum of the accumulated times of the user interaction on all the second webpages in the user interaction data set is detected to reach a preset time threshold, sending the user interaction data of all the second webpages to the acquisition server.
Specifically, continuing to take the example in S602 as an example, if the client detects that the sum of the cumulative number of user interactions on the second webpage a and the cumulative number of user interactions on the second webpage B in the user interaction data set satisfies the preset number threshold, the client sends the user interaction data of the second webpage a and the second webpage B in the user interaction data set to the collection server. Optionally, for this case, the client may send the user interaction data of the second webpage a and the second webpage B to the collection server through the collection script of the webpage where the user last interactive operation is performed.
According to the data sending method provided by the embodiment, when the client detects that the user accesses the second webpage, the client acquires the acquisition script corresponding to the second webpage from the acquisition server, acquires the user interaction data on the second webpage in real time according to the acquisition script, stores the acquired user interaction data in the user interaction data set in real time, and sends the user interaction data of the second webpage to the acquisition server when the sum of the accumulated times of user interaction on the second webpage reaches the preset time threshold. The client can store the collected user interaction data on the second webpage in the user interaction data set in real time, so that if the second webpage is closed, the client can supplement and send the user interaction data which are not sent on the second webpage in the user interaction data set to the collection server when the user accesses the first webpage, the integrity of the data collected by the collection server is improved, and the accuracy of the statistical analysis result of the collection server is improved. And when the client detects that the sum of the accumulated times of user interaction on the second webpage in the user interaction data set reaches a preset time threshold, the client sends the user interaction data on the second webpage to the acquisition server, so that the concurrency of sending requests by the client is reduced, the influence on the user to browse the second webpage in the data acquisition process is reduced as much as possible, and the user can normally access the website.
Fig. 7 is a flowchart illustrating a method for providing data according to another embodiment. The embodiment relates to a process of how a client collects data on a first webpage. Optionally, on the basis of the foregoing embodiment, as shown in fig. 7, the method further includes:
s701, sending the non-user interaction data of the first webpage, which is acquired after executing the acquisition script of the first webpage, to the acquisition server, and acquiring the user interaction data on the first webpage in real time according to the acquisition script of the first webpage.
Specifically, the non-user interaction data of the first webpage includes basic data of the first webpage and complete data of the first webpage, which are collected by the client. After the acquisition script of the first webpage is loaded, the client immediately acquires the basic data of the first webpage and sends the acquired basic data to the acquisition server, so that the acquisition server can acquire the related data of the first webpage as soon as possible. The basic data of the first webpage mainly comprises: the method comprises the following steps of installing browser information on a client, the equipment type of the client, the resolution of the client, the flash version installed on the client, the type of a webpage accessed by a user and the like.
After the page loading of the first webpage is completed, the client acquires the complete data of the first webpage and sends the acquired complete data to the acquisition server, so that the acquisition server can obtain the relatively complete related data of the first webpage, and the accuracy of the statistical analysis result of the acquisition server is improved. The complete data of the first webpage includes basic data of the first webpage, and also includes data such as white screen loading time of the first webpage, first webpage first screen loading time, first webpage page loading time, first webpage rendering time, network delay time of the website server 11, response time of the website server 11, and the like.
It should be noted that, in the process of acquiring, by the client, the user interaction data on the first webpage in real time according to the acquisition script of the first webpage, reference may be made to the process of acquiring, by the client, the user interaction data on the second webpage in real time according to the acquisition script of the second webpage, which is not described herein again in this embodiment.
S702, storing the user interaction data on the first webpage to the user interaction data set in real time.
Compared with the user interaction data, the data sending method provided by the embodiment has the advantages that the quantity of the non-user interaction data is small, and when the small quantity of the non-user interaction data is collected, the client side immediately sends the small quantity of the non-user interaction data to the collection server, so that the collection server can obtain the relevant data of the first webpage as soon as possible. For a large amount of user interaction data, after the user interaction data with the large amount are collected, the client stores the collected user interaction data in a user interaction data set in real time, and the user interaction data reaching the preset number threshold value are sent to the collection server only after the user interaction data reach the preset number threshold value, so that the request and the sending amount sent by the client are reduced, and the influence of a data collection process on a first webpage browsed by a user is reduced as much as possible. And for the user interaction data which does not reach the preset frequency threshold value in the user interaction data set, when the client detects that the user accesses another webpage of the website to be analyzed, the client can supplement and send the user interaction data which does not reach the preset frequency threshold value to the acquisition server, so that the integrity of the data acquired by the client is improved, and the accuracy of the statistical analysis result of the acquisition server is improved. According to different types of data, the client side adopts different data sending methods, so that the acquisition server can obtain the related data of the first webpage as soon as possible, the request concurrency quantity sent by the client side can be reduced, the influence on the user browsing the first webpage in the data acquisition process is reduced, the integrity of the data acquired by the client side can be improved, and the accuracy of the statistical analysis result of the acquisition server is improved.
Fig. 8 is a flowchart illustrating a method for sending data according to another embodiment. For the understanding of those skilled in the art, the following example is used to describe a specific process of sending data by the client. For example, suppose that before the user accesses web page G (web page G is the first web page), the operation of the user accessing the website to be analyzed is: a user accesses a webpage A and then accesses a webpage B through a client, a source link address of a webpage G does not exist on the webpage A and the webpage B, meanwhile, the user conducts 3 interactive operations on the webpage A and 2 interactive operations on the webpage B. Then, the user accesses the webpage C through the client, then clicks the access address of the webpage D on the page of the webpage C, and clicks the access address of the webpage E on the page of the opened webpage D, and the webpage E which should be opened in response originally is the webpage E, but the webpage E is redirected to the webpage G. The web pages A, B, C, D, E and G are all web pages in the website to be analyzed. Specifically, as shown in fig. 8, the method includes:
s801, when the client detects that the webpage G is visited, acquiring scripts corresponding to the webpage G from the acquisition server.
S802, the client determines whether unsent user interaction data exist in a preset user interaction data set. If so, S803 is executed, otherwise, S804 is executed.
Specifically, the client may collect the user interaction data on the web page a and the web page B in real time, and store the collected user interaction data in the user interaction data set in real time, so that after the web page a and the web page B are closed, the user interaction data that is not sent on the web page a and the user interaction data that is not sent on the web page B are both stored in the user interaction data set. Since the user interaction data set stores therein the user interaction data unsent 3 times on the web page a and the user interaction data unsent 2 times on the web page B, the client performs S803.
And S803, the client sends the user interaction data which are not sent in the user interaction data set to the acquisition server. After that, S804 is performed.
Specifically, the client side sends the unsent user interaction data of 3 times on the webpage A and unsent user interaction data of 2 times on the webpage B, which are stored in the user interaction data set, to the collection server through the collection script of the webpage G. After the unsent user interaction data is sent in a supplementary manner, the client optionally deletes the part of the data sent in a supplementary manner from the user interaction data set.
S804, the client determines whether the website to be analyzed has the redirected webpage or not according to the local access record and the access address of the first upstream source webpage of the webpage G. If so, go to S805, otherwise go to S806. Specifically, the local access record stores the relevant records of the user accessing the web page G according to the sequence of the web page access time, that is, the local access record stores the access address of the web page C, the access time of the web page C, the access address of the web page D, the access time of the web page D, the access address of the web page G and the access time of the web page G. Accordingly, the client can acquire the source webpage adjacent to the G webpage as the webpage D from the local access record. Meanwhile, the client may obtain the access address of the first upstream source webpage of the webpage G as the access address of the webpage E through a page access path (optionally, the page access path may be refer sent by the client). Because the address of the source web page adjacent to the web page G obtained from the local access record is different from the address of the first upstream source web page of the web page G obtained from the page access path, the client determines that the website to be analyzed has a redirected web page, and the redirected web page is web page E.
And S805, the client sends the page data of the redirected webpage to the acquisition server. After that, S806 is executed.
Specifically, the client may determine the access time of the redirected web page (E web page) according to the access time of the G web page and the time required for the redirection process, and send the access address of the E web page and the determined access time of the E web page to the acquisition server.
S806, the client collects basic data of the G webpage and sends the basic data of the G webpage to a collection server.
S807, after the completion of the page loading of the G webpage is detected, the client acquires the complete data of the G webpage and sends the complete data of the G webpage to the acquisition server.
Specifically, in a time period from the time when the client acquires the basic data of the G webpage to the time when the client acquires the complete data of the G webpage, if the client detects that the user performs the user interaction operation on the G webpage, the client stores the part of the user interaction operation data in a user interaction data set, and after the client detects that the page loading of the G webpage is completed, the client also sends the part of the user interaction data to the acquisition server at the time when the page loading is completed.
And S808, the client acquires the user interaction data of the G webpage in real time according to the acquisition script of the G webpage, and stores the user interaction data on the G webpage in a user interaction data set in real time.
In the data method provided by the embodiment, when a client detects an operation of a user accessing a first webpage, the client determines whether unsent user interaction data exist in a preset user interaction data set, and when unsent user interaction data exist in the user interaction data set, the unsent user interaction data in the user interaction data set are sent to an acquisition server in a supplementing manner through an acquisition script of the first webpage; secondly, the client determines whether a redirected webpage exists in the website to be analyzed, and after the redirected webpage is determined, the webpage data of the redirected webpage are sent to the acquisition server in a supplementing mode through the acquisition script of the first webpage. Through the two supplementary sending processes, the integrity of the data collected by the client is higher, and the accuracy of the statistical analysis result of the collection server is improved. Furthermore, the client acquires non-user interaction data and user interaction data on the first webpage in real time, and different sending methods are adopted for different types of data, so that the request concurrency amount sent by the client is reduced, the influence of the data acquisition process on the browsing of the first webpage by the user is reduced, the data loss is effectively reduced, the integrity of the data acquired by the client is improved, and the accuracy of statistical analysis of the acquisition server is improved.
Fig. 9 is a schematic structural diagram of a data method and apparatus according to an embodiment. As shown in fig. 9, the apparatus may include: a first determination module 20 and a sending module 21.
Specifically, the first determining module 20 is configured to determine whether unsent user interaction data exists in a preset user interaction data set when an operation of accessing a first webpage of a website to be analyzed is detected; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage.
A sending module 21, configured to send, when the first determining module 20 determines that the unsent user interaction data exists in the preset user interaction data set, the unsent user interaction data to the collection server.
The data sending apparatus provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 10 is a schematic structural diagram of a data processing method and apparatus according to another embodiment. Optionally, on the basis of the above embodiment shown in fig. 9, as shown in fig. 10, the apparatus may further include: a first obtaining module 22 and a second determining module 23.
Specifically, the first obtaining module 22 is configured to obtain, from a page access path, an access address of a first upstream source web page of the first web page after the sending module 21 sends the unsent user interaction data to the acquisition server; and the page access path stores the access address of the upstream source webpage of the currently accessed webpage.
A second determining module 23, configured to determine whether a redirected web page exists in the website to be analyzed according to a local access record and an access address of the first upstream source web page;
the sending module 21 is further configured to send the page data of the redirected webpage to the collecting server when the second determining module 23 determines that the redirected webpage exists.
The local access record comprises an access address of the first webpage, access time of the first webpage, an access address of a second upstream source webpage related to the first webpage in the second webpage and access time of the second upstream source webpage, and the access addresses in the local access record are sorted according to the access time; the page data of the redirected webpage comprises an access address of the redirected webpage and an access time of the redirected webpage.
The data sending apparatus provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 11 is a schematic structural diagram of a data processing method and apparatus according to another embodiment. Optionally, on the basis of the embodiment shown in fig. 10, as shown in fig. 11, the second determining module 23 may include: an acquisition unit 231, a judgment unit 232, and a determination unit 233.
Specifically, the obtaining unit 231 is configured to obtain a source web page adjacent to the first web page in the second upstream source web page.
The determining unit 232 is configured to determine whether the addresses of the source webpage adjacent to the first webpage and the first upstream source webpage are the same.
A determining unit 233, configured to determine that the website to be analyzed has the redirected webpage when the determining unit 232 determines that the addresses of the source webpage adjacent to the first webpage are different from the address of the first upstream source webpage.
Optionally, the determining unit 233 is specifically configured to determine that the first upstream source webpage is the redirected webpage when the address of the source webpage adjacent to the first webpage is different from the address of the first upstream source webpage.
Optionally, the sending module 21 is specifically configured to determine, according to the access time of the first webpage, the access time of the redirected webpage; and sending the access time of the redirected webpage and the access address of the redirected webpage to the acquisition server.
Optionally, a source link address for linking the first webpage does not exist on the second webpage; or the second webpage is provided with a source link address for linking the first webpage.
Optionally, if the source link address linking the first webpage does not exist on the second webpage, the sending module 21 is specifically configured to send the unsent user interaction data to an acquisition server by using the acquisition script of the first webpage.
Optionally, if the second webpage has a source link address for linking the first webpage, the sending module 21 is specifically configured to send the unsent user interaction data to an acquisition server by using the acquisition script of the first webpage.
The data sending apparatus provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 12 is a schematic structural diagram of a data processing method and apparatus according to another embodiment. Optionally, on the basis of the above embodiment, as shown in fig. 12, the apparatus may further include: a second acquisition module 24 and an acquisition and storage module 25.
Specifically, the second obtaining module 24 is configured to obtain, when an operation of accessing the second webpage is detected, a collection script corresponding to the second webpage from a collection server.
The acquisition and storage module 25 is configured to acquire user interaction data on the second webpage in real time according to the acquisition script, and store the user interaction data on the second webpage to the user interaction data set in real time; wherein the user interaction data of the second webpage comprises: at least one of the access address of the second webpage, the accumulated number of user interactions on the second webpage, the user operation position on the second webpage, the accumulated number of user interactions on the user operation position, and whether the hyperlink address exists in the user operation position.
Optionally, the sending module 21 is further configured to send the user interaction data of all second webpages to the collecting server when detecting that the sum of the cumulative times of user interactions on all second webpages in the user interaction data set reaches a preset time threshold.
Optionally, the sending module 21 is further configured to send, after sending the page data of the redirected webpage to the collection server, the non-user interaction data of the first webpage, which is obtained after executing the collection script of the first webpage, to the collection server; the collecting and storing module 25 is further configured to collect, in real time, user interaction data on the first web page according to the collecting script of the first web page, and store, in real time, the user interaction data on the first web page to the user interaction data set.
The data sending apparatus provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
For specific limitations of the data transmission device, reference may be made to the above limitations on the data transmission method, which is not described herein again. The respective modules in the above-described data transmission apparatus may be entirely or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of transmitting data. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
if the operation of accessing the first webpage of the website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
and if so, sending the unsent user interaction data to an acquisition server.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
if the operation of accessing the first webpage of the website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
and if so, sending the unsent user interaction data to an acquisition server.
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 hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A method for transmitting data, comprising:
if the operation of accessing the first webpage of the website to be analyzed is detected, determining whether unsent user interaction data exist in a preset user interaction data set; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
if so, sending the unsent user interaction data to an acquisition server;
after the unsent user interaction data is sent to the collection server, the method further comprises:
acquiring an access address of a first upstream source webpage of the first webpage from a page access path; the access address of an upstream source webpage of a webpage accessed currently is stored in the page access path;
and determining whether the website to be analyzed has a redirected webpage or not according to a local access record and the access address of the first upstream source webpage, and sending the page data of the redirected webpage to the acquisition server when determining that the redirected webpage exists.
2. The method according to claim 1, wherein the local access record includes an access address of the first web page, an access time of the first web page, an access address of a second upstream source web page related to the first web page in the second web page, and an access time of the second upstream source web page, and the access addresses in the local access record are sorted according to the access time; the page data of the redirected webpage comprises an access address of the redirected webpage and an access time of the redirected webpage.
3. The method of claim 2, wherein the determining whether the website to be analyzed has a redirected webpage according to the local access record and the access address of the first upstream source webpage comprises:
acquiring a source webpage adjacent to the first webpage in the second upstream source webpage;
judging whether the addresses of the source webpage adjacent to the first webpage and the first upstream source webpage are the same or not;
if not, determining that the redirected webpage exists in the website to be analyzed.
4. The method of claim 3, wherein the determining that the website to be analyzed has the redirected webpage comprises:
and if the addresses of the source webpage adjacent to the first webpage and the first upstream source webpage are different, determining that the first upstream source webpage is the redirected webpage.
5. The method according to any one of claims 2-4, wherein the sending the page data of the redirected web page to the acquisition server comprises:
determining the access time of the redirected webpage according to the access time of the first webpage;
and sending the access time of the redirected webpage and the access address of the redirected webpage to the acquisition server.
6. The method of claim 1, wherein a source link address linking the first web page is not present on the second web page;
alternatively, the first and second electrodes may be,
the second webpage is provided with a source link address for linking the first webpage.
7. The method of claim 6, wherein if a source link address linking the first webpage does not exist on the second webpage, the sending the unsent user interaction data to a collection server comprises:
and sending the unsent user interaction data to an acquisition server by adopting the acquisition script of the first webpage.
8. The method of claim 6, wherein if the second webpage has a source link address for linking to the first webpage, the sending the unsent user interaction data to the collection server comprises:
and sending the unsent user interaction data to the acquisition server by adopting the acquisition script of the second webpage.
9. The method of claim 1, further comprising:
when the operation of accessing the second webpage is detected, acquiring a collection script corresponding to the second webpage from a collection server;
acquiring user interaction data on the second webpage in real time according to the acquisition script, and storing the user interaction data on the second webpage to the user interaction data set in real time;
wherein the user interaction data of the second webpage comprises: at least one of the access address of the second webpage, the accumulated number of user interactions on the second webpage, the user operation position on the second webpage, the accumulated number of user interactions on the user operation position, and whether the hyperlink address exists in the user operation position.
10. The method of claim 9, further comprising:
and if the sum of the cumulative times of the user interactions on all the second webpages in the user interaction data set is detected to reach a preset time threshold, sending the user interaction data of all the second webpages to the acquisition server.
11. The method of claim 2, wherein after sending the page data of the redirected web page to the acquisition server, the method further comprises:
sending the non-user interaction data of the first webpage acquired after executing the acquisition script of the first webpage to the acquisition server, and acquiring the user interaction data on the first webpage in real time according to the acquisition script of the first webpage;
and storing the user interaction data on the first webpage to the user interaction data set in real time.
12. An apparatus for transmitting data, comprising:
the analysis method comprises the steps that a first determining module is used for determining whether unsent user interaction data exist in a preset user interaction data set when the operation of accessing a first webpage of a website to be analyzed is detected; the unsent user interaction data are unsent data located on all second webpages visited before the first webpage;
the sending module is used for sending the unsent user interaction data to the acquisition server when the first determining module determines that the unsent user interaction data exists in the preset user interaction data set;
the first obtaining module is used for obtaining an access address of a first upstream source webpage of the first webpage from a webpage access path after the sending module sends the unsent user interaction data to the acquisition server; the access address of an upstream source webpage of a webpage accessed currently is stored in the page access path;
the second determining module is used for determining whether the website to be analyzed has a redirected webpage or not according to a local access record and the access address of the first upstream source webpage;
the sending module is further configured to send the page data of the redirected webpage to the collection server when the second determining module determines that the redirected webpage exists.
13. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 11.
CN201810277668.9A 2018-03-30 2018-03-30 Data transmission method and device, computer equipment and storage medium Active CN108900563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810277668.9A CN108900563B (en) 2018-03-30 2018-03-30 Data transmission method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810277668.9A CN108900563B (en) 2018-03-30 2018-03-30 Data transmission method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108900563A CN108900563A (en) 2018-11-27
CN108900563B true CN108900563B (en) 2021-05-18

Family

ID=64342203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810277668.9A Active CN108900563B (en) 2018-03-30 2018-03-30 Data transmission method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108900563B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382380A (en) * 2018-12-27 2020-07-07 北京奇虎科技有限公司 Statistical method and device for page access duration

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8874563B1 (en) * 2007-03-07 2014-10-28 Comscore, Inc. Detecting content and user response to content
CN102946319B (en) * 2012-09-29 2015-12-16 焦点科技股份有限公司 Networks congestion control information analysis system and analytical method thereof
CN104714948A (en) * 2013-12-11 2015-06-17 部落邦(北京)科技有限责任公司 Method, system and thermodynamic diagram display device for replaying user web page operation behavior
CN106484703B (en) * 2015-08-25 2019-09-20 北京国双科技有限公司 The sending method and device of web data
CN106657228A (en) * 2016-09-27 2017-05-10 山东浪潮云服务信息科技有限公司 Crawler realizing method using cloud terminal for concurrent acquisition

Also Published As

Publication number Publication date
CN108900563A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
US20210337037A1 (en) Method and system for monitoring and tracking browsing activity on handled devices
CN108304498B (en) Webpage data acquisition method and device, computer equipment and storage medium
US20190146616A1 (en) Systems And Methods For Remote Tracking And Replay Of User Interaction With A Webpage
CN106528659B (en) Control method and device for browser to jump to application program
TWI676913B (en) Data processing method, data transmission method, risk identification method and device
US20190034549A1 (en) Dynamic user agent strings
CN107590228B (en) Page content processing method and mobile terminal
CN110659092B (en) Webpage screenshot method and device, computer equipment and storage medium
WO2015114753A1 (en) Analysis device and analysis method
CN103530292A (en) Webpage displaying method and device
CN109753421B (en) Service system optimization method and device, computer equipment and storage medium
US20130227386A1 (en) Method of gathering data of an event-like nature from electronic forms
US20180107752A1 (en) Systems and methods for anonymous construction and indexing of visitor databases using first-party cookies
US20140258372A1 (en) Systems and Methods for Categorizing and Measuring Engagement with Content
CN112612546A (en) Page loading method and device, electronic equipment and storage medium
US8368698B2 (en) Calculating a webpage importance from a web browsing graph
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN111538922B (en) Link jump method, application client, device and storage medium
CN108900563B (en) Data transmission method and device, computer equipment and storage medium
CN110929129B (en) Information detection method, equipment and machine-readable storage medium
CN113688022A (en) Browser performance monitoring method, device, equipment and medium
US9679073B2 (en) Webpage comprising a rules engine
Wang et al. Similarity-based web browser optimization
US20100131542A1 (en) Suggested websites
CN110460685B (en) User unique identifier processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20231023

Address after: Room 1423, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai 200040

Patentee after: Tianyi Digital Life Technology Co.,Ltd.

Address before: 1 / F and 2 / F, East Garden, Huatian International Plaza, 211 Longkou Middle Road, Tianhe District, Guangzhou, Guangdong 510630

Patentee before: Century Dragon Information Network Co.,Ltd.

TR01 Transfer of patent right