CN108959381A - The management method and device and electronic equipment of data - Google Patents

The management method and device and electronic equipment of data Download PDF

Info

Publication number
CN108959381A
CN108959381A CN201810535427.XA CN201810535427A CN108959381A CN 108959381 A CN108959381 A CN 108959381A CN 201810535427 A CN201810535427 A CN 201810535427A CN 108959381 A CN108959381 A CN 108959381A
Authority
CN
China
Prior art keywords
data
target
field
metadata
model
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
CN201810535427.XA
Other languages
Chinese (zh)
Other versions
CN108959381B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810535427.XA priority Critical patent/CN108959381B/en
Publication of CN108959381A publication Critical patent/CN108959381A/en
Application granted granted Critical
Publication of CN108959381B publication Critical patent/CN108959381B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

This specification embodiment provides a kind of Managed Solution of data: receiving data processing request;Wherein, the data processing request carries processing field and metadata mark, and the processing field is the corresponding data field of target data to be processed, and the metadata mark is corresponding with the data type of the target data;Corresponding target metadata and target matrix are determined according to metadata mark;Wherein, the corresponding relationship between data field and model field is provided in the target metadata in advance, the target matrix is used to store the data of the data type, and the data sheet field of the target matrix and the model field correspond;According to the target metadata, the corresponding object module field of the processing field and the corresponding target data literary name section of the object module field are determined;According to the processing type of the data processing request, the target data is handled in the column where target data literary name section in the target matrix.

Description

