User behavior data retrieval method and device, electronic equipment and readable medium
By slicing user behavior data to multiple storage nodes and searching in parallel, the problems of excessive I/O load and low retrieval efficiency of a single storage device are solved, and the user experience and computing resource utilization are improved.
Patent Information
- Application Number
- CN202411861206.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-15
AI Technical Summary
During the process of retrieving user behavior data, the I/O load of a single storage device is too large, resulting in extended response time, poor user experience, and unsliced storage leads to low retrieval efficiency and waste of computing resources.
By obtaining the user behavior data set from the preset data source, after formatting, it is stored in pieces to multiple preset storage nodes, and upon receiving the query request, it retrieves the corresponding user behavior information from one preset storage node to reduce the amount of data in a single query.
Through sharding storage and parallel processing of query requests, the I/O load of a single storage device is reduced, the response time of user query requests is shortened, the user experience is improved, and the waste of computing resources is reduced.
Smart Images

Figure CN119829634A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and computer-readable medium for retrieving user behavior data. Background Art
[0002] User behavior data retrieval is a technology for retrieving user behavior data. At present, when retrieving user behavior data, the method usually adopted is: storing the user behavior data of each user with a large amount of data in a storage device, and retrieving the user behavior data corresponding to the user identifier from the storage device according to the user identifier sent by the user.
[0003] However, when using the above method to retrieve user behavior data, the following technical problems often occur:
[0004] Storing the user behavior data of each user with a large amount of data in a single storage device will cause a large I / O load on the storage device when multiple users query their behavior data at the same time, resulting in a long response time for user query requests and a poor user experience. At the same time, storing the user behavior data of each user with a large amount of data in a storage device without sharding it, requires traversing and integrating the storage devices when retrieving user behavior data, resulting in a large amount of data for a single query, low retrieval efficiency, and a waste of computing resources.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose a user behavior data retrieval method, apparatus, electronic device, and computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a user behavior data retrieval method, the method comprising: obtaining a user behavior data set from a preset data source, wherein each user behavior data in the above user behavior data set comprises: a user identifier, and various user behavior sub-data, and each user behavior sub-data in the above various user behavior sub-data comprises various operation attribute information; formatting the above user behavior data set to obtain a formatted user behavior data set; storing the above formatted user behavior data set in pieces to various preset storage nodes; in response to receiving user query verification request information sent by a query terminal, performing verification retrieval processing based on the above user query verification request information to retrieve query user behavior information corresponding to the above user query verification request information from one of the above various preset storage nodes; encrypting the above query user behavior information and sending it to the above query terminal.
[0009] In a second aspect, some embodiments of the present disclosure provide a user behavior data retrieval device, the device comprising: an acquisition unit, configured to acquire a user behavior data set from a preset data source, wherein each user behavior data in the above user behavior data set comprises: a user identifier, and various user behavior sub-data, and each user behavior sub-data in the above various user behavior sub-data comprises various operation attribute information; a formatting processing unit, configured to format the above user behavior data set to obtain a formatted user behavior data set; a storage unit, configured to store the above formatted user behavior data set in segments to various preset storage nodes; a verification retrieval processing unit, configured to respond to receiving user query verification request information sent by a query terminal, and based on the above user query verification request information, perform verification retrieval processing to retrieve the query user behavior information corresponding to the above user query verification request information from one of the above various preset storage nodes; a sending unit, configured to encrypt and send the above query user behavior information to the above query terminal.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0012] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the user behavior data retrieval method of some embodiments of the present disclosure, the user experience is improved and the waste of computing resources is reduced. Specifically, the reason for the poor user experience and the waste of computing resources is that the user behavior data of each user with a large amount of data is stored in a single storage device. When multiple users query their own behavior data at the same time, it will cause the I / O load of the storage device to be large, resulting in a long response time for the user query request and a poor user experience. At the same time, the user behavior data of each user with a large amount of data is stored in a storage device without being stored in pieces. When retrieving user behavior data, it is necessary to traverse and integrate the storage device, so that the amount of data for a single query is large, the retrieval efficiency is low, and computing resources are wasted. Based on this, the user behavior data retrieval method of some embodiments of the present disclosure, first, obtains a user behavior data set from a preset data source, wherein each user behavior data in the above user behavior data set includes: a user identifier, each user behavior sub-data, and each user behavior sub-data in the above user behavior sub-data includes each operation attribute information. In this way, the user behavior data set can be obtained. Then, the above user behavior data set is formatted to obtain a formatted user behavior data set. In this way, the format of the user behavior data in the user behavior data set can be unified. The formatted user behavior data set is divided and stored in each preset storage node. Thus, the formatted user behavior data set can be divided and stored in each preset storage node. By distributing the data to multiple nodes, each storage node is only responsible for storing and managing a part of the data, which reduces the I / O load of a single storage device (storage node) when multiple users query their behavior data at the same time. At the same time, by distributing the data to multiple nodes, the ability to process query requests in parallel is improved, the response time of user query requests is shortened, and the user experience is improved. In response to receiving the user query verification request information sent by the query terminal, based on the user query verification request information, a verification retrieval process is performed to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes. Thus, the query user behavior information can be retrieved from one of the preset storage nodes, reducing the amount of data for a single query. The query user behavior information is encrypted and sent to the query terminal. Thus, the query user behavior information can be encrypted and sent to the query terminal. Because the formatted user behavior data set is stored in pieces on each preset storage node, by distributing the data to multiple nodes, each storage node is only responsible for storing and managing a part of the data, which reduces the I / O load of a single storage device (storage node) when multiple users query their behavior data at the same time. At the same time, by distributing the data to multiple nodes, the ability to process query requests in parallel is improved, the response time of user query requests is shortened, and the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flow chart of some embodiments of the user behavior data retrieval method according to the present disclosure;
[0015] Figure 2 is a schematic diagram of the structure of some embodiments of the user behavior data retrieval device according to the present disclosure;
[0016] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] Figure 1 The process 100 of some embodiments of the user behavior data retrieval method according to the present disclosure is shown. The user behavior data retrieval method comprises the following steps:
[0024] Step 101: Acquire a user behavior data set from a preset data source.
[0025] In some embodiments, the execution subject (e.g., a distributed storage server) of the user behavior data retrieval method may obtain a user behavior data set from a preset data source. Each user behavior data in the above user behavior data set includes: a user identifier, each user behavior sub-data, and each user behavior sub-data in the above user behavior sub-data includes each operation attribute information. The above operation attribute information may include operation time, operation object information, and operation type information. The above operation time may be the time when the user performs the operation. The above operation object information may be an element that characterizes the user operation behavior. For example, the above operation object information may be, but is not limited to, one of the following: a page, a button, or a data item. The above operation type information may indicate the type of operation behavior. As an example, when the user clicks the "Credit Report" menu item at 9:33 on December 12, 2024, the user behavior sub-data may be "Operation time: 9:33 on December 12, 2024, operation object information: "Credit Report" menu item, operation type information: Query credit report". The above preset data source may be the source of the user behavior data set, for example, the above preset data source may be a preset log, a preset database, etc. The user identifier may be a user number or a user name. For example, the user identifier may be "168" or "User A".
[0026] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0027] Step 102: format the user behavior data set to obtain a formatted user behavior data set.
[0028] In some embodiments, the execution entity may format the user behavior data set to obtain a formatted user behavior data set.
[0029] In some optional implementations of some embodiments, the execution subject may format the user behavior data set through the following steps to obtain a formatted user behavior data set:
[0030] The first step is to convert each operation time included in the above user behavior data set into each operation time in a preset time format to update the above user behavior data set. In practice, the above execution entity can call a preset function to convert each operation time into each operation time in each preset time format. For example, the above preset time format can be the ISO 8601 date format. The above preset function can be an isoformat function. As an example, the above operation time can be "9:33 am, December 12, 2024", and the above operation time in the preset time format can be "2024-12-12T09:33:00".
[0031] In the second step, the updated user behavior dataset is determined as the updated user behavior dataset.
[0032] In the third step, for each updated user behavior data in the updated user behavior data set, deduplication processing is performed on each user behavior sub-data included in the updated user behavior data to update the updated user behavior data.
[0033] The fourth step is to determine each updated user behavior data as a formatted user behavior data set.
[0034] Step 103: Store the formatted user behavior data set in slices in each preset storage node.
[0035] In some embodiments, the execution subject may store the formatted user behavior data set in slices to various preset storage nodes. The preset storage nodes may be storage nodes in a distributed storage system. For example, each of the storage nodes may be a storage server.
[0036] In some optional implementations of some embodiments, the execution subject may store the formatted user behavior data set in segments to each preset storage node through the following steps:
[0037] The first step is to group the above-mentioned formatted user behavior data sets to obtain various formatted user behavior data groups. Among them, each formatted user behavior data group in the above-mentioned formatted user behavior data groups corresponds to a storage node identifier. Among them, the above-mentioned storage node identifier can be the number or name of the storage node. For example, the storage node identifier can be "storage node 1".
[0038] In the second step, for each of the above formatted user behavior data groups, the following shard storage process is performed:
[0039] The first sub-step is to determine the storage node identifier corresponding to the formatted user behavior data group as the target storage node identifier.
[0040] The second sub-step is to store the above-mentioned formatted user behavior data group in a preset storage node corresponding to the above-mentioned target storage node identifier in a preset key-value pair storage format. In practice, for each formatted user behavior data in the above-mentioned formatted user behavior data group, the above-mentioned executable body can use the user identifier included in the above-mentioned formatted user behavior data as a key, and each user behavior sub-data included in the above-mentioned formatted user behavior data as a value of the above-mentioned key, and store the formatted user behavior data in the preset storage node corresponding to the above-mentioned target storage node identifier.
[0041] In the process of adopting technical solutions to solve the problems mentioned in the background technology, the following problems are often accompanied:
[0042] When the formatted user behavior data set is stored in shards, the formatted user behavior data set needs to be grouped so that the grouped formatted user behavior data can be stored in each preset storage node. Grouping the formatted user behavior data only by calculating the hash value of the user identifier in the formatted user behavior data may cause data skew. If the hash function cannot group the data evenly, some groups will have much more data than other formatted user behavior data groups. As a result, when each formatted user behavior data group is subsequently stored in its corresponding preset storage nodes, the storage space of some storage nodes is exhausted due to the excessive amount of data in its data group, and the storage space of other storage nodes is not fully utilized, resulting in a waste of storage resources.
[0043] In some optional implementations of some embodiments, the execution subject may group the formatted user behavior data sets to obtain various formatted user behavior data sets by the following steps:
[0044] In the first step, for each formatted user behavior data in the above formatted user behavior data set, perform the following processing:
[0045] The first sub-step is to determine the user identifier included in the formatted user behavior data as the target user identifier. For example, the target user identifier may be "066".
[0046] The second sub-step is, in response to determining that the target user identifier is a digital identifier, executing the following digital identifier retrieval step:
[0047] Sub-step 1, obtaining a preset mapping storage node identification table. The preset mapping storage node identification table may be a data table recording the correspondence between the numerical range information and the storage node identification. For example, the correspondence between the numerical range information and the storage node identification may be "0 to 100 corresponds to storage node 1". The digital identification may be an identification containing pure numbers.
[0048] Sub-step 2: retrieve the numerical range information of the target user identifier from the preset mapping storage node identifier table. The numerical range information is information that can characterize the numerical range. For example, the numerical range information can be "0 to 100 (i.e., a range greater than or equal to 0 and less than or equal to 100)".
[0049] Sub-step three: determine the storage node identifier corresponding to the above value range information in the above preset mapping storage node identifier table as the target storage node identifier corresponding to the above formatted user behavior data. For example, the target storage node identifier corresponding to "066" may be "storage node 1".
[0050] The third sub-step is, in response to determining that the target user identifier is a non-digital identifier, executing the following steps:
[0051] Sub-step 1: Perform hash operation on the target user identifier to obtain a user identifier hash value corresponding to the target user identifier. In practice, the execution subject may input the target user identifier into a preset hash function to obtain a hash value corresponding to the target user identifier as the user identifier hash value.
[0052] Sub-step two, determine each storage node identifier of each preset storage node, and sort the above-mentioned storage node identifiers to obtain a storage node identifier sequence. Wherein, each storage node identifier in the above-mentioned storage node identifier sequence has a corresponding serial number. In practice, the above-mentioned execution subject can execute the sorting task corresponding to the preset sorting information to sort the various storage node identifiers to obtain a storage node identifier sequence. Wherein, the above-mentioned preset sorting information can be a custom sorting function. As an example, the above-mentioned storage node identifiers can be "storage node 3, storage node 1, storage node 2, storage node 4" and the above-mentioned storage node identifier sequence can be {storage node 1, storage node 2, storage node 3, storage node 4}. The corresponding serial number of storage node 1 is 1. The corresponding serial number of storage node 2 is 2.
[0053] Sub-step three: determining the number of storage node identifiers in the storage node identifier sequence as a target number. For example, the target number may be 4.
[0054] Sub-step 4: the remainder of dividing the user identification hash value by the target number is called the target sequence number. As an example, the user identification hash value may be 1, 1%4=1. Then, the target sequence number may be 1.
[0055] Sub-step five: determining the storage node identifier with the target ordinal number in the storage node identifier sequence as the target storage node identifier corresponding to the formatted user behavior data.
[0056] In the second step, each target storage node identifier corresponding to the formatted user behavior data set is determined as a target storage node identifier set.
[0057] The third step is to perform deduplication processing on the above target storage node identification set to obtain a deduplication storage node identification set.
[0058] The fourth step is to determine, for each deduplication storage node identifier in the above deduplication storage node identifier set, each formatted user behavior data corresponding to the above deduplication storage node identifier in the formatted user behavior data set as a formatted user behavior data group to obtain each formatted user behavior data group.
[0059] The above technical solution and its related contents, as an inventive point of an embodiment of the present disclosure, solve the technical problem "the ultimate problem of waste of storage resources". The factors that lead to the waste of storage resources are often as follows: by only calculating the hash value of the user identifier in the formatted user behavior data, the formatted user behavior data is grouped, which may cause data skew. If the hash function cannot group the data evenly well, it will cause the amount of data in some groups to be much larger than that of other formatted user behavior data groups. As a result, when each formatted user behavior data group is subsequently stored in each corresponding preset storage node, the storage space of some storage nodes is exhausted because the amount of data in its data group is too large, and the storage space of other storage nodes is not fully utilized, resulting in a waste of storage resources. If the above factors are solved, the effect of reducing the waste of storage resources can be achieved. In order to achieve this effect, first, for each formatted user behavior data in the above formatted user behavior data set, the following processing is performed: First, the user identifier included in the above formatted user behavior data is determined as the target user identifier. Thus, the target user identifier used to determine the target storage node identifier can be obtained. Then, in response to determining that the above-mentioned target user identifier is a digital identifier, the following digital identifier retrieval steps are performed: the first step is to obtain a preset mapping storage node identifier table. The second step is to retrieve the numerical range information of the above-mentioned target user identifier from the above-mentioned preset mapping storage node identifier table. In this way, the numerical range information of the target user identifier can be determined. The third step is to determine the storage node identifier corresponding to the above-mentioned numerical range information in the above-mentioned preset mapping storage node identifier table as the target storage node identifier corresponding to the above-mentioned formatted user behavior data. In this way, the target storage node identifier corresponding to the formatted user behavior data can be determined. In this way, when the user identifier included in the formatted user behavior data is a digital identifier, the target storage node identifier corresponding to the formatted user behavior data can be determined by the range where the digital identifier is located. Afterwards, in response to determining that the above-mentioned target user identifier is a non-digital identifier, the following steps are performed: the first step is to perform a hash operation on the above-mentioned target user identifier to obtain a user identifier hash value corresponding to the above-mentioned target user identifier. In this way, when the target user identifier is a non-digital identifier, the hash value of the target user identifier can be determined. The second step is to determine each storage node identifier of each preset storage node, and to sort the above storage node identifiers to obtain a storage node identifier sequence, wherein each storage node identifier in the above storage node identifier sequence has a corresponding serial number. The third step is to determine the number of storage node identifiers in the above storage node identifier sequence as the target number. The fourth step is to divide the above user identifier hash value by the above target number, and the remainder is called the target ordinal number. The fifth step is to determine the storage node identifier in the above storage node identifier sequence whose serial number is the above target ordinal number as the target storage node identifier corresponding to the above formatted user behavior data.Thus, through the above steps, when the target user identifier is a non-digital identifier, the target storage node identifier of the corresponding formatted user behavior data can be determined. Then, each target storage node identifier corresponding to the above formatted user behavior data set is determined as a target storage node identifier set. Thus, in combination with range grouping and hash grouping, that is, when the target user identifier included in each formatted user behavior data is a non-digital identifier or a digital identifier, different steps can be used to determine the target storage node identifier corresponding to the formatted user behavior data set, and obtain the target storage node identifier set of the corresponding formatted user behavior data set. Afterwards, the above target storage node identifier set is deduplicated to obtain a deduplicated storage node identifier set. Thus, a deduplicated storage node identifier set for generating each formatted user behavior data group can be obtained. Then, for each deduplicated storage node identifier in the above deduplicated storage node identifier set, each formatted user behavior data corresponding to the above deduplicated storage node identifier in the formatted user behavior data set is determined as a formatted user behavior data group, and each formatted user behavior data group is obtained. In combination with each formatted user behavior data group in the above formatted user behavior data groups, a shard storage process is performed. Thus, each formatted user behavior data group can be sharded. Also, because the range grouping and hash grouping are combined, that is, when the target user identifier included in each formatted user behavior data is a non-digital identifier or a digital identifier, different steps are used to determine the target storage node identifier corresponding to the formatted user behavior data, and the target storage node identifier set corresponding to the formatted user behavior data set is obtained. The degree of data skew caused by grouping the formatted user behavior data only by calculating the hash value of the user identifier in the formatted user behavior data is reduced, and the data skew when the overall formatted user behavior data is grouped is reduced, thereby making the data volume of each formatted user behavior data group relatively balanced, improving the utilization rate of the storage space of each storage node, and reducing the waste of storage resources.
[0060] Step 104, in response to receiving the user query verification request information sent by the query terminal, based on the user query verification request information, performs verification retrieval processing to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes.
[0061] In some embodiments, the execution subject may perform verification retrieval processing based on the user query verification request information in response to receiving the user query verification request information sent by the query terminal, so as to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes. The query terminal may be a computing device or a computing terminal (e.g., a mobile phone, a computer). The user query verification request information includes user identity authentication information and query request information. The user identity authentication information includes: user name and password information. The user name may be a user account. The password information may represent a password. The query request information includes a user identifier or the target query request information includes a user identifier and query condition information. The query condition information may represent the query condition. The user account may be the same as or different from the user identifier. For example, the query condition information may be "user behavior data for querying credit reports between "2024-01-15, 00:00:00" and "2024-02-15, 00:00:00"".
[0062] In some optional implementations of some embodiments, the execution subject may perform verification retrieval processing based on the user query verification request information through the following steps to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes:
[0063] The first step is to determine the user identity verification information included in the user query verification request information as the target user identity verification information. The target user identity verification information includes: user name and password information.
[0064] The second step is to query the reserved password information corresponding to the above user name from the preset database. The above preset database can be a database storing the corresponding relationship between the user name and the reserved password information. The above reserved password information can represent the password reserved by the user.
[0065] The third step is to generate user identity verification information based on the reserved password information and the password information. In practice, the execution subject may compare the password represented by the reserved password information with the password represented by the password information. In response to determining that the password represented by the reserved password information is the same as the password represented by the password information, the execution subject may determine the information representing the user as a legitimate user as the user identity verification information. In response to determining that the password represented by the reserved password information is not the same as the password represented by the password information, the execution subject may determine the information representing the user as an illegal user as the user identity verification information.
[0066] In the fourth step, in response to determining that the user identity authentication information indicates that the user is a legitimate user, the query request information included in the user query verification request information is determined as the target query request information, wherein the target query request information includes the user identifier or the target query request information includes the user identifier and query condition information.
[0067] The fifth step is to determine the user identifier included in the target query request information as the screening user identifier.
[0068] The sixth step is to determine the storage node identifier corresponding to the above-mentioned screening user identifier. In practice, in response to determining that the above-mentioned screening user identifier is a digital identifier, the above-mentioned execution subject may retrieve the numerical range information of the screening user identifier from the above-mentioned preset mapping storage node identifier table. The storage node identifier corresponding to the above-mentioned numerical range information in the above-mentioned preset mapping storage node identifier table is determined as the storage node identifier corresponding to the above-mentioned screening user identifier. In response to determining that the above-mentioned screening user identifier is a non-digital identifier, the above-mentioned execution subject may perform a hash operation on the above-mentioned screening user identifier to obtain a hash value corresponding to the above-mentioned non-digital identifier. Afterwards, the above-mentioned execution subject may determine the remainder of the hash value divided by the above-mentioned target number as the screening sequence number. Afterwards, the above-mentioned execution subject may determine the storage node identifier whose sequence number in the storage node identifier sequence is the screening sequence number as the storage node identifier corresponding to the above-mentioned screening user identifier.
[0069] In the seventh step, each user behavior data including the above-mentioned screening user identifier is obtained from the preset storage node corresponding to the above-mentioned storage node identifier among the above-mentioned preset storage nodes, and each user behavior data including the above-mentioned screening user identifier is determined as each initial retrieval user behavior data.
[0070] In the eighth step, in response to determining that the target query request information does not include the query condition information, each of the initial retrieval user behavior data is determined as the query user behavior information corresponding to the user query verification request information.
[0071] In step 9, in response to determining that the target query request information includes the query condition information, based on the query condition information, conditionally filter the initial search user behavior data to obtain the query user behavior information corresponding to the target query request information. In practice, the execution subject may traverse the initial search user behavior data to determine the initial search user behavior data that meets the query condition information as the query user behavior information corresponding to the target query request information. As an example, the above-mentioned initial retrieval user behavior data can be “{user A, {operation time: 2024-01-16, 00:00:00, operation object information: “Credit Report” menu item, operation type information: query credit report}}, {user A, {operation time: 2024-12-15, 00:00:00, operation object information: “Credit Report” menu item, operation type information: query credit report}}” and the above-mentioned query condition information can be “user behavior data of querying credit report between “2024-01-15, 00:00:00” and “2024-02-15, 00:00:00””. The query condition represented by the above-mentioned query condition information is “the operation time is between “2024-01-15, 00:00:00” and “2024-02-15, 00:00:00” and the operation type information is querying credit report”. Then the above “{user A, {operation time: 2024-01-16, 00:00:00, operation object information: “Credit Report” menu item, operation type information: query credit report}}” is the initial retrieval user behavior data that meets the query condition represented by the above “user behavior data of querying credit report between “2024-01-15, 00:00:00” and “2024-02-15, 00:00:00””. The above query user behavior information can be “{user A, {operation time: 2024-01-16, 00:00:00, operation object information: “Credit Report” menu item, operation type information: query credit report}}”.
[0072] In some optional implementations of some embodiments, the execution subject may perform conditional filtering on each of the initial search user behavior data based on the query condition information to obtain query user behavior information corresponding to the target query request information through the following steps:
[0073] In the first step, each of the initial search user behavior data that meets the query condition represented by the query condition information is determined as each of the target search user behavior data.
[0074] In the second step, each of the target retrieval user behavior data is determined as the query user behavior information corresponding to the target query request information.
[0075] Step 105: encrypt the query user behavior information and send it to the query terminal.
[0076] In some embodiments, the execution entity may encrypt the query user behavior information and send it to the query terminal.
[0077] In some optional implementations of some embodiments, the execution subject may encrypt and send the queried user behavior information to the query terminal through the following steps:
[0078] The first step is to obtain pre-stored encryption algorithm information from a preset database. The encryption algorithm information may represent a preset encryption algorithm. For example, the preset encryption algorithm may be an RSA (Rivest-Shamir-Adleman) encryption algorithm.
[0079] The second step is to encrypt the query user behavior information according to the encryption algorithm information to obtain the encrypted query user behavior information. The encrypted query user behavior information may be the encrypted data of the query user behavior information.
[0080] The third step is to send the encrypted query user behavior information to the query terminal.
[0081] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the user behavior data retrieval method of some embodiments of the present disclosure, the user experience is improved and the waste of computing resources is reduced. Specifically, the reason for the poor user experience and the waste of computing resources is that the user behavior data of each user with a large amount of data is stored in a single storage device. When multiple users query their own behavior data at the same time, it will cause the I / O load of the storage device to be large, resulting in a long response time for the user query request and a poor user experience. At the same time, the user behavior data of each user with a large amount of data is stored in a storage device without being stored in pieces. When retrieving user behavior data, it is necessary to traverse and integrate the storage device, so that the amount of data for a single query is large, the retrieval efficiency is low, and computing resources are wasted. Based on this, the user behavior data retrieval method of some embodiments of the present disclosure, first, obtains a user behavior data set from a preset data source, wherein each user behavior data in the above user behavior data set includes: a user identifier, each user behavior sub-data, and each user behavior sub-data in the above user behavior sub-data includes each operation attribute information. In this way, the user behavior data set can be obtained. Then, the above user behavior data set is formatted to obtain a formatted user behavior data set. In this way, the format of the user behavior data in the user behavior data set can be unified. The formatted user behavior data set is divided and stored in each preset storage node. Thus, the formatted user behavior data set can be divided and stored in each preset storage node. By distributing the data to multiple nodes, each storage node is only responsible for storing and managing a part of the data, which reduces the I / O load of a single storage device (storage node) when multiple users query their behavior data at the same time. At the same time, by distributing the data to multiple nodes, the ability to process query requests in parallel is improved, the response time of user query requests is shortened, and the user experience is improved. In response to receiving the user query verification request information sent by the query terminal, based on the user query verification request information, a verification retrieval process is performed to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes. Thus, the query user behavior information can be retrieved from one of the preset storage nodes, reducing the amount of data for a single query. The query user behavior information is encrypted and sent to the query terminal. Thus, the query user behavior information can be encrypted and sent to the query terminal. Because the formatted user behavior data set is stored in pieces on each preset storage node, by distributing the data to multiple nodes, each storage node is only responsible for storing and managing a part of the data, which reduces the I / O load of a single storage device (storage node) when multiple users query their behavior data at the same time. At the same time, by distributing the data to multiple nodes, the ability to process query requests in parallel is improved, the response time of user query requests is shortened, and the user experience is improved.
[0082] Further references Figure 2 As an implementation of the methods shown in the figures, the present disclosure provides some embodiments of a user behavior data retrieval device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0083] like Figure 2 As shown, the user behavior data retrieval device 200 of some embodiments includes: an acquisition unit 201, a formatting processing unit 202, a storage unit 203, a verification retrieval processing unit 204 and a sending unit 205. The acquisition unit 201 is configured to acquire a user behavior data set from a preset data source, wherein each user behavior data in the above user behavior data set includes: a user identifier, each user behavior sub-data, and each user behavior sub-data in the above user behavior sub-data includes each operation attribute information; the formatting processing unit 202 is configured to format the above user behavior data set to obtain a formatted user behavior data set; the storage unit 203 is configured to store the above formatted user behavior data set in slices to each preset storage node; the verification retrieval processing unit 204 is configured to respond to receiving the user query verification request information sent by the query terminal, based on the above user query verification request information, perform verification retrieval processing, so as to retrieve the query user behavior information corresponding to the above user query verification request information from one of the above preset storage nodes; the sending unit 205 is configured to encrypt the above query user behavior information and send it to the above query terminal.
[0084] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units contained therein, and will not be described in detail here.
[0085] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0086] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0087] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0088] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the functions defined in the method of some embodiments of the present disclosure are executed.
[0089] It should be noted that the computer-readable medium recorded in some 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 may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0090] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0091] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a user behavior data set from a preset data source, wherein each user behavior data in the user behavior data set includes: a user identifier, each user behavior sub-data, and each user behavior sub-data in the user behavior sub-data includes each operation attribute information; formats the user behavior data set to obtain a formatted user behavior data set; stores the formatted user behavior data set in pieces to each preset storage node; in response to receiving the user query verification request information sent by the query terminal, performs verification retrieval processing based on the user query verification request information to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes; encrypts the query user behavior information and sends it to the query terminal.
[0092] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0093] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0094] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an acquisition unit, a formatting processing unit, a storage unit, a verification retrieval processing unit, and a sending unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the acquisition unit may also be described as a "unit for acquiring a user behavior data set from a preset data source."
[0095] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0096] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of technical features, but should also cover other technical solutions formed by any combination of technical features or their equivalent features without departing from the inventive concept. For example, a technical solution formed by replacing the features with (but not limited to) the technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A user behavior data retrieval method, comprising: Acquire a user behavior data set from a preset data source, wherein each user behavior data in the user behavior data set includes: a user identifier, each user behavior sub-data, and each user behavior sub-data in the each user behavior sub-data includes each operation attribute information; Formatting the user behavior data set to obtain a formatted user behavior data set; Storing the formatted user behavior data set in slices to each preset storage node; In response to receiving the user query verification request information sent by the query terminal, based on the user query verification request information, performing verification retrieval processing to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes; The query user behavior information is encrypted and sent to the query terminal.
2. The method according to claim 1, wherein: The various operation attribute information includes operation time, operation object information, operation type information, and the user behavior data set is formatted to obtain a formatted user behavior data set, including: Converting each operation time included in the user behavior data set into each operation time in a preset time format to update the user behavior data set; determining the updated user behavior dataset as an updated user behavior dataset; For each updated user behavior data in the updated user behavior data set, performing deduplication processing on each user behavior sub-data included in the updated user behavior data to update the updated user behavior data; The updated user behavior data are determined as a formatted user behavior data set.
3. The method according to claim 1, wherein: The step of storing the formatted user behavior data set in slices to each preset storage node includes: Performing group processing on the formatted user behavior data set to obtain various formatted user behavior data groups, wherein each of the various formatted user behavior data groups corresponds to a storage node identifier; For each of the formatted user behavior data groups, the following segment storage process is performed: Determine the storage node identifier corresponding to the formatted user behavior data group as the target storage node identifier; The formatted user behavior data group is stored in a preset storage node corresponding to the target storage node identifier in a preset key-value pair storage format.
4. The method according to claim 1, wherein: The step of encrypting and sending the query user behavior information to the query terminal includes: Obtaining pre-stored encryption algorithm information from a preset database; According to the encryption algorithm information, the query user behavior information is encrypted to obtain encrypted query user behavior information; The encrypted query user behavior information is sent to the query terminal.
5. The method according to claim 1, wherein: The user query verification request information includes user identity authentication information and query request information, and the verification retrieval process is performed based on the user query verification request information to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes, including: Determine the user identity authentication information included in the user query verification request information as the target user identity authentication information, wherein the target user identity authentication information includes: user name and password information; Querying the reserved password information corresponding to the user name from a preset database; Generate user identity authentication information based on the reserved password information and the password information; In response to determining that the user identity verification information indicates that the user is a legitimate user, determining the query request information included in the user query verification request information as target query request information, wherein the target query request information includes a user identifier or the target query request information includes a user identifier and query condition information; Determining the user identifier included in the target query request information as a screening user identifier; Determine a storage node identifier corresponding to the screening user identifier; Acquire each user behavior data including the screening user identifier from a preset storage node corresponding to the storage node identifier among the preset storage nodes, and determine each user behavior data including the screening user identifier as each initial search user behavior data; In response to determining that the target query request information does not include the query condition information, determining each of the initial search user behavior data as the query user behavior information corresponding to the user query verification request information; In response to determining that the target query request information includes the query condition information, conditional filtering processing is performed on each of the initial retrieval user behavior data based on the query condition information to obtain query user behavior information corresponding to the target query request information.
6. The method according to claim 5, wherein: The step of performing condition filtering on each of the initial search user behavior data based on the query condition information to obtain the query user behavior information corresponding to the target query request information includes: Determining each of the initial search user behavior data that meets the query condition represented by the query condition information as each of the target search user behavior data; The target retrieval user behavior data are determined as query user behavior information corresponding to the target query request information.
7. A user behavior data retrieval device, comprising: An acquisition unit is configured to acquire a user behavior data set from a preset data source, wherein each user behavior data in the user behavior data set includes: a user identifier, each user behavior sub-data, and each user behavior sub-data in the each user behavior sub-data includes each operation attribute information; a formatting processing unit, configured to format the user behavior data set to obtain a formatted user behavior data set; A storage unit, configured to store the formatted user behavior data set in slices to each preset storage node; a verification retrieval processing unit configured to, in response to receiving the user query verification request information sent by the query terminal, perform verification retrieval processing based on the user query verification request information to retrieve the query user behavior information corresponding to the user query verification request information from one of the preset storage nodes; The sending unit is configured to encrypt and send the query user behavior information to the query terminal.
8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Block chain-based account information query method and device, equipment and medium
CN115982247A
Data processing method and device based on data warehouse, equipment and storage medium
CN117708245A
Communication data real-time acquisition method and device, equipment and storage medium
CN118473824A
Star catalogue data retrieval method and device, electronic equipment and storage medium
CN118503516A
Terminal interaction data storage security management method and system for instant messaging
CN118764496A