Content 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 prior art
In cannot by specification word be converted into can be developer provide eye impression page data technical problem.
This application provides a kind of data creation method, comprising:
Dimension data in the specification word data of identification destination item;
According to described dimension data, set up view interface data, described view interface data includes described destination item
Dimension layout structure data;
Described dimension layout structure data is carried out Data Format Transform, obtains the visual model number of described destination item
According to.
Said method is it is preferred that dimension data in the specification word data of described identification destination item, comprising:
According at least one dimension keys default, the specification word data of destination item is scanned, obtains
The dimension data corresponding with described dimension keys in described specification word data.
Said method it is preferred that described according to described dimension data, set up view interface data, comprising:
Extract the data content of dimension item in described dimension data and each dimension item;
Build the stereoscopic arrangement model of described dimension item composition;
The data content of each dimension item is filled to described stereoscopic arrangement model, obtains the dimension of described destination item
Layout structure data.
Said method, it is preferred that described dimension layout structure data is carried out Data Format Transform, obtains described target item
Purpose visual model data, comprising:
Determine the target data structure of object module;
According to described target data structure, described dimension layout structure data is carried out data conversion, obtains described target
The visual model data of project.
Said method is it is preferred that the target data structure of described determination object module, comprising:
Determine the excel data structure of excel model or the web page data structure of Web page surface model.
Present invention also provides a kind of data generating device, comprising:
Dimension recognition unit, for identifying the dimension data in the specification word data of destination item;
Layout sets up unit, for according to described dimension data, setting up view interface data, described view interface packet
Include the dimension layout structure data of described destination item;
Date Conversion Unit, for described dimension layout structure data is carried out Data Format Transform, obtains described target
The visual model data of project.
Said apparatus are it is preferred that described dimension recognition unit includes:
Key value scans subelement, for according at least one dimension keys default, the description to destination item
Lteral data is scanned, and obtains corresponding with described dimension keys dimension data in described specification word data.
Said apparatus are it is preferred that described layout sets up unit includes:
Data extracts subelement, for extracting in the data of the dimension item in described dimension data and each dimension item
Hold;
Model construction subelement, for building the stereoscopic arrangement model of described dimension item composition;
Fills subelement, for filling the data content of each dimension item to described stereoscopic arrangement model, obtains
Dimension layout structure data to described destination item.
Said apparatus are it is preferred that described Date Conversion Unit includes;
Structure determination subelement, for determining the target data structure of object module;
Structure conversion subunit, for according to described target data structure, described dimension layout structure data being entered line number
According to conversion, obtain the visual model data of described destination item.
Said apparatus it is preferred that described structure determination subelement specifically for: determine excel model excel data knot
The web page data structure of structure or Web page surface model.
A kind of data creation method being provided from such scheme, the application and device, by saying to destination item
Bright book lteral data is identified, and after obtaining its dimension data, according to these dimension datas, sets up and includes by destination item
Dimension layout structure data view interface data, and then Data Format Transform is carried out to these dimension layout structure data,
To obtain the visual model data of destination item, to carry out offer intuitively vision mode exhibition during destination item to developer
Show, improve the development efficiency of destination item.
Specific 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 carried out clear, complete
Site preparation describes it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on
Embodiment in the application, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work
Embodiment, broadly falls into the scope of the application protection.
With reference to Fig. 1, a kind of flow chart of the data creation method embodiment one providing for the application, wherein, methods described
In order to be the visual model data that developer or business personnel's offer have intuitive visual impression, as shown in flow process in Fig. 1, institute
The method of stating may comprise steps of:
Step 101: the dimension data in the specification word data of identification destination item.
Wherein, described destination item can be the database projects such as report item.For example, user needs developer to encode
Make a report tool, to realize the output of corresponding report data, now, the exploration project of described report tool is as described
Destination item.Accordingly, the specification word data of described destination item is the literary composition of the function declaration book of described destination item
Word declaratives, show user's request, the function items being capable of in the report tool as needed for user, such as list, field, press
Button, dynamic chain etc..
It should be noted that described dimension data refers to data entry field in described destination item etc., in form
The data entry field such as sex, name, age.
Step 102: according to described dimension data, set up view interface data, described view interface data includes described mesh
The dimension layout structure data of mark project.
Wherein, from hereinbefore, described dimension data includes the data entry field in destination item, in described step
In 102, according to these data entry field, build dimension layout, with higher dimensional formats framework in this dimension layout, described dimension layout
Middle filling, by the data content in data entry field, forms dimension layout structure data, described dimension layout structure data can
Show the view interface of described destination item, be such as presented to layout format of developer etc., and these dimension layout structure numbers
According to for being directly the intuitively visual data of developer, now execute described step 103.
Step 103: described dimension layout structure data is carried out Data Format Transform, obtains the visual of described destination item
Model data.
Wherein, from hereinbefore, described dimension layout structure data may indicate that the view interface of described destination item,
And presented in data item, and the intuitively visual interface cannot be given 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, this can
Perceived model data can provide intuitively visual data viewing experience for developer.
A kind of data creation method embodiment one being provided from such scheme, the application, by destination item
Specification word data is identified, and after obtaining its dimension data, according to these dimension datas, sets up and includes by target item
The view interface data of purpose dimension layout structure data, and then data form is carried out to these dimension layout structure data turn
Change, to obtain the visual model data of destination item, to carry out offer intuitively vision mode during destination item to developer
Show, improve the development efficiency of destination item.
With reference to Fig. 2, a kind of flow chart of the data creation method embodiment two providing for the application, wherein, described step
101 can be realized by following steps:
Step 111: according at least one dimension keys default, the specification word data of destination item is swept
Retouch, obtain corresponding with described dimension keys dimension data in described specification word data.
Wherein, described dimension keys can include unit keyword, such as Beijing, Tianjin, Hebei etc., can also include year
Part keyword, such as 2012,2013 etc., can also include expenditure, and such as social insurance, casualty insurance etc. can also be wrapped
Include employee's attribute.
As shown in Figure 3, after by the unit dimension keys scanning in described step 111, obtain described description
In dimension data in lteral data, unit dimension includes: Beijing company, Tianjin company, Hebei company etc. and its corresponding son dimension
Degrees of data.Described sub- dimension data can be dimension data as shown in Figure 4.
As shown in Figure 4, after being scanned by the employee's attribute keyword in described step 111, obtain being stated
In dimension data in bright book lteral data, employee's attribute dimensions include: name, sex, age, native place etc. and its corresponding member
Work attribute value data, such as Zhao Jia, female, 28 years old, Beijing etc..
With reference to Fig. 5, the flow chart of step 102 described in a kind of data creation method embodiment three providing for the application,
Wherein, described step 102 may comprise steps of:
Step 121: the dimension item in the described dimension data of extraction and the data content of each dimension item.
Wherein, described dimension item can be unit dimension item as shown in fig. 3 or 4, employee's attribute dimensions item etc., each
The data content of dimension item can be content as shown in Figure 4, such as employee's attribute value data.
It should be noted that the data content of described dimension item can carry out illustrating in described specification word data
Bright data refer Value Data, such as Zhao Jia, 28 years old etc..
Step 122: build the stereoscopic arrangement model of described dimension item composition.
Wherein, refer in described step 122, build stereoscopic arrangement model according to dimension item, specifically, to each dimension
Item carries out the sequence of default or self-defining dimension order, afterwards, sets up stereoscopic arrangement model to these dimension item, such as cube
Body Model, this cubical each face corresponds to two dimension item, the stereoscopic arrangement mould that three dimensionality item as shown in Figure 6 is set up
Type: dimension a, dimension b, dimension c, the clooating sequence of the dimension item in this stereoscopic arrangement model can freely be arranged, now, institute
Stating content in each dimension item in stereoscopic arrangement model is sky.
Step 123: the data content of each dimension item is filled to described stereoscopic arrangement model, obtains described target item
Purpose dimension layout structure data.
Wherein, in stereoscopic arrangement model as shown in Figure 6, described data content is filled to corresponding dimension item, shape
Become the dimension layout structure data of described destination item.
It should be noted that although described dimension layout structure data can show that the layout structure of described destination item,
But its data structure belongs to data base's rank data, its display format is still data item form it is impossible to the personnel that are developed intuitively see
Layout structure to destination item.Now, in subsequent step 103, data form is carried out to this dimension layout structure data
Conversion, obtains the visual model data that developer can be visually seen the layout structure of described destination item.
With reference to Fig. 7, the flow chart of step 103 described in a kind of data creation method example IV providing for the application,
Wherein, described step 103 may comprise steps of:
Step 131: determine the target data structure of object module.
Wherein, described object module can be excel model, or can also be Web page surface model.And described target mould
The target data structure of type, accordingly, can be excel data structure, or can also be web page data structure.Specifically
, described step 131 can be accomplished by:
Determine the excel data structure of excel model or the web page data structure of Web page surface model.
Step 132: according to described target data structure, described dimension layout structure data is carried out data conversion, obtains
The visual model data of described destination item.
Specifically, can be accomplished by described step 132:
Described dimension layout structure data is carried out the corresponding form conversion of excel data structure, obtains described destination item
Visual model data, this visual model data can be understood as excel model data, provides intuitively visual for developer
Interface layout.
Wherein, described excel model data, can also be according to the pattern number in specification word data after being done
Beautify according to excel model data, such as the line width of adjustment excel form, row are high, hide and need not represent to developer
Part field data, to list Fill Color and pane etc..
It should be noted that after obtaining excel model data in described step 132, can be by described excel model
Data is converted to web page model data, to provide intuitively visual interface layout by browser to developer.
Described step 132 can also be accomplished by:
Described dimension layout structure data is carried out the corresponding form conversion of web page data structure, obtains described target item
Purpose visual model data, this visual model data can be understood as web page model data, with by browser to exploit person
Member provides intuitively visual interface layout.
It should be noted that after described step 103, described visual model data is carried out with link setting, so that
Described visual model data can be developed personnel and be checked by browser.Or, to a certain in described visual model data
Field setting link, so that jump to link corresponding page when developer clicks on this field.
With reference to Fig. 8, a kind of structural representation of the data generating device embodiment five providing for the application, described device is used
So that as developer or business personnel provides and has the visual model data of intuitive visual impression, described device can include following
Structure:
Dimension recognition unit 801, for identifying the dimension data in the specification word data of destination item.
Wherein, described destination item can be the database projects such as report item.For example, user needs developer to encode
Make a report tool, to realize the output of corresponding report data, now, the exploration project of described report tool is as described
Destination item.Accordingly, the specification word data of described destination item is the literary composition of the function declaration book of described destination item
Word declaratives, show user's request, the function items being capable of in the report tool as needed for user, such as list, field, press
Button, dynamic chain etc..
It should be noted that described dimension data refers to data entry field in described destination item etc., in form
The data entry field such as sex, name, age.
Layout sets up unit 802, for according to described dimension data, setting up view interface data, described view interface number
According to the dimension layout structure data including described destination item.
Wherein, from hereinbefore, described dimension data includes the data entry field in destination item, and described layout is built
Vertical unit 802, according to these data entry field, builds dimension layout, with higher dimensional formats framework in this dimension layout, described dimension
Fill in layout by the data content in data entry field, form dimension layout structure data, described dimension layout structure data
Can show that the view interface of described destination item, be such as presented to layout format of developer etc., and these dimension layouts knot
Structure data is cannot to be directly the intuitively visual data of developer, and now triggering runs described Date Conversion Unit 803.
Date Conversion Unit 803, for described dimension layout structure data is carried out Data Format Transform, obtains described mesh
The visual model data of mark project.
Wherein, from hereinbefore, described dimension layout structure data may indicate that the view interface of described destination item,
And presented in data item, and the intuitively visual interface cannot be given such as developer, and 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, should
Visual model data can provide intuitively visual data viewing experience for developer.
A kind of data generating device embodiment five being provided from such scheme, the application, by destination item
Specification word data is identified, and after obtaining its dimension data, according to these dimension datas, sets up and includes by target item
The view interface data of purpose dimension layout structure data, and then data form is carried out to these dimension layout structure data turn
Change, to obtain the visual model data of destination item, to carry out offer intuitively vision mode during destination item to developer
Show, improve the development efficiency of destination item.
With reference to Fig. 9, a kind of structural representation of the data generating device embodiment six providing for the application, wherein, described
Dimension recognition unit 801 can be realized by following structure:
Key value scans subelement 811, for according at least one dimension keys default, the explanation to destination item
Book lteral data is scanned, and obtains corresponding with described dimension keys dimension data in described specification word data.
Wherein, described dimension keys can include unit keyword, such as Beijing, Tianjin, Hebei etc., can also include year
Part keyword, such as 2012,2013 etc., can also include expenditure, and such as social insurance, casualty insurance etc. can also be wrapped
Include employee's attribute.
As shown in Figure 3, scan the unit dimension keys scanning of subelement 811 by described key value after, obtain
In dimension data in described specification word data, unit dimension includes: Beijing company, Tianjin company, Hebei company etc. and
Its corresponding sub- dimension data.Described sub- dimension data can be dimension data as shown in Figure 4.
As shown in Figure 4, after being scanned by employee's attribute keyword that described key value scans subelement 811,
Obtain employee's attribute dimensions in the dimension data in described specification word data to include: name, sex, age, native place etc.
And its corresponding employee's attribute value data, such 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 sets up unit 802
Structural representation, wherein, described layout is set up unit 802 and can be included following structure:
Data extracts subelement 821, for extracting the data of the dimension item in described dimension data and each dimension item
Content.
Wherein, described dimension item can be unit dimension item as shown in fig. 3 or 4, employee's attribute dimensions item etc., each
The data content of dimension item can be content as shown in Figure 4, such as employee's attribute value data.
It should be noted that the data content of described dimension item can carry out illustrating in described specification word data
Bright data refer Value Data, such as Zhao Jia, 28 years old etc..
Model construction subelement 822, for building the stereoscopic arrangement model of described dimension item composition.
Wherein, described model construction subelement 822 refers to, builds stereoscopic arrangement model according to dimension item, specifically, right
Each dimension item carries out the sequence of default or self-defining dimension order, afterwards, sets up stereoscopic arrangement mould to these dimension item
Type, such as cube model, this cubical each face corresponds to two dimension item, and it is vertical that three dimensionality item as shown in Figure 6 is set up
Body placement model, the clooating sequence of the dimension item in this stereoscopic arrangement model can freely be arranged, now, described stereoscopic arrangement
In each dimension item in model, content is sky.
Fills subelement 823, for the data content of each dimension item is filled to described stereoscopic arrangement model,
Obtain the dimension layout structure data of described destination item.
Wherein, in stereoscopic arrangement model as shown in Figure 6, described data content is filled to corresponding dimension item, shape
Become the dimension layout structure data of described destination item.
It should be noted that although described dimension layout structure data can show that the layout structure of described destination item,
But its data structure belongs to data base's rank data, its display format is still data item form it is impossible to the personnel that are developed intuitively see
Layout structure to destination item.Now, in the operation of follow-up data converting unit 803, to this dimension layout structure number
According to carrying out Data Format Transform, obtain the visual model number that developer can be visually seen the layout structure of described destination item
According to.
With reference to Figure 11, Date Conversion Unit 803 described in a kind of data generating device embodiment eight providing for the application
Structural representation, wherein, described Date Conversion Unit 803 can include following structure;
Structure determination subelement 831, for determining the target data structure of object module.
Wherein, described object module can be excel model, or can also be Web page surface model.And described target mould
The target data structure of type, accordingly, can be excel data structure, or can also be web page data structure.Specifically
, described structure determination subelement 831 specifically for:
Determine the excel data structure of excel model or the web page data structure of Web page surface model.
Structure conversion subunit 832, for according to described target data structure, described dimension layout structure data being carried out
Data conversion, obtains the visual model data of described destination item.
Specifically, described structure conversion subunit 832 can be accomplished by:
Described dimension layout structure data is carried out the corresponding form conversion of excel data structure, obtains described destination item
Visual model data, this visual model data can be understood as excel model data, provides intuitively visual for developer
Interface layout.
Wherein, described excel model data, can also be according to the pattern number in specification word data after being done
Beautify according to excel model data, such as the line width of adjustment excel form, row are high, hide and need not represent to developer
Part field data, to list Fill Color and pane etc..
It should be noted that after obtaining excel model data in described structure conversion subunit 832, can be by institute
Stating excel model data transformation is web page model data, to provide intuitively visual interface by browser to developer
Layout.
Described structure conversion subunit 832 can also be accomplished by:
Described dimension layout structure data is carried out the corresponding form conversion of web page data structure, obtains described target item
Purpose visual model data, this visual model data can be understood as web page model data, with by browser to exploit person
Member provides intuitively visual interface layout.
It should be noted that after the operation of described structure conversion subunit 832 completes, entering to described visual model data
Row link setting, so that described visual model data can be developed personnel checked by browser.Or, to described visual
A certain field setting link in model data, so that jump to link corresponding page when developer clicks on this field.
It should be noted that each embodiment in this specification is all described by the way of going forward one by one, each embodiment weight
Point explanation is all difference with other embodiment, between each embodiment identical similar partly mutually referring to.
Last in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by
One entity or operation are made a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between there is any this actual relation or order.And, term " inclusion ", "comprising" or its any other variant meaning
Covering comprising of nonexcludability, so that including a series of process of key elements, method, article or equipment not only include that
A little key elements, but also include other key elements being not expressly set out, or also include for this process, method, article or
The intrinsic key element of equipment.In the absence of more restrictions, the key element being limited by sentence " including ... ", not
Also there is other identical element in including the process of described key element, method, article or equipment in exclusion.
Above a kind of data creation method provided herein and device are described in detail, used herein
Specific case is set forth to the principle of the application and embodiment, and the explanation of above example is only intended to help understand this
The method of application and its core concept;Simultaneously for one of ordinary skill in the art, according to the thought of the application, concrete
All will change on embodiment and range of application, in sum, this specification content should not be construed as to the application's
Limit.