CN107943978B - Storage method and device for user access records - Google Patents

Storage method and device for user access records Download PDF

Info

Publication number
CN107943978B
CN107943978B CN201711225183.7A CN201711225183A CN107943978B CN 107943978 B CN107943978 B CN 107943978B CN 201711225183 A CN201711225183 A CN 201711225183A CN 107943978 B CN107943978 B CN 107943978B
Authority
CN
China
Prior art keywords
user
user access
storage
preset storage
matrix
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
CN201711225183.7A
Other languages
Chinese (zh)
Other versions
CN107943978A (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.)
Beijing Jindi Technology Co Ltd
Original Assignee
Beijing Jindi Technology 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 Beijing Jindi Technology Co Ltd filed Critical Beijing Jindi Technology Co Ltd
Priority to CN201711225183.7A priority Critical patent/CN107943978B/en
Publication of CN107943978A publication Critical patent/CN107943978A/en
Application granted granted Critical
Publication of CN107943978B publication Critical patent/CN107943978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for storing user access records, which relate to the technical field of data storage and comprise the following steps: acquiring a pre-established preset storage matrix, wherein the preset storage matrix comprises a plurality of storage bits; acquiring a user access record and a user operand in a current statistical period, wherein the user operand is the behavior quantity of a user operating in a client; the user access records and the user operation numbers are updated in a preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data counted in a counting time period.

Description

