CN113377636B - Method, system, equipment and readable storage medium for calculating page browsing amount - Google Patents
Method, system, equipment and readable storage medium for calculating page browsing amount Download PDFInfo
- Publication number
- CN113377636B CN113377636B CN202110630546.5A CN202110630546A CN113377636B CN 113377636 B CN113377636 B CN 113377636B CN 202110630546 A CN202110630546 A CN 202110630546A CN 113377636 B CN113377636 B CN 113377636B
- Authority
- CN
- China
- Prior art keywords
- record
- field
- pointer
- data record
- timestamp
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000012217 deletion Methods 0.000 claims description 53
- 230000037430 deletion Effects 0.000 claims description 53
- 238000004364 calculation method Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 6
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3438—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a method for calculating page browsing amount, which comprises the following steps: acquiring a timestamp of a currently received data record, and acquiring values of a first pointer and a second pointer; judging whether the data record is a page browsing amount record or not; if not, judging whether the data record is a page display record or not; if the data record is a page display record, judging whether the first field is empty; and if the first field is empty, issuing a current page display record corresponding to the second pointer, and adding one to the page browsing volume. When the data record is a page display record, if the first field is empty, it is proved that the page browsing volume record is not filled, that is, it can be determined that the page browsing volume record is missed, and at this time, the current page display record corresponding to the second pointer is issued and the page browsing volume is increased by one, so that the accuracy of calculating the page browsing volume is greatly improved. The application also provides a system, equipment and a readable storage medium for calculating the page browsing volume, and the system, the equipment and the readable storage medium have the beneficial effects.
Description
Technical Field
The present application relates to the field of page browsing amount calculation, and in particular, to a method, a system, a device, and a readable storage medium for calculating a page browsing amount.
Background
With the continuous development of Web technology, electronic commerce activities are increasingly frequent. Each click by a client on an enterprise web site is logged by the enterprise web server, thereby generating click stream data. When a user opens a page, the program immediately sends two special records to the background to indicate that the page is opened for the first time, and the first record is generally expressed as { pageshow: 1, userid: xxx, url: xxx, called page display record, which is a data record sent to the background when the page link is triggered; the second record is generally represented by { elementid: pv, userid: xxx, url: xxx, called page view volume record, the view volume is issued after the page is actually opened. Sometimes the link is closed by the user as soon as it is triggered, but not yet on the real page, so two recorded page views are needed.
Because the page display records and the page browsing volume records have the condition of possible missed sending, and the analysis indexes need accurate page browsing volume as data support, one of the page display records and the page browsing volume records cannot be used as the reference, and the other page browsing volume record is completely discarded, so that the browsing data is lost too much; but neither can be stored in their entirety, which can cause significant computational errors. So when both records exist, one of the records needs to be deleted. However, due to the fact that data is real-time and various reasons such as network delay and middle process blocking exist, complete sequence of data cannot be guaranteed, only relative sequence can be achieved, and accurate calculation of page browsing amount cannot be achieved.
Therefore, how to improve the accuracy of the calculation of the page browsing amount is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method, a system, equipment and a readable storage medium for calculating the page browsing amount, which are used for improving the accuracy of calculating the page browsing amount.
In order to solve the above technical problem, the present application provides a method for calculating a page browsing amount, including:
acquiring a timestamp of a currently received data record, and acquiring values of a first pointer and a second pointer; the first pointer is a pointer recorded by the current page browsing amount, the first pointer comprises a first timestamp and a first field, the second pointer is a pointer recorded by the current page display, and the second pointer comprises a second timestamp and a second field;
judging whether the data record is a page browsing amount record or not;
if not, judging whether the data record is a page display record or not;
if the data record is a page display record, judging whether the first field is empty;
and if the first field is empty, issuing a current page display record corresponding to the second pointer, and adding one to the page browsing amount.
Optionally, after issuing the current page display record corresponding to the second pointer and adding one to the page browsing amount, the method further includes:
updating the second timestamp to a timestamp of the data record and updating the second field to a field of the data record.
Optionally, the method further includes:
if the first field is not empty, judging whether the data record meets the deleting condition;
if the data record does not accord with the deleting condition, judging whether the current page display record corresponding to the second pointer accords with the deleting condition;
if the current page display record meets the deletion condition, marking the current page display record as a record to be deleted and sending the record to the downstream for deletion;
and if the current page display record does not accord with the deleting condition, issuing the current page display record and adding one to the page browsing amount.
Optionally, the method further includes:
if the data record meets the deleting condition, marking the data record as a record to be deleted and sending the record to the downstream for deletion;
judging whether the current page display record meets the deleting condition;
if the current page display record meets the deletion condition, marking the current page display record as a record to be deleted and sending the record to the downstream for deletion;
and if the current page display record does not accord with the deletion condition, sending the current page display record to downstream for recording, and emptying the second pointer.
Optionally, the method further includes:
if the data record is a page browsing volume record, judging whether the first timestamp is empty;
if so, updating the first timestamp and a third timestamp of a third pointer to the timestamp of the page browsing volume record, and updating a third field in the first field and the third pointer to the field of the data record; the third pointer is a pointer of a last page browsing volume record, and the third pointer comprises the third timestamp and the third field;
if not, judging whether the time stamp recorded by the page browsing amount is larger than the first time stamp;
if the timestamp recorded by the page browsing volume is greater than the first timestamp, updating the third timestamp to the first timestamp, and updating the third field to the first field; updating the first timestamp to be the timestamp of the data record, and updating the first field to be the field of the data record;
and issuing the data record, and adding one to the page browsing amount.
Optionally, the determining whether the data record meets the deletion condition includes:
judging whether the field of the data record is the same as the first field;
if the field of the data record is the same as the first field, determining that the data record meets the deletion condition;
if the field of the data record is different from the first field, judging whether the field of the data record is the same as the third field;
if the field of the data record is the same as the third field, determining that the data record meets the deletion condition;
and if the field of the data record is not the same as the third field, determining that the data record does not meet the deletion condition.
Optionally, the determining whether the current page display record meets the deletion condition includes:
judging whether the second field is the same as the first field;
if the second field is the same as the first field, determining that the current page display record meets the deletion condition;
if the second field is different from the first field, judging whether the second field is the same as the third field;
if the second field is the same as the third field, determining that the current page display record meets the deletion condition;
and if the second field is different from the third field, determining that the current page display record does not accord with the deleting condition.
The present application further provides a system for calculating a browsing volume of a page, the system comprising:
the downloading module is used for acquiring a timestamp of a currently received data record and acquiring values of the first pointer and the second pointer; the first pointer is a pointer recorded by the current page browsing volume, the first pointer comprises a first timestamp and a first field, the second pointer is a pointer recorded by the current page display, and the second pointer comprises a second timestamp and a second field;
the first judgment module is used for judging whether the data record is a page browsing volume record or not;
the second judging module is used for judging whether the data record is a page display record or not when the data record is not a page browsing amount record;
the third judging module is used for judging whether the first field is empty or not when the data record is a page display record;
and the first calculation module is used for issuing the current page display record corresponding to the second pointer when the first field is empty, and adding one to the page browsing amount.
The present application also provides a device for calculating a page browsing amount, including:
a memory for storing a computer program;
a processor for implementing the steps of the method for calculating the page browsing amount according to any one of the above items when the computer program is executed.
The present application also provides a readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the method for calculating page browsing volume according to any one of the above items.
The method for calculating the page browsing amount comprises the following steps: acquiring a timestamp of a currently received data record, and acquiring values of a first pointer and a second pointer; the first pointer is a pointer recorded by the current page browsing amount, the first pointer comprises a first timestamp and a first field, the second pointer is a pointer recorded by the current page display, and the second pointer comprises a second timestamp and a second field; judging whether the data record is a page browsing amount record or not; if not, judging whether the data record is a page display record or not; if the data record is a page display record, judging whether the first field is empty; and if the first field is empty, issuing a current page display record corresponding to the second pointer, and adding one to the page browsing amount.
According to the technical scheme, the timestamp of the currently received data record is acquired, the values of the first pointer and the second pointer are acquired, when the data record is the page display record, if the first field is empty, the page browsing volume record is proved not to be filled, the page browsing volume record can be determined to be missed, the current page display record corresponding to the second pointer is issued at the moment, the page browsing volume is increased by one, and the accuracy of the page browsing volume calculation is greatly improved. The application also provides a system, a device and a readable storage medium for calculating the page browsing amount, which have the beneficial effects and are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for calculating a page browsing amount according to an embodiment of the present application;
FIG. 2 is a flowchart of another method for calculating a browsing volume of a page according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a system for calculating a page browsing amount according to an embodiment of the present application;
fig. 4 is a structural diagram of a device for calculating a browsing volume of a page provided in an embodiment of the present application.
Detailed Description
The core of the application is to provide a method, a system, equipment and a readable storage medium for calculating the page browsing amount, which are used for improving the accuracy of calculating the page browsing amount.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
With the continuous development of Web technology, electronic commerce activities are increasingly frequent. Each click by a client on an enterprise web site is logged by the enterprise web server, thereby producing click stream data. When a user opens a page, the program immediately sends two special records to the background to indicate that the page is opened for the first time, and the first record is generally expressed as { pageshow: 1, userid: xxx, url: xxx, called page display record, which is a data record sent to the background when the page link is triggered; the second record is typically represented by { elementary: pv, userid: xxx, url: xxx, called page view volume record, the view volume is issued after the page is actually opened. Sometimes the link is closed by the user as soon as it is triggered, but not yet on the real page, so two recorded page views are needed.
Because the page display records and the page browsing volume records have the condition of possible missed sending, and the analysis indexes need accurate page browsing volume as data support, one of the page display records and the page browsing volume records cannot be used as the reference, and the other page browsing volume record is completely discarded, so that the browsing data is lost too much; but neither can be stored in their entirety, which can cause significant computational errors. So when both records exist, one of the records needs to be deleted. However, due to the fact that data are real-time and various reasons such as network delay, middle process blocking and the like exist, the data cannot guarantee complete sequence and only can be relatively sequenced, and accurate calculation of page browsing amount cannot be achieved; therefore, the present application provides a method for calculating a page browsing amount, which is used to solve the above problems.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for calculating a page browsing amount according to an embodiment of the present disclosure.
The method specifically comprises the following steps:
s101: acquiring a timestamp of a currently received data record, and acquiring values of a first pointer and a second pointer;
the first pointer mentioned here is a pointer of a current page browsing amount record, the first pointer includes a first timestamp and a first field, the first timestamp and the first field are the timestamp and the field of the current page browsing amount record, the second pointer is a pointer of a current page display record, the second pointer includes a second timestamp and a second field, the second timestamp and the second field are the timestamp and the field of the current page display record.
S102: judging whether the data record is a page browsing amount record or not;
if not, the step S103 is executed;
when the data record is not the page view record, it is proved that the data record may be a normal data record or a page display record, and then step S103 is executed to determine whether the data record is a page display record.
In an embodiment, the determining whether the data record is a page view volume record may be specifically determined by determining whether a field of the data record is a preset determination field.
S103: judging whether the data record is a page display record or not;
if yes, the process proceeds to step S104.
In one embodiment, if the data record belongs to neither the page display record nor the page view volume record, the data record is considered as a normal data record, and the record is directly sent out without any processing.
S104: judging whether the first field is empty or not;
if yes, go to step S105;
when the data record is a page display record, it is proved that the current page display record corresponding to the second pointer is automatically the last page display record, it needs to be determined whether there is a page browsing volume record corresponding to the same page as the page display record corresponding to the second pointer, at this time, step S104 is executed to determine whether the first field is empty, if the first field is empty, it is proved that the current page browsing volume record does not record data, that is, it is indicated that there is no page browsing volume record corresponding to the same page as the page display record corresponding to the second pointer, at this time, step S105 is executed to issue the current page display record corresponding to the second pointer, and add one to the page browsing volume.
S105: and issuing a current page display record corresponding to the second pointer, and adding one to the page browsing amount.
In a specific embodiment, after issuing the current page display record corresponding to the second pointer and adding one to the page browsing amount, the following steps may be further performed to complete the update of the second pointer:
the second timestamp is updated to the timestamp of the data record and the second field is updated to the field of the data record.
Based on the technical scheme, the method for calculating the page browsing volume provided by the application can determine that the page browsing volume record is missed to be sent by acquiring the timestamp of the currently received data record and acquiring the values of the first pointer and the second pointer, and when the data record is the page display record, if the first field is empty, the page browsing volume record is proved to be not filled, and at the moment, the current page display record corresponding to the second pointer is sent and the page browsing volume is increased by one, so that the accuracy of calculating the page browsing volume is greatly improved.
The embodiment of the present application further discloses another method for calculating a page browsing amount, and in this embodiment, the technical solution is further explained and optimized with respect to the previous embodiments, specifically please refer to fig. 2, and fig. 2 is a flowchart of another method for calculating a page browsing amount provided in the embodiment of the present application.
The method specifically comprises the following steps:
s201: acquiring a timestamp of a currently received data record, and acquiring values of a first pointer and a second pointer;
s202: judging whether the data record is a page browsing volume record or not;
if yes, go to step S203; if not, the process proceeds to step S208.
S203: judging whether the first timestamp is empty or not;
if yes, go to step S204; if not, the process proceeds to step S205.
When the data record is a page browsing volume record and the first timestamp is empty, it is proved that the data is not recorded in the current page browsing volume record, and at this time, step S204 is executed, the first timestamp and the third timestamp of the third pointer are updated to the timestamp of the page browsing volume record, and the third field in the first field and the third pointer is updated to the field of the data record; the third pointer mentioned here is a pointer of the last page view volume record, and the third pointer includes a third timestamp and a third field.
S204: updating the first timestamp and a third timestamp of a third pointer to be a timestamp of a page browsing volume record, and updating a third field in the first field and the third pointer to be a field of a data record;
s205: judging whether the time stamp recorded by the page browsing amount is larger than a first time stamp or not;
if yes, go to step S206; if not, the process proceeds to step S207.
When the data record is a page browsing volume record and the first timestamp is not empty, it is proved that the data record is recorded by the current page browsing volume record, at this time, it is determined whether the timestamp of the page browsing volume record is greater than the first timestamp, if so, it is proved that the data record is the latest page browsing volume record, at this time, step S206 is executed to update the third timestamp to the first timestamp, and the third field is updated to the first field; updating the first time stamp into the time stamp of the data record, and updating the first field into the field of the data record; then step S207 is executed to issue the data record, and add one to the page browsing volume.
If the timestamp of the page browsing volume record is not greater than the first timestamp, it is proved that the record corresponding to the first pointer is the latest page browsing volume record, and at this time, step S207 is executed to issue the data record, and the page browsing volume is increased by one.
S206: updating the third timestamp to be the first timestamp and updating the third field to be the first field; updating the first timestamp to be the timestamp of the data record, and updating the first field to be the field of the data record;
s207: issuing the data record, and adding one to the page browsing amount;
s208: judging whether the data record is a page display record or not;
if not, go to step S209; if yes, the process proceeds to step S210.
S209: and issuing the data record.
S210: judging whether the first field is empty or not;
if yes, go to step S211; if not, the process proceeds to step S212.
S211: issuing a current page display record corresponding to the second pointer, and adding one to the page browsing amount;
s212: judging whether the data record meets the deleting condition;
if not, go to step S213; if yes, the process proceeds to step S216.
In an embodiment, the determining whether the data record meets the deletion condition may specifically be:
judging whether the field of the data record is the same as the first field;
if the field of the data record is the same as the first field, determining that the data record meets the deleting condition;
if the field of the data record is different from the first field, judging whether the field of the data record is the same as the third field;
if the field of the data record is the same as the third field, determining that the data record meets the deleting condition;
and if the field of the data record is not the same as the third field, determining that the data record does not meet the deletion condition.
S213: judging whether the current page display record corresponding to the second pointer meets the deletion condition;
if yes, go to step S214; if not, the process proceeds to step S215.
When the first field is not empty, it is proved that the current page browsing volume record has recorded data, that is, it indicates that there may exist a page browsing volume record corresponding to the same page as the page display record corresponding to the second pointer, at this time, step S212 is executed to determine whether the data record meets the deletion condition, and if yes, step S213 is executed to determine whether the current page display record corresponding to the second pointer meets the deletion condition;
if the current page display record corresponding to the second pointer does not meet the deletion condition, executing step S214 to mark the current page display record as a record to be deleted, and sending the record to the downstream for deletion;
if the current page display record corresponding to the second pointer does not meet the deletion condition, step S215 is executed to issue the current page display record, and add one to the page browsing amount.
S214: marking the current page display record as a record to be deleted, and sending the record to the downstream for deletion;
s215: issuing a current page display record, and adding one to the page browsing amount;
s216: marking the data record as a record to be deleted and sending the record to the downstream for deletion;
s217: judging whether the current page display record meets the deletion condition;
if yes, go to step S218; if not, the process proceeds to step S219.
If the data record does not accord with the deleting condition, the data record is marked as the record to be deleted and sent to the downstream for deletion, and then step S217 is executed to judge whether the current page display record accords with the deleting condition;
if the current page display record meets the deletion condition, executing step S218 to mark the current page display record as a record to be deleted, and sending the record to the downstream for deletion; if the current page display record does not meet the deletion condition, step S219 is executed to send the current page display record to the downstream for recording, and the second pointer is cleared.
In a specific embodiment, the determining whether the current page display record meets the deletion condition may specifically be:
judging whether the second field is the same as the first field;
if the second field is the same as the first field, determining that the current page display record meets the deletion condition;
if the second field is different from the first field, judging whether the second field is the same as the third field;
if the second field is the same as the third field, determining that the current page display record meets the deletion condition;
s218: marking the current page display record as a record to be deleted, and sending the record to the downstream for deletion;
s219: and sending the current page display record to the downstream for recording, and emptying the second pointer.
Referring to fig. 3, fig. 3 is a block diagram of a system for calculating a browsing amount of a page according to an embodiment of the present application.
The system may include:
an obtaining module 100, configured to obtain a timestamp of a currently received data record, and obtain values of a first pointer and a second pointer; the first pointer is a pointer recorded by the current page browsing volume, the first pointer comprises a first time stamp and a first field, the second pointer is a pointer recorded by the current page display, and the second pointer comprises a second time stamp and a second field;
the first judging module 200 is configured to judge whether the data record is a page browsing volume record;
a second judging module 300, configured to judge whether the data record is a page display record when the data record is not a page browsing amount record;
a third determining module 400, configured to determine whether the first field is empty when the data record is a page display record;
the first calculating module 500 is configured to issue a current page display record corresponding to the second pointer when the first field is empty, and add one to the page browsing amount.
On the basis of the above embodiment, in a specific embodiment, the system may further include:
and the first updating module is used for updating the second timestamp to be the timestamp of the data record and updating the second field to be the field of the data record.
On the basis of the above embodiment, in a specific embodiment, the system may further include:
the fourth judging module is used for judging whether the data record meets the deleting condition or not if the first field is not empty;
the fifth judging module is used for judging whether the current page display record corresponding to the second pointer meets the deleting condition or not if the data record does not meet the deleting condition;
the first marking module is used for marking the current page display record as a record to be deleted and sending the record to the downstream for deletion if the current page display record meets the deletion condition;
and the second calculation module is used for issuing the current page display record and adding one to the page browsing amount if the current page display record does not accord with the deletion condition.
On the basis of the above embodiment, in a specific embodiment, the system may further include:
the second marking module is used for marking the data record as a record to be deleted and sending the record to the downstream for deletion if the data record meets the deletion condition;
the sixth judging module is used for judging whether the current page display record meets the deleting condition;
the third marking module is used for marking the current page display record as a record to be deleted and sending the record to the downstream for deletion if the current page display record meets the deletion condition;
and the clearing module is used for sending the current page display record to the downstream for recording if the current page display record does not accord with the deleting condition, and clearing the second pointer.
On the basis of the above embodiment, in a specific embodiment, the system may further include:
a seventh judging module, configured to judge whether the first timestamp is null if the data record is the page browsing volume record;
the second updating module is used for updating the first timestamp and a third timestamp of the third pointer to be timestamps of the page browsing volume record and updating a third field in the first field and the third pointer to be a field of the data record if the first timestamp is null; the third pointer is a pointer of a previous page browsing volume record, and the third pointer comprises a third timestamp and a third field;
the eighth judging module is used for judging whether the timestamp recorded by the page browsing amount is greater than the first timestamp if the first timestamp is not null;
the third updating module is used for updating the third timestamp to be the first timestamp and updating the third field to be the first field if the timestamp recorded by the page browsing amount is greater than the first timestamp; updating the first timestamp to be the timestamp of the data record, and updating the first field to be the field of the data record;
and the third calculation module is used for issuing the data record and adding one to the page browsing amount.
On the basis of the foregoing embodiment, in a specific embodiment, the fourth determining module may include:
the first judgment submodule is used for judging whether the field of the data record is the same as the first field;
the first determining submodule is used for determining that the data record meets the deleting condition if the field of the data record is the same as the first field;
the second judgment submodule is used for judging whether the field of the data record is the same as the third field or not if the field of the data record is different from the first field;
the second determining submodule is used for determining that the data record meets the deleting condition if the field of the data record is the same as the third field;
and the third determining submodule is used for determining that the data record does not meet the deleting condition if the field of the data record is different from the third field.
On the basis of the foregoing embodiment, in a specific embodiment, the sixth determining module may include:
the third judgment submodule is used for judging whether the second field is the same as the first field or not;
the fourth determining submodule is used for determining that the current page display record meets the deleting condition if the second field is the same as the first field;
the fourth judgment submodule is used for judging whether the second field is the same as the third field or not if the second field is different from the first field;
the fifth determining submodule is used for determining that the current page display record meets the deleting condition if the second field is the same as the third field;
and the sixth determining submodule is used for determining that the current page display record does not meet the deleting condition if the second field is different from the third field.
Since the embodiment of the system part corresponds to the embodiment of the method part, the embodiment of the system part is described with reference to the embodiment of the method part, and is not repeated here.
Referring to fig. 4, fig. 4 is a structural diagram of a device for calculating a browsing amount of a page according to an embodiment of the present application.
The pageview computing device 600 may vary significantly depending on configuration or performance, and may include one or more processors (CPUs) 622 (e.g., one or more processors) and memory 632, one or more storage media 630 (e.g., one or more mass storage devices) that store applications 642 or data 644. Memory 632 and storage medium 630 may be, among other things, transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a sequence of instructions operating on the device. Still further, the processor 622 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the pageview volume computing device 600.
The pageview computing device 600 may also include one or more power supplies 626, one or more wired or wireless network interfaces 660, one or more input-output interfaces 668, and/or one or more operating systems 641, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The steps in the method for calculating the page view amount described in fig. 1 to 2 above are implemented by the page view amount calculation device based on the structure shown in fig. 4.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection between devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a function calling device, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The method, system, device and readable storage medium for calculating the page browsing volume provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, the present application can also make several improvements and modifications, and those improvements and modifications also fall into the protection scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A method for calculating page browsing volume is characterized by comprising the following steps:
acquiring a timestamp of a currently received data record, and acquiring values of a first pointer and a second pointer; the first pointer is a pointer recorded by the current page browsing amount, the first pointer comprises a first timestamp and a first field, the second pointer is a pointer recorded by the current page display, and the second pointer comprises a second timestamp and a second field;
judging whether the data record is a page browsing amount record or not;
if not, judging whether the data record is a page display record or not;
if the data record is a page display record, judging whether the first field is empty;
and if the first field is empty, issuing a current page display record corresponding to the second pointer, and adding one to the page browsing volume.
2. The method according to claim 1, wherein after issuing the current page display record corresponding to the second pointer and adding one to the page browsing amount, the method further comprises:
updating the second timestamp to a timestamp of the data record and updating the second field to a field of the data record.
3. The method of claim 1, further comprising:
if the first field is not empty, judging whether the data record meets the deleting condition;
if the data record does not accord with the deleting condition, judging whether the current page display record corresponding to the second pointer accords with the deleting condition;
if the current page display record meets the deletion condition, marking the current page display record as a record to be deleted and sending the record to the downstream for deletion;
and if the current page display record does not accord with the deleting condition, issuing the current page display record and adding one to the page browsing amount.
4. The method of claim 3, further comprising:
if the data record meets the deleting condition, marking the data record as a record to be deleted and sending the record to the downstream for deletion;
judging whether the current page display record meets the deleting condition or not;
if the current page display record meets the deletion condition, marking the current page display record as a record to be deleted and sending the record to the downstream for deletion;
and if the current page display record does not accord with the deletion condition, sending the current page display record to downstream for recording, and emptying the second pointer.
5. The method according to any one of claims 3-4, further comprising:
if the data record is a page browsing volume record, judging whether the first timestamp is empty;
if yes, updating the first timestamp and a third timestamp of a third pointer to be timestamps of the page browsing volume record, and updating a third field in the first field and the third pointer to be a field of the data record; the third pointer is a pointer of a last page browsing volume record, and the third pointer comprises the third timestamp and the third field;
if not, judging whether the time stamp recorded by the page browsing amount is larger than the first time stamp;
if the timestamp recorded by the page browsing volume is greater than the first timestamp, updating the third timestamp to the first timestamp, and updating the third field to the first field; updating the first timestamp to be the timestamp of the data record, and updating the first field to be the field of the data record;
and issuing the data record, and adding one to the page browsing amount.
6. The method of claim 5, wherein determining whether the data record satisfies a deletion condition comprises:
judging whether the field of the data record is the same as the first field;
if the field of the data record is the same as the first field, determining that the data record meets the deletion condition;
if the field of the data record is different from the first field, judging whether the field of the data record is the same as the third field;
if the field of the data record is the same as the third field, determining that the data record meets the deletion condition;
and if the field of the data record is not the same as the third field, determining that the data record does not meet the deletion condition.
7. The method of claim 5, wherein determining whether the current page display record meets the deletion condition comprises:
judging whether the second field is the same as the first field;
if the second field is the same as the first field, determining that the current page display record meets the deletion condition;
if the second field is different from the first field, judging whether the second field is the same as the third field;
if the second field is the same as the third field, determining that the current page display record meets the deletion condition;
and if the second field is different from the third field, determining that the current page display record does not meet the deletion condition.
8. A system for calculating page views, comprising:
the acquisition module is used for acquiring the timestamp of the currently received data record and acquiring the values of the first pointer and the second pointer; the first pointer is a pointer recorded by the current page browsing volume, the first pointer comprises a first timestamp and a first field, the second pointer is a pointer recorded by the current page display, and the second pointer comprises a second timestamp and a second field;
the first judgment module is used for judging whether the data record is a page browsing volume record or not;
the second judging module is used for judging whether the data record is a page display record or not when the data record is not a page browsing amount record;
the third judging module is used for judging whether the first field is empty or not when the data record is a page display record;
and the first calculation module is used for issuing a current page display record corresponding to the second pointer when the first field is empty, and adding one to the page browsing amount.
9. A page browsing amount calculation apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of calculating the page view volume according to any one of claims 1 to 7 when executing said computer program.
10. A readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of the method for calculating page browsing volume according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110630546.5A CN113377636B (en) | 2021-06-07 | 2021-06-07 | Method, system, equipment and readable storage medium for calculating page browsing amount |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110630546.5A CN113377636B (en) | 2021-06-07 | 2021-06-07 | Method, system, equipment and readable storage medium for calculating page browsing amount |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113377636A CN113377636A (en) | 2021-09-10 |
CN113377636B true CN113377636B (en) | 2022-08-26 |
Family
ID=77576058
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110630546.5A Active CN113377636B (en) | 2021-06-07 | 2021-06-07 | Method, system, equipment and readable storage medium for calculating page browsing amount |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113377636B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101189608A (en) * | 2005-03-31 | 2008-05-28 | 谷歌公司 | Systems and methods for analyzing a user's Web history |
CN101617299A (en) * | 2007-01-05 | 2009-12-30 | 索尼爱立信移动通讯股份有限公司 | Data base management method |
CN108494735A (en) * | 2018-02-13 | 2018-09-04 | 北京明朝万达科技股份有限公司 | It is a kind of illegally to crack login analysis alarm method and device |
CN108694230A (en) * | 2017-04-05 | 2018-10-23 | 阿马迪厄斯股份公司 | The management of unique identifier in database |
CN111046034A (en) * | 2018-10-12 | 2020-04-21 | 第四范式(北京)技术有限公司 | Method and system for managing memory data and maintaining data in memory |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8180982B2 (en) * | 2007-08-01 | 2012-05-15 | Raytheon Company | Archival and retrieval of data using linked pages and value compression |
US9189641B2 (en) * | 2014-02-06 | 2015-11-17 | Google Inc. | Methods and systems for deleting requested information |
US10452491B2 (en) * | 2016-04-14 | 2019-10-22 | Sap Se | Scalable log partitioning system |
-
2021
- 2021-06-07 CN CN202110630546.5A patent/CN113377636B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101189608A (en) * | 2005-03-31 | 2008-05-28 | 谷歌公司 | Systems and methods for analyzing a user's Web history |
CN101617299A (en) * | 2007-01-05 | 2009-12-30 | 索尼爱立信移动通讯股份有限公司 | Data base management method |
CN108694230A (en) * | 2017-04-05 | 2018-10-23 | 阿马迪厄斯股份公司 | The management of unique identifier in database |
CN108494735A (en) * | 2018-02-13 | 2018-09-04 | 北京明朝万达科技股份有限公司 | It is a kind of illegally to crack login analysis alarm method and device |
CN111046034A (en) * | 2018-10-12 | 2020-04-21 | 第四范式(北京)技术有限公司 | Method and system for managing memory data and maintaining data in memory |
Non-Patent Citations (1)
Title |
---|
Web日志挖掘中数据预处理的研究;赵红玲等;《计算机应用研究》;20050628(第06期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113377636A (en) | 2021-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11356337B2 (en) | System and method for tracking service requests | |
CN111124819B (en) | Method and device for full link monitoring | |
CN108549569B (en) | Method and equipment for searching information in application program | |
US11570078B2 (en) | Collecting route-based traffic metrics in a service-oriented system | |
CN109947729B (en) | Real-time data analysis method and device | |
CN109062774A (en) | Log processing method, device and storage medium, server | |
CN112579695A (en) | Data synchronization method and device | |
CN111143158A (en) | Monitoring data real-time storage method and system, electronic equipment and storage medium | |
CN113377636B (en) | Method, system, equipment and readable storage medium for calculating page browsing amount | |
KR20190015517A (en) | Information processing method and apparatus, and method and apparatus for displaying dynamic information | |
CN110472126A (en) | A kind of acquisition methods of page data, device and equipment | |
CN112395281A (en) | Heterogeneous multi-source data fusion system | |
CN111459987A (en) | Cache updating method and device | |
CN112433757A (en) | Method and device for determining interface calling relationship | |
CN114625805B (en) | Return test configuration method, device, equipment and medium | |
CN110888840A (en) | File query method, device, equipment and medium in distributed file system | |
CN117493282A (en) | Metadata management method based on file system and related equipment thereof | |
CN111382342B (en) | Method, device and equipment for acquiring hot search words and storage medium | |
CN114449031A (en) | Information acquisition method, device, equipment and storage medium | |
CN113449230A (en) | Method and system for determining exposure element, client and server | |
CN108614838B (en) | User group index processing method, device and system | |
CN110688610A (en) | Weight calculation method and device for graph data and electronic equipment | |
CN110908984B (en) | Data processing method, device, equipment and storage medium | |
CN115658626B (en) | Distributed network small file storage management method | |
CN117648432B (en) | Monitoring and early warning system and method based on log acquisition |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231108 Address after: 200441 Room B1-7001, Building 3, No. 258 Changjiang Road, Baoshan District, Shanghai Patentee after: Shanghai Mengju Information Technology Co.,Ltd. Address before: Room b1-8008, building 3, 258 Changjiang Road, Baoshan District, Shanghai 200441 Patentee before: Shanghai Weimeng Enterprise Development Co.,Ltd. |