CN113127692B - Data storage structure, retrieval method, data storage method and terminal equipment - Google Patents

Data storage structure, retrieval method, data storage method and terminal equipment Download PDF

Info

Publication number
CN113127692B
CN113127692B CN201911411743.7A CN201911411743A CN113127692B CN 113127692 B CN113127692 B CN 113127692B CN 201911411743 A CN201911411743 A CN 201911411743A CN 113127692 B CN113127692 B CN 113127692B
Authority
CN
China
Prior art keywords
node
data
user
layer
data storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911411743.7A
Other languages
Chinese (zh)
Other versions
CN113127692A (en
Inventor
赵鸿楠
艾国信
周志成
宋超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201911411743.7A priority Critical patent/CN113127692B/en
Publication of CN113127692A publication Critical patent/CN113127692A/en
Application granted granted Critical
Publication of CN113127692B publication Critical patent/CN113127692B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data storage structure, a retrieval method, a data storage method and terminal equipment, wherein the data storage structure comprises a dictionary tree, an M layer of the dictionary tree is a root node layer, and all of an M+1 layer to an N layer of the dictionary tree are data layers; the root node layer comprises at least two root nodes, and each root node correspondingly stores different first data; the data layer comprises at least one sub-node, and each sub-node correspondingly stores second data; the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1. The searching method provided by the application can improve the efficiency of searching data. The data storage structure, the retrieval method, the data storage method and the terminal equipment provided by the embodiment of the application can avoid redundancy during data storage and reduce the space occupied by data storage.

Description

Data storage structure, retrieval method, data storage method and terminal equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data storage structure, a search method, a data storage method, and a terminal device.
Background
With the rapid development of technology, there may be a large amount of data in many scenarios. For example, a certain hospital management system may store data related to a plurality of patients, or a certain operator may store data related to a plurality of users in the background, or the like. These data often have a relatively large value and the required data can be retrieved from among them.
However, in the prior art, there is greater redundancy in storing data, for example, a certain common field exists in each of the stored sets of data, and in order to ensure the integrity of each set of data, the common field needs to be stored in each of the sets of data, which results in that the common field is stored multiple times, and thus, more storage space is required.
Disclosure of Invention
The data storage structure, the retrieval method, the data storage method and the terminal equipment provided by the embodiment of the application can avoid redundancy during data storage and reduce the space occupied by data storage.
In a first aspect, an embodiment of the present application provides a data storage structure, including a dictionary tree, where an mth layer of the dictionary tree is a root node layer, and m+1th layer to nth layer of the dictionary tree are all the data layers;
the root node layer comprises at least two root nodes, and each root node correspondingly stores different first data;
the data layer comprises at least one sub-node, and each sub-node correspondingly stores second data;
the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1.
In a second aspect, an embodiment of the present application further provides a search method, applied to the data storage structure described above, where the first data includes a first user feature, and the search method includes:
receiving a feature value corresponding to the first user feature, the feature value comprising at least one of the node values;
traversing the dictionary tree by taking the root node of the first user characteristic as a starting point according to the characteristic value so as to determine a first target node corresponding to the first user characteristic;
and acquiring user identity information in the first target node.
In a third aspect, an embodiment of the present application further provides a data storage method, including:
storing first data in an M layer of a dictionary tree structure, wherein the M layer comprises at least two root nodes, and each root node correspondingly stores different first data;
storing second data in a data layer of the dictionary tree structure, wherein the data layer comprises at least one sub-node, one second data is correspondingly stored in each sub-node, and the M+1th layer to the N th layer of the dictionary tree structure are all the data layers;
the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1.
In a fourth aspect, an embodiment of the present application further provides a terminal device, including:
a receiving module, configured to receive a feature value corresponding to the first user feature, where the feature value includes at least one node value;
the retrieval module is used for traversing the dictionary tree by taking the root node of the first user characteristic as a starting point according to the characteristic value so as to determine a first target node corresponding to the first user characteristic;
and the acquisition module is used for acquiring the user identity information in the first target node.
In a fifth aspect, an embodiment of the present application further provides a terminal device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, where the computer program implements the steps of the above-mentioned search method or data storage method when executed by the processor.
In a sixth aspect, embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described retrieval method or data storage method.
In the embodiment of the application, at least two root nodes are arranged on the root node layer of the dictionary tree, and the at least two root nodes share the child nodes of the dictionary tree, so that at least two groups of data with different types can be stored in the same dictionary tree and the child nodes of the dictionary tree can be shared, thereby realizing the effect of saving space.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a block diagram of a data storage structure provided by an embodiment of the present application;
FIG. 2 is a flow chart of a retrieval method provided by an embodiment of the present application;
FIG. 3 is a flow chart of a data storage method provided by an embodiment of the present application;
fig. 4 is one of the block diagrams of the terminal device provided in the embodiment of the present application;
fig. 5 is a second block diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a data storage structure provided in an embodiment of the present application, including a dictionary tree, where an mth layer of the dictionary tree is a root node layer, and m+1th layer to nth layer of the dictionary tree are all the data layers;
the root node layer comprises at least two root nodes, and each root node correspondingly stores different first data;
the data layer comprises at least one sub-node, and each sub-node correspondingly stores second data;
the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1.
All nodes in the data layer are child nodes of the root node layer, wherein the child nodes are all nodes behind the root node. For example, node a has a child node as node b, node b has a child node as node c, and node c has no child nodes. Then the child nodes of node a are node b and node c, not just node b.
The above data storage structure may be used to store a plurality of different types of data, where the first data may be a name of a data type, and the second data may be specific data content, for example, when the data storage structure is used to store personal information of all users of a certain system, each root node of the root node layer may store: name, nickname, identification card number, cell phone number, etc. All the sub-nodes below each root node and the root node form a dictionary tree for storing corresponding data, for example, all the sub-nodes below the root node for storing the identification card numbers and the root node together form a dictionary tree for storing the identification card number information of all the users of the system; all child nodes below the root node for storing mobile phone numbers and the root node together form a dictionary tree for storing mobile phone number information of all users of the system; the node characters stored in each node in each data layer may be different, it should be understood that the node characters in different data layers may be the same, that is, the same node character in each data layer is stored only once, and the dictionary tree storing different types of data may share the same node character in the same data layer, for example, the fourth layer of the dictionary tree includes node character "5", where the node character "5" is only required to be stored once in the fourth layer of the dictionary tree, but the node character "5" may be shared by the dictionary tree storing different types of data, for example, the dictionary tree storing identification card number information and the dictionary tree storing mobile phone number information may share node character "5" in the fourth layer, so at least two dictionary trees formed by at least two root nodes may share child nodes, thereby avoiding redundancy generated during data storage and further reducing the space required to be occupied by data storage.
In the embodiment of the application, at least two root nodes are arranged on the root node layer of the dictionary tree, and the at least two root nodes share the child nodes of the dictionary tree, so that at least two groups of data with different types can be stored in the same dictionary tree and the child nodes of the dictionary tree can be shared, thereby realizing the effect of saving space.
The above data storage structure may be applied to storing account information of some application platforms, for example, for an curiosity background account management system, to store an account of a user and personal information of the user, specifically, please refer to fig. 1, where the first data includes a user feature, and the second data includes a node value; at least one child node in the data layer is a target node, each different user characteristic corresponds to at least one target node, and second data stored in the target node further comprises user identity information; and the user identity information stored in each target node corresponds to the user characteristics corresponding to the target node.
The user features include: the nickname, the real name, the identification card number, the mobile phone number and other personal information, the node value can be a, b, c, d and other single characters, and the above-mentioned identification information can be the user's ID, so, after the user or the application program background manager can query the user's ID only according to the personal information through the data storage structure, for example, please refer to fig. 1, field1 is the root node, and the user characteristics stored in field1 are nicknames, the system includes the first user and the second user, the nickname of the first user is ac, the nickname of the second user is acd, the c node is the target node corresponding to the nickname of the first user, and the d node is the target node corresponding to the nickname of the second user, so after the first user creates the account number and determines the nickname, the ID information of the first user can be pre-stored in the c node, and after the second user creates and determines the nickname, the ID information of the second user can be pre-stored in the d node, wherein the ID information of the user can be stored in the form of a list; therefore, when the ID of the first user needs to be searched according to the nickname of the first user, only the ac needs to be input, and searching is performed in the dictionary tree below f field1 from field1, namely the nickname ac is used as a path, the c node is rapidly positioned as a target node, and the ID information of the first user can be obtained from the c node.
Specifically, since the nickname of the first user is known, accurate retrieval can be performed by taking the nickname as a path, all data is prevented from being traversed, and the efficiency of retrieving the data can be improved.
Optionally, in the case that the target node includes at least two pieces of user identity information, and the at least two pieces of user identity information respectively correspond to different user features, the second data in the target node further includes identification information, and each piece of user identity information is stored in association with one piece of identification information;
the identification information is used for identifying the user characteristics corresponding to the identity information.
Referring to fig. 1, a detailed explanation is made on a technical solution in the embodiment of the present application by using a specific embodiment, for example, field1 and field2 in the figure are both root nodes, and the user feature stored in field1 is a nickname, the user feature stored in field2 is a real name of a user, the data storage structure includes a third user and a fourth user, the nickname of the third user is an acd, the real name of the fourth user is a bcd, the visible d node is a target node corresponding to the nickname of the third user, and is a target node corresponding to the real name of the fourth user, so that, when the nickname of a certain user is known to be an acd, the user feature stored in field2 is a real name of the user, the d node can be determined, but at this time, the nickname node stores ID information of the third user and the fourth user, and thus, the nickname node cannot be determined, the nickname can be further stored in the specific form of the application, and thus the user can not be stored in the specific form of the specific information (for example, the user can be stored in the form of the user+the specific information is the specific information, the user can be stored in the form of the specific name of the corresponding to the nickname of the specific name of the third user, and the user can be stored in the specific information, and the specific name can be stored in the specific form, and the specific information can be stored in the specific name, and the specific information can be stored in the specific form: when the identity information of two users stored in the d node is (uid1+field 1) and (uid3+field 2), and when the nickname of a certain user is known to be acd, the d node can be determined to be a target node by searching in the dictionary tree below the nickname, at this time, the two identity information in the d node are (uid1+field 1) and (uid3+field 2), and since the identity information stored in the d node is represented by the unique information stored in the d node and the unique information found according to the nickname feature at this time, the identity information uid3 corresponding to the real name can be excluded, and the identity information corresponding to the nickname can be determined as the unique information, so that the ID information of the user can be accurately found according to the personal information of the user.
The identity information (uid+field) may be stored in a list structure, for example, for each node in the data layer, the following definition may be given:
public class TrieNode{
public String s;
public List<TrieNode>subNodeList;
public List<String>fields;
}
specifically, the user information of the application platform is stored by using the data storage structure, and when only a certain personal information (such as a nickname or a real name) of the user is known, the ID of the user can be accurately searched.
Optionally, in the case of M, etc. 2, each root node in the first layer of the dictionary tree structure correspondingly stores one piece of user identity information, where each root node in the first layer has a mapping relationship with at least one root node in the second layer.
Referring to fig. 1, the IDs of all users of the application platform may be stored in a first layer of the data storage structure, specifically, a plurality of root nodes may be set in the first layer of the data storage structure, an ID of a user is correspondingly stored in each root node in the first layer, and a mapping relationship between the ID of each user in the first layer and personal information of the user in the second layer is established, so that a background administrator can conveniently check which personal information is stored in any user in the data storage platform, for example, the root node of the user ID in the first layer is uid3, and mapping relationships with field1, field2, field3 and field4 in the second layer exist, and field1, field2, field3 and field4 respectively represent the real name, account name, identification number and mobile phone number of the user. The first layer root node and the second layer root node may be established based on personal settings of the user when the user creates a personal account, or may be established based on modification of personal information by the user in the process of using the application platform.
Referring to fig. 2, fig. 2 is a search method provided in an embodiment of the present application, which is applied to the above data storage structure, where the first data includes a first user feature, and the search method includes:
step 201, receiving a feature value corresponding to the first user feature, wherein the feature value comprises at least one node value;
step 202, traversing the dictionary tree with the root node of the first user feature as a starting point according to the feature value to determine a first target node corresponding to the first user feature;
step 203, obtaining user identity information in the first target node.
In the embodiment of the present application, the specific structure and the technical effects of implementation of the data storage structure are the same as those of the above embodiment, and are not described herein again for avoiding repetition.
The first data including the first user characteristic may be understood as: the first user feature is stored in one of the root nodes in the M-th layer, wherein the first user feature may be personal information such as a nickname and a real name of the user, and the retrieval method provided by the embodiment of the application is further described by taking the first user feature as an example of the nickname of the user.
The receiving of the feature value corresponding to the first user feature may be understood as: the specific value may be a characteristic value input by the user, and when the identity information of the user needs to be searched through the nickname of the user, the nickname of the user is received, for example, the nickname of the user is called acd, the nickname of the user is stored in the root node where field1 is located, the acd is received as a search condition, and searching is performed in the child node below the root node where field1 is located. The characteristic value includes at least one of the node values, which in this embodiment can be understood as: the characteristic value of the nickname characteristic of the user is acd, which comprises three node values, namely a, c and d, and when specific retrieval is performed, the node d is quickly retrieved as a target node according to the three node values in the nickname of the user in sequence in the dictionary tree below the root node where field1 is located.
Optionally, in case at least two of said user identity information are included in said first target node, and said at least two user identity information correspond to different ones of said user characteristics respectively,
the obtaining the user identity information in the first target node includes:
first user identity information in a first target node is acquired, wherein the first user identity information comprises identification information for identifying the first user feature.
In the embodiment of the present application, the technical scheme and the achieved technical effect about the identification information are the same as those of the above embodiment about the identification information, and are not repeated here.
Referring to fig. 3, fig. 3 is a flowchart of a data storage method according to an embodiment of the present application, where, as shown in fig. 3, the data storage method includes:
step 301, storing first data in an mth layer of a dictionary tree structure, wherein the mth layer comprises at least two root nodes, and each root node correspondingly stores different first data;
step 302, storing second data in a data layer of the dictionary tree structure, wherein the data layer comprises at least one sub-node, each sub-node correspondingly stores second data, and all of an M+1th layer to an N layer of the dictionary tree structure are the data layers;
the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1.
The specific implementation manner of the data storage method provided by the embodiment of the present application is already described in the foregoing data storage structure embodiment, and reference should be made to the description in the foregoing data storage structure embodiment correspondingly, so that the data storage method provided by the embodiment of the present application is understood, and will not be repeated here.
Optionally, the first data comprises a user characteristic and the second data comprises a node value;
at least one child node in the data layer is a target node, each different user characteristic corresponds to at least one target node, and second data stored in the target node further comprises user identity information;
and the user identity information stored in each target node corresponds to the user characteristics corresponding to the target node.
Optionally, in the case that the target node includes at least two pieces of user identity information, and the at least two pieces of user identity information respectively correspond to different user features, the second data in the target node further includes identification information, and each piece of user identity information is stored in association with one piece of identification information;
the identification information is used for identifying the user characteristics corresponding to the identity information.
Optionally, in the case of M, etc. 2, each root node in the first layer of the dictionary tree structure correspondingly stores one piece of user identity information, where each root node in the first layer has a mapping relationship with at least one root node in the second layer.
Referring to fig. 4, fig. 4 is a terminal device 400 provided in an embodiment of the present application, where the terminal device 400 includes:
a receiving module 401, configured to receive a feature value corresponding to the first user feature, where the feature value includes at least one node value;
a retrieving module 402, configured to traverse the dictionary tree with a root node where the first user feature is located as a starting point according to the feature value, so as to determine a first target node corresponding to the first user feature;
an obtaining module 403, configured to obtain user identity information in the first target node.
The specific implementation manner of the terminal device provided by the embodiment of the present application is already described in detail in the foregoing embodiment of the search method, and please refer to the description in the foregoing embodiment of the search method correspondingly, so that the terminal device provided by the embodiment of the present application is understood, and in order to avoid repetition, a detailed description is omitted herein.
Optionally, in case at least two of said user identity information are included in said first target node, and said at least two user identity information correspond to different ones of said user characteristics respectively,
the obtaining the user identity information in the first target node includes:
first user identity information in a first target node is acquired, wherein the first user identity information comprises identification information for identifying the first user feature.
The embodiment of the application also provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program realizes each process of the searching method of any one of the method embodiments when being executed by the processor, or realizes each process of the data storing method of any one of the method embodiments when being executed by the processor, and can achieve the same technical effect, and the repetition is avoided, and the description is omitted here.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements each process of the above-mentioned search method, and can achieve the same technical effects, so that repetition is avoided, and no further description is provided herein. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
Referring to fig. 5, fig. 5 is a block diagram of a terminal device according to an embodiment of the present application, where the terminal device shown in fig. 5 includes: a processor 501, a memory 502 and a computer program stored in said memory 502 and executable on said processor, the individual components in the terminal device being coupled together by a bus interface 503, said computer program realizing the following steps when executed by said processor 501:
receiving a feature value corresponding to the first user feature, the feature value comprising at least one of the node values;
traversing the dictionary tree by taking the root node of the first user characteristic as a starting point according to the characteristic value so as to determine a first target node corresponding to the first user characteristic;
and acquiring user identity information in the first target node.
Optionally, in case at least two of said user identity information are included in said first target node, and said at least two user identity information correspond to different ones of said user characteristics respectively,
the obtaining the user identity information in the first target node includes:
first user identity information in a first target node is acquired, wherein the first user identity information comprises identification information for identifying the first user feature.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present application.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (6)

1. The retrieval method is characterized by being applied to a data storage structure, wherein the data storage structure comprises a dictionary tree, an Mth layer of the dictionary tree is a root node layer, and all of an M+1 layer to an N layer of the dictionary tree are data layers; the root node layer comprises at least two root nodes, and each root node correspondingly stores different first data; the data layer comprises at least one sub-node, and each sub-node correspondingly stores second data; the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1; the first data includes user characteristics and the second data includes node values; at least one child node in the data layer is a target node, each different user characteristic corresponds to at least one target node, and second data stored in the target node further comprises user identity information; the user identity information stored in each target node corresponds to the user characteristics corresponding to the target node;
the first data includes a first user characteristic, and the retrieval method includes:
receiving a feature value corresponding to the first user feature, the feature value comprising at least one of the node values;
traversing the dictionary tree by taking the root node of the first user characteristic as a starting point according to the characteristic value so as to determine a first target node corresponding to the first user characteristic;
and acquiring user identity information in the first target node.
2. The method according to claim 1, wherein in case at least two of said user identity information are included in said first target node and said at least two user identity information correspond to different ones of said user characteristics respectively,
the obtaining the user identity information in the first target node includes:
first user identity information in a first target node is acquired, wherein the first user identity information comprises identification information for identifying the first user feature.
3. A method of data storage, comprising:
storing first data in an M layer of a dictionary tree structure, wherein the M layer comprises at least two root nodes, and each root node correspondingly stores different first data;
storing second data in a data layer of the dictionary tree structure, wherein the data layer comprises at least one sub-node, one second data is correspondingly stored in each sub-node, and the M+1th layer to the N th layer of the dictionary tree structure are all the data layers;
the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1;
the first data includes user characteristics and the second data includes node values;
at least one child node in the data layer is a target node, each different user characteristic corresponds to at least one target node, and second data stored in the target node further comprises user identity information;
and the user identity information stored in each target node corresponds to the user characteristics corresponding to the target node.
4. The terminal equipment is characterized by being applied to a data storage structure, wherein the data storage structure comprises a dictionary tree, an Mth layer of the dictionary tree is a root node layer, and all of an M+1 layer to an N layer of the dictionary tree are data layers; the root node layer comprises at least two root nodes, and each root node correspondingly stores different first data; the data layer comprises at least one sub-node, and each sub-node correspondingly stores second data; the data storage type of the root node is a character string, the data storage type of the child node is a single character, M is 1 or 2, and N is an integer greater than or equal to M+1; the first data includes user characteristics and the second data includes node values; at least one child node in the data layer is a target node, each different user characteristic corresponds to at least one target node, and second data stored in the target node further comprises user identity information; the user identity information stored in each target node corresponds to the user characteristics corresponding to the target node; the terminal device includes:
the receiving module is used for receiving a characteristic value corresponding to the first user characteristic, wherein the characteristic value comprises at least one node value;
the retrieval module is used for traversing the dictionary tree by taking the root node of the first user characteristic as a starting point according to the characteristic value so as to determine a first target node corresponding to the first user characteristic;
and the acquisition module is used for acquiring the user identity information in the first target node.
5. A terminal device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor carries out the steps of the method according to any one of claims 1 to 2 or 3.
6. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the method according to any of claims 1 to 2 or 3.
CN201911411743.7A 2019-12-31 2019-12-31 Data storage structure, retrieval method, data storage method and terminal equipment Active CN113127692B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911411743.7A CN113127692B (en) 2019-12-31 2019-12-31 Data storage structure, retrieval method, data storage method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911411743.7A CN113127692B (en) 2019-12-31 2019-12-31 Data storage structure, retrieval method, data storage method and terminal equipment

Publications (2)

Publication Number Publication Date
CN113127692A CN113127692A (en) 2021-07-16
CN113127692B true CN113127692B (en) 2023-08-18

Family

ID=76770159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911411743.7A Active CN113127692B (en) 2019-12-31 2019-12-31 Data storage structure, retrieval method, data storage method and terminal equipment

Country Status (1)

Country Link
CN (1) CN113127692B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713273A (en) * 2016-11-23 2017-05-24 中国空间技术研究院 Protocol keyword identification method based on lexicographic tree pruning search
CN107590258A (en) * 2017-09-20 2018-01-16 杭州安恒信息技术有限公司 Keyword match method and device
CN107862026A (en) * 2017-10-31 2018-03-30 北京小度信息科技有限公司 Date storage method and device, data query method and device, electronic equipment
CN108154024A (en) * 2017-12-20 2018-06-12 北京奇艺世纪科技有限公司 A kind of data retrieval method, device and electronic equipment
RU2017140974A3 (en) * 2017-11-24 2019-05-24
CN110222238A (en) * 2019-04-30 2019-09-10 上海交通大学 The querying method and system of character string and identifier biaxial stress structure

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9754050B2 (en) * 2012-02-28 2017-09-05 Microsoft Technology Licensing, Llc Path-decomposed trie data structures
US9547830B2 (en) * 2013-05-07 2017-01-17 Wise.Io, Inc. Scalable, memory-efficient machine learning and prediction for ensembles of decision trees for homogeneous and heterogeneous datasets

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713273A (en) * 2016-11-23 2017-05-24 中国空间技术研究院 Protocol keyword identification method based on lexicographic tree pruning search
CN107590258A (en) * 2017-09-20 2018-01-16 杭州安恒信息技术有限公司 Keyword match method and device
CN107862026A (en) * 2017-10-31 2018-03-30 北京小度信息科技有限公司 Date storage method and device, data query method and device, electronic equipment
RU2017140974A3 (en) * 2017-11-24 2019-05-24
CN108154024A (en) * 2017-12-20 2018-06-12 北京奇艺世纪科技有限公司 A kind of data retrieval method, device and electronic equipment
CN110222238A (en) * 2019-04-30 2019-09-10 上海交通大学 The querying method and system of character string and identifier biaxial stress structure

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
软件实验DNA k-mer index四字链表字典树检索算法;王辉;于立君;张旭;高菁;魏智红;;实验室科学(01);全文 *

Also Published As

Publication number Publication date
CN113127692A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN109064031B (en) Project affiliate credit evaluation method based on block chain, block chain and storage medium
US20180089243A1 (en) Bloom filter index for device discovery
CN106815226A (en) Text matching technique and device
CN110201393A (en) Configuration data storage method and device and electronic equipment
CN113031951B (en) Menu generation method, menu generation device, computer equipment and storage medium
CN108154024A (en) A kind of data retrieval method, device and electronic equipment
CN114880522A (en) Method and device for realizing ID Mapping based on graph database
CN111026765A (en) Dynamic processing method, equipment, storage medium and device for strictly balanced binary tree
CN115189914A (en) Application Programming Interface (API) identification method and device for network traffic
CN108648017B (en) User requirement matching method, device, equipment and storage medium easy to expand
CN108696418B (en) Privacy protection method and device in social network
CN109614521A (en) A kind of efficient secret protection subgraph inquiry processing method
CN113127692B (en) Data storage structure, retrieval method, data storage method and terminal equipment
CN108076032A (en) A kind of abnormal behaviour user identification method and device
CN106959903A (en) Trap instruction Trap processing method and processing device
CN102932239A (en) Communication method and system in instant communication platform
CN114331167B (en) Method, system, medium and equipment for managing champion challenger strategy
US20180039712A1 (en) Systems and methods for matching users
CN107545004A (en) The method, apparatus and search engine system of a kind of search
CN110457600B (en) Method, device, storage medium and computer equipment for searching target group
CN116263770A (en) Method, device, terminal equipment and medium for storing business data based on database
JP6123372B2 (en) Information processing system, name identification method and program
US9281994B2 (en) Processing algebraic expressions for keyed data sets
CN112257111A (en) Dynamic numerical value desensitization method, device and storage medium
CN110569362B (en) Ontology instantiation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant