CN107577787B - Method and system for storing associated data information - Google Patents

Method and system for storing associated data information Download PDF

Info

Publication number
CN107577787B
CN107577787B CN201710833443.2A CN201710833443A CN107577787B CN 107577787 B CN107577787 B CN 107577787B CN 201710833443 A CN201710833443 A CN 201710833443A CN 107577787 B CN107577787 B CN 107577787B
Authority
CN
China
Prior art keywords
data information
user
record
type
type table
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
CN201710833443.2A
Other languages
Chinese (zh)
Other versions
CN107577787A (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.)
Guangdong Infinite Information Technology Co Ltd
Original Assignee
Guangdong Infinite Information 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 Guangdong Infinite Information Technology Co Ltd filed Critical Guangdong Infinite Information Technology Co Ltd
Priority to CN201710833443.2A priority Critical patent/CN107577787B/en
Publication of CN107577787A publication Critical patent/CN107577787A/en
Application granted granted Critical
Publication of CN107577787B publication Critical patent/CN107577787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method and a system for storing associated data information. The method comprises the following steps: acquiring a plurality of data information to be associated to the same user, identifying the data type of each data information, and determining a type table corresponding to each data type; traversing the corresponding type table, and inquiring whether each type table contains a record of the data information to be associated of the corresponding type; updating a preset ID table and a preset type table according to the query result, so that the plurality of data information are associated to the same user in the updated ID table and the updated type table; and the ID table and the type table are pre-established key-value tables. The invention can solve the problem of low efficiency of the storage of the associated data information.

Description