The management method and device and electronic equipment of data
Technical field
This specification embodiment is related to the management method and device and electricity of Internet technical field more particularly to a kind of data Sub- equipment.
Background technique
Database (Database) is a kind of to carry out the foundation of tissue, storage and management data in computer according to data type Store the warehouse in equipment.Since the data of different types of data are there are different data fields, need in the database Different tables of data is designed, according to different types of data so as to store the data of same data type to corresponding data In table.
However, just because of the tables of data being related to there are different types of data, so needing to be every kind when handling data Data type designs individually a set of processing scheme, generally the corresponding processing scheme of every kind of data type can be referred to as data Handle model.
Need to provide a kind of general data management scheme.
Summary of the invention
The management method and device and electronic equipment for a kind of data that this specification embodiment provides:
According to this specification embodiment in a first aspect, providing a kind of management method of data, which comprises
Receive data processing request;Wherein, the data processing request carries processing field and metadata mark, described Processing field is the corresponding data field of target data to be processed, the data class of the metadata mark and the target data Type is corresponding;
Corresponding target metadata and target matrix are determined according to metadata mark;Wherein, the target element number Be provided with the corresponding relationship between data field and model field in advance in, the target matrix is for storing the data The data of type, the data sheet field of the target matrix and the model field correspond;
According to the target metadata, the corresponding object module field of the processing field and the object module are determined The corresponding target data literary name section of field;
According to the processing type of the data processing request, where the target data literary name section in the target matrix The target data is handled in column.
According to the second aspect of this specification embodiment, a kind of managing device of data is provided, described device includes:
Receiving unit receives data processing request;Wherein, the data processing request carries processing field and metadata Mark, the processing field are the corresponding data field of target data to be processed, the metadata mark and the number of targets According to data type it is corresponding;
First determination unit determines corresponding target metadata and target matrix according to metadata mark;Wherein, Be provided with the corresponding relationship between data field and model field in the target metadata in advance, the target matrix is used for The data of the data type are stored, the data sheet field of the target matrix and the model field correspond;
Second determination unit, according to the target metadata, determine the corresponding object module field of the processing field with And the corresponding target data literary name section of the object module field;
Processing unit, according to the processing type of the data processing request, in the target matrix of the target matrix The target data is handled in column where field.
According to the third aspect of this specification embodiment, a kind of electronic equipment is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to the management method of any of the above-described item data.
This specification embodiment provides a kind of Managed Solution of data, and number of targets to be processed is established using metadata According to data field and target matrix in mapping relations between data sheet field.On the one hand, so that for any data class Type can use same set of data processing model.On the other hand, without paying close attention to the number for data type when establishing tables of data According to specific existing data field;So that Data Sheet Design has versatility, different data table can use identical when designing Data sheet field, that is, model field.
Detailed description of the invention
Fig. 1 is the schematic diagram of existing data management scheme;
Fig. 2 is the schematic diagram for the data management scheme that one embodiment of this specification provides;
Fig. 3 is the flow chart of the management method for the data that one embodiment of this specification provides;
Fig. 4 is the hardware structure diagram of the managing device for the data that one embodiment of this specification provides;
Fig. 5 is the module diagram of the managing device for the data that one embodiment of this specification provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... " or " in response to determination ".
As previously described, because there are different data fields for the data of different types of data, therefore need in the database Different tables of data is designed, according to different types of data so as to store the data of same data type to corresponding data In table.
For example, with the data instance of both different types of data of student data and teacher's data, traditional data Two different tables of data can be accordingly designed in table design concept;
Assuming that there are student_ID (student status number), student_name (student name), student_ for student data The data field of class (student class), student_sex (students' genders), student_age (students ' age), then can be with It is designed to student data table as shown in table 1 below.
Table 1
student_ID student_name student_class student_sex student_age
Assuming that there are teacher_ID (teacher number), teacher_name (teacher's name), teacher_ for teacher's data The data field of class (teacher class), teacher_sex (teacher's gender), teacher_age (teacher's age), then can be with It is designed to teacher's tables of data as shown in table 2 below.
Table 2
teacher_ID teacher_name teacher_class teacher_sex teacher_age
However, just because of the tables of data being related to there are different types of data, so needing to be every kind when handling data Data type designs individually a set of processing scheme, generally the corresponding processing scheme of every kind of data type can be referred to as data Handle model.
The schematic diagram of existing data management scheme as shown in Figure 1, Fig. 1 are carried out with the Advance of Three Classes Mode Structure of database It divides, is divided into view layer, model layer and Data Persistence Layer.Wherein, where view layer can be understood as data processing initiator Layer;Model layer can be understood as the layer where data processing model;Data Persistence Layer can be understood as the layer of data storage;Fig. 1 Shown can be seen that requires every kind of data type to design individual data processing model, and to every kind of data type Need to design individual management interface.For example, the corresponding design of account data has account data to handle model, business datum correspondence is set In respect of business data processing model, the corresponding design of transaction data has transaction data to handle model, and the corresponding design of product data has production Product data processing model, the corresponding design of global data have global data to handle model.
In fact, the data type that may relate to of a practical data management scheme can be than data that Fig. 1 is shown Type is more;According to above-mentioned mentality of designing, a kind of data type is often increased newly, require to design corresponding data processing model, with The data type being related to is more and more, and the data processing model for needing to safeguard also can be more and more, so as to cause data management System is too fat to move, influences the stability of system;Such as data-handling efficiency can be deteriorated, the response time can be elongated etc..
To solve the above-mentioned problems, this explanation as shown in Figure 2 proposes a kind of Managed Solution of general data;For Any data type can use same set of data processing model.Compared to Figure 1, equally it is three-level schema knot with database Structure is divided;The difference is that model layer design is a general metadata schema;It will be originally in Data Persistence Layer The corresponding tables of data of different types of data is unified for a kind of tables of data of general unified format, and Data Persistence Layer can be with The metadata of storage configuration.Specifically, the data field and target matrix of target data to be processed are established using metadata Mapping relations between middle data sheet field.The metadata is a kind of for describing the data of data.
The configuration process of metadata described in detail below:
In one embodiment, the content configured in metadata may include as shown in table 3 below:
Table 3
model_id Metadata mark
model_field Data field
model_field_type The type of data field
model_field_cols Model field
Table 3 can be the corresponding relationship that one data word section and model field are established.
By taking aforementioned student data as an example, in the Data Sheet Design of traditional student, data field is identical as data sheet field, Such as can with student_ID (student status number), student_name (student name), student_class (student class), This 5 data fields of student_sex (students' genders), student_age (students ' age);For example preceding table 1 of traditional tables of data It is shown;
And in this specification, by configuring metadata, it can establish each data field pass corresponding with model field System.
For example:
1, the corresponding relationship between student status student_ID and model field is as shown in table 4 below:
Table 4
model_id alm_student
model_field student_ID
model_field_type int
model_field_cols k1
Table 4 can be expressed as establishing the corresponding relationship between data field student_ID and model field k1;
Wherein, metadata mark (i.e. model_id) is alm_student;And alm_student also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_student to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_student of tables of data);
Wherein, model field (i.e. model_field_cols) is k1;And k1 also may indicate that target matrix alm_ Data sheet field in student;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k1 and number of targets with model field k1 by data field student_ID It is corresponded according to the data sheet field of table;Accordingly, there exist corresponding between data field student_ID and data sheet field k1 Relationship.
2, the corresponding relationship between student name student_name and model field is as shown in table 5 below:
Table 5
Table 5 can be expressed as establishing the corresponding relationship between data field student_name and model field k2;
Wherein, metadata mark (i.e. model_id) is alm_student;And alm_student also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_student to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_student of tables of data);
Wherein, model field (i.e. model_field_cols) is k2;And k2 also may indicate that target matrix alm_ Data sheet field in student;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k2 and targets with model field k2 by data field student_name The data sheet field of tables of data corresponds;Accordingly, there exist between data field student_name and data sheet field k2 Corresponding relationship.
3, the corresponding relationship between student class student_class and model field is as shown in table 6 below:
Table 6
model_id alm_student
model_field student_class
model_field_type string
model_field_cols k3
Table 6 can be expressed as establishing the corresponding relationship between data field student_class and model field k3;
Wherein, metadata mark (i.e. model_id) is alm_student;And alm_student also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_student to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_student of tables of data);
Wherein, model field (i.e. model_field_cols) is k3;And k3 also may indicate that target matrix alm_ Data sheet field in student;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k3 and mesh with model field k3 by data field student_class The data sheet field for marking tables of data corresponds;Accordingly, there exist between data field student_class and data sheet field k3 Corresponding relationship.
4, the corresponding relationship between students' genders student_sex and model field is as shown in table 7 below:
Table 7
model_id alm_student
model_field student_sex
model_field_type string
model_field_cols k4
Table 7 can be expressed as establishing the corresponding relationship between data field student_sex and model field k4;
Wherein, metadata mark (i.e. model_id) is alm_student;And alm_student also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_student to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_student of tables of data);
Wherein, model field (i.e. model_field_cols) is k4;And k4 also may indicate that target matrix alm_ Data sheet field in student;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k4 and targets with model field k4 by data field student_sex The data sheet field of tables of data corresponds;Accordingly, there exist pairs between data field student_sex and data sheet field k4 It should be related to.
5, the corresponding relationship between students ' age student_age and model field is as shown in table 8 below:
Table 8
model_id alm_student
model_field student_age
model_field_type string
model_field_cols k5
Table 8 can be expressed as establishing the corresponding relationship between data field student_age and model field k5;
Wherein, metadata mark (i.e. model_id) is alm_student;And alm_student also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_student to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_student of tables of data);
Wherein, model field (i.e. model_field_cols) is k5;And k5 also may indicate that target matrix alm_ Data sheet field in student;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k5 and targets with model field k5 by data field student_age The data sheet field of tables of data corresponds;Accordingly, there exist pairs between data field student_age and data sheet field k5 It should be related to.
In this specification, in the case where configuring metadata of the above-mentioned table 4 to table 8, it is also necessary to designed for storage student The tables of data of data, the tables of data of the student data identical as metadata mark can be named as alm_ as previously shown Student, specific tables of data are as shown in table 9 below:
Table 9
k1 k2 k3 k4 k5
The number of students designed under tables of data 1 and this specification mode by comparing the student data designed under traditional approach According to tables of data 9, it is known that, the data sheet field in tables of data designed under this specification mode without identical with data field, But it is identical as simulation field defined in metadata.
In one embodiment, simulation field defined in different metadata can be identical.
For example, in conjunction with teacher's data instance above-mentioned, it is assumed that teacher's data there are teacher_ID (teacher number), Teacher_name (teacher's name), teacher_class (teacher class), teacher_sex (teacher's gender), teacher_ The data field of age (teacher's age);Traditional tables of data is as shown in preceding table 2;
And in this specification, by configuring metadata, it can establish each data field pass corresponding with model field System.
1, the corresponding relationship between teacher teacher_ID and model field is as shown in the following table 10:
Table 10
model_id alm_teacher
model_field teacher_ID
model_field_type int
model_field_cols k1
Table 10 can be expressed as establishing the corresponding relationship between data field teacher_ID and model field k1;
Wherein, metadata mark (i.e. model_id) is alm_teacher;And alm_teacher also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_teacher to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_teacher of tables of data);
Wherein, model field (i.e. model_field_cols) is k1;And k1 also may indicate that target matrix alm_ Data sheet field in teacher;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k1 and number of targets with model field k1 by data field teacher_ID It is corresponded according to the data sheet field of table;Accordingly, there exist corresponding between data field teacher_ID and data sheet field k1 Relationship.
2, the corresponding relationship between teacher's name teacher_name and model field is as shown in table 11 below:
Table 11
model_id alm_teacher
model_field teacher_name
model_field_type string
model_field_cols k2
Table 11 can be expressed as establishing the corresponding relationship between data field teacher_name and model field k2;
Wherein, metadata mark (i.e. model_id) is alm_teacher;And alm_teacher also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_teacher to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_teacher of tables of data);
Wherein, model field (i.e. model_field_cols) is k2;And k2 also may indicate that target matrix alm_ Data sheet field in teacher;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k2 and targets with model field k2 by data field teacher_name The data sheet field of tables of data corresponds;Accordingly, there exist between data field teacher_name and data sheet field k2 Corresponding relationship.
3, the corresponding relationship between teacher teacher_class and model field is as shown in table 12 below:
Table 12
model_id alm_teacher
model_field teacher_class
model_field_type string
model_field_cols k3
Table 12 can be expressed as establishing the corresponding relationship between data field teacher_class and model field k3;
Wherein, metadata mark (i.e. model_id) is alm_teacher;And alm_teacher also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_teacher to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_teacher of tables of data);
Wherein, model field (i.e. model_field_cols) is k3;And k3 also may indicate that target matrix alm_ Data sheet field in teacher;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k3 and mesh with model field k3 by data field teacher_class The data sheet field for marking tables of data corresponds;Accordingly, there exist between data field teacher_class and data sheet field k3 Corresponding relationship.
4, the corresponding relationship between teacher teacher_sex and model field is as shown in table 13 below:
Table 13
model_id alm_teacher
model_field teacher_sex
model_field_type string
model_field_cols k4
Table 13 can be expressed as establishing the corresponding relationship between data field teacher_sex and model field k4;
Wherein, metadata mark (i.e. model_id) is alm_teacher;And alm_teacher also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_teacher to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_teacher of tables of data);
Wherein, model field (i.e. model_field_cols) is k4;And k4 also may indicate that target matrix alm_ Data sheet field in teacher;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k4 and targets with model field k4 by data field teacher_sex The data sheet field of tables of data corresponds;Accordingly, there exist pairs between data field teacher_sex and data sheet field k4 It should be related to.
5, the corresponding relationship between teacher teacher_age and model field is as shown in table 14 below:
Table 14
model_id alm_teacher
model_field teacher_age
model_field_type string
model_field_cols K5
Table 14 can be expressed as establishing the corresponding relationship between data field teacher_age and model field k5;
Wherein, metadata mark (i.e. model_id) is alm_teacher;And alm_teacher also may indicate that number According to table name, that is to say, that can determine that (all model_id are matching for alm_teacher to target metadata according to metadata mark Set content) and target matrix (tables of data of the entitled alm_teacher of tables of data);
Wherein, model field (i.e. model_field_cols) is k5;And k5 also may indicate that target matrix alm_ Data sheet field in teacher;I.e. the data sheet field of target matrix and the model field correspond;
Since there are corresponding relationship and model field k5 and targets with model field k5 by data field teacher_age The data sheet field of tables of data corresponds;Accordingly, there exist pairs between data field teacher_age and data sheet field k5 It should be related to.
In this specification, in the case where configuring metadata of the above-mentioned table 9 to table 14, it is also necessary to designed for storage teacher The tables of data of data, the tables of data of teacher's data identical as metadata mark can be named as alm_ as previously shown Teacher, specific tables of data are as shown in table 15 below:
Table 15
k1 k2 k3 k4 k5
By comparing the tables of data 9 of the student data designed under this specification mode and the tables of data 15 of teacher's data;It can Know, the data sheet field in tables of data designed under this specification mode can be identical, identifies (i.e. tables of data using metadata Name)+data sheet field, query metadata is assured that corresponding data field.
For example, same data sheet field k1;For alm_student and k1, alm_student is identified by metadata Corresponding metadata i.e. table 4 can be inquired to table 8;It, can be true according to 4 content of table due to being table 4 there are model field k1 Determining the corresponding data field of model field k1 is student_ID i.e. student status number.
For alm_teacher and k1, corresponding metadata can be inquired i.e. by identifying alm_teacher by metadata Table 10 is to table 14;Due to being table 10 there are model field k1, the corresponding number of model field k1 can be determined according to 10 content of table It is teacher_ID, that is, teacher number according to field.
In conclusion present description provides a kind of Managed Solutions of general data, for the number of different types of data According to same set of data processing model, i.e. the processing model based on metadata can be used;Data field is established by metadata With the mapping relations of data sheet field, data type in data manipulation, without focused data.
On the other hand, without paying close attention to the specific existing data field of data for data type when establishing tables of data;Make Obtaining Data Sheet Design has versatility, and different data table can use identical data sheet field, that is, model field when designing.Often Data sheet field in tables of data can identical (model field is also similar), such as may include 20 field k1, k2, k3,…,k20.In the embodiment having, these fields can be divided into index field and generic field;Wherein, index field can be with It is expressed as k, generic field can be expressed as c;Such as 8 index fields and 12 generic fields, k1, k2, k3 ..., k8;c1, c2、c3、…、c12。
Below can example as shown in connection with fig. 3 introduce a kind of embodiment of the management method of data of this specification, the party Method can apply the server (hereinafter referred to as server) in the management of data, and this method may comprise steps of:
Step 110: receiving data processing request;Wherein, the data processing request carries processing field and metadata Mark, the processing field are the corresponding data field of target data to be processed, the metadata mark and the number of targets According to data type it is corresponding.
In one embodiment, the data may include mobility data.Mobility is a kind of reflection assets exchange conclusion of the business Change the index of the easy degree of medium.Since currency can be used as one of economy medium of exchange, so currency is that have stream The assets of dynamic property.In the business for being related to currency such as financial business, generally require to be managed mobility data.
Step 120: corresponding target metadata and target matrix are determined according to metadata mark;Wherein, described Be provided with the corresponding relationship between data field and model field in target metadata in advance, the target matrix is for storing The data of the data type, the data sheet field of the target matrix and the model field correspond.
In one embodiment, the step 120 determines corresponding target metadata and target according to metadata mark Tables of data specifically includes:
It inquires the metadata and identifies corresponding target metadata;
It inquires metadata described in the target metadata and identifies corresponding target matrix
Step 130: according to the target metadata, determining the corresponding object module field of the processing field and described The corresponding target data literary name section of object module field.
Step 140: according to the processing type of the data processing request, in the target data literary name of the target matrix The target data is handled in column where section.
A kind of Managed Solution of the data provided through this embodiment establishes target data to be processed using metadata Mapping relations in data field and target matrix between data sheet field.On the one hand, so that all for any data type Same set of data processing model can be used.On the other hand, without paying close attention to the data tool for data type when establishing tables of data Data field existing for body;So that Data Sheet Design has versatility, different data table can use identical data when designing Literary name section, that is, model field.
In practical applications, the processing type of data processing request can be generally divided into data storage, data query, data Deletion, data modification etc.;Each processing type is described individually below:
In one embodiment, when the processing type is that data store,
The step 140, can specifically include:
By target data storage to the column where the target data literary name section of the target matrix.
For example, for the student data table shown in the table 9, it is assumed that the data processing request that server receives carried Processing field and target data are as follows:
Student_ID:010;
Student_name: Zhang San;
Student_class: three years Fourth Shifts;
Student_sex: male;
Student_age:18;
And the metadata carried is identified as alm_student;
Corresponding target metadata can be determined for table 4 to table 8, target firstly, identifying alm_student according to metadata Tables of data is table 9;
Then, according to target metadata table 4, it can determine that the corresponding object module field of processing field student_ID is K1 and target data literary name section k1;
According to target metadata table 5, it can determine that the corresponding object module field of processing field student_name is k2, And target data literary name section k2;
According to target metadata table 6, it can determine that the corresponding object module field of processing field student_class is K3 and target data literary name section k3;
According to target metadata table 7, it can determine that the corresponding object module field of processing field student_sex is k4, And target data literary name section k4;
According to target metadata table 8, it can determine that the corresponding object module field of processing field student_age is k5, And target data literary name section k5;
It is stored finally, due to handle type for data, it can be where the target data literary name section in target matrix 9 Target data, such as the following table 16 are stored in column:
Table 16
k1 k2 k3 k4 k5
010 Zhang San 3 years Fourth Shifts Male 18
In this way, just inserting a new student data in the student data table shown in former table 9.
By the embodiment, it is based on metadata, mould can be handled using unified metadata for different types of data Type carries out data storage.
In one embodiment, in order to cope with the storage of mass data, magnanimity number can be ensured in such a way that table is divided in a point library According to storage efficiency when storage.As previously mentioned, there are several index fields in metadata, a point library divides table to be based on these index words Section.Assuming that have 8 index fields, then a point library divides table calculation formula as follows:
DbIndex=hash (k1, k2 ..., k8) %10
TableIndex=hash (k1, k2 ..., k8) %100
By way of hash, data are dispersed in 10 libraries 100 and are opened in table, thus in the premise for not reducing storage efficiency Under, a greater amount of data can be supported to store.
In one embodiment, when the processing type is data query, the data processing request also carries inquiry Rule;
The step 140, can specifically include:
Inquire the data for meeting the rule searching in the column where the target data literary name section of the target matrix.
Wherein, the rule searching can refer to the range for determining data to be checked;Such as inquiry student status 001-010 Student data.
By the embodiment, it is based on metadata, mould can be handled using unified metadata for different types of data Type carries out data query.
In one embodiment, the method also includes:
According to the target metadata, the corresponding data field of data inquired is determined;
The data inquired described in assembling and corresponding data field.
Field in the embodiment due to the data that inquire in tables of data is model field, rather than actual data word Section, therefore the corresponding relationship according to the data field and model field that record in metadata is also needed, by the data inquired Model field is converted to data field.The assembling can be understood as data field being translated as the number that user is understood that According to the meaning of field.
It illustrates, it is assumed that a certain student data inquired are as follows:
K1:010;
K2: Zhang San;
K3: three years Fourth Shifts;
K4: male;
K5:18;
Data field is converted to firstly the need of by model field, the opposite mistake of aforementioned data storage implementation example can be referred to Journey obtains the student data of data field are as follows:
Student_ID:010;
Student_name: Zhang San;
Student_class: three years Fourth Shifts;
Student_sex: male;
Student_age:18;
However, being assembled into the student data that user is understood that:
Student status number: 010;Student name: Zhang San;Student class: 3 years Fourth Shifts;Students' genders: male;Students ' age: 18.
In one embodiment, when the processing type is that data are deleted,
The step 140, can specifically include:
It will be deleted in column where target data literary name section of the target data from the target matrix.
For example, for the student data table shown in the table 16, it is assumed that the data processing request that server receives carries Processing field and target data it is as follows:
Student_ID:010;
And the metadata carried is identified as alm_student;
Corresponding target metadata can be determined for table 4 to table 8, target firstly, identifying alm_student according to metadata Tables of data is table 16;
Then, due to being table 4 there are the target metadata table of processing field student_ID, it is possible to determine processing word The corresponding object module field of section student_ID is k1 and target data literary name section k1;
It is deleted finally, due to handle type for data, it can be in the target data literary name section k1 institute in target matrix 16 Column in data 010 are expert at deletion, to become table 9 again.
By the embodiment, it is based on metadata, mould can be handled using unified metadata for different types of data Type carries out data deletion.
In one embodiment, the processing type be data modification when, the target data include modify before data and Data after modification;
The step 140, can specifically include:
It is described repair by data modification before modification described in the column where the target data literary name section of the target matrix Change rear data.
By the embodiment, it is based on metadata, mould can be handled using unified metadata for different types of data Type carries out data modification.
Corresponding with the management method embodiment of aforementioned data, this specification additionally provides the implementation of the managing device of data Example.Described device embodiment can also be realized by software realization by way of hardware or software and hardware combining.With soft It is by the processor of equipment where it by nonvolatile memory as the device on a logical meaning for part is realized In corresponding computer business program instruction be read into memory operation formed.For hardware view, as shown in figure 4, being A kind of hardware structure diagram of equipment where the managing devices of this specification data, in addition to processor shown in Fig. 4, network interface, Except memory and nonvolatile memory, the practical function of management of equipment in embodiment where device generally according to the data Can, it can also include other hardware, this is repeated no more.
Fig. 5 is referred to, is the module map of the managing device for the data that one embodiment of this specification provides, described device is corresponding Embodiment illustrated in fig. 3, described device include:
Receiving unit 210 receives data processing request;Wherein, the data processing request carries processing field and member Data Identification, the processing field are the corresponding data field of target data to be processed, the metadata mark and the mesh The data type for marking data is corresponding;
First determination unit 220 determines corresponding target metadata and target matrix according to metadata mark;Its In, be provided with the corresponding relationship between data field and model field, the target matrix in the target metadata in advance For storing the data of the data type, the data sheet field of the target matrix and the model field are corresponded;
Second determination unit 230 determines the corresponding object module field of the processing field according to the target metadata And the corresponding target data literary name section of the object module field;
Processing unit 240, according to the processing type of the data processing request, in the target data of the target matrix The target data is handled in column where literary name section.
In an alternative embodiment:
The data include mobility data.
In an alternative embodiment: different metadata model fields having the same.
In an alternative embodiment:
First determination unit 220, specifically includes:
First inquiry subelement, inquires the metadata and identifies corresponding target metadata;
Second inquiry subelement, inquires metadata described in the target metadata and identifies corresponding target matrix.
In an alternative embodiment:
When the processing type is that data store, the processing unit 240 is specifically included:
By target data storage to the column where the target data literary name section of the target matrix.
In an alternative embodiment:
When the processing type is data query, the data processing request also carries rule searching;
The processing unit 240, specifically includes:
Inquire the data for meeting the rule searching in the column where the target data literary name section of the target matrix.
In an alternative embodiment:
Described device further include:
First determines subelement, according to the target metadata, determines the corresponding data field of data inquired;
Assemble subelement, the data inquired described in assembling and corresponding data field.
In an alternative embodiment:
When the processing type is that data are deleted, the processing unit 240 is specifically included:
It will be deleted in column where target data literary name section of the target data from the target matrix.
In an alternative embodiment:
When the processing type is data modification, the target data includes data and data after modification before modifying;
The processing unit 240, specifically includes:
It is described repair by data modification before modification described in the column where the target data literary name section of the target matrix Change rear data.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not In the case where making the creative labor, it can understand and implement.
Figure 5 above describes inner function module and the structural representation of the managing device of data, substantial execution master Body can be a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Receive data processing request;Wherein, the data processing request carries processing field and metadata mark, described Processing field is the corresponding data field of target data to be processed, the data class of the metadata mark and the target data Type is corresponding;
Corresponding target metadata and target matrix are determined according to metadata mark;Wherein, the target element number Be provided with the corresponding relationship between data field and model field in advance in, the target matrix is for storing the data The data of type, the data sheet field of the target matrix and the model field correspond;
According to the target metadata, the corresponding object module field of the processing field and the object module are determined The corresponding target data literary name section of field;
According to the processing type of the data processing request, where the target data literary name section in the target matrix The target data is handled in column.
Optionally, the data include mobility data.
Optionally, different metadata model field having the same.
Optionally, described that corresponding target metadata and target matrix are determined according to metadata mark, it is specific to wrap It includes:
It inquires the metadata and identifies corresponding target metadata;
It inquires metadata described in the target metadata and identifies corresponding target matrix.
Optionally, when the processing type is that data store,
The processing type according to the data processing request, in the target data literary name section institute of the target matrix Column in handle the target data, specifically include:
By target data storage to the column where the target data literary name section of the target matrix.
Optionally, when the processing type is data query, the data processing request also carries rule searching;
The processing type according to the data processing request, in the target data literary name section institute of the target matrix Column in handle the target data, specifically include:
Inquire the data for meeting the rule searching in the column where the target data literary name section of the target matrix.
Optionally, further includes:
According to the target metadata, the corresponding data field of data inquired is determined;
The data inquired described in assembling and corresponding data field.
Optionally, when the processing type is that data are deleted,
The processing type according to the data processing request, in the target data literary name section institute of the target matrix Column in handle the target data, specifically include:
It will be deleted in column where target data literary name section of the target data from the target matrix.
Optionally, when the processing type is data modification, the target data includes after modifying preceding data and modification Data;
The processing type according to the data processing request, in the target data literary name section institute of the target matrix Column in handle the target data, specifically include:
It is described repair by data modification before modification described in the column where the target data literary name section of the target matrix Change rear data.
In the embodiment of above-mentioned electronic equipment, it should be appreciated that the processor can be central processing unit (English: Central Processing Unit, referred to as: CPU), can also be other general processors, digital signal processor (English: Digital Signal Processor, referred to as: DSP), specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC) etc..General processor can be microprocessor or the processor is also possible to Any conventional processor etc., and memory above-mentioned can be read-only memory (English: read-only memory, abbreviation: ROM), random access memory (English: random access memory, abbreviation: RAM), flash memory, hard disk or solid State hard disk.The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware processor and execute completion, or Hardware and software module combination in person's processor execute completion.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.It is set especially for electronics For standby embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to method reality Apply the part explanation of example.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to this specification Other embodiments.This specification is intended to cover any variations, uses, or adaptations of this specification, these modifications, Purposes or adaptive change follow the general principle of this specification and undocumented in the art including this specification Common knowledge or conventional techniques.The description and examples are only to be considered as illustrative, the true scope of this specification and Spirit is indicated by the following claims.
It should be understood that this specification is not limited to the precise structure that has been described above and shown in the drawings, And various modifications and changes may be made without departing from the scope thereof.The range of this specification is only limited by the attached claims System.

