CN111488386B - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN111488386B
CN111488386B CN202010289735.6A CN202010289735A CN111488386B CN 111488386 B CN111488386 B CN 111488386B CN 202010289735 A CN202010289735 A CN 202010289735A CN 111488386 B CN111488386 B CN 111488386B
Authority
CN
China
Prior art keywords
behavior data
user behavior
user
query
data
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
CN202010289735.6A
Other languages
Chinese (zh)
Other versions
CN111488386A (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 Yishu Technology Co ltd
Original Assignee
Beijing Yishu 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 Yishu Technology Co ltd filed Critical Beijing Yishu Technology Co ltd
Priority to CN202010289735.6A priority Critical patent/CN111488386B/en
Publication of CN111488386A publication Critical patent/CN111488386A/en
Application granted granted Critical
Publication of CN111488386B publication Critical patent/CN111488386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • 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/242Query formulation
    • G06F16/2425Iterative querying; Query formulation based on the results of a preceding query
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the disclosure discloses a data query method and a data query device. One embodiment of the method comprises the following steps: acquiring a user behavior data set, wherein the user behavior data in the user behavior data set comprises a user identifier and behavior data; for the user behavior data in the user behavior data set, storing the user identification in the user behavior data as a key and the behavior data in the user behavior data as a value; and responding to the received data query request for indicating the value corresponding to the query target key, and querying according to the target key to obtain a query result. This embodiment helps to improve the query efficiency for user behavior data.

Description

Data query method and device
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a data query method and device.
Background
With the rapid development of the internet and the increasing amount of users and demands of users, mining and analysis of user behavior data has also progressed. By accurately mining and analyzing the user behavior data, the intention of the user can be more accurately understood, and therefore more accurate service can be provided for the user.
Currently, after the user behavior data is collected, the user behavior data is typically stored using a relational database such as MySQL, or using a distributed file system such as HDFS (Hadoop Distributed File System).
Disclosure of Invention
The embodiment of the disclosure provides a data query method and a data query device.
In a first aspect, embodiments of the present disclosure provide a data query method, the method including: acquiring a user behavior data set, wherein the user behavior data in the user behavior data set comprises a user identifier and behavior data; for the user behavior data in the user behavior data set, storing the user identification in the user behavior data as a key and the behavior data in the user behavior data as a value; and responding to the received data query request for indicating the value corresponding to the query target key, and querying according to the target key to obtain a query result.
In some embodiments, for user behavior data in a user behavior data set, storing, with a user identifier in the user behavior data as a key and behavior data in the user behavior data as a value, includes: and storing the user behavior data in the user behavior data set by utilizing an HBase or Cassandra or Bigtable database.
In some embodiments, the user behavior data in the user behavior data set further comprises at least one of: timestamp, session identification, event identification, page address, event attribute information.
In some embodiments, for user behavior data in a user behavior data set, storing, with a user identifier in the user behavior data as a key and behavior data in the user behavior data as a value, includes: for the user behavior data in the user behavior data set, the user identification, the time stamp, the session identification and the event identification in the user behavior data are used as keys, and the event attribute information in the user behavior data is used as a value to be stored.
In some embodiments, the target key includes a user identification and a timestamp.
In some embodiments, the target key includes a user identification, a timestamp, and a session identification.
In some embodiments, the target key includes a user identification, a timestamp, a session identification, and an event identification.
In a second aspect, embodiments of the present disclosure provide a data query apparatus, the apparatus comprising: an acquisition unit configured to acquire a user behavior data set, wherein the user behavior data in the user behavior data set includes a user identification and behavior data; a storage unit configured to store, for user behavior data in a user behavior data set, a user identification in the user behavior data as a key and behavior data in the user behavior data as a value; and the query unit is configured to respond to the received data query request for indicating the value corresponding to the query target key, and perform query according to the target key to obtain a query result.
In some embodiments, the memory unit is further configured to: and storing the user behavior data in the user behavior data set by utilizing an HBase or Cassandra or Bigtable database.
In some embodiments, the user behavior data in the user behavior data set further includes at least one of: timestamp, session identification, event identification, page address, event attribute information.
In some embodiments, the memory unit is further configured to: for the user behavior data in the user behavior data set, the user identification, the time stamp, the session identification and the event identification in the user behavior data are used as keys, and the event attribute information in the user behavior data is used as a value to be stored.
In some embodiments, the target key includes a user identification and a timestamp.
In some embodiments, the target key includes a user identification, a timestamp, and a session identification.
In some embodiments, the target key includes a user identification, a timestamp, a session identification, and an event identification.
In a third aspect, embodiments of the present disclosure provide a server, the electronic device comprising: one or more processors; a storage means for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
The data query method and device provided by the embodiment of the disclosure store the user behavior data by using the user identification in the user behavior data as a key and using the behavior data in the user behavior data as a value after the user behavior data is acquired. Therefore, after the data query request of the user is received, the behavior data corresponding to the target key can be conveniently queried in real time from the stored user behavior data according to the target key in the data query request, so that the query efficiency of the user behavior data is improved.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a data query method according to the present disclosure;
FIG. 3 is a flow chart of yet another embodiment of a data query method according to the present disclosure;
FIG. 4 is a flow chart of yet another embodiment of a data query method according to the present disclosure;
FIG. 5 is a schematic diagram of an embodiment of a data querying device according to the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary architecture 100 in which embodiments of the data query method or data query apparatus of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages or the like. Various client applications can be installed on the terminal devices 101, 102, 103. Such as, for example, browser class applications, search class applications, instant messaging class applications, social platform software, shopping class applications, data analysis class applications, and the like.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, smartphones, tablet computers, electronic book readers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, such as a server processing user behavior data sets transmitted by the terminal devices 101, 102, 103. The server 105 may store the received user behavior data set in a preset format, and when receiving a query request sent by the terminal device 101, 102, 103, etc., query from the stored user behavior data set, and may further return the query result to the terminal device 101, 102, 103.
The user behavior data set may be directly stored in the local area of the server 105, and the server 105 may directly extract and process the locally stored user behavior data set, and in this case, the terminal devices 101, 102, 103 and the network 104 may not be present.
It should be noted that, the data query method provided by the embodiments of the present disclosure is generally executed by the server 105, and accordingly, the data query device is generally disposed in the server 105.
It should also be noted that the terminal devices 101, 102, 103 may also be provided with a data processing class application, and the terminal devices 101, 102, 103 may also store the user behavior data set according to a preset format based on the data processing class application, and respond to the query request of the user. In this case, the data query method may also be executed by the terminal devices 101, 102, 103, and accordingly, the data query means may also be provided in the terminal devices 101, 102, 103. At this point, the exemplary system architecture 100 may not have the server 105 and network 104 present.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When server 105 is software, it may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a data query method according to the present disclosure is shown. The data query method comprises the following steps:
step 201, a user behavior data set is obtained.
In this embodiment, the execution subject of the data query method (e.g., server 105 shown in fig. 1) may obtain the user behavior data set from a local or other storage device (e.g., terminal devices 101, 102, 103, etc. shown in fig. 1).
The user behavior data in the user behavior data set may include user identification and behavior data. Wherein the user identification may be used to identify the user. The representation method of the user identifier can be flexibly set according to the actual application requirement. For example, a user's account (e.g., an account registered by the user when using the client application) may be employed as the user identification.
Wherein the behavior data may be used to indicate various behaviors of the user. As an example, the behavior data may indicate various behaviors of the user when using the client application. It should be appreciated that the specific content of the behavior data may also be flexibly set according to the actual application requirements and application scenarios.
Specifically, the behavior data may indicate, for example, page browsing behavior of the user and addresses of pages browsed, clicking behavior and elements of pages clicked, closing popup behavior and contents of popup closed, and the like.
For another example, if the behavior data in the user behavior data set indicates a user's behavior in using a shopping class application installed by the client, the behavior data may indicate, for example, a user's page browsing behavior and an address of a page being browsed, a behavior of joining a shopping cart and a name, price, etc. of an item joining the shopping cart, an ordering behavior and attribute information of an item included in the order, etc.
Step 202, for the user behavior data in the user behavior data set, storing the user identification in the user behavior data as a key and the behavior data in the user behavior data as a value.
In this embodiment, each user behavior data in the user behavior data set may be stored by means of a key value pair. Specifically, for each user behavior data in the user behavior data set, a user identification in the user behavior data may be used as a key, and the behavior data in the user behavior data may be stored as a corresponding value.
Step 203, in response to receiving a data query request for indicating a value corresponding to the query target key, performing a query according to the target key to obtain a query result.
In this embodiment, after storing the user behavior data in the user behavior data set, if a data query request is received, a corresponding query may be performed in the stored user behavior data to obtain a query result. The data query request may be used to indicate a value corresponding to the query target key. The target key may refer to a key corresponding to a value that the query request is intended to query.
In this embodiment, the execution body may receive a data query request sent by a user through a client used by the execution body. Then, the value corresponding to the target key can be queried, and the queried value is used as a query result.
Further, the execution body may return the query result to the sender of the data query request, and so on. For example, the query results may be returned to the terminal device used by the user so that the user may view the query results.
Alternatively, the user may be provided with a visual query page through which the user may send a data query request. For example, in the query page described above, an input box in which a target key can be input or selected, a button for transmitting a data query request including the target key input by the user, and the like may be provided to the user. At this time, the user may input the target key and send a data query request for indicating a value corresponding to the query target key to the execution body by clicking the button.
Through the visualized query page such as graphics, the intuitiveness and operability of the data query process of the user can be ensured.
In some optional implementations of this embodiment, when the user behavior data in the user behavior data set is stored by using the database, a set of key-value pairs corresponding to each user behavior data may be regarded as a unit, and each data row may be regarded as a mapping of a set of key-value pairs, and the data row may be identified according to the keys. The storage mode can greatly improve the data query speed when the number of stored user behavior data is large.
In this embodiment, when storing the user behavior data in the user behavior data set, the user behavior data may be stored by using a non-relational distributed database. Because of the storage structure of the non-relational distributed database, the data query speed can be effectively improved compared with the relational database.
It should be appreciated that the stored results for different non-relational databases may be different. For example, some non-relational distributed databases do not build secondary indexes, etc., thereby increasing data query speed.
In some optional implementations of the present embodiment, the user behavior data in the user behavior data set further includes at least one of: timestamp, session identification, event identification, page address, event attribute information.
The time stamp may be used to indicate the time of occurrence of the corresponding user behavior data.
Session identification (Session ID) may be used to identify a user Session. A session may refer to various sessions. For example, a session may refer to a complete session from opening a client application to exiting the client application when the user is using the client application. It should be appreciated that the granularity of the session can be flexibly set by the skilled person depending on the application requirements.
Event identification may be used to identify an event. An event may refer to various behaviors of a user. For example, when a user uses a client application, a click operation of the user may be regarded as an event, a page browsing operation of the user may be regarded as an event, and a closing of a page or a pop-up window by the user may be regarded as an event. In general, a session may include several events. It should be appreciated that the granularity of the events may also be flexibly set by the skilled person according to the actual application requirements.
The page address may be used to indicate a page. For example, the page address may be a URL (Uniform Resource Locator ) of a page, or the like.
The event attribute information may refer to related attribute information of the event indicated by the corresponding event identification. In general, different events may have different properties. For example, for an event in which a user browses a page, the event attribute information corresponding to the event may include an address of the page browsed by the user, times of entering and leaving the page, stay time at the page, and the like. It should be understood that, for different events, the specifically recorded event attribute information may be flexibly set according to the actual application scenario.
Thus, detailed user behavior data of the user indicated by the user identification can be queried by the user identification.
The method provided by the above embodiment of the present disclosure stores user behavior data using a user identifier in the user behavior data as a key and using behavior data in the user behavior data as a key value pair of corresponding values. Therefore, when the data query request aiming at the target key is received, the stored user behavior data can be conveniently queried to obtain a query result, so that the query efficiency aiming at the user behavior data is improved, and the efficiency of processing work such as analysis and the like carried out on the user behavior data is improved.
With further reference to FIG. 3, a flow 300 of yet another embodiment of a data query method is shown. The flow 300 of the data query method includes the steps of:
step 301, a user behavior data set is acquired.
The specific implementation of step 301 may refer to the description of step 201 in the corresponding embodiment of fig. 2, and will not be described herein.
Step 302, for user behavior data in the user behavior data set, using a user identifier in the user behavior data as a key, using behavior data in the user behavior data as a value, and storing the user behavior data in the user behavior data set by using a non-relational distributed database.
In this embodiment, the non-relational distributed database may include various existing, as well as future non-relational distributed databases that may occur, such as Redis, mongodDB, neo j.
Alternatively, the non-relational distributed database may include HBase, cassandra, bigtable and the like. At this time, the user behavior data in the user behavior data set is stored by using a database such as HBase, cassandra, bigtmable, or the like.
Note that, redis, mongodDB, neo and j, HBase, cassandra, bigtable are well known data storage methods, and therefore, specific storage results and usage methods of Redis, mongodDB, neo and j, HBase, cassandra, bigtable are not described herein.
Step 303, in response to receiving a data query request for indicating a value corresponding to the query target key, performing a query according to the target key to obtain a query result.
The specific implementation of step 303 may refer to the description of step 203 in the corresponding embodiment of fig. 2, which is not repeated here.
In the prior art, mySQL, HDFS and the like are generally used for storing user behavior data, but because MySQL cannot well process massive user line behavior data, and the persistence of the data is poor, multi-level indexes are required to be established, only simple condition query and the like are required to be carried out, the use of MySQL for storing user behavior data may cause the conditions of low efficiency, poor accuracy, incapability of carrying out total statistical analysis and the like of subsequent data query. However, HDFS requires a full scan of the data for each data query, which results in huge computational resources and query time being spent as the amount of stored user behavior data increases. Meanwhile, HDFS is generally unable to build various indexes based on different dimensions, which also results in a situation where multi-dimensional data combination analysis is not possible when user behavior data is stored using HDFS.
The method provided by the embodiment of the disclosure stores the user behavior data in the user behavior data set by using various non-relational distributed databases, and can improve the data query efficiency by using the characteristics of the storage structures of the non-relational distributed databases, thereby solving the problems in the prior art.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a data query method is shown. The flow 400 of the data query method includes the steps of:
step 401, a user behavior data set is obtained.
The specific implementation of step 401 may refer to the description of step 201 in the corresponding embodiment of fig. 2, and will not be described herein.
Step 402, for the user behavior data in the user behavior data set, the user identifier, the timestamp, the session identifier and the event identifier in the user behavior data are used as keys, the event attribute information in the user behavior data is used as a value, and the HBase is used for storing the user behavior data in the user behavior data set.
In this embodiment, the HBase organizes the data using a table where the stored data is not of a specific data type and can be considered as an unexplained string, and each row in the table corresponds to a row key that can be ordered and any number of columns.
When the HBase is used to store the user behavior data in the user behavior data set, the user identifier, the timestamp, the session identifier and the event identifier in the user behavior data can be used as row keys, and the event attribute information in the user behavior data can be used as column values corresponding to the row keys.
It should be appreciated that the ordering of row keys may be flexibly set according to the actual application requirements and application scenarios.
Alternatively, the row keys may be sequentially in the order of user identification, time stamp, session identification, event identification.
As the HBase supports prefix inquiry, the action data of various granularities of each user can be conveniently inquired by taking the sequence of the user identification, the time stamp, the session identification and the event identification as a row key.
For the user behavior data in the user behavior data set, when the user identifier, the time stamp, the session identifier and the event identifier in the user behavior data are used as keys and the event attribute information in the user behavior data is used as a value, the behavior data in the user behavior data can comprise the event attribute information.
Step 403, in response to receiving a data query request for indicating a value corresponding to the query target key, performing a query according to the target key, and obtaining a query result.
In this embodiment, since the row key of the HBase may include several keys that can be ordered, and the HBase supports prefix query, different types of queries may be performed according to the difference of the target keys indicated by the data query request.
Alternatively, the target key may include only the user identification. At this time, the HBase is scanned according to the data query request indicating the value corresponding to the query target key, and the obtained query result may include all user behavior data of the user indicated by the user identifier.
Optionally, the target key may include a user identification and a timestamp. At this time, the HBase is scanned according to the data query request indicating the value corresponding to the query target key, and the obtained query result may include the user behavior data of the user indicated by the user identifier at the time indicated by the timestamp. Wherein the time stamp may indicate a point in time or a range of time. When the timestamp indicates a time range, the query result may include all user behavior data of the user indicated by the user identification within the time range indicated by the timestamp.
Optionally, the target key may include a user identification, a timestamp, and a session identification. At this time, the HBase is scanned according to the data query request indicating the value corresponding to the query target key, and the obtained query result may include all user behavior data in the session indicated by the session identifier of the user indicated by the user identifier at the time indicated by the timestamp.
Optionally, the target key may include a user identification, a timestamp, a session identification, and an event identification. At this time, the HBase is scanned according to the data query request indicating the value corresponding to the query target key, and the obtained query result may include all user behavior data in the event jointly identified by the user identifier, the timestamp, the session identifier and the event identifier.
Therefore, the user can flexibly send the data query request according to the actual application requirement so as to acquire the user behavior data with different granularities.
According to the data query method provided by the embodiment of the disclosure, the HBase is used for storing the user behavior data in the user behavior data set, and the user identifier, the time stamp, the session identifier and the event identifier are used as the row keys, and as the HBase can query efficiently according to the row keys and can also query rapidly according to prefix matching of the row keys, after receiving the data query request, the HBase is used for querying, query results can be returned in real time for the data query request, the complexity of query time is saved, the query efficiency is greatly improved, and simultaneously, the user behavior data can be subjected to multi-dimensional combined analysis.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a data query device, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be specifically applied to various electronic devices.
As shown in fig. 5, the data query device 500 provided in this embodiment includes an acquisition unit 501, a storage unit 502, and a query unit 503. Wherein the obtaining unit 501 is configured to obtain a user behavior data set, wherein the user behavior data in the user behavior data set comprises a user identification and behavior data; the storage unit 502 is configured to store, for user behavior data in the user behavior data set, a user identification in the user behavior data as a key and behavior data in the user behavior data as a value; the query unit 503 is configured to query according to the target key in response to receiving a data query request for indicating a value corresponding to the query target key, and obtain a query result.
In this embodiment, in the data query device 500: the specific processes of the obtaining unit 501, the storing unit 502 and the querying unit 503 and the technical effects thereof may refer to the descriptions related to step 201, step 202 and step 203 in the corresponding embodiment of fig. 2, and are not described herein.
In some optional implementations of this embodiment, the storage unit 502 is further configured to: and storing the user behavior data in the user behavior data set by utilizing an HBase or Cassandra or Bigtable database.
In some optional implementations of this embodiment, the user behavior data in the user behavior data set further includes at least one of: timestamp, session identification, event identification, page address, event attribute information.
In some optional implementations of this embodiment, the storage unit 502 is further configured to: for the user behavior data in the user behavior data set, the user identification, the time stamp, the session identification and the event identification in the user behavior data are used as keys, and the event attribute information in the user behavior data is used as a value to be stored.
In some alternative implementations of the present embodiment, the target key includes a user identification and a timestamp.
In some alternative implementations of the present embodiment, the target key includes a user identification, a timestamp, and a session identification.
In some alternative implementations of the present embodiment, the target key includes a user identification, a timestamp, a session identification, and an event identification.
The device provided by the embodiment of the present disclosure acquires a user behavior data set through an acquisition unit, wherein the user behavior data in the user behavior data set includes a user identifier and behavior data; the storage unit stores user behavior data in the user behavior data set in a mode that a user mark in the user behavior data is used as a key and the behavior data in the user behavior data is used as a value; the query unit is used for responding to a data query request for indicating a value corresponding to a query target key, and querying is carried out according to the target key to obtain a query result, so that the stored user behavior data can be conveniently queried to obtain the query result, the query efficiency of the user behavior data is improved, and the efficiency of subsequent processing work such as analysis and the like of the user behavior data is improved.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., server in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device/server illustrated in fig. 6 is merely an example, and should not impose any limitation on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601.
It should be noted that, the computer readable medium according to the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the server; or may exist alone without being assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: acquiring a user behavior data set, wherein the user behavior data in the user behavior data set comprises a user identifier and behavior data; for the user behavior data in the user behavior data set, storing the user identification in the user behavior data as a key and the behavior data in the user behavior data as a value; and responding to the received data query request for indicating the value corresponding to the query target key, and querying according to the target key to obtain a query result.
Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The described units may also be provided in a processor, for example, described as: a processor includes an acquisition unit, a storage unit, and a query unit. Wherein the names of the units do not constitute a limitation of the unit itself in some cases, for example, the acquisition unit may also be described as "unit acquiring a user behavior data set".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (10)

1. A data query method, comprising:
acquiring a user behavior data set, wherein the user behavior data in the user behavior data set comprises a user identifier and behavior data;
for the user behavior data in the user behavior data set, storing the user identification in the user behavior data as a key and the behavior data in the user behavior data as a value;
responding to a received data query request for indicating a value corresponding to a query target key, and querying according to the target key to obtain a query result, wherein the data query request is sent through a visualized query page;
wherein, for the user behavior data in the user behavior data set, the method uses the user identifier in the user behavior data as a key and uses the behavior data in the user behavior data as a value to store, and includes:
the set of key value pairs corresponding to each user behavior data is taken as a unit, each data row is taken as a mapping of the set of key value pairs, and the data rows are identified according to keys.
2. The method according to claim 1, wherein the storing the user behavior data in the user behavior data set with the user identifier in the user behavior data as a key and the behavior data in the user behavior data as a value includes:
and storing the user behavior data in the user behavior data set by utilizing an HBase or Cassandra or Bigtable database.
3. The method of claim 1, wherein the user behavior data in the user behavior data set further comprises at least one of: timestamp, session identification, event identification, page address, event attribute information.
4. A method according to claim 3, wherein said storing, for the user behavior data in the user behavior data set, the user identification in the user behavior data as a key and the behavior data in the user behavior data as a value comprises:
and for the user behavior data in the user behavior data set, storing the user identification, the time stamp, the session identification and the event identification in the user behavior data as keys and the event attribute information in the user behavior data as values.
5. The method of claim 4, wherein the target key comprises a user identification and a timestamp.
6. The method of claim 4, wherein the target key comprises a user identification, a timestamp, and a session identification.
7. The method of claim 4, wherein the target key comprises a user identification, a timestamp, a session identification, and an event identification.
8. A data querying device, wherein the device comprises:
an acquisition unit configured to acquire a user behavior data set, wherein user behavior data in the user behavior data set includes a user identification and behavior data;
a storage unit configured to store, for user behavior data in the user behavior data set, a user identification in the user behavior data as a key and behavior data in the user behavior data as a value;
the query unit is configured to respond to a received data query request for indicating a value corresponding to a query target key, and query according to the target key to obtain a query result, wherein the data query request is sent through a visualized query page;
wherein the memory unit is further configured to: the set of key value pairs corresponding to each user behavior data is taken as a unit, each data row is taken as a mapping of the set of key value pairs, and the data rows are identified according to keys.
9. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-7.
CN202010289735.6A 2020-04-14 2020-04-14 Data query method and device Active CN111488386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010289735.6A CN111488386B (en) 2020-04-14 2020-04-14 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010289735.6A CN111488386B (en) 2020-04-14 2020-04-14 Data query method and device

Publications (2)

Publication Number Publication Date
CN111488386A CN111488386A (en) 2020-08-04
CN111488386B true CN111488386B (en) 2023-09-29

Family

ID=71792527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010289735.6A Active CN111488386B (en) 2020-04-14 2020-04-14 Data query method and device

Country Status (1)

Country Link
CN (1) CN111488386B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113807091B (en) * 2021-08-12 2022-07-22 北京百度网讯科技有限公司 Word mining method and device, electronic equipment and readable storage medium
CN113821513A (en) * 2021-09-18 2021-12-21 阿里巴巴(中国)有限公司 Data processing method, device and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298641A (en) * 2011-09-14 2011-12-28 清华大学 Method for uniformly storing files and structured data based on key value bank
CN102523131A (en) * 2011-12-07 2012-06-27 上海海高通信发展有限公司 User internet behavior collecting method and system and user internet behavior analyzing method and system
CN102855309A (en) * 2012-08-21 2013-01-02 亿赞普(北京)科技有限公司 Information recommendation method and device based on user behavior associated analysis
CN105426421A (en) * 2015-11-03 2016-03-23 武汉地大信息工程股份有限公司 Tense monitoring data quick visualization method and system
CN106021357A (en) * 2016-05-09 2016-10-12 泰华智慧产业集团股份有限公司 Distribution-based big data paging query method and system
CN106471501A (en) * 2016-03-24 2017-03-01 华为技术有限公司 The method of data query, the storage method data system of data object
CN106874316A (en) * 2015-12-14 2017-06-20 广州爱九游信息技术有限公司 A kind of methods of exhibiting of user's combined data, device and server
CN108090064A (en) * 2016-11-21 2018-05-29 腾讯科技(深圳)有限公司 A kind of data query method, apparatus, data storage server and system
CN108319608A (en) * 2017-01-16 2018-07-24 中国移动通信集团湖南有限公司 The method, apparatus and system of access log storage inquiry
CN109213781A (en) * 2018-08-27 2019-01-15 平安科技(深圳)有限公司 Air control data query method and device
CN109656930A (en) * 2018-12-27 2019-04-19 广州华多网络科技有限公司 Data query method, apparatus and system
CN110347722A (en) * 2019-07-11 2019-10-18 软通智慧科技有限公司 Data capture method, device, equipment and storage medium based on HBase

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9172534B2 (en) * 2009-07-29 2015-10-27 Nec Corporation Range search system, range search method, and range search program
CN105446991B (en) * 2014-07-07 2018-10-30 阿里巴巴集团控股有限公司 Date storage method, querying method and equipment
US10664463B2 (en) * 2016-12-30 2020-05-26 Dropbox, Inc. Event context enrichment
US11615142B2 (en) * 2018-08-20 2023-03-28 Salesforce, Inc. Mapping and query service between object oriented programming objects and deep key-value data stores

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298641A (en) * 2011-09-14 2011-12-28 清华大学 Method for uniformly storing files and structured data based on key value bank
CN102523131A (en) * 2011-12-07 2012-06-27 上海海高通信发展有限公司 User internet behavior collecting method and system and user internet behavior analyzing method and system
CN102855309A (en) * 2012-08-21 2013-01-02 亿赞普(北京)科技有限公司 Information recommendation method and device based on user behavior associated analysis
CN105426421A (en) * 2015-11-03 2016-03-23 武汉地大信息工程股份有限公司 Tense monitoring data quick visualization method and system
CN106874316A (en) * 2015-12-14 2017-06-20 广州爱九游信息技术有限公司 A kind of methods of exhibiting of user's combined data, device and server
CN106471501A (en) * 2016-03-24 2017-03-01 华为技术有限公司 The method of data query, the storage method data system of data object
CN106021357A (en) * 2016-05-09 2016-10-12 泰华智慧产业集团股份有限公司 Distribution-based big data paging query method and system
CN108090064A (en) * 2016-11-21 2018-05-29 腾讯科技(深圳)有限公司 A kind of data query method, apparatus, data storage server and system
CN108319608A (en) * 2017-01-16 2018-07-24 中国移动通信集团湖南有限公司 The method, apparatus and system of access log storage inquiry
CN109213781A (en) * 2018-08-27 2019-01-15 平安科技(深圳)有限公司 Air control data query method and device
CN109656930A (en) * 2018-12-27 2019-04-19 广州华多网络科技有限公司 Data query method, apparatus and system
CN110347722A (en) * 2019-07-11 2019-10-18 软通智慧科技有限公司 Data capture method, device, equipment and storage medium based on HBase

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于HBase的多维索引查询机制的优化研究;谭玉龙;中国优秀硕士学位论文全文数据库;全文 *
曹丹丹 ; 乐嘉锦 ; 夏小玲 ; .Redis数据库在视频推荐服务系统中的应用.计算机与现代化.(第10期), *

Also Published As

Publication number Publication date
CN111488386A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN107679211B (en) Method and device for pushing information
CN108804450B (en) Information pushing method and device
EP3579124A1 (en) Method and apparatus for providing search results
CN108846753B (en) Method and apparatus for processing data
US10175954B2 (en) Method of processing big data, including arranging icons in a workflow GUI by a user, checking process availability and syntax, converting the workflow into execution code, monitoring the workflow, and displaying associated information
CN110321544B (en) Method and device for generating information
JP2021103506A (en) Method and device for generating information
US11263267B1 (en) Apparatuses, methods, and computer program products for generating interaction vectors within a multi-component system
CN111488386B (en) Data query method and device
CN110737824B (en) Content query method and device
WO2023134134A1 (en) Method and apparatus for generating association viewing model, and computer device and storage medium
CN110059172B (en) Method and device for recommending answers based on natural language understanding
US10931771B2 (en) Method and apparatus for pushing information
CN111797297B (en) Page data processing method and device, computer equipment and storage medium
CN111813685B (en) Automatic test method and device
CN109710634B (en) Method and device for generating information
US20230085684A1 (en) Method of recommending data, electronic device, and medium
CN111581098A (en) Interface data transfer storage method, device, server and storage medium
US20220164377A1 (en) Method and apparatus for distributing content across platforms, device and storage medium
CN111581356B (en) User behavior path analysis method and device
CN111143464A (en) Data acquisition method and device and electronic equipment
US10089081B2 (en) Method and/or apparatus for generating signal processing pipelines
CN112037857B (en) Strain genome annotation query method and device, electronic equipment and storage medium
EP4220526A1 (en) Information recommendation method and device
CN110968768B (en) Information generation method and device

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