Method and system for storing associated data information
Technical Field
The invention relates to the technical field of databases, in particular to a method, a system, a storage medium and computer equipment for storing associated data information.
Background
In the database, when there are a plurality of associated identification information, for example, there are a plurality of identity associations for an individual, a connected graph needs to be processed. When the traditional database stores the connected graph, a large amount of multi-table association operation needs to be carried out, so that the efficiency of storing the associated data information in a warehouse is low.
Disclosure of Invention
Based on the method and the system for storing the associated data information, the problem of low efficiency of storing the associated data information can be solved.
The scheme of the invention comprises the following steps:
a method for storing associated data information comprises the following steps:
acquiring a plurality of data information to be associated to the same user, identifying the data type of each data information, and determining a type table corresponding to each data type;
traversing the corresponding type table, and inquiring whether each type table contains a record of the data information to be associated of the corresponding type;
updating a preset ID table and a preset type table according to the query result, so that the plurality of data information are associated to the same user in the updated ID table and the updated type table;
the ID table and the type table are pre-established key-value tables; the ID table is globally unique and is used for storing all users and all data information related to each user; the type table is in one-to-one correspondence with the data types contained in the ID table.
A system for associating data information for storage, comprising:
the data identification module is used for acquiring a plurality of data information to be associated to the same user, identifying the data type of each data information, and determining a type table corresponding to each data type;
the query module is used for traversing the corresponding type tables and querying whether each type table contains the record of the data information to be associated of the corresponding type;
the data storage module is used for updating a preset ID table and a preset type table according to the query result, so that the plurality of data information are associated to the same user in the updated ID table and the updated type table;
the ID table and the type table are pre-established key-value tables; the ID table is globally unique and is used for storing all users and all data information related to each user; the type table is in one-to-one correspondence with the data types contained in the ID table.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method when executing the program.
According to the technical scheme, a plurality of data information to be associated to the same user are obtained, the data type of each data information is identified, and a type table corresponding to each data type is determined; traversing the corresponding type table, and inquiring whether each type table contains a record of the data information to be associated of the corresponding type; updating a preset ID table and a preset type table according to the query result, so that the plurality of data information are associated to the same user in the updated ID table and the updated type table; the ID table and the type table are pre-established key-value tables; the ID table is globally unique and is used for storing all users and all data information related to each user; the type table is in one-to-one correspondence with the data types contained in the ID table.
Drawings
FIG. 1 is a schematic flow chart diagram of a method of associating data information for warehousing according to an embodiment;
FIG. 2 is a diagram illustrating an application scenario of a method for storing associated data information according to an embodiment;
FIG. 3 is a diagram illustrating an application scenario of a method for storing associated data information according to another embodiment;
fig. 4 is a schematic structural diagram of a system for storing associated data information according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Although the steps in the present invention are arranged by using reference numbers, the order of the steps is not limited, and the relative order of the steps can be adjusted unless the order of the steps is explicitly stated or other steps are required for the execution of a certain step.
Fig. 1 is a schematic flow chart of a method for storing associated data information according to an embodiment. As shown in fig. 1, the method for storing the associated data information includes the steps of:
s11, acquiring a plurality of data information to be associated to the same user, identifying the data type of each data information, and determining a type table corresponding to each data type;
wherein, the plurality of data information refers to data information needing to be associated to the same user. Optionally, the data types of the plurality of data information to be warehoused include: at least one of a mailbox, a phone number, a social account number.
S12, traversing the corresponding type table, and inquiring whether each type table contains the record of the data information to be associated of the corresponding type;
s13, updating a preset ID table and a preset type table according to the query result, so that the plurality of data information are associated to the same user in the updated ID table and the updated type table;
the ID table and the type table are pre-established key-value tables; the ID table is globally unique (namely unique in a database where the ID table is located) and is used for storing all users and all data information related to each user; the type table corresponds to the data types contained in the ID table one by one, that is, one type of data information corresponds to one type table, for example, data information of mailbox type corresponds to one type table, and data information of telephone number type corresponds to another type table.
In the key-value table, the most basic unit is a column (column), one or more columns constitute one row (row), and storage is determined by a unique row key (row key). There are many rows in a key-value table, there may be many versions in each column, there are different values stored in each Cell (Cell); the row key is unique and appears only once in a key-value table, otherwise the same row is updated.
A row consists of several columns, some of which may in turn constitute a column family, all columns of a column family being stored in the same underlying storage file. The columns need to be well defined at the time of creating the table, and the number of columns should not be too large. The column family name is composed of printable characters and the columns need not be defined when creating the table. The names of the qualifiers (i.e., column names) in the same column family should be unique, otherwise the number of columns is not limited in updating the same column. Nor are column values defined by type and length.
It should be noted that the database for warehousing in the above embodiment is a key-value type database, such as HBase, Cassandra, Dynamic, and the like.
In one embodiment, in the ID table, Rowkey is a user ID, and a column cluster includes data information and a weight. In the type table, Rowkey is data information, and a column cluster includes a user ID and a weight.
In a specific situation, in the database of the user ID information, there is only one ID table in the global, all IDs of one user are stored, the table name may be an icid, there are multiple type tables, there will be one table recording related information for one type of ID information, and the table name may be: and the icid _ email (the email can be other identity identifiers) stores the user ID corresponding to the identity identifier. Correspondingly, the ID table and the type table can be respectively shown in table 1 and table 2:
table 1:
Figure BDA0001409214420000051
table 2:
Figure BDA0001409214420000052
further, after updating the preset ID table and the type table according to the query result so that the plurality of pieces of data information are associated with the same user in the updated ID table and the updated type table, the method further includes: and acquiring the updating information of the ID table and the type table, and writing the updating information into a corresponding change history table. The change history table is a pre-established key-value table, and the change history table is in one-to-one correspondence with data types contained in the ID table, namely the number of the change history table is consistent with the number of the type tables in the database.
In an embodiment, in the change history table, Rowkey is first data information, and a column cluster includes second data information and a weight associated with the first data information. In the above specific case, by using the change history table for recording the associated modification history of the user identity information, one type of the identity identifier has a change history table, and the table name may be: icid _ email _ his (email may be other identity), for example as shown in table 3.
Table 3:
in an embodiment, if the data information includes first data information and second data information, the first data information and the second data information respectively correspond to a first type table and a second type table; in step S13, the preset ID table and type table are updated according to the query result, so that the multiple pieces of data information are associated with the same user in the updated ID table and type table, and the specific implementation manner may include:
if the first type table contains a record of first data information and the second type table contains a record of second data information, identifying a first user ID of a corresponding record in the first type table, identifying a second user ID of a corresponding record in the second type table, detecting whether the first user ID and the second user ID are consistent, if not, storing column data corresponding to the second user ID in the ID table into a column corresponding to the first user ID, deleting the record corresponding to the original second user ID in the ID table, and changing the second user ID in the second type table into the first user ID;
if the first type table contains a record of first data information and the second type table does not contain a record of second data information, identifying a first user ID of a corresponding record in the first type table, storing the second data information into a column corresponding to the first user ID in the ID table, and adding a record of the association relationship between the second data information and the first user ID in the second type table;
if the first type table does not contain a record of first data information and the second type table contains a record of second data information, identifying a second user ID corresponding to the record in the second type table, storing the first data information into a column corresponding to the second user ID in the ID table, and adding a record of the association relationship between the first data information and the second user ID in the first type table;
if the first type table does not contain a record of first data information, and the second type table does not contain a record of second data information, adding a record of a new user ID in the ID table, storing the first data information and the second data information into a column corresponding to the new user ID, adding a record of the association relationship between the first data information and the new user ID in the first type table, and adding a record of the association relationship between the second data information and the new user ID in the second type table.
Referring to fig. 2, when the data information required by the user to be associated with the database includes mailbox information a @ a.com and mobile phone number information 139 × 0101, the mailbox information and the mobile phone number information respectively correspond to a mailbox table and a mobile phone table; and the mailbox information a @ a.com and the mobile phone number information 139X 0101 both need to be associated with a user ID of X. Then, traversing the mailbox table and the mobile phone table according to the mailbox information and the mobile phone number information,
if the mailbox table contains a record of a @ a.com, the mobile phone table contains a record of 139X 0101, a first user ID corresponding to the record in the mailbox table is identified, a second user ID corresponding to the record in the mobile phone table is identified, whether the first user ID and the second user ID are consistent is detected, if the first user ID is X, the second user ID is not X and is Y, column data corresponding to Y in the ID table is stored in a column corresponding to X, the record corresponding to Y in the ID table is deleted, and Y in the mobile phone table is changed into X;
if the mailbox table contains a record of a @ a.com, no record of 139 × × 0101 exists in the mobile phone table, a first user ID of a corresponding record in the mailbox table is identified, if the user ID is X, the 139 × 0101 is stored in a column corresponding to X in the ID table, and records of 139 × 0101 and an association relation of X are added in the mobile phone table; if the first user ID is not X (for example, Z), the user ID needs to be changed, Z in the mailbox table is changed to X, Z in the ID table is changed to X, and the 139 × 0101 information is added to the column corresponding to X. In addition, a row can be added in the change history table, and the association information of a @ a.com and 139 x 0101 and the time stamp established by the association information are recorded.
If the mailbox table does not have a @ a.com record, the mobile phone table contains 139X 0101 records, a second user ID corresponding to the records in the mobile phone table is identified, if the second user ID is X, a @ a.com is stored in a column corresponding to X in the ID table, and a @ a.com and X association relation records are added in the mailbox table; if the second user ID is not X (for example, Y), the user ID needs to be changed, Y in the mobile phone table is changed into X, Y in the ID table is changed into X, and the a @ a.com information is added to the column corresponding to X. In addition, a row can be added in the change history table, and the association information between 139 × 0101 and a @ a.com and the time stamp established by the association information are recorded.
If the mailbox table does not have a @ a.com record, and the mobile phone table does not have a 139X 0101 record, adding a new user ID (namely, X) record in the ID table, storing the a @ a.com and 139X 0101 records in a column corresponding to the new user ID, adding a @ a.com and X association relation records in the mailbox table, and adding 139X 0101 and X association relation records in the mobile phone table. In addition, a row can be added in the change history table, and the association information between 139 × 0101 and a @ a.com and the time stamp established by the association information are recorded.
For example, the flow in fig. 2 can achieve the purpose of rapidly warehousing the associated data, and 260 matching relationships can be warehoused in 1 second in the test environment. Furthermore, the above process may be added to the optimization, a batch processing manner is adopted, the communication cost is reduced, and in the process optimization, after traversing the corresponding type table and querying whether each type table contains the record of the data information to be associated of the corresponding type, the method further includes: creating a first queue, a second queue and a change queue, and storing the data information of the first data type and the associated user ID information which are inquired in a storage mode into the pre-established first queue in batches; storing the inquired data information of the second data type and the associated user ID information thereof to a pre-established second queue in batches; storing user ID information to be changed to a pre-established change queue in batches; updating the ID table and the type table through the first queue, the second queue and/or the change queue. The specific optimization process can be shown in fig. 3, and includes the steps of:
acquiring mailbox information to be warehoused and corresponding Uuid in batches, and acquiring Uuid corresponding to mobile phone information to be warehoused in batches; creating a first queue, a second queue and a change queue; caching mailbox information and a corresponding Uuid into a first queue, and caching the Uuid corresponding to mobile phone information into a second queue; traversing the mailbox table and the mobile phone table according to the flow shown in FIG. 2; determine if a user ID change is required? If not, updating the mailbox table, the mobile phone table and the ID table according to the first queue and the second queue; if yes, caching the ID information of the user needing to be changed into a change queue, and updating the mailbox table, the mobile phone table and the ID table according to the first queue, the second queue and the change queue.
After optimization, 5000 matching relations can be put in a warehouse in the same environment within 1 second, and the efficiency is improved by about 20 times.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention.
By the method for storing the associated data information in the embodiment and the method for storing the connected graph in the key-value mode, the speed of storing the associated data information is improved, the speed is dozens of times, and historical operation query can be provided.
Based on the same idea as the method for storing the associated data information in the embodiment, the present invention further provides a system for storing the associated data information, which can be used to execute the method for storing the associated data information. For convenience of description, in the structural schematic diagram of the embodiment of the system for associating data information storage, only the part related to the embodiment of the present invention is shown, and those skilled in the art will understand that the illustrated structure does not constitute a limitation to the system, and may include more or less components than those illustrated, or combine some components, or arrange different components.
Fig. 4 is a schematic structural diagram of a system for storing associated data information according to an embodiment of the present invention. As shown in fig. 4, the system for storing the associated data information includes:
the data identification module 410 is configured to acquire multiple pieces of data information to be associated with the same user, identify a data type of each piece of data information, and determine a type table corresponding to each data type; the data information is associated with the same user;
the query module 420 is configured to traverse the corresponding type table, and query whether each type table includes a record of the data information to be associated of the corresponding type;
the data entry module 430 is configured to update a preset ID table and a preset type table according to the query result, so that the plurality of pieces of data information are associated with the same user in the updated ID table and the updated type table;
the ID table and the type table are pre-established key-value tables; the ID table is globally unique and is used for storing all users and all data information related to each user; the type table is in one-to-one correspondence with the data types contained in the ID table.
In one embodiment, in the type table, Rowkey is data information, and a column cluster includes a user ID and a weight; in the change history table, Rowkey is first data information, and a column cluster includes second data information and a weight associated with the first data information.
In an embodiment, the system for storing the associated data information further includes:
the change recording module is used for acquiring the update information of the ID table and the type table and writing the update information into a corresponding change history table;
the change history table is a pre-established key-value table, and the change history table is in one-to-one correspondence with data types contained in the ID table. In the ID table, Rowkey is a user ID, and the column cluster comprises data information and weight;
in an embodiment, if the data information includes first data information and second data information, the first data information and the second data information respectively correspond to a first type table and a second type table; a data warehousing module 430 for: if the first type table contains a record of first data information and the second type table contains a record of second data information, identifying a first user ID of a corresponding record in the first type table, identifying a second user ID of a corresponding record in the second type table, detecting whether the first user ID and the second user ID are consistent, if not, storing column data corresponding to the second user ID in the ID table into a column corresponding to the first user ID, deleting the record corresponding to the original second user ID in the ID table, and changing the second user ID in the second type table into the first user ID;
if the first type table contains a record of first data information and the second type table does not contain a record of second data information, identifying a first user ID of a corresponding record in the first type table, storing the second data information into a column corresponding to the first user ID in the ID table, and adding a record of the association relationship between the second data information and the first user ID in the second type table;
if the first type table does not contain a record of first data information and the second type table contains a record of second data information, identifying a second user ID corresponding to the record in the second type table, storing the first data information into a column corresponding to the second user ID in the ID table, and adding a record of the association relationship between the first data information and the second user ID in the first type table;
if the first type table does not contain a record of first data information, and the second type table does not contain a record of second data information, adding a record of a new user ID in the ID table, storing the first data information and the second data information into a column corresponding to the new user ID, adding a record of the association relationship between the first data information and the new user ID in the first type table, and adding a record of the association relationship between the second data information and the new user ID in the second type table.
In an embodiment, the data warehousing module 430 includes a queue management unit, configured to store the queried data information of the first data type and the associated user ID information in batch to a pre-established first queue; storing the inquired data information of the second data type and the associated user ID information thereof to a pre-established second queue in batches; storing user ID information to be changed to a pre-established change queue in batches; the data warehousing module 430 updates the ID table and the type table through the first queue, the second queue, and/or the change queue.
It should be noted that, in the implementation of the system for storing associated data information in a database in the foregoing example, because the contents of information interaction, execution process, and the like between the modules/units are based on the same concept as the foregoing method embodiment of the present invention, the technical effect brought by the contents is the same as the foregoing method embodiment of the present invention, and specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
In addition, in the above-mentioned embodiment of the system for storing associated data information, the logical division of each program module is only an example, and in practical applications, the above-mentioned function distribution may be completed by different program modules according to needs, for example, due to the configuration requirements of corresponding hardware or the convenience of implementation of software, that is, the internal structure of the system for storing associated data information is divided into different program modules to complete all or part of the above-described functions.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which is stored in a computer readable storage medium and sold or used as a stand-alone product. The program, when executed, may perform all or a portion of the steps of the embodiments of the methods described above. In addition, the storage medium may be provided in a computer device, and the computer device further includes a processor, and when the processor executes the program in the storage medium, all or part of the steps of the embodiments of the methods described above can be implemented. The storage medium may be a magnetic disk, an optical disk, a Read-only Memory (ROM), a Random Access Memory (RAM), or the like.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. It will be understood that the terms "first," "second," and the like as used herein are used herein to distinguish one object from another, but the objects are not limited by these terms.
The above-described examples merely represent several embodiments of the present invention and should not be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for storing associated data information is characterized by comprising the following steps:
acquiring a plurality of data information to be associated to the same user, identifying the data type of each data information, and determining a type table corresponding to each data type;
traversing the corresponding type table, and inquiring whether each type table contains a record of the data information to be associated of the corresponding type;
updating a preset ID table and a preset type table according to the query result, so that the plurality of data information are associated to the same user in the updated ID table and the updated type table;
acquiring the updating information of the ID table and the type table, and writing the updating information into a corresponding change history table;
the ID table and the type table are pre-established key-value tables; the ID table is globally unique and is used for storing all users and all data information related to each user; the type table corresponds to the data types contained in the ID table one by one;
the change history table is a pre-established key-value table, and the change history table is in one-to-one correspondence with the data types contained in the ID table; in the change history table, Rowkey is first data information, and a column cluster includes second data information and a weight associated with the first data information.
2. The method of associating data information warehousing of claim 1,
in the ID table, Rowkey is a user ID, and the column cluster comprises data information and weight;
in the type table, Rowkey is data information, and a column cluster includes a user ID and a weight.
3. The method for associating data information with a database according to claim 1 or 2, wherein if the data information includes first data information and second data information, the data types of the first data information and the second data information respectively correspond to the first type table and the second type table;
the updating a preset ID table and a preset type table according to the query result so that the plurality of data information are associated to the same user in the updated ID table and the updated type table comprises the following steps:
if the first type table contains a record of the first data information, the second type table contains a record of the second data information; identifying a first user ID corresponding to a record in the first type table, and identifying a second user ID corresponding to a record in the second type table; if the first user ID and the second user ID are not consistent, storing column data corresponding to the second user ID in the ID table into a column corresponding to the first user ID, deleting a record corresponding to the second user ID in the ID table, and changing the second user ID in the second type table into the first user ID;
if the first type table contains the record of the first data information and the second type table does not contain the record of the second data information, identifying a first user ID of the corresponding record in the first type table; storing the second data information to a column corresponding to the first user ID in the ID table, and adding a record of the incidence relation between the second data information and the first user ID in the second type table;
if the first type table does not contain a record of first data information, the second type table contains a record of second data information, a second user ID corresponding to the record in the second type table is identified, the first data information is stored in a column corresponding to the second user ID in the ID table, and a record of the association relationship between the first data information and the second user ID is added in the first type table;
if the first type table does not contain a record of first data information, the second type table does not contain a record of second data information, a record of a new user ID is added in the ID table, the first data information and the second data information are stored in a column corresponding to the new user ID, a record of the incidence relation between the first data information and the new user ID is added in the first type table, and a record of the incidence relation between the second data information and the new user ID is added in the second type table.
4. The method according to claim 3, wherein after traversing the corresponding type table and querying whether each type table contains the record of the data information to be associated of the corresponding type, the method further comprises:
storing the inquired data information of the first data type and the associated user ID information in a first queue established in advance in batches;
storing the inquired data information of the second data type and the associated user ID information thereof to a pre-established second queue in batches;
storing user ID information to be changed to a pre-established change queue in batches;
updating the ID table and the type table through the first queue, the second queue and/or the change queue.
5. The method of associating data information for warehousing as recited in claim 1, wherein the data types of the plurality of data information to be warehoused include: at least one of a mailbox, a phone number, a social account number.
6. A system for associating data information for storage, comprising:
the data identification module is used for acquiring a plurality of data information to be associated to the same user, identifying the data type of each data information, and determining a type table corresponding to each data type;
the query module is used for traversing the corresponding type tables and querying whether each type table contains the record of the data information to be associated of the corresponding type;
the data storage module is used for updating a preset ID table and a preset type table according to the query result, so that the plurality of data information are associated to the same user in the updated ID table and the updated type table;
the change recording module is used for acquiring the update information of the ID table and the type table and writing the update information into a corresponding change history table;
the ID table and the type table are pre-established key-value tables; the ID table is globally unique and is used for storing all users and all data information related to each user; the type table corresponds to the data types contained in the ID table one by one;
the change history table is a pre-established key-value table, and the change history table is in one-to-one correspondence with the data types contained in the ID table;
the change history table is a pre-established key-value table, and the change history table is in one-to-one correspondence with the data types contained in the ID table; in the change history table, Rowkey is first data information, and a column cluster includes second data information and a weight associated with the first data information.
7. The system for associating data information warehousing of claim 6, further comprising:
in the ID table, Rowkey is a user ID, and the column cluster comprises data information and weight;
in the type table, Rowkey is data information, and a column cluster includes a user ID and a weight.
8. The system for associating data information with a database according to claim 6, wherein if the data information includes first data information and second data information, the data types of the first data information and the second data information respectively correspond to the first type table and the second type table;
the data entry module is specifically configured to:
if the first type table contains a record of the first data information, the second type table contains a record of the second data information; identifying a first user ID corresponding to a record in the first type table, and identifying a second user ID corresponding to a record in the second type table; if the first user ID and the second user ID are not consistent, storing column data corresponding to the second user ID in the ID table into a column corresponding to the first user ID, deleting a record corresponding to the second user ID in the ID table, and changing the second user ID in the second type table into the first user ID;
if the first type table contains the record of the first data information and the second type table does not contain the record of the second data information, identifying a first user ID of the corresponding record in the first type table; storing the second data information to a column corresponding to the first user ID in the ID table, and adding a record of the incidence relation between the second data information and the first user ID in the second type table;
if the first type table does not contain a record of first data information, the second type table contains a record of second data information, a second user ID corresponding to the record in the second type table is identified, the first data information is stored in a column corresponding to the second user ID in the ID table, and a record of the association relationship between the first data information and the second user ID is added in the first type table;
if the first type table does not contain a record of first data information, the second type table does not contain a record of second data information, a record of a new user ID is added in the ID table, the first data information and the second data information are stored in a column corresponding to the new user ID, a record of the incidence relation between the first data information and the new user ID is added in the first type table, and a record of the incidence relation between the second data information and the new user ID is added in the second type table.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any one of claims 1 to 5 are performed when the program is executed by the processor.
CN201710833443.2A 2017-09-15 2017-09-15 Method and system for storing associated data information Active CN107577787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710833443.2A CN107577787B (en) 2017-09-15 2017-09-15 Method and system for storing associated data information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710833443.2A CN107577787B (en) 2017-09-15 2017-09-15 Method and system for storing associated data information