Claims (11)

1. a kind of management method of data, which comprises
Receive data processing request;Wherein, the data processing request carries processing field and metadata mark, the processing Field is the corresponding data field of target data to be processed, the data type pair of the metadata mark and the target data It answers;
Corresponding target metadata and target matrix are determined according to metadata mark;Wherein, in the target metadata Be provided with the corresponding relationship between data field and model field in advance, the target matrix is for storing the data type Data, the data sheet field of the target matrix and the model field correspond;
According to the target metadata, the corresponding object module field of the processing field and the object module field are determined Corresponding target data literary name section;
According to the processing type of the data processing request, in the column where target data literary name section in the target matrix Handle the target data.
2. according to the method described in claim 1, the data include mobility data.
3. according to the method described in claim 1, different metadata model field having the same.
4. according to the method described in claim 1, described determine corresponding target metadata and mesh according to metadata mark Tables of data is marked, is specifically included:
It inquires the metadata and identifies corresponding target metadata;
It inquires metadata described in the target metadata and identifies corresponding target matrix.
5. according to the method described in claim 1, the processing type be data store when,
The processing type according to the data processing request, where the target data literary name section in the target matrix The target data is handled in column, is specifically included:
By target data storage to the column where the target data literary name section of the target matrix.
6. according to the method described in claim 1, the data processing request is also taken when the processing type is data query With rule searching;
The processing type according to the data processing request, where the target data literary name section in the target matrix The target data is handled in column, is specifically included:
Inquire the data for meeting the rule searching in the column where the target data literary name section of the target matrix.
7. according to the method described in claim 6, the method also includes:
According to the target metadata, the corresponding data field of data inquired is determined;
The data inquired described in assembling and corresponding data field.
8. according to the method described in claim 1, the processing type be data delete when,
The processing type according to the data processing request, where the target data literary name section in the target matrix The target data is handled in column, is specifically included:
It will be deleted in column where target data literary name section of the target data from the target matrix.
9. according to the method described in claim 1, the target data includes modification when the processing type is data modification Data after preceding data and modification;
The processing type according to the data processing request, where the target data literary name section in the target matrix The target data is handled in column, is specifically included:
By data modification before modification described in the column where the target data literary name section of the target matrix for after the modification Data.
10. a kind of managing device of data, described device include:
Receiving unit receives data processing request;Wherein, the data processing request carries processing field and metadata mark Know, the processing field is the corresponding data field of target data to be processed, the metadata mark and the target data Data type it is corresponding;
First determination unit determines corresponding target metadata and target matrix according to metadata mark;Wherein, described Be provided with the corresponding relationship between data field and model field in target metadata in advance, the target matrix is for storing The data of the data type, the data sheet field of the target matrix and the model field correspond;
Second determination unit determines the corresponding object module field of the processing field and institute according to the target metadata State the corresponding target data literary name section of object module field;
Processing unit, according to the processing type of the data processing request, in the target data literary name section of the target matrix The target data is handled in the column at place.
11. a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to method described in any one of the claims 1-9.
CN201810535427.XA 2018-05-29 2018-05-29 Data management method and device and electronic equipment Active CN108959381B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810535427.XA CN108959381B (en) 2018-05-29 2018-05-29 Data management method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810535427.XA CN108959381B (en) 2018-05-29 2018-05-29 Data management method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108959381A true CN108959381A (en) 2018-12-07
CN108959381B CN108959381B (en) 2021-05-28

