Data storage methods, devices, equipment and storage media
By converting account identifiers into bit identifiers and storing them in a bitmap database, the problem of limited number of user accounts and storage of non-integer account identifiers in existing technologies is solved, enabling wider data storage applications and larger storage space.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies use bitmaps to store a limited number of user accounts and cannot store non-integer user accounts, which limits their application scenarios.
By converting account identifiers into bit identifiers and storing the correspondence between account identifiers and bit identifiers in a bitmap database, candidate bitmap sets are determined based on target attribute information, and candidate bitmaps that match the target bit identifiers are searched in the candidate bitmap sets, thus realizing the storage of target bit identifiers.
It expands the storage range of account identifiers, increases the amount of data stored, expands the application scenarios of data storage, and enables the storage of non-integer account identifiers.
Smart Images

Figure CN116595204B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a data storage method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of information technology, the personalized needs of global internet users are constantly growing, requiring the storage and analysis of massive amounts of user data, thus leading to a rapid increase in the demand for personalized services. For example, in the field of short video recommendation, it is necessary to accurately recommend personalized video content to different users, and user profiles are the foundational data for providing accurate recommendations. Effectively utilizing user profile data is a prerequisite for accurate recommendations.
[0003] In related technologies, a streaming real-time data processing engine can be used to write user profile data into a distributed file system according to a specified format. When statistical analysis of relevant dimensional data is needed, data warehouse tools can be used to analyze the aforementioned files. Alternatively, a streaming real-time data processing engine can be used to write user profile data into a columnar storage database. The column values are the dimensions to be analyzed, with only one row of data globally. The written row value is a bitmap containing all users. When statistical analysis of relevant dimensional data is needed, the corresponding bitmap is directly retrieved. In contrast, data warehouse tools are slow at analyzing file data and cannot perform real-time data analysis. Although bitmaps can achieve real-time analysis, the storage space of a single bitmap is limited and cannot be elastically expanded, and user accounts must be integers, restricting its use cases. Summary of the Invention
[0004] This disclosure provides a data storage method, apparatus, device, and storage medium to at least solve the problems in related technologies where bitmap storage has a limited number of user accounts and cannot store non-integer user accounts. The technical solution of this disclosure is as follows:
[0005] According to a first aspect of the present disclosure, a data storage method is provided, comprising:
[0006] Based on the target profile data corresponding to the target account, determine the target attribute value corresponding to the target attribute information of the target account;
[0007] Based on the target account identifier corresponding to the target account, a target bit identifier matching the target account identifier is searched in the bitmap database; the bitmap database is used to store the correspondence between account identifiers and bit identifiers;
[0008] Based on the target attribute value corresponding to the target attribute information, a candidate bitmap set matching the target attribute value is determined;
[0009] The target bitmap is obtained by searching the candidate bitmap set for a candidate bitmap that matches the target bit identifier.
[0010] The target bit identifier is stored in the target bitmap.
[0011] In one exemplary implementation, the target attribute information of the target account includes first target attribute information and second target attribute information. The step of determining a candidate bitmap set matching the target attribute value based on the target attribute value corresponding to the target attribute information includes:
[0012] Based on the first target attribute value corresponding to the first target attribute information, determine the initial target bitmap set corresponding to the target account;
[0013] Based on the second target attribute value corresponding to the second target attribute information, a candidate bitmap set matching the second target attribute value is searched in the initial target bitmap set.
[0014] In one exemplary embodiment, the method further includes:
[0015] Obtain multiple first attribute values corresponding to the first target attribute information;
[0016] Construct initial bitmap sets corresponding to each of the multiple first attribute values;
[0017] The step of determining the initial target bitmap set corresponding to the target account based on the first target attribute value corresponding to the first target attribute information includes:
[0018] Based on the first target attribute value corresponding to the first target attribute information, an initial bitmap set matching the first target attribute value is searched among multiple initial bitmap sets to obtain the initial target bitmap set.
[0019] In one exemplary implementation, constructing the initial bitmap set corresponding to each of the plurality of first attribute values includes:
[0020] For any given first attribute value, determine multiple second attribute information corresponding to that first attribute value;
[0021] Determine the second attribute value corresponding to each of the plurality of second attribute information;
[0022] Construct a preset candidate bitmap set corresponding to each second attribute value;
[0023] Based on multiple preset candidate bitmap sets corresponding to any first attribute value, an initial bitmap set corresponding to any first attribute value is constructed.
[0024] In an exemplary implementation, the step of searching the candidate bitmap set for a candidate bitmap that matches the target bit identifier to obtain the target bitmap includes:
[0025] Obtain the candidate bitmap identifiers corresponding to each of the multiple candidate bitmaps in the candidate bitmap set;
[0026] Based on the target bit identifier, determine the bitmap filtering identifier;
[0027] From the plurality of candidate bitmap identifiers, candidate bitmap identifiers that match the bitmap filtering identifiers are selected to obtain the target candidate bitmap identifier;
[0028] The candidate bitmap corresponding to the target candidate bitmap is identified as the target bitmap.
[0029] In one exemplary implementation, determining the bitmap filtering identifier based on the target bit identifier includes:
[0030] Obtain the character located at a preset position in the target bit identifier;
[0031] The character at the preset position is determined as the bitmap filter identifier.
[0032] In one exemplary embodiment, the method further includes:
[0033] If no identifier matching the target account identifier exists in the bitmap database, the target bit identifier is generated based on the target account identifier.
[0034] In one exemplary embodiment, the method further includes:
[0035] Receive a request to obtain the filtered account identifier, the request carrying a first filter attribute value and a second filter attribute value;
[0036] Based on the first filtering attribute value, a filtering initial bitmap set is determined from the plurality of initial bitmap sets;
[0037] Based on the second filtering attribute value, a target filtering bitmap set is determined from the initial filtering bitmap set;
[0038] Obtain the bit identifier corresponding to each target filter bitmap in the target filter bitmap set to obtain the filter bit identifier;
[0039] The account identifier corresponding to each filter bit identifier is determined as the filter account identifier.
[0040] In one exemplary implementation, the second filter attribute value is at least two, and both of the at least two second filter attribute values match the filter account identifier. The step of determining the target filter bitmap set from the initial filter bitmap set based on the second filter attribute values includes:
[0041] Based on the at least two second filtering attribute values, candidate bitmap sets corresponding to each of the at least two second filtering attribute values are determined from the initial filtering bitmap set, thereby obtaining at least two target filtering bitmap sets;
[0042] The step of obtaining the bit identifier corresponding to each target filter bitmap in the target filter bitmap set to obtain the filter bit identifier includes:
[0043] Obtain the candidate bit identifier set corresponding to each of the at least two target filtering bitmap sets;
[0044] Determine the intersection bit identifier of the at least two candidate bit identifier sets;
[0045] The intersection bit identifier is determined as the filtering bit identifier.
[0046] According to a second aspect of the present disclosure, a data storage device is provided, comprising:
[0047] The target attribute value determination module is configured to determine the target attribute value corresponding to the target attribute information of the target account based on the target profile data corresponding to the target account.
[0048] The target bit identifier lookup module is configured to perform a search in a bitmap database for a target bit identifier that matches the target account identifier, based on the target account identifier corresponding to the target account; the bitmap database is used to store the correspondence between account identifiers and bit identifiers.
[0049] The candidate bitmap set determination module is configured to determine a candidate bitmap set that matches the target attribute value based on the target attribute value corresponding to the target attribute information.
[0050] The target bitmap determination module is configured to perform a search in the candidate bitmap set for a candidate bitmap that matches the target bit identifier, thereby obtaining the target bitmap;
[0051] The target bit identifier storage module is configured to store the target bit identifier in the target bitmap.
[0052] In one exemplary embodiment, the target attribute information of the target account includes first target attribute information and second target attribute information, and the candidate bitmap set determination module includes:
[0053] The initial target bitmap set determination unit is configured to determine the initial target bitmap set corresponding to the target account based on the first target attribute value corresponding to the first target attribute information.
[0054] The candidate bitmap set determination unit is configured to perform a search in the initial target bitmap set for a candidate bitmap set that matches the second target attribute value based on the second target attribute value corresponding to the second target attribute information.
[0055] In one exemplary embodiment, the apparatus further includes:
[0056] The first attribute value acquisition unit is configured to acquire multiple first attribute values corresponding to the first target attribute information;
[0057] The initial bitmap set construction unit is configured to perform the construction of the initial bitmap sets corresponding to each of the plurality of first attribute values.
[0058] In one exemplary embodiment, the initial target bitmap set determination unit includes:
[0059] The atlas determination subunit is configured to perform an operation based on the first target attribute value corresponding to the first target attribute information, and search among multiple initial bitmap sets for an initial bitmap set that matches the first target attribute value, thereby obtaining the initial target bitmap set.
[0060] In one exemplary implementation, the initial bitmap set construction unit includes:
[0061] The second attribute information determination subunit is configured to perform the task of determining multiple second attribute information corresponding to any first attribute value for any first attribute value.
[0062] The second attribute value determination subunit is configured to determine the second attribute value corresponding to each of the plurality of second attribute information;
[0063] The preset candidate bitmap set construction subunit is configured to perform the construction of the preset candidate bitmap set corresponding to each second attribute value;
[0064] The initial bitmap set construction subunit is configured to execute multiple preset candidate bitmap sets based on any first attribute value to construct the initial bitmap set corresponding to any first attribute value.
[0065] In one exemplary embodiment, the target bitmap determination module includes:
[0066] The candidate bitmap identifier acquisition unit is configured to acquire the candidate bitmap identifiers corresponding to each of the multiple candidate bitmaps in the candidate bitmap set.
[0067] The bitmap filtering identifier determination unit is configured to determine the bitmap filtering identifier based on the target bit identifier;
[0068] The target candidate bitmap identifier determination unit is configured to perform the task of filtering out candidate bitmap identifiers that match the bitmap filtering identifiers from a plurality of candidate bitmap identifiers to obtain target candidate bitmap identifiers;
[0069] The target bitmap determination unit is configured to determine the candidate bitmap corresponding to the target candidate bitmap identifier as the target bitmap.
[0070] In one exemplary embodiment, the bitmap filtering identifier determination unit includes:
[0071] The character acquisition subunit is configured to acquire the character located at a preset position in the target bit identifier;
[0072] The bitmap filter identifier determination subunit is configured to determine the character at the preset position as the bitmap filter identifier.
[0073] In one exemplary embodiment, the apparatus further includes:
[0074] The target bit identifier generation module is configured to generate the target bit identifier based on the target account identifier if no identifier matching the target account identifier exists in the bitmap database.
[0075] In one exemplary embodiment, the apparatus further includes:
[0076] The request receiving module is configured to execute a request to receive a filtered account identifier acquisition request, the filtered account identifier acquisition request carrying a first filtering attribute value and a second filtering attribute value;
[0077] The initial bitmap set selection module is configured to perform a selection of an initial bitmap set from the plurality of initial bitmap sets based on the first selection attribute value.
[0078] The target filter bitmap set determination module is configured to determine the target filter bitmap set from the initial filter bitmap set based on the second filter attribute value.
[0079] The filter bit identifier determination module is configured to obtain the bit identifier corresponding to each target filter bitmap in the target filter bitmap set, and obtain the filter bit identifier.
[0080] The filter account identifier determination module is configured to determine the account identifier corresponding to each filter bit identifier as the filter account identifier.
[0081] In one exemplary embodiment, the second filter attribute value is at least two, and both of the at least two second filter attribute values match the filter account identifier. The target filter bitmap determination module includes:
[0082] The target filtering bitmap set determination unit is configured to perform, based on the at least two second filtering attribute values, determine the candidate bitmap sets corresponding to each of the at least two second filtering attribute values from the initial filtering bitmap set, and obtain at least two target filtering bitmap sets.
[0083] In one exemplary embodiment, the filter bit identifier determination module includes:
[0084] The candidate bit identifier set acquisition unit is configured to acquire the candidate bit identifier set corresponding to each of the at least two target filter bitmap sets;
[0085] The intersection bit identifier determination unit is configured to perform the task of determining the intersection bit identifier of the at least two candidate bit identifier sets;
[0086] The filter bit identifier determination unit is configured to determine the intersection bit identifier as the filter bit identifier.
[0087] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0088] processor;
[0089] Memory used to store the processor's executable instructions;
[0090] The processor is configured to execute the instructions to implement the data storage method described above.
[0091] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by an electronic device processor, enables the electronic device to perform the data storage method as described above.
[0092] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the data storage method described above.
[0093] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:
[0094] This disclosure determines the target attribute value corresponding to the target attribute information of the target account based on the target profile data corresponding to the target account; it searches for the target bit identifier that matches the target account identifier in a bitmap database based on the target account identifier corresponding to the target account identifier; the bitmap database is used to store the correspondence between account identifiers and bit identifiers; it determines the candidate bitmap set that matches the target attribute value based on the target attribute information; it searches for the candidate bitmap set that matches the target bit identifier to obtain the target bitmap; and it stores the target bit identifier in the target bitmap. This disclosure stores the correspondence between account identifiers and bit identifiers in the bitmap database, so that the corresponding target bit identifier can be found according to the obtained target account identifier, and data is stored based on the target bit identifier. Even if the target account identifier is not an integer, it can still be stored, thereby expanding the storage range of account identifiers and expanding the application scenarios of data storage; this disclosure sets multiple candidate bitmaps for each attribute value, thereby expanding the data storage space and increasing the data storage volume.
[0095] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0096] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0097] Figure 1 This is an application environment diagram illustrating a data storage method according to an exemplary embodiment.
[0098] Figure 2 This is a flowchart illustrating a data storage method according to an exemplary embodiment.
[0099] Figure 3 This is a flowchart illustrating a method for constructing an initial bitmap set corresponding to a plurality of first attribute values, according to an exemplary embodiment.
[0100] Figure 4 This is a flowchart illustrating a method for constructing an initial bitmap set according to an exemplary embodiment.
[0101] Figure 5 This is a flowchart illustrating a method for finding a candidate bitmap that matches a target bit identifier in a candidate bitmap set, according to an exemplary embodiment, to obtain a target bitmap.
[0102] Figure 6 This is a flowchart illustrating a method for determining a bitmap filtering identifier based on the aforementioned target bit identifier, according to an exemplary embodiment.
[0103] Figure 7 This is a flowchart illustrating a method for determining a filtered account identifier according to an exemplary embodiment.
[0104] Figure 8 This is a flowchart illustrating a method for obtaining bit identifiers corresponding to each target filter bitmap in a target filter bitmap set, according to an exemplary embodiment.
[0105] Figure 9 This is a schematic diagram illustrating the structure of a data storage system according to an exemplary embodiment.
[0106] Figure 10 This is a block diagram illustrating a data storage device according to an exemplary embodiment.
[0107] Figure 11 This is a block diagram illustrating an electronic device for storing data according to an exemplary embodiment. Detailed Implementation
[0108] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0109] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0110] It should be noted that the user information (including but not limited to user device information, user profile data, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0111] Related technologies can use streaming real-time data processing engines to write user profile data into a distributed file system according to a specified format. When it is necessary to analyze relevant dimensional data, data warehouse tools can be used to analyze the aforementioned files. Alternatively, streaming real-time data processing engines can be used to write user profile data into a columnar storage database. The column values are the dimensions to be analyzed, with only one row of data globally. The written row value is a bitmap containing all users. When it is necessary to analyze relevant dimensional data, the corresponding bitmap can be retrieved directly. Data warehouse tools, on the other hand, are slow at analyzing file data and cannot perform real-time data analysis. Although bitmaps can achieve real-time analysis, the storage space of a single bitmap is limited and cannot be elastically expanded, and user accounts must be integers, limiting the use cases.
[0112] To address the issues of limited user account count and inability to store non-integer user accounts in bitmap storage in related technologies, this disclosure provides a data storage method, apparatus, device, and storage medium.
[0113] Please see Figure 1 The diagram illustrates an application environment for a data storage method according to an exemplary embodiment. The application environment may include a server 01 and a client 02.
[0114] Specifically, in the embodiments of this specification, the aforementioned server 01 may include a standalone server, a distributed server, or a server cluster composed of multiple servers. It may also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 01 may include a network communication unit, a processor, and a memory, etc. Specifically, the aforementioned server 01 can be used to determine the target attribute value corresponding to the target attribute information of the target account based on the target profile data corresponding to the target account; search for a target bit identifier matching the target account identifier in a bitmap database based on the target account identifier corresponding to the target account; the bitmap database is used to store the correspondence between account identifiers and bit identifiers; determine a candidate bitmap set matching the target attribute value based on the target attribute value corresponding to the target attribute information; search for a candidate bitmap matching the target bit identifier in the candidate bitmap set to obtain the target bitmap; and store the target bit identifier in the target bitmap.
[0115] Specifically, in the embodiments of this specification, the aforementioned client 02 may include physical devices such as smartphones, desktop computers, tablets, laptops, digital assistants, smart wearable devices, and in-vehicle terminals, and may also include software running on the physical device, such as web pages provided to users by some service providers, or applications provided to users by these service providers. Specifically, the aforementioned client 02 can be used to display the target bit identifier stored in the target bitmap.
[0116] Figure 2 This is a flowchart illustrating a data storage method according to an exemplary embodiment, such as... Figure 2 As shown, this method can be applied to Figure 1 The server 01 shown includes the following steps.
[0117] In step S201, based on the target profile data corresponding to the target account, the target attribute value corresponding to the target attribute information of the target account is determined.
[0118] In this embodiment of the disclosure, the target account can be any account of the target application. The target profile data can include the target account's behavioral data and account information within the target application. The behavioral data can include, but is not limited to, multimedia data viewed by the target account within the target application. The account information can include the target account's nationality, gender, location, and other information. The target application can include, but is not limited to, video applications, audio applications, etc.
[0119] In this embodiment of the disclosure, the target profile data can be parsed to obtain the target attribute value corresponding to the target attribute information of the target account; the target attribute value is the specific data corresponding to the target attribute information; the target attribute information may include, but is not limited to, nationality, gender, sports hobbies, etc.
[0120] In some embodiments, determining the target attribute value corresponding to the target attribute information of the target account based on the target profile data corresponding to the target account includes:
[0121] Obtain the target profile data corresponding to the aforementioned target accounts;
[0122] In this embodiment of the disclosure, target profile data of a target account can be determined by the account information registered by the target account in the target application and the historical behavior data of the target account in the target application; for example, the interests and hobbies of the target account can be determined based on the multimedia information browsed by the target account in the target application, and target profile data can be obtained.
[0123] In some embodiments, a profile data recognition model can be trained based on the sample account information, sample behavior data, and sample profile data of the sample account; then, the profile data recognition model can be used to perform profile data recognition processing on the account information and historical behavior data of the target account to obtain the target profile data; thereby, the target profile data of the target account can be determined quickly and accurately.
[0124] By analyzing the target profile data, the target attribute values corresponding to the target attribute information of the target account are obtained.
[0125] In this embodiment of the disclosure, after obtaining the target profile data of the target account, the target profile data can be parsed to obtain target attribute information and corresponding target attribute values; the target attribute information can be one or more. The target attribute value is the specific data corresponding to the target attribute information; the target attribute information can include, but is not limited to, nationality, gender, sports hobbies, etc.; for example, when the target attribute information is country or nationality, if the target account's nationality is China, then the target attribute value is China; when the target attribute information is gender, if the target account is female, then the target attribute value is female; when the target attribute information is sports hobbies, if the target account's sports hobby is football, then the target attribute value is football.
[0126] In step S202, based on the target account identifier corresponding to the target account, a target bit identifier matching the target account identifier is searched in the bitmap database; the bitmap database is used to store the correspondence between account identifiers and bit identifiers.
[0127] In this embodiment, each account identifier can be pre-converted into a bit identifier in a compressed bitmap, with each bit in the compressed bitmap identifying an account; and the correspondence between account identifiers and bit identifiers is stored; thus facilitating the storage of target profile data based on bit identifiers; in related technologies, data is typically stored based on account identifiers, and if the account identifier is not an integer, data storage is impossible; in this embodiment, account identifiers are converted into bit identifiers, and data is stored according to the bit identifiers, since all bit identifiers are integers, so even if the target account identifier is not an integer, it will not affect the storage of the target profile data.
[0128] In some embodiments, the method for constructing the bitmap database includes:
[0129] Retrieve account identifiers for multiple preset accounts;
[0130] In this embodiment of the disclosure, the preset account may include the target account. For all preset accounts in the target application, the account identifier of each preset account can be obtained after each preset account registers the target application. The account identifier may include, but is not limited to, the username, login account, nickname and other information of the preset account.
[0131] Based on a preset strategy, each account identifier is converted into a bit identifier, thus obtaining the mapping relationship between account identifiers and bit identifiers;
[0132] In this embodiment of the disclosure, a preset strategy can be constructed to convert account identifiers into bit identifiers; all bit identifiers are integers; specifically, bit identifiers can be assigned to each preset account in sequence according to the registration time of the preset accounts. For example, the first preset account that is registered first can be assigned the smallest bit in the compressed bitmap as the first bit identifier; the second preset account that is registered second can be assigned a second bit identifier, which is the identifier after adding a preset value to the first bit identifier. The preset value can be set according to the actual situation, for example, the preset value can be set to 1.
[0133] In some embodiments, the corresponding bit identifier can also be calculated based on the characters in the account identifier and a preset calculation rule.
[0134] A bitmap database is constructed based on the mapping relationship between account identifiers and bit identifiers.
[0135] In this embodiment of the disclosure, after determining the bit identifier corresponding to each preset account, the mapping relationship between the account identifier and the bit identifier can be determined based on the account identifier and the bit identifier corresponding to each preset account; then, a bitmap database is constructed based on the mapping relationship between the account identifier and the bit identifier.
[0136] In some embodiments, the update time of the bitmap database can also be set to facilitate regular data updates to the bitmap database and to periodically clean up account identifiers and bit identifiers that have not been used for a long time, thereby preventing invalid data from occupying a large amount of memory.
[0137] In this embodiment of the disclosure, the bitmap database can be stored based on the Hadoop Distributed File System (HDFS), and the target profile data can be stored through the large-scale data processing engine (Spark).
[0138] In this embodiment of the disclosure, the account identifier of each account can be converted into a bit identifier according to a preset strategy, and a bitmap database can be constructed. This allows for the rapid determination of the bit identifier corresponding to the target account based on the bitmap database, thereby enabling the rapid storage of the profile data corresponding to the non-integer target account identifier.
[0139] In step S203, based on the target attribute values corresponding to the target attribute information, a candidate bitmap set matching the target attribute values is determined.
[0140] In this embodiment of the disclosure, the target attribute information of the target account includes first target attribute information and second target attribute information. At least one second target attribute information can be determined based on the first target attribute information, and the second target attribute information is a sub-attribute of the first target attribute information. For example, the first target attribute information is nationality, and the second target attribute information is the account gender corresponding to a preset nationality, the account's sports preferences, movie preferences, etc. Different first target attribute information can correspond to the same or different second target attribute information.
[0141] In some embodiments, based on the target attribute values corresponding to the aforementioned target attribute information, determining a candidate bitmap set that matches the aforementioned target attribute values includes:
[0142] Based on the first target attribute value corresponding to the first target attribute information, determine the initial target bitmap set corresponding to the above target account;
[0143] In this embodiment of the disclosure, the first target attribute value can represent the geographical location information of the target account; the first target attribute information can include, but is not limited to, nationality, province or preset geographical region, and the first target attribute value can be the specific name corresponding to the nationality, province or preset geographical region; each first attribute value corresponds to an initial bitmap set; each initial bitmap set can include multiple compressed bitmaps; the first target attribute value corresponding to the first target attribute information can be determined first, and then the corresponding initial target bitmap set can be determined.
[0144] In this embodiment of the disclosure, an initial bitmap set corresponding to each first attribute value can be pre-constructed, such as... Figure 3 As shown, the above method also includes:
[0145] In step S301, multiple first attribute values corresponding to the first target attribute information are obtained;
[0146] In some embodiments, multiple first attribute values corresponding to the first target attribute information can be obtained first; multiple first attribute values corresponding to the first target attribute information can be obtained by searching in a browser; or multiple first attribute values corresponding to the first historical attribute information in the target application can be determined based on the first historical attribute values. The first attribute values can represent the geographical location information of a preset account.
[0147] In step S302, an initial bitmap set corresponding to each of the above-mentioned multiple first attribute values is constructed.
[0148] In one exemplary embodiment, after determining a plurality of first attribute values, an initial bitmap set corresponding to each first attribute value can be constructed.
[0149] In this embodiment of the disclosure, such as Figure 4As shown, the above-mentioned construction of the initial bitmap sets corresponding to each of the multiple first attribute values includes:
[0150] In step S3021, for any first attribute value, multiple second attribute information corresponding to any first attribute value is determined;
[0151] In this embodiment of the disclosure, the second attribute information can be determined based on the first attribute value; for example, for the first attribute value of China, the second attribute information can be set as gender, sports hobbies, movie hobbies, etc.
[0152] In step S3022, the second attribute value corresponding to each of the above-mentioned multiple second attribute information is determined;
[0153] In this embodiment of the disclosure, each second attribute information can correspond to at least one second attribute value. For example, for the second attribute information of sports hobbies, multiple second attribute values such as football, basketball, volleyball, table tennis, badminton, swimming, and weightlifting can be set.
[0154] In step S3023, a preset candidate bitmap set corresponding to each second attribute value is constructed;
[0155] In this embodiment of the disclosure, for each second attribute value, a corresponding preset candidate bitmap set can be constructed. Each preset candidate bitmap set can include a preset number of candidate bitmaps. The preset number can be set according to the actual situation. Specifically, the preset number of candidate bitmaps can be determined based on the number of predicted accounts corresponding to the second attribute value; the larger the number of predicted users, the larger the corresponding preset number; the smaller the number of predicted users, the smaller the corresponding preset number; for example, it can be set to ten. The preset number of preset candidate bitmaps corresponding to each second attribute value can be the same or different.
[0156] In step S3024, an initial bitmap set corresponding to any of the first attribute values is constructed based on multiple preset candidate bitmap sets corresponding to any of the first attribute values.
[0157] In this embodiment of the disclosure, since any first attribute value corresponds to multiple second attribute information, and each second attribute information corresponds to one second attribute value, it can be determined that any first attribute value corresponds to multiple second attribute values; and each second attribute value corresponds to a preset candidate bitmap set; therefore, it can be determined that any first attribute value corresponds to multiple preset candidate bitmap sets; and the multiple preset candidate bitmap sets corresponding to any first attribute value can be determined as the initial bitmap set corresponding to the aforementioned first attribute value. Thus, the initial bitmap set corresponding to each first attribute value can be obtained, thereby obtaining multiple initial bitmap sets.
[0158] In this embodiment of the disclosure, multiple initial bitmap sets can be stored according to a distributed storage columnar database (HBase). During the data storage process, the first attribute value can be used as a row of HBase, the second attribute information can be used as a column family of HBase, and the second attribute value can be used as a column of HBase.
[0159] In this embodiment, the second attribute information corresponding to the first attribute value can be determined first, and multiple second attribute values corresponding to the second attribute information can be obtained. Then, a preset candidate bitmap set corresponding to each second attribute value can be constructed. Thus, based on the preset candidate bitmap sets corresponding to each of the multiple second attribute values, an initial bitmap set corresponding to the first attribute value can be constructed. This results in an initial bitmap set corresponding to each first attribute value. This facilitates the storage of bit identifiers in the initial bitmap set according to the corresponding second attribute value, thereby achieving fast and accurate storage of target profile data. Furthermore, since multiple compressed bitmaps are set for each second attribute value, the storage space for bit identifiers is increased, and the storage capacity of profile data is increased, which can be used to store profile data for more accounts.
[0160] In some embodiments, an attribute bitmap database can be constructed based on the correspondence between each first attribute value and an initial bitmap set, and the mapping relationship between the first attribute value and the initial bitmap set can be stored in the attribute bitmap database.
[0161] In some embodiments, determining the initial target bitmap set corresponding to the target account based on the first target attribute value corresponding to the first target attribute information includes:
[0162] Based on the first target attribute value corresponding to the first target attribute information, an initial bitmap set matching the first target attribute value is searched among multiple initial bitmap sets to obtain the initial target bitmap set.
[0163] Specifically, in this embodiment of the disclosure, an initial bitmap set matching the first target attribute value can be found among multiple initial bitmap sets to obtain the initial target bitmap set. Alternatively, an initial target bitmap set matching the first target attribute value can be found in the constructed attribute bitmap database. The initial target bitmap set includes multiple preset candidate bitmap sets corresponding to each of the second attribute values.
[0164] In this embodiment of the disclosure, an initial bitmap set corresponding to each first attribute value can be pre-constructed, and then an initial target bitmap set matching the first target attribute value can be selected from multiple initial bitmap sets. Subsequently, a target bitmap can be selected from the initial target bitmap set, thereby quickly determining the selection range of the target bitmap.
[0165] Based on the second target attribute value corresponding to the second target attribute information mentioned above, a candidate bitmap set matching the second target attribute value is searched in the initial target bitmap set.
[0166] Specifically, in this embodiment of the disclosure, the initial target bitmap set includes multiple preset candidate bitmap sets corresponding to each of the second attribute values. Candidate bitmap sets matching the second target attribute values can be selected from the initial target bitmap set based on the second target attribute values corresponding to the second target attribute information, thereby facilitating further determination of the target bitmap.
[0167] In this embodiment of the disclosure, after the initial target bitmap set is initially determined, a candidate bitmap set matching the second target attribute value can be quickly searched in the initial target bitmap set according to the second target attribute value, thereby further narrowing the screening range of target bitmaps and improving the screening efficiency of target bitmaps.
[0168] In step S204, a candidate bitmap matching the target bit identifier is searched in the candidate bitmap set to obtain the target bitmap.
[0169] Specifically, in this embodiment of the disclosure, the candidate bitmap set may include multiple candidate bitmaps. After determining the candidate bitmap set, the corresponding target bitmap can be further determined according to the target bit identifier.
[0170] In this embodiment of the disclosure, such as Figure 5 As shown, the above-mentioned method of searching for a candidate bitmap that matches the target bit identifier in the candidate bitmap set to obtain the target bitmap includes:
[0171] In step S2041, the candidate bitmap identifiers corresponding to each of the multiple candidate bitmaps in the above candidate bitmap set are obtained;
[0172] Specifically, in the embodiments of this disclosure, the capacity of each candidate bitmap in the candidate bitmap set may be the same or different; each candidate bitmap has a corresponding candidate bitmap identifier, and different candidate bitmaps in the same candidate bitmap set have different candidate bitmap identifiers; different candidate bitmap sets may include the same candidate bitmap identifier; the candidate bitmap identifier may include, but is not limited to, character identifiers and image identifiers.
[0173] In some embodiments, the candidate bitmap identifier of each candidate bitmap can be randomly set, or the candidate bitmap identifier corresponding to each candidate bitmap can be set according to the order of each candidate bitmap in the candidate bitmap set.
[0174] In some embodiments, obtaining the candidate bitmap identifiers corresponding to each of the multiple candidate bitmaps in the candidate bitmap set includes:
[0175] Determine the arrangement order of the multiple candidate bitmaps in the above candidate bitmap set;
[0176] Specifically, in this embodiment of the disclosure, after constructing the candidate bitmap set, the arrangement order of multiple candidate bitmaps in the candidate bitmap set can be obtained.
[0177] Based on the arrangement order of the above candidate bitmaps, the candidate bitmap identifiers corresponding to each of the above candidate bitmaps are determined.
[0178] Specifically, in this embodiment of the disclosure, the candidate bitmap identifiers corresponding to each of the multiple candidate bitmaps can be determined according to their respective arrangement order. Candidate bitmaps ranked higher can be assigned smaller candidate bitmap identifiers, while candidate bitmaps ranked lower can be assigned larger candidate bitmap identifiers; for example, the candidate bitmap identifier of the first-ranked candidate bitmap in a set can be set to 1, the candidate bitmap identifier of the second-ranked candidate bitmap can be set to 2, and so on.
[0179] In some embodiments, after setting the candidate bitmap identifier corresponding to each candidate bitmap, the order of each candidate bitmap in the candidate bitmap set can be determined.
[0180] In step S2042, a bitmap filtering identifier is determined based on the aforementioned target bit identifier;
[0181] In some embodiments, such as Figure 6 As shown, the determination of the bitmap filtering identifier based on the target bit identifier includes:
[0182] In step S20421, the character located at the preset position in the target bit identifier is obtained;
[0183] Specifically, in this embodiment of the disclosure, when the target bit identifier is a string, the preset position can be the position corresponding to any character in the string; for example, the preset position can be the last bit of the target bit identifier, and the character at the preset position is the last character of the target bit identifier; the preset position can also be the first bit of the target bit identifier or other positions.
[0184] In step S20422, the character at the preset position is determined as the bitmap filter identifier.
[0185] Specifically, in this embodiment of the disclosure, a character at a preset position can be determined as a bitmap filtering identifier; for example, the last character of the target bit identifier can be determined as the bitmap filtering identifier; thus, the target bitmap can be further filtered out based on the bitmap filtering identifier.
[0186] In this embodiment of the disclosure, a bitmap filtering identifier can be determined based on the target bit identifier. Specifically, the character at a preset position in the target bit identifier can be determined as the bitmap filtering identifier, thereby facilitating the quick and accurate determination of the target bitmap from multiple candidate bitmaps.
[0187] In step S2043, candidate bitmap identifiers that match the bitmap filtering identifiers are selected from a plurality of the above candidate bitmap identifiers to obtain target candidate bitmap identifiers;
[0188] Specifically, in this embodiment of the disclosure, a candidate bitmap identifier that matches the bitmap filtering identifier can be selected from multiple candidate bitmap identifiers based on the determined bitmap filtering identifier, thereby obtaining the target candidate bitmap identifier.
[0189] In some embodiments, the above method further includes:
[0190] If no identifier matching the target account identifier exists in the bitmap database, the target bit identifier is generated based on the target account identifier.
[0191] Specifically, in this embodiment of the disclosure, if there is no identifier in the bitmap database that matches the target account identifier, it means that there is no corresponding target bit identifier for the target account identifier. In this case, a target bit identifier can be generated for the target account identifier in real time. Specifically, the bit identifier with the largest value or the latest generated bit identifier in the bitmap database can be obtained as a preset bit identifier, and the target bit identifier can be generated based on the preset bit identifier. For example, a target value can be added to the preset bit identifier to obtain the target bit identifier. The target value can be 1 or other values.
[0192] In this embodiment of the disclosure, if there is no identifier in the bitmap database that matches the target account identifier, a target bit identifier can be generated in real time based on the target account identifier, thereby enabling fast storage of the target profile data and avoiding the situation where the target profile data cannot be stored.
[0193] In step S2044, the candidate bitmap corresponding to the above target candidate bitmap is identified as the target bitmap.
[0194] Specifically, in this embodiment of the disclosure, after determining the target candidate bitmap identifier, the candidate bitmap corresponding to the identifier can be determined as the target bitmap, thereby facilitating the subsequent storage of target profile data.
[0195] In this embodiment of the disclosure, the candidate bitmap identifier corresponding to each candidate bitmap can be determined, and the bitmap filtering identifier can be determined according to the target bit identifier; then, the target candidate bitmap identifier can be filtered from multiple candidate bitmap identifiers according to the bitmap filtering identifier; thus, the target bitmap can be filtered out quickly and accurately.
[0196] In step S205, the target bit identifier is stored in the target bit map.
[0197] In this embodiment of the disclosure, after the target bitmap is determined, the target bit identifier can be stored in the target bitmap, thereby achieving fast and accurate storage of target profile data.
[0198] In this embodiment of the disclosure, when a target account corresponds to multiple second attribute values, the target bitmap corresponding to each second attribute value can be determined separately, and the target bit identifier can be stored in the corresponding target bitmap in sequence, thereby realizing the storage of profile data according to the bit identifier.
[0199] In some embodiments, after constructing the initial bitmap set corresponding to each first attribute value, the corresponding bit identifier can be stored in each initial bitmap set to realize the storage of the profile data of the preset account; and the required data can be obtained according to the initial bitmap set after storing the data.
[0200] In this embodiment of the disclosure, such as Figure 7 As shown, the above method also includes:
[0201] In step S701, a filter account identifier acquisition request is received, the filter account identifier acquisition request carrying a first filter attribute value and a second filter attribute value;
[0202] Specifically, in this embodiment of the disclosure, the local server can receive a filter account identifier acquisition request sent by the terminal. The filter account identifier acquisition request carries a first filter attribute value and a second filter attribute value. The first filter attribute value can be an attribute value among the first attribute values, and the second filter attribute value can be an attribute value among the second attribute values.
[0203] In step S702, a filter initial bitmap set is determined from multiple initial bitmap sets based on the first filter attribute value;
[0204] Specifically, in this embodiment of the disclosure, an initial bitmap set matching the first filtering attribute value can be determined from multiple initial bitmap sets to obtain a filtering initial bitmap set. The filtering initial bitmap set includes multiple filtering initial bitmaps. The filtering initial bitmap set is used to determine the bitmap range of the filtering account identifier.
[0205] In step S703, the target filter bitmap set is determined from the initial filter bitmap set based on the second filter attribute value;
[0206] In this embodiment of the disclosure, the second filtering attribute value is at least two, and both of the at least two second filtering attribute values match the filtering account identifier. Determining the target filtering bitmap set from the initial filtering bitmap set based on the second filtering attribute values includes:
[0207] Based on the above at least two second filtering attribute values, candidate bitmap sets corresponding to each of the above at least two second filtering attribute values are determined from the above initial filtering bitmap set, resulting in at least two target filtering bitmap sets.
[0208] Specifically, in this embodiment of the disclosure, when there are at least two second filtering attribute values, a candidate bitmap set corresponding to each second filtering attribute value can be determined to obtain at least two target filtering bitmap sets, thereby further determining the filtering account identifier.
[0209] In step S704, the bit identifiers corresponding to each target filter bitmap in the target filter bitmap set are obtained to obtain the filter bit identifiers;
[0210] Specifically, in this embodiment of the disclosure, when the second filtering attribute value is one, the corresponding target filtering bitmap set is also one, and the bit identifiers corresponding to each target filtering bitmap in the target filtering bitmap set can be determined as filtering bit identifiers.
[0211] In some embodiments, obtaining the bit identifier corresponding to each target filter bitmap in the target filter bitmap set to obtain the filter bit identifier includes:
[0212] Obtain the bit identifier set corresponding to each target filtering bitmap in the above target filtering bitmap set;
[0213] Specifically, in this embodiment of the disclosure, the target filtering bitmap set may include multiple target filtering bitmaps, and the bit identifier set stored in each target filtering bitmap can be obtained; thus, the bit identifier set corresponding to each of the multiple target filtering bitmaps is obtained.
[0214] The union of the bit identifier sets corresponding to the above target filtering bitmaps is used as the filtering bit identifier.
[0215] Specifically, in this embodiment of the disclosure, the union of the bit identifier sets corresponding to each target filtering bitmap can be determined to obtain the union bit identifier; and each identifier in the union bit identifier is determined as a filtering bit identifier.
[0216] In a specific embodiment, if it is necessary to find female accounts in Brazil, the first filter attribute value is Brazil; the second filter attribute value is female. Then, the initial bitmap set corresponding to Brazil can be filtered out first; and the filter bit identifier corresponding to female can be filtered out according to the second filter attribute value, thereby further determining the filter account identifier.
[0217] In this embodiment of the disclosure, such as Figure 8As shown, the above-mentioned second filtering attribute values are at least two, and both of the above-mentioned at least two second filtering attribute values match the above-mentioned filtering account identifier. The above-mentioned acquisition of the bit identifier corresponding to each target filtering bitmap in the above-mentioned target filtering bitmap set to obtain the filtering bit identifier includes:
[0218] In step S7041, the candidate bit identifier set corresponding to each of the above at least two target filtering bit map sets is obtained;
[0219] Specifically, in this embodiment of the disclosure, when there are at least two second filtering attribute values, the candidate bit identifier set corresponding to each second filtering attribute value can be obtained respectively.
[0220] In step S7042, the intersection bit identifier of the above at least two candidate bit identifier sets is determined;
[0221] Specifically, in this embodiment of the disclosure, the intersection of at least two candidate bit identifier sets can be determined to obtain the intersection bit identifier, thereby further determining the filter bit identifier that matches at least two second filter attribute values.
[0222] In step S7043, the intersection bit identifier is determined as the filtering bit identifier.
[0223] Specifically, in this embodiment of the disclosure, the obtained intersection bit identifier can be determined as the filter bit identifier, thereby enabling the rapid determination of the filter account identifier.
[0224] In one specific embodiment, to find female accounts in Brazil that like football, the first filter attribute value can be determined to be Brazil; the second filter attribute value is female. Then, the initial bitmap set corresponding to Brazil can be filtered out first; and the filter bit identifier corresponding to female can be filtered out according to the second filter attribute value, thereby further determining the filter account identifier.
[0225] In this embodiment of the disclosure, when there are multiple second filtering attribute values, the candidate bit identifier set corresponding to each second filtering attribute value can be obtained respectively, and the intersection of each candidate bit identifier set can be determined, thereby further determining the filtering bit identifier; thus realizing the rapid determination of the filtering bit identifier based on multiple second filtering attribute values, thereby quickly and accurately determining the corresponding filtering account identifier.
[0226] In step S705, the account identifier corresponding to each filter bit identifier is determined as the above-mentioned filter account identifier.
[0227] Specifically, in this embodiment of the disclosure, the account identifier that matches each filter bit identifier can be searched in the bitmap database to obtain the filter account identifier, thereby quickly determining the filter account identifier based on the filter bit identifier.
[0228] In some embodiments, after determining the filter account identifier, the above method further includes:
[0229] Send the aforementioned filtered account identifier to the terminal so that the terminal displays the filtered account identifier.
[0230] In some embodiments, the server may determine the filter account identifier based on the terminal request and then send the filter account identifier to the terminal so that the terminal can display the filter account identifier, making it easier for the terminal user to intuitively know the required filter account identifier.
[0231] In this embodiment of the disclosure, the filtering bit identifier can be quickly and accurately determined from the bit identifiers stored in the initial bitmap set based on the first filtering attribute value and the second filtering attribute value, thereby quickly determining the filtering account identifier.
[0232] In a specific embodiment, such as Figure 9 As shown, Figure 9 This is a schematic diagram of a data storage system, including a data processing engine (Spark), a distributed file system (Hadoop Distributed File System, HDFS), and a distributed columnar database (HBase). The distributed file system stores the mapping between user account identifiers and user IDs (bit identifiers), while the data processing engine stores the mapping between user profile data and user IDs (bit identifiers). The distributed columnar database stores the parsed user profile data, including initial bitmap sets for China and Brazil respectively. Each initial bitmap set includes compressed bitmap sets corresponding to different genders and sports preferences. Each compressed bitmap set includes ten compressed bitmaps, and each compressed bitmap has the same storage space. When you need to count female users in Brazil who like football, you can read the first bitmap in HBase with row value "Brazil", column family "Sports", and column "Football", and get the union of user IDs in each first bitmap in the first bitmap to get the first account set; then get the second bitmap with row value "Brazil", column family "Gender", and column "Female", and get the union of user IDs in each second bitmap in the second bitmap to get the second account set; finally, take the intersection of the first account set and the second account set to get the filtered accounts.
[0233] This disclosure determines the target attribute value corresponding to the target attribute information of the target account based on the target profile data corresponding to the target account; it searches for the target bit identifier that matches the target account identifier in a bitmap database based on the target account identifier corresponding to the target account identifier; the bitmap database is used to store the correspondence between account identifiers and bit identifiers; it determines the candidate bitmap set that matches the target attribute value based on the target attribute information; it searches for the candidate bitmap set that matches the target bit identifier to obtain the target bitmap; and it stores the target bit identifier in the target bitmap. This disclosure stores the correspondence between account identifiers and bit identifiers in the bitmap database, so that the corresponding target bit identifier can be found according to the obtained target account identifier, and data is stored based on the target bit identifier. Even if the target account identifier is not an integer, it can still be stored, thereby expanding the storage range of account identifiers and expanding the application scenarios of data storage; this disclosure sets multiple candidate bitmaps for each attribute value, thereby expanding the data storage space and increasing the data storage volume.
[0234] This embodiment also provides a block diagram of a data storage device, such as Figure 10 As shown, Figure 10 This is a block diagram illustrating a data storage device according to an exemplary embodiment. (Refer to...) Figure 10 The device includes:
[0235] The target attribute value determination module 1010 is configured to determine the target attribute value corresponding to the target attribute information of the target account based on the target profile data corresponding to the target account.
[0236] The target bit identifier lookup module 1020 is configured to perform a search in a bitmap database for a target bit identifier that matches the target account identifier based on the target account identifier corresponding to the target account; the bitmap database is used to store the correspondence between account identifiers and bit identifiers.
[0237] The candidate bitmap set determination module 1030 is configured to determine a candidate bitmap set that matches the target attribute value based on the target attribute value corresponding to the target attribute information.
[0238] The target bitmap determination module 1040 is configured to perform a search in the candidate bitmap set for a candidate bitmap that matches the target bit identifier, thereby obtaining the target bitmap;
[0239] The target bit identifier storage module 1050 is configured to store the target bit identifier in the target bitmap.
[0240] In some embodiments, the target attribute information of the target account includes first target attribute information and second target attribute information, and the candidate bitmap set determination module includes:
[0241] The initial target bitmap set determination unit is configured to determine the initial target bitmap set corresponding to the target account based on the first target attribute value corresponding to the first target attribute information.
[0242] The candidate bitmap set determination unit is configured to perform a search in the initial target bitmap set for a candidate bitmap set that matches the second target attribute value based on the second target attribute value corresponding to the second target attribute information.
[0243] In some embodiments, the apparatus further includes:
[0244] The first attribute value acquisition unit is configured to acquire multiple first attribute values corresponding to the first target attribute information;
[0245] The initial bitmap set construction unit is configured to perform the construction of the initial bitmap sets corresponding to each of the plurality of first attribute values.
[0246] In some embodiments, the initial target bitmap set determination unit includes:
[0247] The atlas determination subunit is configured to perform an operation based on the first target attribute value corresponding to the first target attribute information, and search among multiple initial bitmap sets for an initial bitmap set that matches the first target attribute value, thereby obtaining the initial target bitmap set.
[0248] In some embodiments, the initial bitmap set construction unit includes:
[0249] The second attribute information determination subunit is configured to perform the task of determining multiple second attribute information corresponding to any first attribute value for any first attribute value.
[0250] The second attribute value determination subunit is configured to determine the second attribute value corresponding to each of the plurality of second attribute information;
[0251] The preset candidate bitmap set construction subunit is configured to perform the construction of the preset candidate bitmap set corresponding to each second attribute value;
[0252] The initial bitmap set construction subunit is configured to execute multiple preset candidate bitmap sets based on any first attribute value to construct the initial bitmap set corresponding to any first attribute value.
[0253] In some embodiments, the target bitmap determination module includes:
[0254] The candidate bitmap identifier acquisition unit is configured to acquire the candidate bitmap identifiers corresponding to each of the multiple candidate bitmaps in the candidate bitmap set.
[0255] The bitmap filtering identifier determination unit is configured to determine the bitmap filtering identifier based on the target bit identifier;
[0256] The target candidate bitmap identifier determination unit is configured to perform the task of filtering out candidate bitmap identifiers that match the bitmap filtering identifiers from a plurality of candidate bitmap identifiers to obtain target candidate bitmap identifiers;
[0257] The target bitmap determination unit is configured to determine the candidate bitmap corresponding to the target candidate bitmap identifier as the target bitmap.
[0258] In some embodiments, the bitmap filtering identifier determination unit includes:
[0259] The character acquisition subunit is configured to acquire the character located at a preset position in the target bit identifier;
[0260] The bitmap filter identifier determination subunit is configured to determine the character at the preset position as the bitmap filter identifier.
[0261] In some embodiments, the apparatus further includes:
[0262] The target bit identifier generation module is configured to generate the target bit identifier based on the target account identifier if no identifier matching the target account identifier exists in the bitmap database.
[0263] In some embodiments, the apparatus further includes:
[0264] The request receiving module is configured to execute a request to receive a filtered account identifier acquisition request, the filtered account identifier acquisition request carrying a first filtering attribute value and a second filtering attribute value;
[0265] The initial bitmap set selection module is configured to perform a selection of an initial bitmap set from the plurality of initial bitmap sets based on the first selection attribute value.
[0266] The target filter bitmap set determination module is configured to determine the target filter bitmap set from the initial filter bitmap set based on the second filter attribute value.
[0267] The filter bit identifier determination module is configured to obtain the bit identifier corresponding to each target filter bitmap in the target filter bitmap set, and obtain the filter bit identifier.
[0268] The filter account identifier determination module is configured to determine the account identifier corresponding to each filter bit identifier as the filter account identifier.
[0269] In some embodiments, the second filter attribute value is at least two, and both of the at least two second filter attribute values match the filter account identifier. The target filter bitmap determination module includes:
[0270] The target filtering bitmap set determination unit is configured to perform, based on the at least two second filtering attribute values, determine the candidate bitmap sets corresponding to each of the at least two second filtering attribute values from the initial filtering bitmap set, and obtain at least two target filtering bitmap sets.
[0271] In some embodiments, the filter bit identifier determination module includes:
[0272] The candidate bit identifier set acquisition unit is configured to acquire the candidate bit identifier set corresponding to each of the at least two target filter bitmap sets;
[0273] The intersection bit identifier determination unit is configured to perform the task of determining the intersection bit identifier of the at least two candidate bit identifier sets;
[0274] The filter bit identifier determination unit is configured to determine the intersection bit identifier as the filter bit identifier.
[0275] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0276] In one exemplary embodiment, an electronic device is also provided, including a processor; a memory for storing processor-executable instructions; wherein, when the processor is configured to execute the instructions stored in the memory, it implements the data storage method provided in any of the above embodiments.
[0277] The electronic device can be a terminal, a server, or a similar computing device. Taking a server as an example... Figure 11 This is a block diagram illustrating an electronic device according to an exemplary embodiment, such as... Figure 11As shown, the server 1100 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1110 (CPUs 1110 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 1130 for storing data, and one or more storage media 1120 (e.g., one or more mass storage devices) for storing application programs 1123 or data 1122. The memory 1130 and storage media 1120 may be temporary or persistent storage. The program stored in the storage media 1120 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 1110 may be configured to communicate with the storage media 1120 and execute the series of instruction operations stored in the storage media 1120 on the server 1100. Server 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1140, and / or one or more operating systems 1121, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0278] The input / output interface 1140 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 1100. In one example, the input / output interface 1140 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 1140 may be a radio frequency (RF) module for wireless communication with the Internet.
[0279] Those skilled in the art will understand that Figure 11 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 1100 may also include... Figure 11 The more or fewer components shown, or having the same Figure 11 The different configurations shown.
[0280] In one exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1130 including instructions, which can be executed by a processor 1110 of device 1100 to perform the above-described method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0281] In one exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the data storage method provided in any of the above embodiments.
[0282] This disclosure determines the target attribute value corresponding to the target attribute information of the target account based on the target profile data corresponding to the target account; it searches for the target bit identifier that matches the target account identifier in a bitmap database based on the target account identifier corresponding to the target account identifier; the bitmap database is used to store the correspondence between account identifiers and bit identifiers; it determines the candidate bitmap set that matches the target attribute value based on the target attribute information; it searches for the candidate bitmap set that matches the target bit identifier to obtain the target bitmap; and it stores the target bit identifier in the target bitmap. This disclosure stores the correspondence between account identifiers and bit identifiers in the bitmap database, so that the corresponding target bit identifier can be found according to the obtained target account identifier, and data is stored based on the target bit identifier. Even if the target account identifier is not an integer, it can still be stored, thereby expanding the storage range of account identifiers and expanding the application scenarios of data storage; this disclosure sets multiple candidate bitmaps for each attribute value, thereby expanding the data storage space and increasing the data storage volume.
[0283] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0284] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0285] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A data storage method, characterized by, The method comprises the following steps: determining a target attribute value corresponding to target attribute information of a target account based on target portrait data corresponding to the target account; finding a target bit identifier matching the target account identifier in a bitmap database based on a target account identifier corresponding to the target account; the bitmap database is used to store the correspondence between account identifiers and bit identifiers; the bit identifier is an integer; the target attribute information comprises first target attribute information and second target attribute information, the second target attribute information is sub-attribute information of the first target attribute information, and an initial target bitmap set corresponding to the target account is determined based on a first target attribute value corresponding to the first target attribute information; finding a candidate bitmap set matching the second target attribute value in the initial target bitmap set based on a second target attribute value corresponding to the second target attribute information; finding a candidate bitmap matching the target bit identifier in the candidate bitmap set to obtain a target bitmap; storing the target bit identifier in the target bitmap.
2. The method of claim 1, wherein, The method further comprises: obtaining a plurality of first attribute values corresponding to the first target attribute information; constructing an initial bitmap set corresponding to each of the plurality of first attribute values; the step of determining the initial target bitmap set corresponding to the target account based on the first target attribute value corresponding to the first target attribute information comprises: finding an initial bitmap set matching the first target attribute value in a plurality of initial bitmap sets based on the first target attribute value corresponding to the first target attribute information, to obtain the initial target bitmap set.
3. The method of claim 2, wherein, The step of constructing the initial bitmap set corresponding to each of the plurality of first attribute values comprises: determining a plurality of second attribute information corresponding to any first attribute value; determining a second attribute value corresponding to each of the plurality of second attribute information; constructing a preset candidate bitmap set corresponding to each second attribute value; constructing an initial bitmap set corresponding to any first attribute value based on a plurality of preset candidate bitmap sets corresponding to the first attribute value.
4. The method of claim 1, wherein, The step of finding a candidate bitmap matching the target bit identifier in the candidate bitmap set to obtain a target bitmap comprises: obtaining a candidate bitmap identifier corresponding to each of a plurality of candidate bitmaps in the candidate bitmap set; determining a bitmap screening identifier based on the target bit identifier; screening a candidate bitmap identifier matching the bitmap screening identifier from a plurality of candidate bitmap identifiers to obtain a target candidate bitmap identifier; determining the candidate bitmap corresponding to the target candidate bitmap identifier as the target bitmap.
5. The method of claim 4, wherein, The step of determining a bitmap screening identifier based on the target bit identifier comprises: obtaining a character at a preset position in the target bit identifier; determining the character at the preset position as the bitmap screening identifier.
6. The method of claim 1, wherein, The method further comprises: if there is no identifier matching the target account identifier in the bitmap database, generating the target bit identifier based on the target account identifier.
7. The method according to any one of claims 2-3, characterized in that, The method further comprises: receiving a screening account identifier acquisition request, the screening account identifier acquisition request carrying a first screening attribute value and a second screening attribute value; determine a target initial bitmap set from the plurality of initial bitmap sets based on the first screening attribute value; determine a target screening bitmap set from the target initial bitmap set based on the second screening attribute value; obtain a screening bit identifier corresponding to each target screening bitmap in the target screening bitmap set; determine the screening account identifier as an account identifier corresponding to each screening bit identifier.
8. The method of claim 7, wherein, The second screening attribute value is at least two, and the at least two second screening attribute values are matched with the screening account identifier. The target screening bitmap set is determined from the target initial bitmap set based on the second screening attribute value, including: determine at least two target screening bitmap sets from the target initial bitmap set based on the at least two second screening attribute values, each corresponding to a candidate bitmap set of the at least two second screening attribute values; The target screening bitmap set is determined from the target initial bitmap set based on the second screening attribute value, including: obtain at least two candidate bit identifier sets corresponding to the at least two target screening bitmap sets; determine an intersection bit identifier of the at least two candidate bit identifier sets; determine the screening bit identifier as the intersection bit identifier.
9. A data storage device, characterized by including: a target attribute value determination module configured to determine a target attribute value corresponding to target attribute information of a target account based on target portrait data corresponding to the target account; a target bit identifier search module configured to search for a target bit identifier matching a target account identifier corresponding to the target account in a bitmap database based on the target account identifier; the bitmap database is used to store a corresponding relationship between an account identifier and a bit identifier; the bit identifier is an integer; a candidate bitmap set determination module configured to determine a candidate bitmap set matching the target attribute value based on a target attribute value corresponding to the target attribute information; a target bitmap determination module configured to search for a candidate bitmap matching the target bit identifier in the candidate bitmap set to obtain a target bitmap; a target bit identifier storage module configured to store the target bit identifier in the target bitmap; The target attribute information includes first target attribute information and second target attribute information, and the second target attribute information is sub-attribute information of the first target attribute information. The candidate bitmap set determination module includes: an initial target bitmap set determination unit configured to determine an initial target bitmap set corresponding to the target account based on a first target attribute value corresponding to the first target attribute information; a candidate bitmap set determination unit configured to search for a candidate bitmap set matching the second target attribute value in the initial target bitmap set based on a second target attribute value corresponding to the second target attribute information.
10. An electronic device, comprising: including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the data storage method of any one of claims 1-8.
11. A computer readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the data storage method as claimed in any one of claims 1-8.
Citation Information
Patent Citations
Data statistics method and device based on bitmap and electronic equipment
CN110134721A
Business processing method and device, electronic equipment and storage medium
CN113468226A