Storage method and device for user access records
Technical Field
The present invention relates to the technical field of data storage, and in particular, to a method and an apparatus for storing user access records.
Background
With the increasing popularity of networks, whether websites or APPs, there are tens of thousands of users 'visiting volumes and millions of users' visiting volumes every day, and the visiting conditions of websites/APPs for a period of time constitute user visiting record information, and merchants can spy many opportunities from the visiting record information of users, for example, user group classification can be made based on the user visiting records, so that personalized user recommendation can be made, and the like. For massive user access records, how to reasonably analyze the unstructured data effectively and to perform user access record statistics in an efficient manner becomes a very valuable problem for user behavior mining application.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and an apparatus for storing a user access record, so as to alleviate the technical problem of low efficiency in storing user behavior data in the prior art.
In a first aspect, an embodiment of the present invention provides a method for storing a user access record, including: acquiring a pre-established preset storage matrix, wherein the preset storage matrix comprises a plurality of storage bits; acquiring a user access record and a user operand in a current statistical period, wherein the user operand is the behavior quantity of a user operating in a client; and updating the user access record and the user operand in a preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data counted in a counting time period.
Further, updating the user access record and the user operand in a preset storage matrix comprises: updating the user access record in a first preset storage matrix; and updating the user operand in a second preset storage matrix.
Further, updating the user access record in the first preset storage matrix includes: moving a storage bit of a historical user access record stored in the first preset storage matrix according to a first direction, wherein the historical user access record is an Nth storage bit pre-stored in the first preset storage matrix and a previous user access record, and N is the column number of the first preset storage matrix; and updating the user access record obtained by statistics in the current statistical time period in the Nth storage bit.
Further, updating the user operand in a second preset storage matrix comprises: moving a storage bit of a historical user operand stored in the second preset storage matrix according to a first direction, wherein the user operand is an Nth storage bit stored in the second preset storage matrix in advance and a user access record before the Nth storage bit, and N is the column number of the second preset storage matrix; and updating the user operand obtained by statistics in the current statistical time period in the Nth storage bit.
Further, the method further comprises: classifying and storing the preset storage matrix according to a preset classification rule to obtain at least one classification group, wherein the preset classification rule comprises at least one of the following rules: the source of the user, the category of the user, the registration time and the region to which the user belongs.
Further, the method further comprises: counting the user access records and the user operands in each classification group to respectively obtain the total amount of the user access records and the total amount of the user operands; and taking the total amount of the user access records and the total amount of the user operation numbers as the whole access data of the corresponding classification groups.
In a second aspect, an embodiment of the present invention further provides a storage apparatus for a user access record, including: the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring a preset storage matrix which is established in advance, and the preset storage matrix comprises a plurality of storage bits; the second obtaining unit is used for obtaining a user access record and a user operand in the current statistical time period, wherein the user operand is the behavior quantity of a user operating in the client; and the storage updating unit is used for updating the user access record and the user operand in a preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data counted in a counting time period.
Further, the storage updating unit includes: the first storage updating module is used for updating the user access record in a first preset storage matrix; and the second storage updating module is used for updating the user operand in a second preset storage matrix.
Further, the first storage update module is configured to: moving a storage bit of a historical user access record stored in the first preset storage matrix according to a first direction, wherein the historical user access record is an Nth storage bit pre-stored in the first preset storage matrix and a previous user access record, and N is the column number of the first preset storage matrix; and updating the user access record obtained by statistics in the current statistical time period in the Nth storage bit.
Further, the second storage update module is configured to: moving a storage bit of a historical user operand stored in the second preset storage matrix according to a first direction, wherein the user operand is an Nth storage bit stored in the second preset storage matrix in advance and a user access record before the Nth storage bit, and N is the column number of the second preset storage matrix; and updating the user operand obtained by statistics in the current statistical time period in the Nth storage bit.
In the embodiment of the invention, a preset storage matrix which is established in advance is firstly obtained, then, a user access record and a user operand in a current statistical time period are obtained, and finally, the user access record and the user operand are updated in the preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data which are counted in one statistical time period. In the embodiment of the invention, through the setting mode, the user can conveniently inquire the user access record or the user operand according to the data acquisition time, and the technical problem of low efficiency in storing the user behavior data in the prior art is further solved, so that the technical effect of quickly and efficiently storing the user access record or the user operand is realized.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for storing a user access record according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a storage device for user access records in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of another storage device for user access records in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of another storage device for user access records in accordance with an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
in accordance with an embodiment of the present invention, there is provided an embodiment of a method for storing user access records, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a method for storing a user access record according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, acquiring a preset storage matrix which is established in advance, wherein the preset storage matrix comprises a plurality of storage bits;
in the embodiment of the invention, when the server acquires the instruction for recording and storing the user access record and the user operand, the server firstly acquires the pre-established preset storage matrix.
Step S104, obtaining a user access record and a user operand in the current statistical time period, wherein the user operand is the behavior quantity of a user operating in a client;
user access records are generated when a user accesses a website or uses an APP at a certain day, the website or an APP product is used by the user at the same day, the operation behavior of the user after the user enters the website or the APP is also recorded, and the total record number is the operation number of the user in the current statistical time period. The user access record and the user operand may also be referred to as user access data.
For example, if a user visits a certain video website on 28/11/2017, the user visit record may be recorded as an identification of "1". If the number of actions operated by the user in the client is 58, the user operand is recorded as "58".
Step S106, updating the user access record and the user operand in a preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data counted in a counting time period.
It should be noted that the schemes described in step S102 to step S106 above may be executed by a server.
In the embodiment of the present invention, the statistical time period may be one day, 12 hours, or 6 hours, and specifically, the duration of the statistical time period may be set according to actual needs.
If the user cares about the user access record and the user operation number within 30 days, and the set statistical period may be one day, at this time, the size of the preset storage matrix may be set to 30, that is, the number of columns of the preset storage matrix is 30. If the user cares about the user access record and the number of user operations within 30 days and the set statistical period may be 12 hours, at this time, the size of the preset memory matrix may be set to 60, that is, the number of columns of the preset memory matrix is 60. That is, the size of the preset memory matrix is associated with the total statistical period, wherein the total statistical period is the sum of the statistical periods. And one storage bit in the preset storage matrix is used for storing the data counted in one counting time period.
In the embodiment of the invention, a preset storage matrix which is established in advance is firstly obtained, then, a user access record and a user operand in a current statistical time period are obtained, and finally, the user access record and the user operand are updated in the preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data which are counted in one statistical time period. In the embodiment of the invention, through the setting mode, the user can conveniently inquire the user access record or the user operand according to the data acquisition time, and the technical problem of low efficiency in storing the user behavior data in the prior art is further solved, so that the technical effect of quickly and efficiently storing the user access record or the user operand is realized.
In the embodiment of the present invention, the preset storage matrix may be pre-established, and as can be seen from the above description, in the embodiment of the present invention, the mainly acquired data includes the user access record and the user operand. Therefore, in the embodiment of the present invention, a storage matrix may be set up for the user access record and the user operand, respectively, or may be set up for storing the user access record and the user operand simultaneously.
In an alternative embodiment, two storage matrices may be designed to store user access records and user operands, respectively, wherein the size of the storage matrices is associated with a statistical period. If the statistical period is one day, the size of the storage matrix is the total number of days in the time period concerned by the user; if it is desired to monitor the user access records for the last year, the memory matrix size may be set to 365; if it is desired to monitor the user access records for the last month, the size of the memory matrix may be designed to be 30. The specific setting can be carried out according to actual needs.
If two memory matrices are designed, the two memory matrices are one-dimensional matrices, such as 1 × N matrices, where N is the size of the memory matrix, i.e., the number of columns, i.e., the number of statistical time periods, e.g., the number of statistical days.
In an alternative embodiment, a storage matrix may be further designed to store the user access records and the user operands simultaneously, wherein the size of the storage matrix is associated with the statistical time period.
If a memory matrix is designed, the two memory matrices are two-dimensional matrices, such as 2 × N matrices, where N is the size of the memory matrix, i.e. the number of columns, i.e. the number of statistical time periods, e.g. the number of statistical days.
It should be noted that, in the embodiment of the present invention, the preset storage matrix may be set according to actually acquired data. If other data can be obtained besides the user access record and the user operand, a corresponding preset storage matrix can be independently established for the other data. The preset memory matrix may also be set to a more multidimensional memory matrix. The user can set the setting according to actual needs.
When two storage matrices (i.e. a first preset storage matrix and a second preset storage matrix) are designed, updating the user access records and the user operands in the preset storage matrices comprises the following steps:
updating the user access record in a first preset storage matrix; and
and updating the user operand in a second preset storage matrix.
In the embodiment of the present invention, a first preset storage matrix and a second preset storage matrix may be respectively designed, where the first preset storage matrix is used to store a user access record, and the second preset storage matrix is used to store a user operand.
In the embodiment of the invention, the matrixing storage mode of the data is realized by designing the preset storage matrix for recording the user access records and the user operands, so that the user group access or operation condition can be efficiently counted, and the user can conveniently count and inquire the data.
In an optional embodiment, the updating the user access record in the first preset storage matrix includes the following steps:
firstly, moving a storage bit of a historical user access record stored in the first preset storage matrix according to a first direction, wherein the historical user access record is an Nth storage bit pre-stored in the first preset storage matrix and a previous user access record, and N is the column number of the first preset storage matrix;
and then updating the user access record obtained by statistics in the current statistical time period in the Nth storage bit.
In the embodiment of the present invention, it is assumed that a First preset storage matrix for storing user access records is a, and an updating method when updating user access records in the matrix a adopts a fifo (First Input First output) First-in First-out method similar to a queue.
For example, the statistical period is given by day, and the first preset storage matrix a for recording the user access record updated by a user in 2017, 11 and 27 is: [0, 0, 0, 0, 0, … …, 0, 1, 1 ].
If there is a user access record in 2017, day 11, month 28 (i.e. the current statistical period), the content of the matrix a will move forward as a whole, and the user access record is updated in the matrix a after the movement forward, as follows: [0, 0, 0, 0, 0, … …, 1, 1, 1 ].
If there is no user access record in 2017 on day 11, month 28 (i.e., the current statistics period), the contents of its matrix A (i.e., the historical user access records) will also move forward in their entirety and be updated as: [0, 0, 0, 0, 0, … …, 1, 1, 0 ].
It should be noted that, as can be seen from the above description, when the historical user access record is moved forward as a whole, the historical user access record is moved to the left by one position (i.e., one storage bit), and at this time, moving to the left by one position is to move one storage bit in the first direction.
In an optional embodiment, the updating the user operand in the second predetermined storage matrix includes the following steps:
firstly, moving a storage bit of a historical user operand stored in the second preset storage matrix according to a first direction, wherein the user operand is an Nth storage bit pre-stored in the second preset storage matrix and a user access record before the Nth storage bit, and N is the column number of the second preset storage matrix;
and then updating the user operand obtained by statistics in the current statistical time period in the Nth storage bit.
In the embodiment of the present invention, it is assumed that a second preset storage matrix for storing the user operands is B, and an updating method when updating the user operands in the matrix B adopts a fifo (First Input First output) First-in First-out method similar to a queue.
For example, the statistical period is given by day, and the second preset storage matrix B for recording the user operand, updated by a user in 2017, 11, 27 is: [0, 0, 0, 0, 0, … …, 0, 156, 20 ].
If there is a user access record in 2017, day 11, month 28 (i.e. the current statistical period), the content of the matrix B is moved forward as a whole, and the user operand is updated in the matrix B after the movement, and the update is: [0, 0, 0, 0, 0, … …, 156, 20, 130], where 130 is the number of operations the user performed on the client at 11/28/2017.
If there is no user access record in 2017 on day 11, month 28 (i.e., the current statistics period), the contents of its matrix B (i.e., the historical user access records) will also move forward in their entirety and be updated as: [0, 0, 0, 0, 0, … …, 156, 20, 0 ].
As can be seen from the above steps, the matrixing process of the user access data (i.e. the user access records and the user operands) is completed, and the matrixed user access data is very convenient for statistics. For example, if the number of logins of a user in the last year is to be queried, all items of the first preset storage matrix for recording the user access records of the user need to be added and summed. For another example, if the login times of a user in the last month need to be queried, the last 30 items of the first preset storage matrix of the user for recording the user access records are added and summed, and so on; the method for querying the operation frequency of a user in the last year, last month or last week is the same as above, and is not described here again.
As can be seen from the above description, in the embodiment of the present invention, the preset storage matrix has great convenience through a first-in first-out processing method, and when massive access records are updated every day, a date factor does not need to be considered, and the matrix is simply operated according to a FIFO method; data in the latest statistical time period (for example, the latest day) is permanently at the tail of the preset storage matrix, so that the real-time data on the same day can be conveniently counted and monitored; when the user access data of about 1 week, about 15 days or about 1 month is counted, only the data of the date number corresponding to the tail part of the matrix needs to be acquired, so that the method is convenient and quick, and any complicated positioning operation is not needed.
Taking the example of monitoring the access records of the user in the last year, it is assumed that the initial values of the access record matrix a (i.e., the first predetermined storage matrix) and the operand record matrix B (i.e., the second predetermined storage matrix) of the user are both 0, and the statistical period is one day with 2017/01/01 as the starting point. If user 1 visits website/APP on 1 month and 1 day and has 156 operations, the access record matrix a is updated to [0, 0, 0, … …, 0, 0, 1], the operand record matrix B is updated to [0, 0, 0, 0, 0, … …, 0, 0, 156], and the un-visited user matrix remains the same. If user 1 visits website/APP again on day 1, month 2 and has 20 operations, his access record matrix a is updated to [0, 0, 0, 0, 0, … …, 0, 1, 1], and his operand record matrix B is updated to [0, 0, 0, … …, 0, 156, 20 ]. If the user 1 does not access the website/APP on day 1, month 2, the access record matrix a is updated to [0, 0, 0, 0, 0, … …, 0, 1, 0], the operand record matrix B is updated to [0, 0, 0, 0, 0, … …, 0, 156, 0], and so on, and thus, the detailed description is omitted here.
In another alternative embodiment, the method further comprises: classifying and storing the preset storage matrix according to a preset classification rule to obtain at least one classification group, wherein the preset classification rule comprises at least one of the following rules: the source of the user, the category of the user, the registration time and the region to which the user belongs.
In the embodiment of the present invention, in order to facilitate category statistics on user access data of a user, a storage scheme may be designed, and information such as a source of the user, a category of the user (e.g., a general user, a VIP user, and a media user), a region to which the user belongs, and registration time may be added, as shown in table 1.
TABLE 1
Figure BDA0001487117920000111
After the first preset storage matrix and the second preset storage matrix are stored according to the storage manner, the first preset storage matrix and the second preset storage matrix may be classified according to the preset classification rule (that is, the source of the user, the category of the user, the registration time, and the region to which the user belongs), so as to obtain at least one classification group, for example, the user source belongs to a classification group promoted by 360 degrees, and the region to which the user source belongs is a classification group in beijing. The region of the user mobile phone number is the region of the user mobile phone number, or the region of the user mobile phone number is the resident region of the user mobile phone number.
In another alternative embodiment, the method further comprises the steps of:
firstly, counting user access records and user operands in each classification group to respectively obtain the total amount of the user access records and the total amount of the user operands;
then, the total amount of the user access records and the total amount of the user operation numbers are used as the whole access data of the corresponding classification groups.
In the embodiment of the present invention, after performing the classification statistics on the user access records and the user operands, the total of the user access records in each classification group may be calculated based on the classification groups after the classification statistics to obtain the total amount of the user access records, and the total of the user operands in each classification group may be calculated to obtain the total amount of the user operands. Thereby resulting in the overall access data for the sorted set.
It should be noted that, in the embodiment of the present invention, the matrix position corresponding to the statistical time interval may be derived according to the date of the statistical time interval, and the user access data (i.e., the user access record and the user operand) of the statistical time interval can be quickly and accurately determined through the matrix position.
It should be noted that, in the embodiment of the present invention, in addition to the above description, the matrixed storage method supports the following requirements:
according to the user login condition (namely, the user access record) in a period of time, counting the active users in the period of time, and the enterprise can initiate preferential activities and the like according to the active user list;
counting and comparing user access records of different promotion channels to judge the quality of the promotion channels;
summarizing user access records registered in a certain area or a certain period of time, and performing targeted user behavior analysis;
the VIP user access record matrix is used as training data on the basis, and the access rule of the VIP user is learned through a deep learning method, so that the probability that a certain user or certain class of users become the VIP is predicted.
As can be seen from the above description, in the embodiment of the present invention, based on the user access record, the user access record and the user operand are matrixed by the matrixing processing method, so that the user access condition can be efficiently counted, and the matrixing processing method is applicable to both online data and offline data, and the advantages of the matrixed data include, but are not limited to, the following points:
user access and user operation records are efficiently recorded, and the statistical work is greatly facilitated; analyzing the user access record and storing the analyzed user access record into the matrix, wherein the user access record and the behavior record are clear at a glance; the storage mode of matrixing saves memory and has high calculation efficiency.
Example two:
the embodiment of the present invention further provides a storage device for user access records, where the storage device for user access records is mainly used to execute the storage method for user access records provided in the foregoing content of the embodiment of the present invention, and the storage device for user access records provided in the embodiment of the present invention is specifically described below.
Fig. 2 is a schematic diagram of a storage apparatus for user access records according to an embodiment of the present invention, and as shown in fig. 2, the storage apparatus for user access records mainly includes a first obtaining unit 10, a second obtaining unit 20 and a storage updating unit 30, where:
the device comprises a first obtaining unit 10, a second obtaining unit, a first storage unit and a second storage unit, wherein the first obtaining unit is used for obtaining a preset storage matrix which is established in advance, and the preset storage matrix comprises a plurality of storage bits;
a second obtaining unit 20, configured to obtain a user access record and a user operand in a current statistical time period, where the user operand is a behavior quantity of a user operating in a client;
the storage updating unit 30 is configured to update the user access record and the user operand in a preset storage matrix, where one storage bit in the preset storage matrix is used to store data counted in a counting period.
In the embodiment of the invention, a preset storage matrix which is established in advance is firstly obtained, then, a user access record and a user operand in a current statistical time period are obtained, and finally, the user access record and the user operand are updated in the preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data which are counted in one statistical time period. In the embodiment of the invention, through the setting mode, the user can conveniently inquire the user access record or the user operand according to the data acquisition time, and the technical problem of low efficiency in storing the user behavior data in the prior art is further solved, so that the technical effect of quickly and efficiently storing the user access record or the user operand is realized.
Optionally, as shown in fig. 3, the storage updating unit includes: a first storage updating module 31, configured to update the user access record in a first preset storage matrix; and a second storage updating module 32, configured to update the user operand in a second preset storage matrix.
Optionally, the first storage updating module is configured to: moving a storage bit of a historical user access record stored in the first preset storage matrix according to a first direction, wherein the historical user access record is an Nth storage bit pre-stored in the first preset storage matrix and a previous user access record, and N is the column number of the first preset storage matrix; and updating the user access record obtained by statistics in the current statistical time period in the Nth storage bit.
Optionally, the second storage updating module is configured to: moving a storage bit of a historical user operand stored in the second preset storage matrix according to a first direction, wherein the user operand is an Nth storage bit stored in the second preset storage matrix in advance and a user access record before the Nth storage bit, and N is the column number of the second preset storage matrix; and updating the user operand obtained by statistics in the current statistical time period in the Nth storage bit.
Optionally, the apparatus is further configured to: classifying and storing the preset storage matrix according to a preset classification rule to obtain at least one classification group, wherein the preset classification rule comprises at least one of the following rules: the source of the user, the category of the user, the registration time and the region to which the user belongs.
Optionally, the apparatus is further configured to: counting the user access records and the user operands in each classification group to respectively obtain the total amount of the user access records and the total amount of the user operands; and taking the total amount of the user access records and the total amount of the user operation numbers as the whole access data of the corresponding classification groups.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
The storage device for the user access record provided by the embodiment of the invention has the same technical characteristics as the storage method for the user access record provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
Example three:
referring to fig. 4, an embodiment of the present invention further provides a storage apparatus 100 for a user to access a record, including: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42; the processor 40 is arranged to execute executable modules, such as computer programs, stored in the memory 41.
The Memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
The bus 42 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 40, or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method in combination with the hardware thereof.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The computer program product of the method and the device for storing user access records provided by the embodiments of the present invention includes a computer readable storage medium storing a non-volatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units 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 system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units 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 mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of 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 server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method for storing user access records, comprising:
acquiring a pre-established preset storage matrix, wherein the preset storage matrix comprises a plurality of storage bits;
acquiring a user access record and a user operand in a current statistical period, wherein the user operand is the behavior quantity of a user operating in a client;
updating the user access record and the user operand in a preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data counted in a counting time period, and the size of the preset storage matrix is associated with the sum of the counting time period;
wherein updating the user access record and the user operand in a preset storage matrix comprises:
updating the user access record in a first preset storage matrix; and
updating the user operand in a second preset storage matrix;
wherein updating the user access record in the first preset storage matrix comprises:
moving a storage bit of a historical user access record stored in the first preset storage matrix according to a first direction, wherein the historical user access record is an Nth storage bit pre-stored in the first preset storage matrix and a previous user access record, and N is the column number of the first preset storage matrix;
and updating the user access record obtained by statistics in the current statistical time period in the Nth storage bit.
2. The method of claim 1, wherein updating the user operand in a second predetermined storage matrix comprises:
moving a storage bit of a historical user operand stored in the second preset storage matrix according to a first direction, wherein the user operand is an Nth storage bit stored in the second preset storage matrix in advance and a user access record before the Nth storage bit, and N is the column number of the second preset storage matrix;
and updating the user operand obtained by statistics in the current statistical time period in the Nth storage bit.
3. The method according to any one of claims 1 to 2, further comprising:
classifying and storing the preset storage matrix according to a preset classification rule to obtain at least one classification group, wherein the preset classification rule comprises at least one of the following rules: the source of the user, the category of the user, the registration time and the region to which the user belongs.
4. The method of claim 3, further comprising:
counting the user access records and the user operands in each classification group to respectively obtain the total amount of the user access records and the total amount of the user operands;
and taking the total amount of the user access records and the total amount of the user operation numbers as the whole access data of the corresponding classification groups.
5. A storage device for user access records, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring a preset storage matrix which is established in advance, and the preset storage matrix comprises a plurality of storage bits;
the second obtaining unit is used for obtaining a user access record and a user operand in the current statistical time period, wherein the user operand is the behavior quantity of a user operating in the client;
the storage updating unit is used for updating the user access record and the user operand in a preset storage matrix, wherein one storage bit in the preset storage matrix is used for storing data counted in a counting time period, and the size of the preset storage matrix is associated with the sum of the counting time period;
wherein the storage update unit includes:
the first storage updating module is used for updating the user access record in a first preset storage matrix; and
the second storage updating module is used for updating the user operand in a second preset storage matrix;
wherein the first storage update module is configured to:
moving a storage bit of a historical user access record stored in the first preset storage matrix according to a first direction, wherein the historical user access record is an Nth storage bit pre-stored in the first preset storage matrix and a previous user access record, and N is the column number of the first preset storage matrix;
and updating the user access record obtained by statistics in the current statistical time period in the Nth storage bit.
6. The apparatus of claim 5, wherein the second storage update module is configured to:
moving a storage bit of a historical user operand stored in the second preset storage matrix according to a first direction, wherein the user operand is an Nth storage bit stored in the second preset storage matrix in advance and a user access record before the Nth storage bit, and N is the column number of the second preset storage matrix;
and updating the user operand obtained by statistics in the current statistical time period in the Nth storage bit.
CN201711225183.7A 2017-11-29 2017-11-29 Storage method and device for user access records Active CN107943978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711225183.7A CN107943978B (en) 2017-11-29 2017-11-29 Storage method and device for user access records

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711225183.7A CN107943978B (en) 2017-11-29 2017-11-29 Storage method and device for user access records