Family

ID=64492514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810535427.XA Active CN108959381B (en) 2018-05-29 2018-05-29 Data management method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108959381B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568696A (en) * 2021-07-29 2021-10-29 成都卓码数智数字科技有限公司 Method for defining service data model through interface operation in digital transformation
CN113590593A (en) * 2021-08-04 2021-11-02 浙江大华技术股份有限公司 Method and device for generating data table information, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160110398A1 (en) * 2014-10-17 2016-04-21 Unmesh Gandhi Runtime Generation of a Mapping Table for Uploading Data into Structured Data Marts
CN106547786A (en) * 2015-09-22 2017-03-29 阿里巴巴集团控股有限公司 A kind of date storage method and device
CN106708891A (en) * 2015-11-17 2017-05-24 中兴通讯股份有限公司 Network management data synchronizing method and device
CN107391739A (en) * 2017-08-07 2017-11-24 北京奇艺世纪科技有限公司 A kind of query statement generation method, device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160110398A1 (en) * 2014-10-17 2016-04-21 Unmesh Gandhi Runtime Generation of a Mapping Table for Uploading Data into Structured Data Marts
CN106547786A (en) * 2015-09-22 2017-03-29 阿里巴巴集团控股有限公司 A kind of date storage method and device
CN106708891A (en) * 2015-11-17 2017-05-24 中兴通讯股份有限公司 Network management data synchronizing method and device
CN107391739A (en) * 2017-08-07 2017-11-24 北京奇艺世纪科技有限公司 A kind of query statement generation method, device and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SO YOUNG CHOI ET AL.: "Real-Time Data Stream Management System for Large Volume of RFID Events", 《INSTITUTE OF ELECTRICAL AND ELECTRONICS ENGINEERS》 *
任庆东 等: "基于元数据驱动的通用数据迁移工具", 《东北石油大学学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568696A (en) * 2021-07-29 2021-10-29 成都卓码数智数字科技有限公司 Method for defining service data model through interface operation in digital transformation
CN113590593A (en) * 2021-08-04 2021-11-02 浙江大华技术股份有限公司 Method and device for generating data table information, storage medium and electronic device

