Summary of the invention
Technical problems to be solved in this application are to provide a kind of data creation method and device, in order to solve the technical matters that instructions text conversion cannot be become can provide for developer the page data of eye impressions in prior art.
The application provides a kind of data creation method, comprising:
Dimension data in the instructions lteral data of identification destination item;
According to described dimension data, set up view interface data, described view interface data comprise the dimension layout structure data of described destination item;
Described dimension layout structure data are carried out to Data Format Transform, obtain the visual model data of described destination item.
Said method, preferred, the dimension data in the instructions lteral data of described identification destination item, comprising:
According at least one default dimension keys, the instructions lteral data of destination item is scanned, obtain the dimension data corresponding with described dimension keys in described instructions lteral data.
Said method, preferred, the described dimension data of described foundation, sets up view interface data, comprising:
Extract dimension item in described dimension data and the data content of each dimension item;
Build stereoscopic arrangement's model of described dimension item composition;
The data content of each dimension item is filled in described stereoscopic arrangement model, obtains the dimension layout structure data of described destination item.
Said method, preferred, described dimension layout structure data are carried out to Data Format Transform, obtain the visual model data of described destination item, comprising:
Determine the target data structure of object module;
According to described target data structure, described dimension layout structure data are carried out to data-switching, obtain the visual model data of described destination item.
Said method, preferred, the target data structure of described definite object module, comprising:
Determine the excel data structure of excel model or the web page data structure of web page model.
The application also provides a kind of data generating device, comprising:
Dimension recognition unit, for identifying the dimension data of instructions lteral data of destination item;
Layout is set up unit, for according to described dimension data, sets up view interface data, and described view interface data comprise the dimension layout structure data of described destination item;
Date Conversion Unit, for described dimension layout structure data are carried out to Data Format Transform, obtains the visual model data of described destination item.
Said apparatus, preferred, described dimension recognition unit comprises:
Key value scanning subelement, at least one dimension keys according to default, scans the instructions lteral data of destination item, obtains the dimension data corresponding with described dimension keys in described instructions lteral data.
Said apparatus, preferred, described layout is set up unit and is comprised:
Data are extracted subelement, for extracting the dimension item of described dimension data and the data content of each dimension item;
Model construction subelement, for building stereoscopic arrangement's model of described dimension item composition;
Content is filled subelement, for the data content of each dimension item being filled to described stereoscopic arrangement model, obtains the dimension layout structure data of described destination item.
Said apparatus, preferred, described Date Conversion Unit comprises;
Structure is determined subelement, for determining the target data structure of object module;
Structure conversion subelement, for according to described target data structure, carries out data-switching by described dimension layout structure data, obtains the visual model data of described destination item.
Said apparatus, preferred, described structure determine subelement specifically for: determine the excel data structure of excel model or the web page data structure of web page model.
From such scheme, a kind of data creation method and device that the application provides, identify by the instructions lteral data to destination item, after obtaining its dimension data, according to these dimension datas, foundation comprises the view interface data by the dimension layout structure data of destination item, and then these dimension layout structure data are carried out to Data Format Transform, to obtain the visual model data of destination item, provide when carrying out destination item to developer vision mode intuitively to show, improve the development efficiency of destination item.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiment.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtaining under creative work prerequisite, all belong to the scope of the application's protection.
With reference to figure 1, the process flow diagram of a kind of data creation method embodiment mono-providing for the application, wherein, described method is with thinking that developer or business personnel provide the visual model data with eye impressions directly perceived, as shown in flow process in Fig. 1, described method can comprise the following steps:
Step 101: the dimension data in the instructions lteral data of identification destination item.
Wherein, described destination item can be the database projects such as report item.For example, user need developer encode make a report tool, to realize the output of corresponding report data, now, the development project of described report tool is described destination item.Accordingly, the instructions lteral data of described destination item is the explanatory note part of the function declaration book of described destination item, show user's request, the function items that can realize in report tool as required in user, as list, field, button, dynamic chain etc.
It should be noted that, described dimension data refers to the data item field in described destination item etc., as data item fields such as the sex in form, name, ages.
Step 102: according to described dimension data, set up view interface data, described view interface data comprise the dimension layout structure data of described destination item.
Wherein, in above, described dimension data includes the data item field in destination item, in described step 102, according to these data item fields, build dimension layout, in this dimension layout with multidimensional form framework, in described dimension layout, fill by the data content in data item field, form dimension layout structure data, described dimension layout structure data can show the view interface of described destination item, as represent layout format to developer etc., and these dimension layout structure data are to be directly developer's visual data directly perceived, now carry out described step 103.
Step 103: described dimension layout structure data are carried out to Data Format Transform, obtain the visual model data of described destination item.
Wherein, in above, described dimension layout structure data can show the view interface of described destination item, and the form with data item exists, and cannot give the visual interfaces directly perceived such as developer, therefore, in described step 103, need to carry out Data Format Transform to described dimension layout structure data, to obtain the visual model data of destination item, these visual model data can provide visual data viewing experience directly perceived for developer.
From such scheme, a kind of data creation method embodiment mono-that the application provides, identify by the instructions lteral data to destination item, after obtaining its dimension data, according to these dimension datas, foundation comprises the view interface data by the dimension layout structure data of destination item, and then these dimension layout structure data are carried out to Data Format Transform, to obtain the visual model data of destination item, provide when carrying out destination item to developer vision mode intuitively to show, improve the development efficiency of destination item.
With reference to figure 2, the process flow diagram of a kind of data creation method embodiment bis-providing for the application, wherein, described step 101 can realize by following steps:
Step 111: according at least one default dimension keys, the instructions lteral data of destination item is scanned, obtain the dimension data corresponding with described dimension keys in described instructions lteral data.
Wherein, described dimension keys can comprise unit key word, as Beijing, Tianjin, Hebei etc., time key word can also be comprised, as 2012,2013 etc., expenditure can also be comprised, as social insurance, casualty insurance etc., can also comprise employee's attribute.
As shown in Figure 3, after the unit dimension keys scanning in described step 111, obtain unit dimension in the dimension data in described instructions lteral data and include: Beijing company, Tianjin company, Hebei company etc. and corresponding sub-dimension data thereof.Described sub-dimension data can be dimension data as shown in Figure 4.
As shown in Figure 4, after scanning by the employee's attribute key word in described step 111, obtaining employee's attribute dimensions in the dimension data in described instructions lteral data includes: name, sex, age, native place etc. and corresponding employee's attribute value data thereof, and as Zhao Jia, female, 28 years old, Beijing etc.
With reference to figure 5, the process flow diagram of step 102 described in a kind of data creation method embodiment tri-providing for the application, wherein, described step 102 can comprise the following steps:
Step 121: extract dimension item in described dimension data and the data content of each dimension item.
Wherein, described dimension item can be unit dimension item, the employee's attribute dimensions item etc. as shown in Fig. 3 or 4, and the data content of each dimension item can be content as shown in Figure 4, as employee's attribute value data.
It should be noted that, the data content of described dimension item can be the data reference value data that are illustrated in described instructions lteral data, as Zhao Jia, 28 years old etc.
Step 122: the stereoscopic arrangement's model that builds described dimension item composition.
Wherein, in described step 122, refer to, build stereoscopic arrangement's model according to dimension item, concrete, each dimension item is preset or the sequence of self-defining dimension order, afterwards, these dimension items are set up to stereoscopic arrangement's model, as cube model, corresponding two the dimension items of this cubical each face, stereoscopic arrangement's model that three dimensionality item is set up as shown in Figure 6: dimension A, dimension B, dimension C, the clooating sequence of the dimension item in this stereoscopic arrangement's model can freely arrange, now, in described stereoscopic arrangement model, in each dimension item, content is empty.
Step 123: the data content of each dimension item is filled in described stereoscopic arrangement model, obtains the dimension layout structure data of described destination item.
Wherein, in stereoscopic arrangement's model as shown in Figure 6, described data content is filled in corresponding dimension item, forms the dimension layout structure data of described destination item.
It should be noted that, although described dimension layout structure data can show the layout structure of described destination item, but its data structure belongs to database rank data, its display format is still data item form, cannot be developed personnel and intuitively see the layout structure of destination item.Now, in subsequent step 103, this dimension layout structure data are carried out to Data Format Transform, obtain developer and can intuitively see the visual model data of the layout structure of described destination item.
With reference to figure 7, the process flow diagram of step 103 described in a kind of data creation method embodiment tetra-providing for the application, wherein, described step 103 can comprise the following steps:
Step 131: the target data structure of determining object module.
Wherein, described object module can be excel model, or can be also web page model.And the target data structure of described object module is corresponding, can be excel data structure, or also can be web page data structure.Concrete, described step 131 can realize in the following manner:
Determine the excel data structure of excel model or the web page data structure of web page model.
Step 132: according to described target data structure, described dimension layout structure data are carried out to data-switching, obtain the visual model data of described destination item.
Concrete, in described step 132, can realize in the following manner:
Described dimension layout structure data are carried out to the corresponding format conversion of excel data structure, obtain the visual model data of described destination item, these visual model data can be understood as excel model data, for developer provides visual interface layout directly perceived.
Wherein, described excel model data is after being done, can also beautify excel model data according to the pattern data in instructions lteral data, as adjust excel form line width, be listed as high, hide without the partial words segment data representing to developer, give list Fill Color and pane etc.
It should be noted that, obtain excel model data in described step 132 after, described excel model data can be converted to web page model data, to provide visual interface layout directly perceived by browser to developer.
Described step 132 also can realize in the following manner:
Described dimension layout structure data are carried out to the corresponding format conversion of web page data structure, obtain the visual model data of described destination item, these visual model data can be understood as web page model data, to provide visual interface layout directly perceived by browser to developer.
It should be noted that, after described step 103, described visual model data are linked to setting, check by browser to make described visual model data can be developed personnel.Or, a certain field in described visual model data is arranged to link, jump to the corresponding page of link when making developer click this field.
With reference to figure 8, the structural representation of a kind of data generating device embodiment five providing for the application, described device is with thinking that developer or business personnel provide the visual model data with eye impressions directly perceived, described device can comprise following structure:
Dimension recognition unit 801, for identifying the dimension data of instructions lteral data of destination item.
Wherein, described destination item can be the database projects such as report item.For example, user need developer encode make a report tool, to realize the output of corresponding report data, now, the development project of described report tool is described destination item.Accordingly, the instructions lteral data of described destination item is the explanatory note part of the function declaration book of described destination item, show user's request, the function items that can realize in report tool as required in user, as list, field, button, dynamic chain etc.
It should be noted that, described dimension data refers to the data item field in described destination item etc., as data item fields such as the sex in form, name, ages.
Layout is set up unit 802, for according to described dimension data, sets up view interface data, and described view interface data comprise the dimension layout structure data of described destination item.
Wherein, in above, described dimension data includes the data item field in destination item, described layout is set up unit 802 according to these data item fields, build dimension layout, in this dimension layout with multidimensional form framework, in described dimension layout, fill by the data content in data item field, form dimension layout structure data, described dimension layout structure data can show the view interface of described destination item, as represent layout format to developer etc., and these dimension layout structure data are to be directly developer's visual data directly perceived, now trigger the described Date Conversion Unit 803 of operation.
Date Conversion Unit 803, for described dimension layout structure data are carried out to Data Format Transform, obtains the visual model data of described destination item.
Wherein, in above, described dimension layout structure data can show the view interface of described destination item, and the form with data item exists, and cannot give the visual interfaces directly perceived such as developer, therefore, described Date Conversion Unit 803 need to carry out Data Format Transform to described dimension layout structure data, to obtain the visual model data of destination item, these visual model data can provide visual data viewing experience directly perceived for developer.
From such scheme, a kind of data generating device embodiment five that the application provides, identify by the instructions lteral data to destination item, after obtaining its dimension data, according to these dimension datas, foundation comprises the view interface data by the dimension layout structure data of destination item, and then these dimension layout structure data are carried out to Data Format Transform, to obtain the visual model data of destination item, provide when carrying out destination item to developer vision mode intuitively to show, improve the development efficiency of destination item.
With reference to figure 9, the structural representation of a kind of data generating device embodiment six providing for the application, wherein, described dimension recognition unit 801 can be realized by following structure:
Key value scanning subelement 811, at least one dimension keys according to default, scans the instructions lteral data of destination item, obtains the dimension data corresponding with described dimension keys in described instructions lteral data.
Wherein, described dimension keys can comprise unit key word, as Beijing, Tianjin, Hebei etc., time key word can also be comprised, as 2012,2013 etc., expenditure can also be comprised, as social insurance, casualty insurance etc., can also comprise employee's attribute.
As shown in Figure 3, after unit dimension keys scanning by described key value scanning subelement 811, obtain unit dimension in the dimension data in described instructions lteral data and include: Beijing company, Tianjin company, Hebei company etc. and corresponding sub-dimension data thereof.Described sub-dimension data can be dimension data as shown in Figure 4.
As shown in Figure 4, after scanning by employee's attribute key word of described key value scanning subelement 811, obtaining employee's attribute dimensions in the dimension data in described instructions lteral data includes: name, sex, age, native place etc. and corresponding employee's attribute value data thereof, and as Zhao Jia, female, 28 years old, Beijing etc.
With reference to Figure 10, described in a kind of data generating device embodiment seven providing for the application, layout is set up the structural representation of unit 802, and wherein, described layout is set up unit 802 can comprise following structure:
Data are extracted subelement 821, for extracting the dimension item of described dimension data and the data content of each dimension item.
Wherein, described dimension item can be unit dimension item, the employee's attribute dimensions item etc. as shown in Fig. 3 or 4, and the data content of each dimension item can be content as shown in Figure 4, as employee's attribute value data.
It should be noted that, the data content of described dimension item can be the data reference value data that are illustrated in described instructions lteral data, as Zhao Jia, 28 years old etc.
Model construction subelement 822, for building stereoscopic arrangement's model of described dimension item composition.
Wherein, described model construction subelement 822 refers to, build stereoscopic arrangement's model according to dimension item, concrete, each dimension item is preset or the sequence of self-defining dimension order, afterwards, these dimension items are set up to stereoscopic arrangement's model, as cube model, corresponding two the dimension items of this cubical each face, stereoscopic arrangement's model that three dimensionality item is set up as shown in Figure 6, the clooating sequence of the dimension item in this stereoscopic arrangement's model can freely arrange, now, in described stereoscopic arrangement model, in each dimension item, content is empty.
Content is filled subelement 823, for the data content of each dimension item being filled to described stereoscopic arrangement model, obtains the dimension layout structure data of described destination item.
Wherein, in stereoscopic arrangement's model as shown in Figure 6, described data content is filled in corresponding dimension item, forms the dimension layout structure data of described destination item.
It should be noted that, although described dimension layout structure data can show the layout structure of described destination item, but its data structure belongs to database rank data, its display format is still data item form, cannot be developed personnel and intuitively see the layout structure of destination item.Now, in service in follow-up data converting unit 803, carries out Data Format Transform to this dimension layout structure data, obtains developer and can intuitively see the visual model data of the layout structure of described destination item.
With reference to Figure 11, the structural representation of Date Conversion Unit 803 described in a kind of data generating device embodiment eight providing for the application, wherein, described Date Conversion Unit 803 can comprise following structure;
Structure is determined subelement 831, for determining the target data structure of object module.
Wherein, described object module can be excel model, or can be also web page model.And the target data structure of described object module is corresponding, can be excel data structure, or also can be web page data structure.Concrete, described structure determine subelement 831 specifically for:
Determine the excel data structure of excel model or the web page data structure of web page model.
Structure conversion subelement 832, for according to described target data structure, carries out data-switching by described dimension layout structure data, obtains the visual model data of described destination item.
Concrete, described structure conversion subelement 832 can be realized in the following manner:
Described dimension layout structure data are carried out to the corresponding format conversion of excel data structure, obtain the visual model data of described destination item, these visual model data can be understood as excel model data, for developer provides visual interface layout directly perceived.
Wherein, described excel model data is after being done, can also beautify excel model data according to the pattern data in instructions lteral data, as adjust excel form line width, be listed as high, hide without the partial words segment data representing to developer, give list Fill Color and pane etc.
It should be noted that, obtain excel model data in described structure conversion subelement 832 after, described excel model data can be converted to web page model data, to provide visual interface layout directly perceived by browser to developer.
Described structure conversion subelement 832 also can be realized in the following manner:
Described dimension layout structure data are carried out to the corresponding format conversion of web page data structure, obtain the visual model data of described destination item, these visual model data can be understood as web page model data, to provide visual interface layout directly perceived by browser to developer.
It should be noted that, after described structure conversion subelement 832 has moved, described visual model data are linked to setting, check by browser to make described visual model data can be developed personnel.Or, a certain field in described visual model data is arranged to link, jump to the corresponding page of link when making developer click this field.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment, between each embodiment identical similar part mutually referring to.
Finally, also it should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
A kind of data creation method and the device that above the application are provided are described in detail, applied principle and the embodiment of specific case to the application herein and set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; , for one of ordinary skill in the art, according to the application's thought, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application meanwhile.