Publications (2)

Publication Number Publication Date
CN107943978A CN107943978A (en) 2018-04-20
CN107943978B true CN107943978B (en) 2020-11-24

Family

ID=61946687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711225183.7A Active CN107943978B (en) 2017-11-29 2017-11-29 Storage method and device for user access records

Country Status (1)

Country Link
CN (1) CN107943978B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459987A (en) * 2020-04-27 2020-07-28 恩亿科(北京)数据科技有限公司 Cache updating method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4839853A (en) * 1988-09-15 1989-06-13 Bell Communications Research, Inc. Computer information retrieval using latent semantic structure
CN101470754A (en) * 2007-12-27 2009-07-01 国际商业机器公司 Community server system and activity recording method therefor
CN102982166A (en) * 2012-12-11 2013-03-20 南京邮电大学 Web user browsing access matrix construction method based on time slicing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013028560A1 (en) * 2011-08-19 2013-02-28 Strategic Content Imaging Systems, methods, and computer-readable media for the triggering of location-aware content via print-based input controls

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4839853A (en) * 1988-09-15 1989-06-13 Bell Communications Research, Inc. Computer information retrieval using latent semantic structure
CN101470754A (en) * 2007-12-27 2009-07-01 国际商业机器公司 Community server system and activity recording method therefor
CN102982166A (en) * 2012-12-11 2013-03-20 南京邮电大学 Web user browsing access matrix construction method based on time slicing