Publications (2)

Publication Number Publication Date
CN107577787A CN107577787A (en) 2018-01-12
CN107577787B true CN107577787B (en) 2020-02-07

Family

ID=61036111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710833443.2A Active CN107577787B (en) 2017-09-15 2017-09-15 Method and system for storing associated data information

Country Status (1)

Country Link
CN (1) CN107577787B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108803548B (en) * 2018-08-20 2021-04-20 张家港康得新光电材料有限公司 Method and device for managing parallel operation of equipment
CN109344318B (en) * 2018-10-15 2020-05-15 北京字节跳动网络技术有限公司 Method and apparatus for processing information
CN110008264B (en) * 2019-03-04 2020-12-25 广州易朋软件有限公司 Data acquisition method and device of cost accounting system
CN111683001A (en) * 2020-06-05 2020-09-18 联想(北京)有限公司 Information processing method and device and electronic equipment
CN114064705A (en) * 2021-10-19 2022-02-18 广州数说故事信息科技有限公司 User information fusion method, terminal, storage medium and system under multilayer association

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467521B (en) * 2010-11-08 2013-09-04 北大方正集团有限公司 Easily-extensible multi-level classification search method and system
CN104391948B (en) * 2014-12-01 2017-11-21 广东电网有限责任公司清远供电局 The data normalization construction method and system of data warehouse
CN105389404B (en) * 2015-12-29 2019-04-16 北京斗牛科技有限公司 A kind of method and apparatus importing data to database association table

Also Published As

Publication number Publication date
CN107577787A (en) 2018-01-12

Similar Documents

Publication Publication Date Title
CN107577787B (en) Method and system for storing associated data information
US7263520B2 (en) Fast aggregation of compressed data using full table scans
US9292554B2 (en) Thin database indexing
CN108170815B (en) Data processing method, device and storage medium
US20160328445A1 (en) Data Query Method and Apparatus
CN112434015B (en) Data storage method and device, electronic equipment and medium
CN105117442B (en) A kind of big data querying method based on probability
CN111625561B (en) Data query method and device
US20190362016A1 (en) Frequent pattern analysis for distributed systems
CN104346458A (en) Data storage method and device
US20110264703A1 (en) Importing Tree Structure
CN109388636A (en) Business datum is inserted into database method, apparatus, computer equipment and storage medium
CN103870480A (en) Dynamic data masking method and database system
CN117033424A (en) Query optimization method and device for slow SQL (structured query language) statement and computer equipment
CN108984626B (en) Data processing method and device and server
US20100191730A1 (en) Efficiency in processing queries directed to static data sets
CN109739854A (en) A kind of date storage method and device
CN107291938A (en) Order Query System and method
CN108376054B (en) Processing method and device for indexing identification data
US20150058351A1 (en) Queries for thin database indexing
CN114416741A (en) KV data writing and reading method and device based on multi-level index and storage medium
CN113742344A (en) Method and device for indexing power system data
CN114036048A (en) Case activity detection method, device, equipment and storage medium
CN113778996A (en) Large data stream data processing method and device, electronic equipment and storage medium
CN113849520A (en) Intelligent identification method and device of abnormal SQL (structured query language), electronic equipment and storage medium

Legal Events

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