CN107526806A - The conversion method and device of data - Google Patents
The conversion method and device of data Download PDFInfo
- Publication number
- CN107526806A CN107526806A CN201710724595.9A CN201710724595A CN107526806A CN 107526806 A CN107526806 A CN 107526806A CN 201710724595 A CN201710724595 A CN 201710724595A CN 107526806 A CN107526806 A CN 107526806A
- Authority
- CN
- China
- Prior art keywords
- data
- conversion
- conversion map
- changed
- name
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of conversion method of data and device, it is related to a kind of technical field of data processing, with the demand constantly change of technical staff in the existing field when in generating file and the data of rear end storage when there is difference in main purpose, needing technical staff, department is determined one by one, and it is modified, a large amount of human resources are wasted, and take the problem of longer.Main technical schemes are:Obtain data to be converted;Inquire about conversion map relation corresponding with the converting attribute of the data in conversion map file;Changed according to data described in the conversion map relation pair.It is mainly used in data conversion.
Description
Technical field
The present invention relates to a kind of technical field of data processing, more particularly to the conversion method and device of a kind of data.
Background technology
With the fast development of big data, technical staff can be by some platforms or system come the data to different business
Issued or handled.For example, in the cpm background systems for supporting ad data distribution, technical staff in front end by adding
The field added so that the advertisement engine of rear end issues data according to these fields.
At present, existing operation department, the technical staff of business department can input configuration words by front end system
Section, a file is then generated by command interface, so that the technical staff of rear end and commercialization engine are read out and issued, but
It is, when generating the field in file and the data of rear end storage difference occur with the demand constantly change of technical staff,
Needing technical staff, department is determined one by one, and is modified, and wastes a large amount of human resources, and time-consuming longer.
The content of the invention
In view of this, the present invention provides a kind of conversion method and device of data, and main purpose is existing when generation text
, it is necessary to technical staff when there is difference as the demand of technical staff constantly changes in the data of field in part and rear end storage
Department is determined one by one, and is modified, and wastes a large amount of human resources, and take the problem of longer.
According to one aspect of the invention, there is provided a kind of conversion method of data, including:
Obtain data to be converted;
Inquire about conversion map relation corresponding with the converting attribute of the data in conversion map file;
Changed according to data described in the conversion map relation pair.
Further, after acquisition data to be converted, methods described also includes:
Parse the converting attribute of the data;
Judge whether the form of the converting attribute after parsing is consistent with the form of expected converting attribute, the expected conversion category
Property form be the expected storage form stored corresponding to the data;
If inconsistent, the initiation to system bottom obtains conversion map file request.
Further, the converting attribute includes structure conversion, name conversion, type conversion.
Further, before acquisition data to be converted, methods described also includes:
Changed by data conversion format JSON according to structure, name is changed, type conversion is respectively configured with reference to change
The conversion map relation of amount, and generate and include the conversion map files of all conversion map relations, it is described with reference to variable for for
The node of the data, the name, type, associate field that node is included with reference to variable are replaced in conversion map relation
Name, child node.
Further, the data according to the conversion map relation pair, which carry out conversion, includes:
It is the data by the reference variable replacement in the conversion map relation, and is closed according to the conversion map after replacement
System carries out data conversion.
Further, after the data according to the conversion map relation pair are changed, methods described is also wrapped
Include:
By in the database of the data storage after conversion to system background.
According to one aspect of the invention, there is provided a kind of conversion equipment of data, including:
Acquiring unit, for obtaining data to be converted;
Query unit, closed for inquiring about conversion map corresponding with the converting attribute of the data in conversion map file
System;
Converting unit, changed for the data according to the conversion map relation pair.
Further, described device also includes:
Resolution unit, for parsing the converting attribute of the data;
Judging unit, for judging whether the form of the converting attribute after parsing is consistent with the form of expected converting attribute,
The form of the expected converting attribute is the expected storage form stored corresponding to the data;
Transmitting element, if for inconsistent, the initiation to system bottom obtains conversion map file request.
Further, the converting attribute includes structure conversion, name conversion, type conversion.
Further, described device also includes:
Generation unit, for being changed by data conversion format JSON according to structure, name is changed, type conversion is matched somebody with somebody respectively
Put with the conversion map relation with reference to variable, and generate the conversion map file for including all conversion map relations, the ginseng
It is the node for replacing the data in conversion map relation according to variable, name, the class that node is included with reference to variable
Type, associate field name, child node.
Further, the converting unit, specifically for being institute by the reference variable replacement in the conversion map relation
Data are stated, and data conversion is carried out according to the conversion map relation after replacement.
Further, described device also includes:
Memory cell, for by the database of the data storage after conversion to system background.
According to another aspect of the invention, there is provided a kind of storage medium, being stored with least one in the storage medium can
Execute instruction, the executable instruction make computing device be operated as corresponding to the conversion method of above-mentioned data.
In accordance with a further aspect of the present invention, there is provided a kind of terminal, including:Processor, memory, communication interface and communication
Bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device above-mentioned
Operated corresponding to the conversion method of data.
By above-mentioned technical proposal, technical scheme provided in an embodiment of the present invention at least has following advantages:
The invention provides a kind of conversion method of data and device, obtains data to be converted first, and then inquiry turns
Conversion map relation corresponding with the converting attribute of the data in mapped file is changed, further according to the conversion map relation pair institute
Data are stated to be changed.With the existing field when in generation file with the data that rear end stores as the demand of technical staff is continuous
When changing and difference occur, it is necessary to technical staff department is determined one by one, and be modified and compare, the embodiment of the present invention passes through
Being found from conversion map file needs the correspondence mappings relation of change data, by mapping relations come to the data for needing to change
Changed, so as to reduce the resource consumption that manual operation is brought, reduce the time-consuming of data conversion, simplify the step manually changed
Suddenly, so as to improving the efficiency of data conversion.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention
Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of conversion method flow chart of data provided in an embodiment of the present invention;
Fig. 2 shows the conversion method flow chart of another data provided in an embodiment of the present invention;
Fig. 3 shows a kind of conversion equipment block diagram of data provided in an embodiment of the present invention;
Fig. 4 shows the conversion equipment block diagram of another data provided in an embodiment of the present invention;
Fig. 5 shows a kind of structural representation of terminal provided in an embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
As stated in the Background Art, existing operation department, business department technical staff can be by front end system come defeated
Enter configuration field, a file is then generated by command interface, so that the technical staff of rear end and commercialization engine are read
Hair is removed, still, is gone out when generating the field in file with the data that rear end stores with the demand constantly change of technical staff
During existing difference, it is necessary to technical staff department is determined one by one, and be modified, waste a large amount of human resources, and it is time-consuming compared with
It is long, so as to cause the efficiency of data conversion.
In order to solve the above problems, the embodiments of the invention provide a kind of conversion method of data, as shown in figure 1, described
Method includes:
101st, data to be converted are obtained.
Wherein, the data to be converted are the data that are inputted in front end system, and in general in back-end system in order to enter
Row stores and is easy to different business engine to carry out issuing data, structure, name, the class of the data and the data of backstage storage of input
Type occurs inconsistent, it is therefore desirable to carries out data conversion to such data.Exemplary, data to be converted can be should
With in platform, the field data of technical staff's data, for field data, it is necessary to which the content of conversion can include the storage of field
Structure, the title of field, type of field etc., for example, because the field form stored in background data base is " ad_id ", then
Field data to be converted can be that " _ id " the embodiment of the present invention is not specifically limited.
It should be noted that the data to be converted obtained can generate configuration according to the data of input from front-end platform
Obtained in file, include in this configuration file the data in need for being conveyed to back-end technology personnel and service enabler.
102nd, conversion map relation corresponding with the converting attribute of the data in conversion map file is inquired about.
Wherein, conversion map relation corresponding to different switching attribute, the conversion are stored with the conversion map file
Attribute include structure conversion, name conversion, type conversion, the conversion map relation be for by data conversion to be converted into
It is expected that the sentence of transition form, for example, the type " 2017.5.11 " that conversion map relation can be directed to field to be converted is converted to
" 2017-05-11 ", the embodiment of the present invention are not specifically limited to the code form of conversion map relation.
It should be noted that the conversion map relation in conversion map file is technical staff beforehand through data conversion lattice
Formula JSON is configured, and corresponding conversion mapping relations are respectively configured in each converting attribute, to be changed to data
When corresponding sentence is directly found out from conversion map file, avoid repeat compile and repeat change.
103rd, the data according to the conversion map relation pair are changed.
Wherein, mapping relations corresponding to specific converting attribute can be determined by the conversion map relation, it is each
The corresponding converting attribute of individual mapping relations, the mapping relations turn for the storage form of data current data to be converted with expected
One-to-one relationship between the storage form changed, the storage form of data can be turned by this one-to-one relationship
Change, so as to realize automatic data transfer method.
It should be noted that in general, another can be generated after being changed to data by converted data storage
File, it is stored in the back-end data base of system, so that background data base is stored and service enabler carries out issuing data.
The embodiments of the invention provide a kind of conversion method of data, is deposited with the existing field when in generation file with rear end
The data of storage with the demand of technical staff constantly change and when there is difference, it is necessary to technical staff department is determined one by one,
And be modified and compare, the embodiment of the present invention needs the correspondence mappings of change data to close by being found from conversion map file
System, changed come the data changed to needs by mapping relations, so as to reduce the resource consumption that manual operation is brought, reduced
Time-consuming, simplified artificial the step of changing, so as to improve the efficiency of data conversion of data conversion.
The embodiments of the invention provide the conversion method of another data, as shown in Fig. 2 methods described includes:
201st, changed by data conversion format JSON according to structure, name is changed, type conversion is respectively configured with ginseng
According to the conversion map relation of variable, and generate the conversion map file for including all conversion map relations.
Wherein, described with reference to variable is node for replacing the data in conversion map relation, described with reference to becoming
Amount includes name, type, associate field name, the child node of node, and the data are field data, and the field data is skill
The field that art personnel or user are inputted by front-end platform system, for example, the difference according to adline is needed on cpm backstages,
Different field types is configured to carry out the issue of advertisement, the field of user's input can include:Time field, Correlation Criteria word
Section, advertised name field etc., the embodiment of the present invention is not specifically limited.
It should be noted that bring substantial amounts of work to development technique personnel in order to avoid editing all conversion map relations
Measure, so as to the reference variable for needing to change according to the configuration of JSON salient feature, the name of the node with reference to variable can
To be represented with " node_name ", to represent the name of data to be converted, the type of node can with " node_type " come
Represent, in general, can be the side of basic data type or format conversion to represent the type of data to be converted
Religious name, for example, colon2line is exactly the method name for the time format for time format during storage being converted into generation, node
Associate field can be represented with " related_node ", to represent associating for data of the data to be converted with being expected conversion,
For example, " node_name ":Ad_id, relative " related_node ":_ id, child node can be with " child_node " come table
Show, to represent to need the data of data conversion.
202nd, data to be converted are obtained.
This step is identical with step 101 method shown in Fig. 1, will not be repeated here.
It should be noted that it is technical staff by front-end platform by all Field Counts currently to obtain data to be converted
After input, after generating configuration file, in order to ensure the storage form of field and the field on data backstage in configuration file
Storage form, asked from the acquisition of trend system bottom send configuration file, so as to carry out the conversion of data.
203rd, the converting attribute of the data is parsed.
For the embodiment of the present invention, because different field datas corresponds to different converting attributes, and it is possible to be converted
The change data of field is the same with expected transition form, in order to accurately wait to turn from conversion map ff to current
Conversion map relation corresponding to field is changed, and avoids repeating carrying out format transformation to field, it is necessary to parse current number to be converted
According to change data.
It should be noted that parsing converting attribute can be judged according to the mark belonging to field, for example, field is
" 2013.2.3 ", the time is identified as, then can determine that the attribute of field is changed for type, the embodiment of the present invention does not do specific limit
It is fixed.
204th, judge whether the form of the converting attribute after parsing is consistent with the form of expected converting attribute.
Wherein, the form of the expected converting attribute is the expected storage form stored corresponding to the data, stores shape
Formula includes data storage format, title storage form, time storage form.For example, if the field of front-end platform input is
Ad_id, and the field form of data storage is also ad_id, then it is assumed that it is consistent, it is not necessary to data conversion is carried out, saves resource,
Avoid causing unnecessary conversion.
If 205a, inconsistent, the initiation acquisition conversion map file request to system bottom.
Wherein, typically can be by this kind of configuration because conversion map file is the file that is previously stored with conversion map relation
File is stored in the premise that demand in system operation in system bottom, only be present, can just carry out file calling, be deposited to save
Store up space.
It should be noted that when initiating to obtain conversion map file request to bottom, it is thus necessary to determine that current conversion is reflected
Penetrate file whether be recent renewal file, can be judged according to the generation time of conversion map file, if generation time
Special time is exceeded, such as one month, has then needed to send the renewal request of conversion map file, used in the determination that user returns
Current file is just obtained after the response of current conversion map file, so as to ensure that the real-time of data conversion, it is ensured that when
The preceding field form changed is newest field form.
For the embodiment of the present invention, the step arranged side by side with step 205a:If form and the expection of the converting attribute after parsing
The form of converting attribute is consistent, then sends the prompt message without conversion.
Wherein, the prompt message is used for the field data for prompting front end and the field form being stored in back-end data base
It is the same, without carrying out field conversion, prompt message can be sent by speech form, dialogue box form, and the present invention is real
Example is applied to be not specifically limited.
For the embodiment of the present invention, step 206 after step 205a, in inquiry conversion map file with the data
Conversion map relation corresponding to converting attribute.
This step is identical with step 102 method shown in Fig. 1, will not be repeated here.
207th, the data according to the conversion map relation pair are changed.
This step is identical with step 103 method shown in Fig. 1, will not be repeated here.
For the embodiment of the present invention, step is specifically as follows:To be with reference to variable replacement in the conversion map relation
The data, and carry out data conversion according to the conversion map relation after replacement.
Wherein, described will be that field data is to be added the field for needing to be changed by replacing with reference to variable replacement
Into conversion map relation, so as to according to conversion map relation be for need replace after conversion field sentence so that
Realization is automatically processed and changed corresponding to different switching attribute, is carried out manual switch without artificial, is reduced cost of labor, improve data
Conversion efficiency.For example, the reference variable in conversion map relation includes " node_name ", " node_type ", " related_
Node ", " child_node ", it is respectively with reference to variable according to corresponding to replacing the name id of input field:“node_
name”:" ad_id ", " node_type ":“int”:“related_app”:" _ id ", without right for simple name
" child_node " sets mapping relations, then corresponds to replacement and be with reference to variable:“child_node”:[], but for number
Replaced according to the parameter of storage organization converting attribute, then for the setting of next stage can be carried out with reference to variable " child_node ",
The embodiment of the present invention is not specifically limited.
208th, by the database of the data storage after conversion to system background.
Wherein, the data after the conversion are stored with document form, and the database of the system background can be to be
The spatial cache on system backstage or the local storage space of system background, the embodiment of the present invention are not specifically limited.
For the embodiment of the present invention, directly the data after conversion are carried out in order to facilitate backstage technical staff and service enabler
Inquiry is carried out issuing data with reference to the data after change data, and the data after conversion are generated into a new configuration file, deposited
Storage is easy to data to extract, and save the record of data conversion into background data base.
The embodiments of the invention provide the conversion method of another data, with the existing field when in generation file and rear end
The data of storage with the demand of technical staff constantly change and when there is difference, it is necessary to technical staff one by one department carry out it is true
It is fixed, and be modified and compare, the embodiment of the present invention according to structure by being changed, name is changed, type conversion is pre-configured with and included
With reference to the mapping relations between the name of variable node, type, associate field name, child node, by any time from being stored with mapping
Mapping relations corresponding to extraction, carry out field conversion in the file of relation, and before conversion, it is also necessary to judge whether that field needs
The operation such as format transformation is carried out, it is determined that it is expected that when storage form and the different form of present field, just progress data conversion,
The wasting of resources caused by so as to avoid unnecessary data conversion process, the resource consumption that manual operation is brought is reduced, simplify people
The step of work is changed, realizes in the case of unattended, full automatic progress field conversion, so as to improve the effect of data conversion
Rate.
Further, as the realization to method shown in above-mentioned Fig. 1, the embodiments of the invention provide a kind of conversion of data
Device, as shown in figure 3, the device includes:Acquiring unit 31, query unit 32, converting unit 33.
Acquiring unit 31, for obtaining data to be converted;The acquiring unit 31 is performed for the conversion equipment of data and obtained
Take the functional module of data to be converted.Wherein, the data to be converted are the data that are inputted in front end system, in general
In order to be stored and be easy to different business engine to carry out issuing data, the data and the number of backstage storage of input in back-end system
According to structure, name, type occur it is inconsistent, it is therefore desirable to data conversion is carried out to such data.
Query unit 32, closed for inquiring about conversion map corresponding with the converting attribute of the data in conversion map file
System;The query unit 32 performs the converting attribute pair in inquiry conversion map file with the data for the conversion equipment of data
The functional module for the conversion map relation answered.Wherein, it is stored with corresponding to different switching attribute and turns in the conversion map file
Change mapping relations, the converting attribute includes structure conversion, name conversion, type conversion, the conversion map relation be for
Sentence by data conversion to be converted into expected transition form, for example, conversion map relation can be directed to field to be converted
Type " 2017.5.11 " is converted to " 2017-05-11 ", and the embodiment of the present invention is not done to the code form of conversion map relation to be had
Body limits.
Converting unit 33, changed for the data according to the conversion map relation pair.The converting unit 33
The functional module changed for conversion equipment execution data according to the conversion map relation pair of data.Wherein, lead to
Mapping relations corresponding to specific converting attribute can be determined by crossing the conversion map relation, each mapping relations corresponding one
Individual converting attribute, the mapping relations are between the storage form of data current data to be converted and the storage form of expected conversion
One-to-one relationship, the storage form of data can be changed by this one-to-one relationship, it is automatic so as to realize
Data transfer method.
The invention provides a kind of conversion equipment of data, with the existing field when in generation file and the number of rear end storage
According to the constantly change of the demand with technical staff when there is difference, it is necessary to technical staff department is determined one by one, and carry out
Change is compared, and the embodiment of the present invention needs the correspondence mappings relation of change data by being found from conversion map file, passes through
Mapping relations are changed come the data changed to needs, so as to reduce the resource consumption that manual operation is brought, reduce data and turn
That changes is time-consuming, simplifies artificial the step of changing, so as to improve the efficiency of data conversion.
Further, as the realization to method shown in above-mentioned Fig. 2, the embodiments of the invention provide turning for another data
Changing device, as shown in figure 4, the device includes:Acquiring unit 41, query unit 42, converting unit 43, resolution unit 44, judgement
Unit 45, transmitting element 46, generation unit 47, memory cell 48.
Acquiring unit 41, for obtaining data to be converted;
Wherein, the data to be converted are the data that are inputted in front end system, and in general in back-end system in order to enter
Row stores and is easy to different business engine to carry out issuing data, structure, name, the class of the data and the data of backstage storage of input
Type occurs inconsistent, it is therefore desirable to carries out data conversion to such data.
Query unit 42, closed for inquiring about conversion map corresponding with the converting attribute of the data in conversion map file
System;
Wherein, conversion map relation corresponding to different switching attribute, the conversion are stored with the conversion map file
Attribute include structure conversion, name conversion, type conversion, the conversion map relation be for by data conversion to be converted into
It is expected that the sentence of transition form.
Converting unit 43, changed for the data according to the conversion map relation pair.
Wherein, mapping relations corresponding to specific converting attribute can be determined by the conversion map relation, it is each
The corresponding converting attribute of individual mapping relations, the mapping relations turn for the storage form of data current data to be converted with expected
One-to-one relationship between the storage form changed, the storage form of data can be turned by this one-to-one relationship
Change, so as to realize automatic data transfer method.In general, converted data storage can be given birth to after being changed to data
Into another file, so that background data base is stored and service enabler carries out issuing data.
Specifically, the converting attribute includes structure conversion, name conversion, type conversion.
Further, described device also includes:
Resolution unit 44, for parsing the converting attribute of the data;
For the embodiment of the present invention, because different field datas corresponds to different converting attributes, and it is possible to be converted
The change data of field is the same with expected transition form, in order to accurately wait to turn from conversion map ff to current
Conversion map relation corresponding to field is changed, and avoids repeating carrying out format transformation to field, it is necessary to parse current number to be converted
According to change data.
Judging unit 45, for judge the form of the converting attribute after parsing and expected converting attribute form whether one
Cause, the form of the expected converting attribute is the expected storage form stored corresponding to the data;
Wherein, the form of the expected converting attribute is the expected storage form stored corresponding to the data, stores shape
Formula includes data storage format, title storage form, time storage form.
Transmitting element 46, if for inconsistent, the initiation to system bottom obtains conversion map file request.
Wherein, typically can be by this kind of configuration because conversion map file is the file that is previously stored with conversion map relation
File is stored in the premise that demand in system operation in system bottom, only be present, can just carry out file calling, be deposited to save
Store up space.
Specifically, the data are field data.
Further, described device also includes:
Generation unit 47, for being changed by data conversion format JSON according to structure, name is changed, type conversion is distinguished
Configuration generates the conversion map file for including all conversion map relations with the conversion map relation with reference to variable.
Wherein, described with reference to variable is node for replacing the data in conversion map relation, described with reference to becoming
Amount includes name, type, associate field name, the child node of node, and the data are field data, and the field data is skill
The field that art personnel or user are inputted by front-end platform system, for example, the difference according to adline is needed on cpm backstages,
Different field types is configured to carry out the issue of advertisement, the field of user's input can include:Time field, Correlation Criteria word
Section, advertised name field etc., the embodiment of the present invention is not specifically limited.
Specifically, the converting unit 43, specifically for being institute by the reference variable replacement in the conversion map relation
Data are stated, and data conversion is carried out according to the conversion map relation after replacement.
Further, described device also includes:
Memory cell 48, for by the database of the data storage after conversion to system background.
Wherein, the data after the conversion are stored with document form, and the database of the system background can be to be
The spatial cache on system backstage or the local storage space of system background, the embodiment of the present invention are not specifically limited.
The embodiments of the invention provide the conversion equipment of another data, with the existing field when in generation file and rear end
The data of storage with the demand of technical staff constantly change and when there is difference, it is necessary to technical staff one by one department carry out it is true
It is fixed, and be modified and compare, the embodiment of the present invention according to structure by being changed, name is changed, type conversion is pre-configured with and included
With reference to the mapping relations between the name of variable node, type, associate field name, child node, by any time from being stored with mapping
Mapping relations corresponding to extraction, carry out field conversion in the file of relation, and before conversion, it is also necessary to judge whether that field needs
The operation such as format transformation is carried out, it is determined that it is expected that when storage form and the different form of present field, just progress data conversion,
The wasting of resources caused by so as to avoid unnecessary data conversion process, the resource consumption that manual operation is brought is reduced, simplify people
The step of work is changed, realizes in the case of unattended, full automatic progress field conversion, so as to improve the effect of data conversion
Rate.
A kind of storage medium is provided according to one embodiment of the invention, it is executable that the storage medium is stored with least one
Instruction, the computer executable instructions can perform the conversion method of the data in above-mentioned any means embodiment.
Fig. 5 shows a kind of structural representation of the terminal provided according to one embodiment of the invention, of the invention specific real
Specific implementation of the example not to terminal is applied to limit.
As shown in figure 5, the terminal can include:Processor (processor) 51, communication interface (Communications
Interface) 52, memory (memory) 53 and communication bus 54.Wherein:Processor 51, communication interface 52, Yi Jicun
Reservoir 53 completes mutual communication by communication bus 54.Communication interface 504, for miscellaneous equipment such as client or its
The network element communication of its server etc..Processor 51, for configuration processor, the conversion method that can specifically perform above-mentioned data is implemented
Correlation step in example.Specifically, program can include program code, and the program code includes computer-managed instruction.Processing
Device 51 is probably central processor CPU, or specific integrated circuit ASIC (Application Specific
Integrated Circuit), or it is arranged to implement one or more integrated circuits of the embodiment of the present invention.
The one or more processors that terminal includes, can be same type of processor, such as one or more CPU;
Can be different types of processor, such as one or more CPU and one or more ASIC.Memory 53, for depositing journey
Sequence.Memory 53 may include high-speed RAM memory, it is also possible to also including nonvolatile memory (non-volatile
Memory), a for example, at least magnetic disk storage.Program specifically can be used for so that processor 51 performs following operation:Obtain
Data to be converted;Inquire about conversion map relation corresponding with the converting attribute of the data in conversion map file;According to institute
Data described in stating conversion map relation pair are changed.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of system
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself
Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be realized with hardware, or to be run on one or more processor
Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice
Microprocessor or digital signal processor (DSP) are realized in the conversion method of data according to embodiments of the present invention and device
Some or all parts some or all functions.The present invention is also implemented as being used to perform side as described herein
The some or all equipment or program of device (for example, computer program and computer program product) of method.It is such
Realizing the program of the present invention can store on a computer-readable medium, or can have the shape of one or more signal
Formula.Such signal can be downloaded from internet website and obtained, and either be provided or with any other shape on carrier signal
Formula provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real
It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
Embodiment of the invention discloses that:
A1, a kind of conversion method of data, including:
Obtain data to be converted;
Inquire about conversion map relation corresponding with the converting attribute of the data in conversion map file;
Changed according to data described in the conversion map relation pair.
A2, the method according to A1, it is described obtain data to be converted after, methods described also includes:
Parse the converting attribute of the data;
Judge whether the form of the converting attribute after parsing is consistent with the form of expected converting attribute, the expected conversion category
Property form be the expected storage form stored corresponding to the data;
If inconsistent, the initiation to system bottom obtains conversion map file request.
A3, the method according to A2, the converting attribute include structure conversion, name conversion, type conversion.
A4, the method according to A3, it is described obtain data to be converted before, methods described also includes:
Changed by data conversion format JSON according to structure, name is changed, type conversion is respectively configured with reference to change
The conversion map relation of amount, and generate and include the conversion map files of all conversion map relations, it is described with reference to variable for for
The node of the data, the name, type, associate field that node is included with reference to variable are replaced in conversion map relation
Name, child node.
Method described in A5, the A1, the data according to the conversion map relation pair, which carry out conversion, to be included:
It is the data by the reference variable replacement in the conversion map relation, and is closed according to the conversion map after replacement
System carries out data conversion.
Method described in A6, any one of A1-A5, the data according to the conversion map relation pair are turned
After alternatively, methods described also includes:
By in the database of the data storage after conversion to system background.
B7, a kind of conversion equipment of data, including:
Acquiring unit, for obtaining data to be converted;
Query unit, closed for inquiring about conversion map corresponding with the converting attribute of the data in conversion map file
System;
Converting unit, changed for the data according to the conversion map relation pair.
B8, the device according to B7, described device also include:
Resolution unit, for parsing the converting attribute of the data;
Judging unit, for judging whether the form of the converting attribute after parsing is consistent with the form of expected converting attribute,
The form of the expected converting attribute is the expected storage form stored corresponding to the data;
Transmitting element, if for inconsistent, the initiation to system bottom obtains conversion map file request.
B9, the device according to B8, the converting attribute include structure conversion, name conversion, type conversion.
B10, the device according to B9, described device also include:
Generation unit, for being changed by data conversion format JSON according to structure, name is changed, type conversion is matched somebody with somebody respectively
Put with the conversion map relation with reference to variable, and generate the conversion map file for including all conversion map relations, the ginseng
It is the node for replacing the data in conversion map relation according to variable, name, the class that node is included with reference to variable
Type, associate field name, child node.
B11, the device according to B7,
The converting unit, specifically for being the data by the reference variable replacement in the conversion map relation, and
Data conversion is carried out according to the conversion map relation after replacement.
B12, the device according to any one of B7-B11, described device also include:
Memory cell, for by the database of the data storage after conversion to system background.
C13, a kind of storage medium, an at least executable instruction, the executable instruction are stored with the storage medium
Make operation corresponding to the conversion method of data of the computing device as any one of A1-A6.
D14, a kind of terminal, including:Processor, memory, communication interface and communication bus, the processor, described deposit
Reservoir and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device such as
Operated corresponding to the conversion method of data any one of A1-A6.
Claims (10)
- A kind of 1. conversion method of data, it is characterised in that including:Obtain data to be converted;Inquire about conversion map relation corresponding with the converting attribute of the data in conversion map file;Changed according to data described in the conversion map relation pair.
- 2. according to the method for claim 1, it is characterised in that after acquisition data to be converted, methods described is also Including:Parse the converting attribute of the data;Judge whether the form of the converting attribute after parsing is consistent with the form of expected converting attribute, the expected converting attribute Form is the expected storage form stored corresponding to the data;If inconsistent, the initiation to system bottom obtains conversion map file request.
- 3. according to the method for claim 2, it is characterised in that the converting attribute includes structure conversion, name conversion, class Type is changed.
- 4. according to the method for claim 3, it is characterised in that before acquisition data to be converted, methods described is also Including:Changed by data conversion format JSON according to structure, name is changed, type conversion is respectively configured with reference to variable Conversion map relation, and the conversion map file for including all conversion map relations is generated, the reference variable is for turning Change in mapping relations and replace the node of the data, it is described with reference to name of the variable including node, type, associate field name, son Node.
- A kind of 5. conversion equipment of data, it is characterised in that including:Acquiring unit, for obtaining data to be converted;Query unit, for inquiring about conversion map relation corresponding with the converting attribute of the data in conversion map file;Converting unit, changed for the data according to the conversion map relation pair.
- 6. device according to claim 5, it is characterised in that described device also includes:Resolution unit, for parsing the converting attribute of the data;Judging unit, it is described for judging whether the form of the converting attribute after parsing is consistent with the form of expected converting attribute It is expected that the form of converting attribute is the expected storage form stored corresponding to the data;Transmitting element, if for inconsistent, the initiation to system bottom obtains conversion map file request.
- 7. device according to claim 6, it is characterised in that the converting attribute includes structure conversion, name conversion, class Type is changed.
- 8. device according to claim 7, it is characterised in that described device also includes:Generation unit, for being changed by data conversion format JSON according to structure, name is changed, tool is respectively configured in type conversion With reference to the conversion map relation of variable, and the conversion map file for including all conversion map relations is generated, it is described with reference to change Measure as the node for replacing the data in conversion map relation, the name, type, pass that node is included with reference to variable Join field name, child node.
- 9. a kind of storage medium, an at least executable instruction is stored with the storage medium, the executable instruction makes processing Device performs operation corresponding to the conversion method of the data as any one of claim 1-4.
- 10. a kind of terminal, including:Processor, memory, communication interface and communication bus, the processor, the memory and The communication interface completes mutual communication by the communication bus;The memory is used to deposit an at least executable instruction, and the executable instruction makes the computing device such as right will Ask and operated corresponding to the conversion method of the data any one of 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710724595.9A CN107526806A (en) | 2017-08-22 | 2017-08-22 | The conversion method and device of data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710724595.9A CN107526806A (en) | 2017-08-22 | 2017-08-22 | The conversion method and device of data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107526806A true CN107526806A (en) | 2017-12-29 |
Family
ID=60681843
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710724595.9A Pending CN107526806A (en) | 2017-08-22 | 2017-08-22 | The conversion method and device of data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107526806A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108563768A (en) * | 2018-04-19 | 2018-09-21 | 中国平安财产保险股份有限公司 | Data transfer device, device, equipment and the storage medium of different data model |
CN108595391A (en) * | 2018-04-28 | 2018-09-28 | 中国建设银行股份有限公司 | A kind of data information conversion method and device |
CN108763080A (en) * | 2018-05-29 | 2018-11-06 | 平安普惠企业管理有限公司 | Test data method for uploading, device, computer equipment and storage medium |
CN109086442A (en) * | 2018-08-16 | 2018-12-25 | 口口相传(北京)网络技术有限公司 | The methods of exhibiting and device of business datum |
CN109875521A (en) * | 2019-04-18 | 2019-06-14 | 厦门纳龙科技有限公司 | A kind of analysis of ECG data and system |
CN109885532A (en) * | 2019-02-11 | 2019-06-14 | 中国银行股份有限公司 | A kind of transaction data standardized method and device |
CN110379257A (en) * | 2019-06-13 | 2019-10-25 | 广东工业大学 | A kind of multilingual cross-platform online code fighting system and method |
CN111143446A (en) * | 2019-11-26 | 2020-05-12 | 贝壳技术有限公司 | Data structure conversion processing method and device of data object and electronic equipment |
CN112882974A (en) * | 2021-02-09 | 2021-06-01 | 深圳市云网万店科技有限公司 | JSON data conversion method and device, computer equipment and storage medium |
-
2017
- 2017-08-22 CN CN201710724595.9A patent/CN107526806A/en active Pending
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108563768A (en) * | 2018-04-19 | 2018-09-21 | 中国平安财产保险股份有限公司 | Data transfer device, device, equipment and the storage medium of different data model |
CN108563768B (en) * | 2018-04-19 | 2023-05-23 | 中国平安财产保险股份有限公司 | Data conversion method, device, equipment and storage medium for different data models |
CN108595391A (en) * | 2018-04-28 | 2018-09-28 | 中国建设银行股份有限公司 | A kind of data information conversion method and device |
CN108763080A (en) * | 2018-05-29 | 2018-11-06 | 平安普惠企业管理有限公司 | Test data method for uploading, device, computer equipment and storage medium |
CN109086442B (en) * | 2018-08-16 | 2021-07-06 | 口口相传(北京)网络技术有限公司 | Business data display method and device |
CN109086442A (en) * | 2018-08-16 | 2018-12-25 | 口口相传(北京)网络技术有限公司 | The methods of exhibiting and device of business datum |
CN109885532A (en) * | 2019-02-11 | 2019-06-14 | 中国银行股份有限公司 | A kind of transaction data standardized method and device |
CN109875521A (en) * | 2019-04-18 | 2019-06-14 | 厦门纳龙科技有限公司 | A kind of analysis of ECG data and system |
CN110379257A (en) * | 2019-06-13 | 2019-10-25 | 广东工业大学 | A kind of multilingual cross-platform online code fighting system and method |
CN110379257B (en) * | 2019-06-13 | 2021-03-30 | 广东工业大学 | Multi-language cross-platform online code fighting system and method |
CN111143446A (en) * | 2019-11-26 | 2020-05-12 | 贝壳技术有限公司 | Data structure conversion processing method and device of data object and electronic equipment |
CN112882974A (en) * | 2021-02-09 | 2021-06-01 | 深圳市云网万店科技有限公司 | JSON data conversion method and device, computer equipment and storage medium |
CN112882974B (en) * | 2021-02-09 | 2024-01-05 | 深圳市云网万店科技有限公司 | JSON data conversion method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107526806A (en) | The conversion method and device of data | |
CN108279932B (en) | Method and device for dynamically configuring user interface of mobile terminal | |
CN109614102A (en) | Code automatic generation method, device, electronic equipment and storage medium | |
CN104376068A (en) | Data representation system and method based on dynamic report template | |
CN110472207A (en) | List generation method and device | |
CN104731589A (en) | Automatic generation method and device of user interface (UI) | |
CN108829378A (en) | A kind of development approach of application software, device and electronic equipment | |
CN101556669A (en) | Method and device for conducting personalized marketing with user by using human-computer interaction technology | |
CN101833714A (en) | Method, device and system for controlling power of examination and approval | |
CN104717179A (en) | Communication service processing method and device | |
CN102426612A (en) | Condition object query method and system | |
CN105975489A (en) | Metadata-based online SQL code completion method | |
CN111881042A (en) | Automatic test script generation method and device and electronic equipment | |
CN104361040A (en) | Method and device for customized query | |
CN105450589B (en) | Remote invocation method and system | |
CN105159974A (en) | Method for automatically generating cross-data-source web service | |
CN111104181A (en) | Webpage data filling system for visually editing task flow | |
CN102811257A (en) | Automatic publication and combination method for Web service | |
CN102567517A (en) | Device and method for issuing data of database | |
CN109739504B (en) | Method for automatically generating H5 service handling page according to background configuration | |
CN110032574A (en) | The processing method and processing device of SQL statement | |
CN112947900A (en) | Web application development method and device, server and development terminal | |
CN112214236A (en) | Method for building management system of application architecture of software rapid development platform | |
Thongmak et al. | Design of rules for transforming uml sequence diagrams into java code | |
CN112184481B (en) | Smart power grid arrearage processing method and device combining RPA and AI |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171229 |