Also Published As

Publication number Publication date
CN107943978A (en) 2018-04-20

Similar Documents

Publication Publication Date Title
CN107463641B (en) System and method for improving access to search results
TWI603220B (en) Method and device for network verification information
WO2017166644A1 (en) Data acquisition method and system
US9600503B2 (en) Systems and methods for pruning data by sampling
CN107797894B (en) APP user behavior analysis method and device
CN110675194A (en) Funnel analysis method, device, equipment and readable medium
US11403309B2 (en) Generating segments based on intelligent sequential data
CN108512720B (en) Website traffic statistical method and device
CN110781372B (en) Method and device for optimizing website, computer equipment and storage medium
AU2019200084A1 (en) Automatically generating meaningful user segments
US10140377B2 (en) Data processing, data collection
CN108664492B (en) Method and device for pushing content to user, electronic equipment and storage medium
CN111258819A (en) Data acquisition method, device and system for MySQL database backup file
CN111061588A (en) Method and device for locating database abnormal source
CN107943978B (en) Storage method and device for user access records
US11621894B2 (en) Computerized systems and methods for processing high-volume log files from virtual servers
CN114003818A (en) Page recommendation method, device, server and storage medium
CN107330031B (en) Data storage method and device and electronic equipment
JP2016024486A (en) Data utilization system and control method therefor
CN104123307A (en) Data loading method and system
CN110737691B (en) Method and apparatus for processing access behavior data
CN114611039A (en) Asynchronous loading rule analysis method and device, storage medium and electronic equipment
CN110990401B (en) Hotel searching method and system
CN114021045A (en) Method, device, equipment and storage medium for marking user source channel
CN113127767A (en) Mobile phone number extraction method and device, electronic 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