Also Published As

Publication number Publication date
CN108959381B (en) 2021-05-28

Similar Documents

Publication Publication Date Title
US10496678B1 (en) Systems and methods for generating and implementing knowledge graphs for knowledge representation and analysis
US8495007B2 (en) Systems and methods for hierarchical aggregation of multi-dimensional data sources
Dourish No SQL: The shifting materialities of database technology
TWI344608B (en) System and method for generating an entity diagram
CN112287126B (en) Entity alignment method and device suitable for multi-mode knowledge graph
US10671671B2 (en) Supporting tuples in log-based representations of graph databases
CN105518658A (en) Apparatus, systems, and methods for grouping data records
KR20200099602A (en) Layered graph data structure
CN110827008A (en) Block chain link point and transaction method
CN108694201A (en) A kind of entity alignment schemes and device
CN108319661A (en) A kind of structured storage method and device of spare part information
WO2018097846A1 (en) Edge store designs for graph databases
CN105518669A (en) Data model change management
CN109656986A (en) A kind of householder method that business datum summarizes, device and electronic equipment
US20090222408A1 (en) Data storage structure
CN108829753A (en) A kind of information processing method and device
JP2019520627A (en) Use of B-trees to store graph information in a database
CN108959381A (en) The management method and device and electronic equipment of data
EP3249557B1 (en) Computer implemented and computer controlled method, computer program product and platform for arranging data for processing and storage at a data storage engine
CN110720097A (en) Functional equivalence of tuples and edges in graph databases
CN110209780A (en) A kind of question template generation method, device, server and storage medium
US20180144060A1 (en) Processing deleted edges in graph databases
CN108550019A (en) A kind of resume selection method and device
WO2016119508A1 (en) Method for recognizing large-scale objects based on spark system
WO2023219734A1 (en) Evaluating row-store expressions on a column-store database

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
TA01 Transfer of patent application right

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant