CN108108436A - Date storage method, device, storage medium and electronic equipment - Google Patents

Date storage method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108108436A
CN108108436A CN201711385053.XA CN201711385053A CN108108436A CN 108108436 A CN108108436 A CN 108108436A CN 201711385053 A CN201711385053 A CN 201711385053A CN 108108436 A CN108108436 A CN 108108436A
Authority
CN
China
Prior art keywords
data
tables
row element
user
target
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.)
Granted
Application number
CN201711385053.XA
Other languages
Chinese (zh)
Other versions
CN108108436B (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201711385053.XA priority Critical patent/CN108108436B/en
Publication of CN108108436A publication Critical patent/CN108108436A/en
Application granted granted Critical
Publication of CN108108436B publication Critical patent/CN108108436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

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

Abstract

This disclosure relates to a kind of date storage method, device, storage medium and electronic equipment.The described method includes:Obtain multiple raw data tables, each row element in the associated table id of every raw data table and every raw data table corresponds to different user ID in the range of raw data table;Multiple raw data tables are converted into one and summarize tables of data, summarizing each row element in tables of data includes:User ID, table id and by each data in the row element corresponding with User ID in the raw data table associated by table id be combined processing after the data obtained;An at least target matrix is created, and every target matrix is mapped to the different mappings position in same mapping space;According to the User ID and table id for summarizing each row element in tables of data, determine target mapping position of the row element in mapping space, and the row element is stored to first object tables of data.In this way, database performance caused by can solving the problems, such as huge data volume is bad.

Description

Date storage method, device, storage medium and electronic equipment
Technical field
This disclosure relates to data processing field, and in particular, to a kind of date storage method, device, storage medium and electricity Sub- equipment.
Background technology
With the development of internet, exponential increase is presented in the data of storage.By taking online examination as an example, for each user Per a test paper, corresponding table can be created in the database, to store the script that user is filled in, in this way, each Examination paper can all create a table.In the database, the maximum length that field is added in each table is conditional, if beyond this A limitation can cause data to overflow, and cause the corrupt data of storage.
The content of the invention
The purpose of the disclosure is to provide a kind of date storage method, device, storage medium and electronic equipment.
To achieve these goals, according to the disclosure in a first aspect, providing a kind of date storage method.The method bag It includes:Multiple raw data tables are obtained, wherein, the associated table id of every raw data table, and every raw data table In each row element in the range of the raw data table correspond to different User ID;Multiple described raw data tables are converted Summarize tables of data into one, each row element summarized in tables of data includes following information:User ID, table id and will be Each data are combined institute after processing in raw data table associated by the table id, in row element corresponding with the User ID The data obtained;An at least target matrix is created, and every target matrix is mapped to same mapping space not Same mapping position;According to the User ID and table id summarized in tables of data in each row element, determine that the row element is reflected described The target mapping position in space is penetrated, and by row element storage into first object tables of data, wherein, the first object number It is reflected before being located at the target mapping position according to table for its mapping position in the mapping space and apart from the target Penetrate the nearest target matrix in position.
Optionally, the User ID and table id in tables of data in each row element are summarized described in the basis, determines the row element Target mapping position in the mapping space, including:According to the User ID summarized in tables of data in each row element and Table id will carry out Hash operation after the User ID and table id combination, and by the mapping of gained cryptographic Hash and the mapping space Total number of positions carries out complementation, target mapping position of the acquired results as the row element in the mapping space.
Optionally, it is described to store the row element into first object tables of data, including:Judge the first object data Whether the data volume stored in table has reached predetermined threshold value;When determining that the predetermined threshold value has not yet been reached, by the row element It stores in the first object tables of data.
Optionally, the method further includes:When determining to have reached the predetermined threshold value, new target data is created Table, and the new target matrix is mapped in the mapping space, the first object tables of data it is empty in the mapping Between in target mapping position in the mapping space of mapping position and the row element between mapping position;By row member Element storage is into the new target matrix.
Optionally, the method further includes:For already present each row element in the first object tables of data, according to institute Target mapping position of each row element in the mapping space is stated, each row element is stored it described again respectively Mapping position in mapping space be located at before the target mapping position of the row element in the mapping space and away from In the target matrix nearest from the target mapping position.
Optionally, the raw data table is examination paper answer data table, and each row in every raw data table corresponds to In different User ID, each row correspond to this Zhang Kaojuan Zhong Ge roads examination question, and each row element represents that corresponding user examines at this The answer for each road examination question filled in volume;The combined treatment, including:It will be in the raw data table associated by the table id In, each answer is encoded in row element corresponding with the User ID, wherein, the candidate options of examination question have N, each answer By N binary code representations, N number of candidate options and N binary codes one-to-one corresponding, and in the N binary code with answer The corresponding binary code of candidate options of middle appearance is set to 1, is set to the corresponding binary code of candidate options not occurred 0;By in the raw data table associated by the table id, in row element corresponding with the User ID each answer coding according to Examination question order is combined.
Optionally, the method further includes:Data query instruction is received, the data query instruction includes target user ID With object table ID;When receiving data query instruction, according to the target user ID and the object table ID, determine with The theoretical map position of the target user ID and the corresponding elements of the object table ID in the mapping space;According to described Theoretical map position determines the second target matrix, wherein, second target matrix is it in the mapping space Mapping position is located at before the theoretical map position and the target matrix nearest apart from the theoretical map position;Root Second target matrix is inquired about according to the target user ID and object table ID;It is deposited when in second target matrix In the data to match with the target user ID and the object table ID, the data that match described in output.
Optionally, the method further includes:It, will be in the new raw data table when getting new raw data table Information be added to it is described summarize in tables of data, wherein, the associated table id of new raw data table, and described Each row element in new raw data table corresponds to different User ID in the range of the raw data table;For the remittance Newly added each row element in total data table, performs the User ID and table summarized described in the basis in tables of data in each row element ID determines target mapping position of the row element in the mapping space, and the row element is stored to first object data In table, wherein, the first object tables of data is located at the target mapped bits for its mapping position in the mapping space Before putting and the step of the target matrix nearest apart from the target mapping position.
According to the second aspect of the disclosure, a kind of data storage device is provided.Described device includes:Acquisition module is used for Multiple raw data tables are obtained, wherein, the associated table id of every raw data table, and in every raw data table Each row element corresponds to different User ID in the range of the raw data table;Modular converter, for will described multiple are original Data table transmition summarizes tables of data into one, and each row element summarized in tables of data includes following information:User ID, table ID and will each data carry out in the raw data table associated by the table id, in row element corresponding with the User ID The data of gained after combined treatment;Creation module, for creating an at least target matrix, and by every target data Table is mapped to the different mappings position in same mapping space;Memory module, for summarizing each row element in tables of data according to In User ID and table id, determine target mapping position of the row element in the mapping space, and the row element stored Into first object tables of data, wherein, the first object tables of data is located at for its mapping position in the mapping space Before the target mapping position and the target matrix nearest apart from the target mapping position.
According to the third aspect of the disclosure, a kind of computer readable storage medium is provided, is stored thereon with computer program, The step of method that disclosure first aspect is provided is realized when the program is executed by processor.
According to the fourth aspect of the disclosure, a kind of electronic equipment is provided, including:The calculating that the disclosure third aspect is provided Machine readable storage medium storing program for executing;And one or more processor, for performing the program in the computer readable storage medium.
Through the above technical solutions, the data in database are stored according to certain regular-scattered, it is possible to reduce data Memory space, optimization data store organisation, and then database performance caused by solving the problems, such as huge data volume is bad, convenient for pair The data addition of database, data query, and the efficiency of data query, data addition etc. can be promoted.
Other feature and advantage of the disclosure will be described in detail in subsequent specific embodiment part.
Description of the drawings
Attached drawing is for providing further understanding of the disclosure, and a part for constitution instruction, with following tool Body embodiment is together for explaining the disclosure, but do not form the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is the flow chart of the date storage method provided according to an embodiment of the present disclosure.
Fig. 2A is a kind of illustrative form signal of raw data table in the date storage method provided according to the disclosure Figure.
Fig. 2 B are in the date storage method provided according to the disclosure, and the illustrative form of another kind of raw data table shows It is intended to.
Fig. 2 C are in the date storage method provided according to the disclosure, and the illustrative form of another kind of raw data table shows It is intended to.
Fig. 3 A are a kind of illustrative form signals for summarizing tables of data in the date storage method provided according to the disclosure Figure.
Fig. 3 B are in the date storage method provided according to the disclosure, and another illustrative form for summarizing tables of data shows It is intended to.
Fig. 4 is mapping position of the target matrix in mapping space in the date storage method provided according to the disclosure A kind of illustrative schematic diagram.
Fig. 5 A are the flow charts of the date storage method provided according to the another embodiment of the disclosure.
Fig. 5 B are mapping position of the target matrix in mapping space in the date storage method provided according to the disclosure The illustrative schematic diagram of another kind.
Fig. 6 is the flow chart of the date storage method provided according to the another embodiment of the disclosure.
Fig. 7 is the flow chart of the date storage method provided according to the another embodiment of the disclosure.
Fig. 8 is the block diagram of the data storage device provided according to an embodiment of the present disclosure.
Fig. 9 is the block diagram according to a kind of electronic equipment shown in an exemplary embodiment.
Specific embodiment
The specific embodiment of the disclosure is described in detail below in conjunction with attached drawing.It should be appreciated that this place is retouched The specific embodiment stated is only used for describing and explaining the disclosure, is not limited to the disclosure.
Fig. 1 is the flow chart of the date storage method provided according to an embodiment of the present disclosure.It as shown in Figure 1, should Method may comprise steps of.
In a step 101, multiple raw data tables are obtained.
Wherein, the associated table id of every raw data table, the table id associated by each raw data table is unique, and Table id unique association this raw data table.Also, each row element in every raw data table is in the raw data table In the range of correspond to different User ID, wherein, User ID and each user correspond, and each User ID is unique. Wherein, table id and User ID can be made of any character or character string.
Illustratively, raw data table can be examination paper answer data table, and each row in every raw data table corresponds to not Same User ID, each row correspond to this Zhang Kaojuan Zhong Ge roads examination question, and each row element represents corresponding user in this Zhang Kaojuan The answer for each road examination question filled in.As shown in form in Fig. 2A~Fig. 2 C, raw data table can be that certain Chinese language is examined in Fig. 2A The answer data table of volume, the Chinese language examination paper share 5 examination questions, are all the multiple-choice question that candidate options are A, B, C, D, by Fig. 2A Central Plains Beginning tables of data understand, its associated table id can be Chi, wherein Stu_1, Stu_2, Stu_3 can be User ID, Chi_01~ Chi_05 can represent Chinese language examination paper Nei Ge roads examination question, and each user such as ABD, CD, BD has filled in every a line For the answer of each road examination question of current Chinese language examination paper.Raw data table can be the answer data of certain mathematics examination paper in Fig. 2 B Table, the mathematics examination paper share 3 examination questions, are all the multiple-choice question that candidate options are A, B, C, D, can by raw data table in Fig. 2 B To know, its associated table id can be Mat, wherein, Stu_4, Stu_3, Stu_5 can be User ID, and Mat_01~Mat_03 can To represent mathematics examination paper Nei Ge roads examination question, current mathematics is directed to for what each user had filled in every a line such as AC, BD The answer of each road examination question of examination paper.In Fig. 2 C raw data table can be certain English answer to examination papers tables of data, the English examination paper 4 examination questions are shared, are all the multiple-choice question that candidate options are A, B, C, D, from raw data table in Fig. 2 C, its associated table id Can be Eng, wherein, Stu_6, Stu_9, Stu_3 can be User ID, and Eng_01~Eng_04 can represent the English examination paper Nei Ge roads examination question, each road examination question for current English examination paper often filled in a line such as BC, AB for each user Answer.
In a step 102, multiple raw data tables are converted into one and summarize tables of data.
Following information can be included by summarizing each row element in tables of data:User ID, table id and will be associated by table id Raw data table in, in row element corresponding with User ID each data be combined processing after gained data.
By taking the raw data table in Fig. 2A as an example, in tables of data is summarized, the data correspondence in the raw data table summarizes 3 rows of tables of data, the row element per a line include User ID (Stu_1, Stu_2, Stu_3), table id (Chi) and each use Treated data that whole scripts that user corresponding to the ID of family has filled in are combined.
Illustratively, said combination processing can directly store all scripts according to examination question order, and using # as every The termination mark of a script.For example, for the corresponding scripts of Stu_1, combined treatment in the raw data table of Fig. 2A Data afterwards can be ABD#CD#AD#AC#D#.In such a manner, it is each in Fig. 2A~Fig. 2 C for raw data table The situation of table, the tables of data that summarizes being converted into can be as shown in form in Fig. 3 A.
For another example said combination processing may comprise steps of:By in the raw data table associated by table id, with use Each answer is encoded in the corresponding row elements of family ID;By in the raw data table associated by table id, it is corresponding with User ID The coding of each answer is combined according to examination question order in row element.
Wherein, the candidate options of examination question have N, and each answer can be by N binary code representations, N number of candidate options and N Position binary code corresponds, and can be with the corresponding binary code of candidate options that occurs in answer in N binary codes 1 is set to, can be set to 0 with the corresponding binary code of candidate options not occurred.Illustratively, if the candidate options of examination question have 4 Item (A, B, C, D), the script that user fills in are ABD, then the corresponding coding of the script can be 1101.And right After the completion of each answer coding, answer can be combined according to examination question order.For example, in the raw data table of Fig. 2 B The corresponding scripts of Stu_3 (CD, C, A), the data after combined treatment can be 001100101000.According to such side Formula, in the case of raw data table is each table in Fig. 2A~Fig. 2 C, the tables of data that summarizes being converted into can be such as table in Fig. 3 B Shown in lattice.By this combined treatment mode, data space can be not only saved, can also be checked in answer afterwards Cheng Zhong directly determines the correctness of user's answer using logical operation, simplifies calculating process.
In step 103, an at least target matrix is created, and every target matrix is mapped to same mapping sky Between different mappings position.
Due to be converted to summarize tables of data data volume very huge, it is necessary to carry out a point list processing, tables of data will be summarized In each data disperse to store.Therefore, an at least target matrix can be created.Illustratively, the target matrix of establishment Quantity can be determined according to the data volume summarized in tables of data.Meanwhile a mapping space can be introduced, the mapping space it is every A mapping position can correspond to a storage location of memory space, wherein, memory space can be used for storing each number of targets According to the data of table.Illustratively, which can be line style mapping space.It is reflected for another example the mapping space can be annular Penetrate space.The every target matrix created can be mapped to the corresponding mapping position of the mapping space by the mapping space, Namely correspond to the different storage locations of memory space.Illustratively, as shown in figure 4, the mapping space created may have and have 1000 mapping positions (0~999) correspond to 1000 storage locations of memory space respectively, if creating 3 target matrixes, Each target matrix can as shown in Figure 4 in the mapping position of mapping space, and target matrix 1 is mapped to position 0, target Tables of data 2 is mapped to position 299, and target matrix 3 is mapped to position 699.If correspondingly, there are data to need to be stored in number of targets According in table 1, then will being stored in memory space and 0 corresponding storage location of position.
At step 104, according to the User ID and table id for summarizing each row element in tables of data, determine that the row element is mapping Target mapping position in space, and by row element storage into first object tables of data.
Wherein, before first object tables of data is located at target mapping position for its mapping position in mapping space, simultaneously And the target matrix that distance objective mapping position is nearest.Illustratively, it is if as shown in figure 4, first according to certain row in tables of data is summarized The User ID and table id of element determine that target mapping position of the row element in mapping space is position 499, then the row element Corresponding first object tables of data is target matrix 2.
In one embodiment, in step 104, according to the User ID and table id for summarizing each row element in tables of data, really Fixed target mapping position of the row element in mapping space, may comprise steps of:According to summarizing, each row in tables of data is first User ID and table id in element will carry out Hash operation after User ID and table id combination, and by gained cryptographic Hash and mapping space Mapping position sum carry out complementation, acquired results be target mapping position of the row element in mapping space.
According to the User ID and table id summarized in tables of data in a row element, can obtain by the user ID and the table id group Into character string, to the character string carry out Hash operation can obtain corresponding cryptographic Hash.In order to enable the cryptographic Hash arrived can be with The mapping space created is properly mapped to, it is necessary to which cryptographic Hash and the mapping position of mapping space sum are carried out complementation.Show Obtained cryptographic Hash and 1000 for containing the mapping space of 1000 mapping positions in Fig. 4, can be carried out remainder fortune by example ground It calculates.Complementation acquired results are target mapping position of the row element in the mapping space.
In addition, Hash operation described above is known in the art common sense, relevant technical staff in the field can obtain, This is without being described in detail.
After definite target mapping position of the row element in mapping space, in one embodiment, step 104 In, by row element storage into first object tables of data, it may comprise steps of:Judge to store in first object tables of data Data volume whether have reached predetermined threshold value;When determining that predetermined threshold value has not yet been reached, by row element storage to the first mesh It marks in tables of data.
Illustratively, predetermined threshold value can be allowed the maximum of the data volume of storage by every target matrix.It is determining When predetermined threshold value has not yet been reached, then by row element storage into first object tables of data.This way it is possible to avoid data volume is more than The situation that data caused by predetermined threshold value are overflowed.
In addition, when the data volume stored in determining first object tables of data has reached predetermined threshold value, the disclosure provides Method can also comprise the following steps, as shown in Figure 5A.
In step 501, when the data volume stored in determining first object tables of data has reached predetermined threshold value, create New target matrix, and new target matrix is mapped in mapping space, first object tables of data is in mapping space Mapping position in mapping space of mapping position and the row element between mapping position.
When the data volume in determining first object tables of data has reached predetermined threshold value, in order to disperse first object data Data in table can create new target matrix.The mapping position of the new target matrix in mapping space can be with Mapping position and mapping position of the row element in the mapping space in first object tables of data in the mapping space Between.As shown in Figure 5 B, if the mapping position of row element to be stored in mapping space is position 450, it may be determined that first Target matrix is target matrix 2, if determining at this time, the data volume in target matrix 2 has reached predetermined threshold value, then New target matrix (target matrix 4) can be created, and its mapping position is determined as positioned at position 299 and position 450 Between mapping position, for example, position 350.
In step 502, by row element storage into new target matrix.
After new target matrix has been created, row element to be stored can be stored into new target matrix.
In addition, for Fig. 5 B, it, can be by above-mentioned first object after new target matrix (target matrix 4) is created Already present each row element stores again in tables of data (target matrix 2), i.e., according to above-mentioned first object tables of data (number of targets According to table 2) in target mapping position of each row element in mapping space, it is empty in mapping that each row element is stored it again respectively Between in mapping position be located at before target mapping position of the row element in mapping space and apart from the target mapped bits It puts in nearest target matrix (target matrix 2 or target matrix 4).So, it is only necessary to target matrix 2 and target The data that tables of data 4 is stored are updated, without being operated to target matrix 1 and target matrix 3.
Through the above scheme, the data in database are stored according to certain regular-scattered, it is possible to reduce data store Space, optimization data store organisation, and then database performance caused by solving the problems, such as huge data volume is bad, convenient for data The data addition in storehouse, data query, and the efficiency of data query, data addition etc. can be promoted.
Fig. 6 is the flow chart of the date storage method provided according to an embodiment of the present disclosure.As shown in fig. 6, this The open method provided can also comprise the following steps.
In step 601, data query instruction is received.
Data query instruction can include target user ID and object table ID, for determining its theory in mapping space Mapping position, and then inquire about data.
In step 602, when receiving data query instruction, according to target user ID and object table ID, definite and mesh Mark the theoretical map position of User ID and the corresponding elements of object table ID in mapping space.
The target user ID and object table ID that this in being instructed according to data query is included, with reference to described in step 104 Mapping mode, it may be determined that the theoretical map position of target user ID and the corresponding elements of object table ID in mapping space.
In step 603, according to theoretical map position, the second target matrix is determined.
Wherein, before the second target matrix is located at theoretical map position for its mapping position in mapping space, simultaneously And the target data that should be stored on the target matrix that Distance Theory mapping position is nearest, that is, element theory to be found Table.
In step 604, the second target matrix is inquired about according to target user ID and object table ID.
It, can be in second number of targets according to target user ID and object table ID after second target matrix is determined According to being inquired about in table.
Wherein, the mode for inquiring about tables of data is known in the art common sense, herein without being described in detail.
In step 605, when there are the data that match with target user ID and object table ID in the second target matrix When, the matched data of the output phase.
If by inquiry, determine there are the data to match with target user ID and object table ID in the second target matrix When, the data can be exported.
If by inquiry, determine that there is no the numbers to match with target user ID and object table ID in the second target matrix According to when, corresponding prompt message can be exported, so as to achieve the purpose that prompting.
Fig. 7 is the flow chart of the date storage method provided according to an embodiment of the present disclosure.As shown in fig. 7, this The open method provided can also comprise the following steps.
In step 701, when getting new raw data table, the information in new raw data table is added to remittance In total data table.
Wherein, the associated table id of new raw data table, and each row element in new raw data table exists Correspond to different User ID in the range of the raw data table.New raw data table builds table mode and initial original number Build that table mode is identical according to table, each row element corresponds to different User ID, and new raw data table have it is associated there Only table ID.When getting new raw data table, the information in new raw data table can be added to and summarize data In table.Wherein, the information in raw data table is added to the step summarized in tables of data hereinbefore to have been described, herein not Repeat narration.
Afterwards, for newly added each row element in tables of data is summarized, step 104 is performed.
Newly added each row element in tables of data will be summarized, stored according to step 104 in corresponding target matrix, with Newly added data is enable to disperse to be stored in memory space, and then ensure the performance of database.
Fig. 8 is the block diagram of the data storage device provided according to an embodiment of the present disclosure.It is as shown in figure 8, described Device 800 includes:Acquisition module 801, for obtaining multiple raw data tables, wherein, every raw data table has associated Table id, and each row element in every raw data table in the range of the raw data table correspond to different users ID;Modular converter 802 summarizes tables of data for multiple described raw data tables to be converted into one, described to summarize in tables of data Each row element include following information:User ID, table id and will be in the raw data table associated by the table id and institute State the data that each data in the corresponding row element of User ID are combined gained after processing;Creation module 803, for creating at least One target matrix, and every target matrix is mapped to the different mappings position in same mapping space;Store mould Block 804 for summarizing the User ID and table id in tables of data in each row element according to, determines the row element in the mapping Target mapping position in space, and by row element storage into first object tables of data, wherein, the first object data Table is located at before the target mapping position for its mapping position in the mapping space and is mapped apart from the target The nearest target matrix in position.
Optionally, the memory module 804 is used to summarize the User ID and table in tables of data in each row element according to ID will carry out Hash operation after the User ID and table id combination, and by gained cryptographic Hash and the mapped bits of the mapping space It puts sum and carries out complementation, target mapping position of the acquired results as the row element in the mapping space.
Optionally, the memory module 804 includes:Judging submodule, for judging to deposit in the first object tables of data Whether the data volume of storage has reached predetermined threshold value;First sub-module stored, for determining that the predetermined threshold value has not yet been reached When, by row element storage into the first object tables of data.
Optionally, the memory module 804 further includes:Submodule is created, for determining to have reached the default threshold During value, new target matrix is created, and the new target matrix is mapped in the mapping space, first mesh Mark mapping position of the tables of data in the mapping space and target mapping position of the row element in the mapping space it Between mapping position;Second sub-module stored, for storing the row element into the new target matrix.
Optionally, the memory module 804 is additionally operable to for already present each row element in the first object tables of data, According to target mapping position of each row element in the mapping space, each row element is stored it again respectively Mapping position in the mapping space be located at the target mapping position of the row element in the mapping space before, And in the target matrix nearest apart from the target mapping position.
Optionally, the raw data table is examination paper answer data table, and each row in every raw data table corresponds to In different User ID, each row correspond to this Zhang Kaojuan Zhong Ge roads examination question, and each row element represents that corresponding user examines at this The answer for each road examination question filled in volume;The modular converter 802 includes:Encoding submodule, for will be in the table id institute In associated raw data table, in row element corresponding with the User ID each answer encoded, wherein, the candidate of examination question choosing Item has N, and each answer is corresponded by N binary code representations, N number of candidate options with N binary codes, and N described 1 is set to the corresponding binary code of candidate options occurred in answer in binary code, it is opposite with the candidate options not occurred The binary code answered is set to 0;Combine submodule, for by the raw data table associated by the table id, with the user The coding of each answer is combined according to examination question order in the corresponding row elements of ID.
Optionally, described device 800 further includes:Receiving module, for receiving data query instruction, the data query refers to Order includes target user ID and object table ID;First determining module, for when receiving data query instruction, according to institute Target user ID and the object table ID are stated, determines element corresponding with the target user ID and the object table ID described Theoretical map position in mapping space;Second determining module, for according to the theoretical map position, determining the second number of targets According to table, wherein, second target matrix is located at the theoretical map position for its mapping position in the mapping space Before putting and the target matrix nearest apart from the theoretical map position;Enquiry module, for according to the target user The ID and object table ID inquires about second target matrix;Output module is deposited for working as in second target matrix In the data to match with the target user ID and the object table ID, the data that match described in output.
Optionally, described device 800 further includes:Add module, described in when getting new raw data table, inciting somebody to action Information in new raw data table summarizes described in being added in tables of data, wherein, the new raw data table has correlation The table id of connection, and each row element in the new raw data table in the range of the raw data table correspond to it is different User ID;The memory module 804 is used to summarize newly added each row element in tables of data for described, again according to the remittance User ID and table id in total data table in each row element determine target mapped bits of the row element in the mapping space It puts, and by row element storage into first object tables of data, wherein, the first object tables of data is empty in the mapping for it Between in mapping position be located at before the target mapping position and the target data nearest apart from the target mapping position Table.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
The disclosure also provides a kind of computer readable storage medium, is stored thereon with computer program instructions, which refers to The step of date storage method that the disclosure provides is realized when order is executed by processor.
Fig. 9 is the block diagram according to a kind of electronic equipment 900 shown in an exemplary embodiment.For example, electronic equipment 900 can To be provided as a server.With reference to Fig. 9, electronic equipment 900 includes processor 922, and quantity can be one or more, with And memory 932, for storing the computer program that can be performed by processor 922.The computer program stored in memory 932 Can include it is one or more each correspond to the module of one group of instruction.In addition, processor 922 can be configured as The computer program is performed, to perform above-mentioned date storage method.
In addition, electronic equipment 900 can also include power supply module 926 and communication component 950, which can be with It is configured as performing the power management of electronic equipment 900, which, which can be configured as, realizes electronic equipment 900 Communication, for example, wired or wireless communication.In addition, the electronic equipment 900 can also include input/output (I/O) interface 958.Electricity Sub- equipment 900 can be operated based on the operating system for being stored in memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM etc..
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction, example are additionally provided Such as include the memory 932 of program instruction, above procedure instruction can be performed by the processor 922 of electronic equipment 900 in completion The date storage method stated.
The preferred embodiment of the disclosure is described in detail above in association with attached drawing, still, the disclosure is not limited to above-mentioned reality The detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical solution of the disclosure Monotropic type, these simple variants belong to the protection domain of the disclosure.
It is further to note that the specific technical features described in the above specific embodiments, in not lance In the case of shield, it can be combined by any suitable means.In order to avoid unnecessary repetition, the disclosure to it is various can The combination of energy no longer separately illustrates.
In addition, it can also be combined between a variety of embodiments of the disclosure, as long as it is without prejudice to originally Disclosed thought should equally be considered as disclosure disclosure of that.

Claims (10)

1. a kind of date storage method, which is characterized in that the described method includes:
Multiple raw data tables are obtained, wherein, the associated table id of every raw data table, and every raw data table In each row element in the range of the raw data table correspond to different User ID;
Multiple described raw data tables are converted into one and summarize tables of data, each row element summarized in tables of data include with Lower information:User ID, table id and will be in the raw data table associated by the table id, row corresponding with the User ID Each data are combined the data of gained after processing in element;
An at least target matrix is created, and every target matrix is mapped to the different mappings in same mapping space Position;
According to the User ID and table id summarized in tables of data in each row element, determine the row element in the mapping space Target mapping position, and by the row element storage into first object tables of data, wherein, the first object tables of data be its Mapping position in the mapping space is located at before the target mapping position and apart from the target mapping position most Near target matrix.
2. according to the method described in claim 1, it is characterized in that, summarize described in the basis in tables of data in each row element User ID and table id determine target mapping position of the row element in the mapping space, including:
According to the User ID and table id summarized in tables of data in each row element, will be carried out after the User ID and table id combination Hash operation, and gained cryptographic Hash and the mapping position of mapping space sum are subjected to complementation, acquired results conduct Target mapping position of the row element in the mapping space.
It is 3. according to the method described in claim 1, it is characterized in that, described by row element storage to first object tables of data In, including:
Whether the data volume for judging to store in the first object tables of data has reached predetermined threshold value;
When determining that the predetermined threshold value has not yet been reached, by row element storage into the first object tables of data.
4. according to the method described in claim 3, it is characterized in that, the method further includes:
When determining to have reached the predetermined threshold value, new target matrix is created, and the new target matrix is reflected It is mapped in the mapping space, mapping position and the row element of the first object tables of data in the mapping space are in institute State the mapping position between the target mapping position in mapping space;
By row element storage into the new target matrix.
5. according to the method described in claim 1, it is characterized in that, the raw data table be examination paper answer data table, every Each row in the raw data table corresponds to different User ID, and each row correspond to this Zhang Kaojuan Zhong Ge roads examination question, each row The answer for each road examination question that the corresponding user of element representation is filled in this Zhang Kaojuan;
The combined treatment, including:
By in the raw data table associated by the table id, in row element corresponding with the User ID each answer compile Code, wherein, the candidate options of examination question have N, and each answer is by N binary code representations, N number of candidate options and N binary systems Code corresponds, and is set to 1 with the corresponding binary code of candidate options occurred in answer in the N binary code, with The corresponding binary code of candidate options not occurred is set to 0;
By the coding of each answer is pressed in the raw data table associated by the table id, in row element corresponding with the User ID It is combined according to examination question order.
6. according to the method any one of claim 1-5, which is characterized in that the method further includes:
Data query instruction is received, the data query instruction includes target user ID and object table ID;
When receiving the data query instruction, according to the target user ID and the object table ID, determine and the mesh Mark the theoretical map position of User ID and the corresponding elements of the object table ID in the mapping space;
According to the theoretical map position, the second target matrix is determined, wherein, second target matrix is it described Mapping position in mapping space is located at before the theoretical map position and the mesh nearest apart from the theoretical map position Mark tables of data;
Second target matrix is inquired about according to the target user ID and object table ID;
It is defeated when there are the data to match with the target user ID and the object table ID in second target matrix Go out the data to match.
7. according to the method any one of claim 1-5, which is characterized in that the method further includes:
When getting new raw data table, the information in the new raw data table is added to and described summarizes tables of data In, wherein, the associated table id of new raw data table, and each row element in the new raw data table Correspond to different User ID in the range of the raw data table;
Summarize newly added each row element in tables of data for described, perform and summarize each row element in tables of data described in the basis In User ID and table id, determine target mapping position of the row element in the mapping space, and the row element stored Into first object tables of data, wherein, the first object tables of data is located at for its mapping position in the mapping space Before the target mapping position and the step of the target matrix nearest apart from the target mapping position.
8. a kind of data storage device, which is characterized in that described device includes:
Acquisition module, for obtaining multiple raw data tables, wherein, the associated table id of every raw data table, and Each row element in every raw data table corresponds to different User ID in the range of the raw data table;
Modular converter summarizes tables of data for multiple described raw data tables to be converted into one, described to summarize in tables of data Each row element includes following information:User ID, table id and by the raw data table associated by the table id, with it is described Each data are combined the data of gained after processing in the corresponding row element of User ID;
Every target matrix for creating an at least target matrix, and is mapped to same mapping by creation module The different mappings position in space;
Memory module for summarizing the User ID and table id in tables of data in each row element according to, determines that the row element exists Target mapping position in the mapping space, and by row element storage into first object tables of data, wherein, described first Target matrix is located at for its mapping position in the mapping space before the target mapping position and apart from described The nearest target matrix of target mapping position.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The step of method any one of claim 1-7 is realized during row.
10. a kind of electronic equipment, which is characterized in that including:
Computer readable storage medium described in claim 9;And
One or more processor, for performing the program in the computer readable storage medium.
CN201711385053.XA 2017-12-20 2017-12-20 Data storage method and device, storage medium and electronic equipment Active CN108108436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711385053.XA CN108108436B (en) 2017-12-20 2017-12-20 Data storage method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711385053.XA CN108108436B (en) 2017-12-20 2017-12-20 Data storage method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108108436A true CN108108436A (en) 2018-06-01
CN108108436B CN108108436B (en) 2020-07-31

Family

ID=62210519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711385053.XA Active CN108108436B (en) 2017-12-20 2017-12-20 Data storage method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108108436B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634963A (en) * 2018-12-11 2019-04-16 泰康保险集团股份有限公司 Processing method, device and the readable storage medium storing program for executing of declaration form data
CN109934628A (en) * 2019-03-08 2019-06-25 智者四海(北京)技术有限公司 Characteristic processing method and device
CN110516081A (en) * 2019-09-02 2019-11-29 北京明略软件系统有限公司 The display methods and device of tables of data mapping relations
CN110532262A (en) * 2019-07-30 2019-12-03 北京三快在线科技有限公司 A kind of data storage rule auto recommending method, device, equipment and readable storage medium storing program for executing
CN110580633A (en) * 2018-06-08 2019-12-17 北京三快在线科技有限公司 Information pushing method and device and server
CN111639071A (en) * 2019-03-01 2020-09-08 贵州白山云科技股份有限公司 Form display method and device
CN113393296A (en) * 2021-06-16 2021-09-14 北京沃东天骏信息技术有限公司 Data relationship representation method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737127A (en) * 2012-06-20 2012-10-17 厦门聚海源物联网络技术有限公司 Massive data storage method
WO2014024007A1 (en) * 2012-08-10 2014-02-13 Nokia Corporation Mapping a location to an area
CN103942209A (en) * 2013-01-18 2014-07-23 阿里巴巴集团控股有限公司 Data processing method
CN105912650A (en) * 2016-04-07 2016-08-31 腾讯科技(深圳)有限公司 Method and apparatus of recommending songs
CN106055654A (en) * 2016-06-01 2016-10-26 东软集团股份有限公司 Heterogeneous data integration method and device
CN106528579A (en) * 2015-09-15 2017-03-22 阿里巴巴集团控股有限公司 Search method, device and system based on sharding structure databases
CN107291780A (en) * 2016-04-12 2017-10-24 腾讯科技(深圳)有限公司 A kind of user comment information methods of exhibiting and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737127A (en) * 2012-06-20 2012-10-17 厦门聚海源物联网络技术有限公司 Massive data storage method
WO2014024007A1 (en) * 2012-08-10 2014-02-13 Nokia Corporation Mapping a location to an area
CN103942209A (en) * 2013-01-18 2014-07-23 阿里巴巴集团控股有限公司 Data processing method
CN106528579A (en) * 2015-09-15 2017-03-22 阿里巴巴集团控股有限公司 Search method, device and system based on sharding structure databases
CN105912650A (en) * 2016-04-07 2016-08-31 腾讯科技(深圳)有限公司 Method and apparatus of recommending songs
CN107291780A (en) * 2016-04-12 2017-10-24 腾讯科技(深圳)有限公司 A kind of user comment information methods of exhibiting and device
CN106055654A (en) * 2016-06-01 2016-10-26 东软集团股份有限公司 Heterogeneous data integration method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580633A (en) * 2018-06-08 2019-12-17 北京三快在线科技有限公司 Information pushing method and device and server
CN110580633B (en) * 2018-06-08 2021-03-02 北京三快在线科技有限公司 Information pushing method and device and server
CN109634963A (en) * 2018-12-11 2019-04-16 泰康保险集团股份有限公司 Processing method, device and the readable storage medium storing program for executing of declaration form data
CN109634963B (en) * 2018-12-11 2021-01-26 泰康保险集团股份有限公司 Policy data processing method and device and readable storage medium
CN111639071A (en) * 2019-03-01 2020-09-08 贵州白山云科技股份有限公司 Form display method and device
CN111639071B (en) * 2019-03-01 2023-07-28 贵州白山云科技股份有限公司 Form display method and device
CN109934628A (en) * 2019-03-08 2019-06-25 智者四海(北京)技术有限公司 Characteristic processing method and device
CN110532262A (en) * 2019-07-30 2019-12-03 北京三快在线科技有限公司 A kind of data storage rule auto recommending method, device, equipment and readable storage medium storing program for executing
CN110516081A (en) * 2019-09-02 2019-11-29 北京明略软件系统有限公司 The display methods and device of tables of data mapping relations
CN113393296A (en) * 2021-06-16 2021-09-14 北京沃东天骏信息技术有限公司 Data relationship representation method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN108108436B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN108108436A (en) Date storage method, device, storage medium and electronic equipment
CN110609693B (en) Code updating method and device based on data standardization and terminal equipment
CN107800819A (en) A kind of generation method of file identification, device and server
Zhang et al. Classification and regression with random forests as a standard method for presence-only data SDMs: a future conservation example using China tree species
CN110162319A (en) Application program update method, apparatus, computer equipment and storage medium
Austin Inconsistencies between theory and methodology: a recurrent problem in ordination studies
CN102132289A (en) Method and device for code obfuscation
CN107145784A (en) A kind of method of vulnerability scanning, device and computer-readable medium
CN109800258A (en) Data file dispositions method, device, computer equipment and storage medium
CN106547520A (en) A kind of code path analysis method and device
CN109740347A (en) A kind of identification of the fragile hash function for smart machine firmware and crack method
CN110795697B (en) Method and device for acquiring logic expression, storage medium and electronic device
CN107181733A (en) A kind of login validation method and device
CN109359084A (en) Abnormality diagnostic method, device, equipment and storage medium in the processing of block chain information
CN112989348A (en) Attack detection method, model training method, device, server and storage medium
CN104639550A (en) User identification method and equipment
CN116055165A (en) Malicious traffic data detection method and system
CN111177663B (en) Code obfuscation improving method and device for compiler, storage medium, and electronic device
CN110460606A (en) A kind of second order SQL injection leak detection method, device and equipment
CN110458184A (en) Optical character identification householder method, device, computer equipment and storage medium
CN108694049A (en) A kind of method and apparatus of update software
CN109857735B (en) Data construction method and system for rule description through excel
CN109889616B (en) Method and device for identifying domain name
CN113935069B (en) Data verification method, device and equipment based on block chain and storage medium
CN114553819B (en) IPv6 address identification 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