CN110020353A - The construction method and device of web form - Google Patents

The construction method and device of web form Download PDF

Info

Publication number
CN110020353A
CN110020353A CN201710914737.8A CN201710914737A CN110020353A CN 110020353 A CN110020353 A CN 110020353A CN 201710914737 A CN201710914737 A CN 201710914737A CN 110020353 A CN110020353 A CN 110020353A
Authority
CN
China
Prior art keywords
web form
file
json file
form template
json
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710914737.8A
Other languages
Chinese (zh)
Other versions
CN110020353B (en
Inventor
李勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710914737.8A priority Critical patent/CN110020353B/en
Publication of CN110020353A publication Critical patent/CN110020353A/en
Application granted granted Critical
Publication of CN110020353B publication Critical patent/CN110020353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Landscapes

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

Abstract

The invention discloses a kind of construction method of web form and devices, are related to technical field of data processing, and main purpose improves building efficiency and invent to reduce the building time of web form when constructing web form by configuration file.The method comprise the steps that target configuration file is converted to corresponding target json file;The mapping relations of json file and web form template are obtained, the mapping relations are the corresponding relationship of the data structure of json file and the tableau format of web form template;According to the mapping relations of the json file and web form template, the target json file is built into corresponding web form.The present invention is for constructing web form.

Description

The construction method and device of web form
Technical field
The present invention relates to technical field of data processing more particularly to the construction methods and device of a kind of web form.
Background technique
With the rapid development of internet, network is become more and more important for people.People are in browsing webpage There are a kind of webpage of sheet format, i.e. web form in the process, wherein the data in this webpage are substantially according to table Form stored, because of the convenience of its browsing, factors, such web forms such as browsing facilitates increasingly are opened by website Hair personnel are paid attention to.Under normal conditions, the building of web form is all based on configuration file progress, and different web forms needs Otherwise with configuration file constructed, when the information in web form needs to add additional project or content, need pair The code of configuration file carries out the corresponding change modified and be just able to achieve web form content.
Currently, in the building process of web form, generally constructed in a fixed manner according to fixed configuration file Web form, if configuration file is modified, needing to modify to code to be just able to achieve generates new web form. However, in practical applications, when the quantity for the web form for needing to construct is more, due to needing to carry out one to different lists One building, also, when configuration file changes, corresponding web form could be constructed by needing to modify configuration code, be caused The building process of web form takes long time, and influences to construct efficiency.
Summary of the invention
In view of the above problems, the present invention provides the construction method and device of a kind of web form, and main purpose is in order to logical When crossing configuration file building web form, the building time of web form is reduced, improves building efficiency.
In order to solve the above technical problems, in a first aspect, the present invention provides a kind of construction method of web form, this method Include:
Target configuration file is converted into corresponding target json file;
The mapping relations of json file and web form template are obtained, the mapping relations are the data structure of json file With the corresponding relationship of the tableau format of web form template;
According to the mapping relations of the json file and web form template, the target json file is built into correspondence Web form.
Optionally, before target configuration file being converted to corresponding target json file described, the method is also wrapped It includes:
Obtain the data structure of json file and the tableau format of web form template;
It is matched in the tableau format of the web form template for the disparity items in the data structure of the json file Different content, obtain the mapping relations of the json file and web form template.
Optionally, described before the tableau format of the data structure for obtaining json file and web form template Method further include:
User instruction is obtained, includes the setting information of web form template in the user instruction;
According to the setting information in the user instruction, the tableau format of the web form template, the setting are set Setting information comprising one or more data in character string, number and array in web form template in information, the list Data format and position in the tableau format of template comprising different data.
Optionally, which is characterized in that in the mapping relations according to the json file and web form template, by institute Target json file is stated to be built into after corresponding web form, the method also includes:
The control event of configuration webpage list, the control event of the web form are used to be arranged the table of the web form Disparity items and item value in single structure, project and item value in the form structure correspond.
Optionally, before target configuration file being converted to corresponding target json file described, the method is also wrapped It includes:
Determine the file type of the target configuration file;
If the file type of the target configuration file is json file, json file and web form template are obtained Mapping relations, and be built into the target configuration file pair according to the mapping relations of the json file and web form template The web form answered.
Second aspect, the present invention also provides a kind of construction device of web form, which includes:
Converting unit, for target configuration file to be converted to corresponding target json file;
First acquisition unit, for obtaining the mapping relations of json file Yu web form template, the mapping relations are The corresponding relationship of the tableau format of the data structure and web form template of json file;
The mapping of construction unit, json file and web form template for being obtained according to the first acquisition unit is closed System, is built into corresponding web form for the target json file that the converting unit is converted.
Optionally, described device further include:
Second acquisition unit, for obtaining the data structure of json file and the tableau format of web form template;
Matching unit, the disparity items in the data structure of the json file for being obtained for the second acquisition unit Different content in tableau format with the web form template obtains the mapping of the json file and web form template Relationship.
Optionally, described device further include:
Third acquiring unit, for obtaining user instruction, the setting comprising web form template is believed in the user instruction Breath;
Setting unit, the setting information in user instruction for being obtained according to the third acquiring unit, described in setting The tableau format of web form template includes in character string, number and array in web form template one in the setting information Kind or a variety of data setting information, data format and position in the tableau format of the form templat comprising different data.
Optionally, described device further include:
Configuration unit, for the control event of configuration webpage list, the control event of the web form is for being arranged institute Disparity items and item value in the form structure of web form are stated, the project in the form structure and item value correspond.
Optionally, described device further include:
Determination unit, for determining the file type of the target configuration file;
The first acquisition unit, if being also used to the determination unit determines that the file type of target configuration file is json File then obtains the mapping relations of json file Yu web form template;
The construction unit, the json file for being also used to be obtained according to the first acquisition unit and web form template The target configuration file is built into corresponding web form by mapping relations.
To achieve the goals above, according to the third aspect of the invention we, a kind of storage medium, the storage medium are provided Program including storage, wherein equipment where controlling the storage medium in described program operation executes net described above The construction method of page table list.
To achieve the goals above, according to the fourth aspect of the invention, a kind of processor is provided, the processor is used for Run program, wherein described program executes the construction method of web form described above when running.
By above-mentioned technical proposal, the construction method and device of web form provided by the invention exist for the prior art When constructing web form, web form is constructed in a fixed manner according to fixed configuration file, causes to construct efficiency too low The problem of, after the present invention is by being converted to corresponding target json file for target configuration file, utilize json file and net The target json file is built into corresponding web form by the mapping relations of page form templat, is realized to web form Building.When needing to construct multiple web forms, it is not necessary that corresponding configuration file is arranged one by one according to each list, net is simplified Page table list building process reduces the building time, improves building efficiency.Simultaneously as utilizing json file and web form The mapping relations of template carry out the building of web form, change the prior art showing with fixed configuration file building list Shape improves the flexibility of list building.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of construction method flow chart of web form provided in an embodiment of the present invention;
Fig. 2 shows the construction method flow charts of another web form provided in an embodiment of the present invention;
Fig. 3 shows a kind of composition block diagram of the construction device of web form provided in an embodiment of the present invention;
Fig. 4 shows the composition block diagram of the construction device of another web form provided in an embodiment of the present invention.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention It is fully disclosed to those skilled in the art.
In order to improve the building efficiency of web form, the embodiment of the invention provides a kind of construction method of web form, As shown in Figure 1, this method comprises:
101, target configuration file is converted into corresponding target json file.
In general, when using configuration file to construct web form, be all according to the different-format of configuration file respectively into Row setting.For example, the configuration file of the different-formats such as xml, yaml.As a result, in the setting up procedure of existing configuration file, need The more time is spent to be directed to the different plan of establishment of different file format designs.Therefore, first in order to improve this status The first method according to this step is converted into json file for the configuration file of a variety of different-formats is same.
Wherein, json (JavaScript Object Notation, abbreviation JS object) is that a kind of data of lightweight are handed over Change format.Because it is succinct and clearly hierarchical structure, so that json becomes ideal data interchange language.The text of such format Part, i.e. json file are easy to the reading of people and write, while being also easy to machine parsing and generating, in the mistake of data processing and exchange Cheng Zhong can effectively promote network transmission efficiency.
Therefore, based on the easy analyticity of json file, the method according to this step can be by type in difference or lattice The file consolidation of formula is converted into json file, then carries out subsequent parsing and other operations again.Specifically, being configured by target During file is converted to corresponding json file, it can choose any conversion regime in the prior art and carry out, herein Without limitation, it can carry out as needed.
102, the mapping relations of json file and web form template are obtained.
Wherein, the mapping relations can be understood as the data structure of json file and the tableau format of web form template Corresponding relationship.
In this step, the data structure of the json file can be understood as the pass of the data in file between different item System.Since in json file, there are certain nest relations for the storage form of data, and there are tissue passes on data content System, such as the coordination between level, the nest relation between the superior and the subordinate's data.Therefore, the data knot in this step The relationship of structure, that is, between data wherein included and data.Meanwhile the tableau format of the web form template is then based on use Family setting or system default are formed by tableau format.It should be noted that the list as described in the embodiment of the present invention constructs Method is realized based on configuration file, and therefore, the tableau format of the web form template in the embodiment of the present invention is actually It can be determined according to file structure in configuration file and file content.Certainly, the table of specific web form template Structure can be chosen or be arranged according to actual needs, it is not limited here.But it is ensured that the tableau format can Complete mapping relations are formed with the file structure of the target configuration file, to avoid in the process of subsequent builds web form In there is the case where loss of data.
As a result, in this step, it needs to get the web form template of corresponding json file, and between the two reflects Relationship is penetrated, to ensure the subsequent building that can carry out associated documents according to the mapping relations.
103, according to the mapping relations of the json file and web form template, the target json file is built into Corresponding web form.
Due to preserving the file structure and net of json file in the mapping relations of json file and web form template Corresponding relationship between the tableau format of page form templat therefore can be according to the mapping relations by the items in json file Data are added in the corresponding position in web form template according to the relationship between file structure and tableau format respectively.Its In, it is directed not only to for the data in json file being added in the building process in web form described in the embodiment of the present invention It can also include by the corresponding Data Format Transform of the Data Format Transform of json file to web form in corresponding table Process.Certainly, since many formats in the data format in json file can be general in web form, for This kind of data whether need change data format then can according to the default setting for the command information or system that user assigns come into Row, here, not doing specific restriction, can in the light of actual conditions choose.
The construction method and device of web form provided in an embodiment of the present invention, for the prior art in building web form When, web form is constructed in a fixed manner according to fixed configuration file, causes to construct the too low problem of efficiency, the present invention After target configuration file is converted to corresponding target json file, reflecting for json file and web form template is utilized It penetrates relationship and the target json file is built into corresponding web form, realize the building to web form.When needing structure When building multiple web forms, it is not necessary that corresponding configuration file is arranged one by one according to each list, simplifies web form and constructed Journey reduces the building time, improves building efficiency.Simultaneously as the mapping using json file and web form template is closed It is the building to carry out web form, changes the prior art with the status of fixed configuration file building list, improve table The flexibility singly constructed.
Further, as the refinement and extension to embodiment illustrated in fig. 1, the embodiment of the invention also provides another nets The construction method of page table list, as shown in Fig. 2, its specific steps includes:
201, user instruction is obtained.
In embodiments of the present invention, the construction method of web form is based between json file and web form template What mapping relations carried out, therefore, need to first have to before being constructed to generate net corresponding to the web form to be constructed Page form templat.And the preferred specific list knot for determining the web form structure is needed before generating the web form template Structure.The method according to this step as a result, user instruction available first, wherein include webpage in the user instruction The setting information of form templat, thus, it is possible to pass through the acquisition of information in the user instruction to the web form to be constructed The setting information of corresponding web form template.
By obtaining user instruction, with the setting information for the web form template for including in this available user instruction, It ensures that the accuracy of the setting up procedure of web form template, and then webpage is constructed according to the web form template to be subsequent The accuracy of list lays the foundation.
202, according to the setting information in the user instruction, the tableau format of the web form template is set.
Wherein, one or more numbers in character string, number and array in web form template are included in the setting information According to setting information, data format and position in the tableau format of the form templat comprising different data.
After the method described in the step 201 gets user instruction, use can be got in the user instruction In the setting information that the web form template is arranged, to the tableau format of web form template as involved in the setting information Setting information, and in tableau format include different data data format and its Data Position, therefore, in the embodiment of the present invention Described in setting information actually include a kind of in character string, number and array in tableau format in setting web form template Or a variety of data format and its position setting information.As a result, according to the setting information to the table in web form template Structure is configured, and obtains the web form template of corresponding user instruction.Due to enumerating web form mould in setting information The setting information of the setting information of the data of different-format in tableau format in plate ensure that the setting knot of web form template The accuracy of fruit.
203, the data structure of json file and the tableau format of web form template are obtained.
It in this step, can be by getting the data structure and web form mould of json file in preset database The tableau format of plate can also obtain the data structure of json file and the table knot of web form template by other means Structure, the mode specifically obtained, and its acquisition position can according to need and chosen, and not do specific restriction herein.
204, the tableau format of the web form template is matched for disparity items in the data structure of the json file Middle different content obtains the mapping relations of the json file and web form template.
The building process of web form described in the embodiment of the present invention is carried out based on json file, therefore for structure Process is built, the mapping relations using json file and web form template are needed.Therefore, the method according to this step, when After getting the data structure of json file and the tableau format of web form template, need to close foundation mapping between the two System.
Specifically, the total data traversed in json file first can be somebody's turn to do by the method according to this step The data structure of json file, or the method according to abovementioned steps 203, utilize the number for the json file being directly obtained According to structure.In fact, regardless of whether get the data structure of json file in abovementioned steps, it in this step can be right Json file is traversed, and data structure is obtained, in this way when the data structure of json file has not been obtained in abovementioned steps or When abnormal or missing occurs in the data structure of the json file got, the acquisition effect to data structure can be realized, it can be with Ensure the accuracy of data structure.Certainly, when user is already provided with dependent instruction if can directly skip described in this step Ergodic process, specifically, whether can according to the actual situation control, herein not if needing to traverse json file Make specific limit.
Then, the data of the disparity items in the data structure of json file are matched into corresponding web form template respectively The corresponding different content of tableau format.Herein, it can be understood as by the data of the disparity items in json file respectively with net Different location in page table list establishes mapping relations, at the same determine the data in the project in the web form after building whether The conversion for needing to carry out format, if necessary to the conversion of format, then mapping relations involved in this step not only include json text The positional relationship of the corresponding web form template of the data of disparity items in part, further includes the lattice in corresponding web form template Formula relationship.It should be noted that mapping is established mode and can be carried out according to the instruction of user, or set according to user is preparatory Set progress.When the foundation that user is not mapping relations is assigned dependent instruction or is configured in advance, then it can pass through system Default information carry out the foundation of mapping relations.
As a result, by establishing mapping relations between the data structure for json file and the tableau format of web form template, Realize json file to web form corresponding relationship establishment, thus for provided when subsequent builds web form building according to According to, it is ensured that the accuracy of subsequent builds result.
205, the file type of the target configuration file is determined.
Since the embodiment of the present invention is to realize the building of web form based on json file, it is being constructed Before, it is thus necessary to determine that whether current target configuration file needs to convert to json file, i.e., firstly the need of determining target configuration text Whether part is json, if it is determined that target configuration file is json file, then illustrates that the configuration file is actually to be not necessarily to carry out File conversion, subsequent building can be directly carried out, conversely, then illustrating target configuration file not is json file, needs elder generation The conversion of file is carried out, then in the building for carrying out subsequent web form.
Therefore, however, it is determined that the file type of the target configuration file is json file, thens follow the steps 206;If it is determined that The file type of the target configuration file is not json file, thens follow the steps 207.
If 206, the file type of the target configuration file is json file, json file and web form mould are obtained The mapping relations of plate, and the target configuration file is built into corresponding web form.
After the determination through step 205, after determining target configuration file is json file, then illustrate target configuration text Part can directly carry out the building of web form without formatting using the mapping relations that abovementioned steps are established.
Thus, it is possible to obtain the mapping relations between json file and web form template first, the target is then traversed Total data in configuration file, and the disparity items data according to json file in mapping relations are added to the net corresponding to it In the position of page form templat, while being confirmed whether in mapping relations the corresponding relationship there are data format.If there is number According to the corresponding relationship between format, then also need to be added to the item of the former json file in the position of corresponding web form template Mesh number is according to the conversion for carrying out format.After having added the project data, continue method described in this step, until target is matched The total data in file is set all to be added to after web form template to get the corresponding web form of the target configuration file is arrived.
The method according to this step, after the file type for determining target configuration file is json file, direct root Web form is constructed according to mapping relations, avoids the process of configuration file conversion json file, reduces the embodiment of the present invention Step needed for the building process of the web form reduces the building time, improves building efficiency.
207, target configuration file is converted into corresponding target json file.
After step 205 is confirmed, when determining target configuration file not is json file, illustrate configuration file reality It is other kinds of file on border, is the base based on json file based on web form construction method described in the embodiment of the present invention It is carried out on plinth, thus, it is desirable to which the target configuration file is converted to corresponding json file.In embodiments of the present invention, institute The description for the target configuration file stated, the description of json file and to convert the process to json file by target configuration file equal Consistent with the associated description of step 101 in previous embodiment, details are not described herein.
208, the mapping relations of json file and web form template are obtained.
In this step, the mapping relations can actually be interpreted as the data structure and web form mould of json file The corresponding relationship of the tableau format of plate.The inventive concept of the web form construction method based on the embodiment of the present invention needs The building of web form is realized using the mapping relations.Therefore it needs to obtain in abovementioned steps 204 before being constructed Obtained mapping relations.Wherein, mapping relations described in this step can be temporarily builds according to before building web form every time It is vertical, it is also possible to be pre-established according to the instruction of user.When the mapping relations are established in advance by user, need to Family confirmation obtains the position of the mapping relations, or is stored by the storage location of system default, here, for obtaining institute The acquisition modes for stating the mapping relations of json file and web form template are not made specifically to limit, can be according to the actual situation It determines.
209, the target json file is built into according to the json file and the mapping relations of web form template Corresponding web form.
It, can be according to the mapping relations after the mapping relations that step 208 gets json file and web form template Construct corresponding web form.Specifically, the building process of web form is identical as the description in abovementioned steps 206, herein not It repeats again.
210, the control event of configuration webpage list.
It, can also be according to this step after the completion of web page form building after step 206 or step 209 Method, to the control event for configuring the corresponding web form in the web form, wherein the control of the web form Event is for being arranged disparity items and item value in the form structure of the web form, project and item in the form structure Mesh value corresponds.
In this step, the project of the form structure can actually be interpreted as data items different in list, and Item value is not numerical value truly, but the specific data of the corresponding project, for example, project can be " gender ", And the item value for corresponding to the project then can be " male " or " female ".Therefore, there are one-to-one relationships for project and its item value. Simultaneously in this step, the control event be then for in web form disparity items and its item value control Event may be implemented by being configured to the control event by the control effect of project different in web form, example Such as, it can increase or delete the project in web form by the control event, and then realize in web form Appearance is flexibly controlled.
The control event for passing through configuration webpage list as a result, may be implemented to carry out content to the web form after building The effect controlled, and then realize the flexible control to web form content.
Further, as the realization to method shown in above-mentioned Fig. 1, the embodiment of the invention also provides a kind of web forms Construction device, for being realized to above-mentioned method shown in FIG. 1.The Installation practice is corresponding with preceding method embodiment, To be easy to read, present apparatus embodiment no longer repeats the detail content in preceding method embodiment one by one, but it should bright Really, the device in the present embodiment can correspond to the full content realized in preceding method embodiment.As shown in figure 3, the device packet It includes: converting unit 31, first acquisition unit 32 and construction unit 33, wherein
Converting unit 31 can be used for being converted to target configuration file corresponding target json file.
First acquisition unit 32 can be used for obtaining the mapping relations of json file Yu web form template, the mapping Relationship is the corresponding relationship of the data structure of json file and the tableau format of web form template.
Construction unit 33, the json file that can be used for being obtained according to the first acquisition unit 32 and web form template Mapping relations, the target json file that the converting unit 31 is converted is built into corresponding web form.
Further, as the realization to method shown in above-mentioned Fig. 2, the embodiment of the invention also provides another webpage tables Single construction device, for being realized to above-mentioned method shown in Fig. 2.The Installation practice and preceding method embodiment pair It answers, to be easy to read, present apparatus embodiment no longer repeats the detail content in preceding method embodiment one by one, but it should Clear, the device in the present embodiment can correspond to the full content realized in preceding method embodiment, it is described the present embodiment provides Another web form construction device, can be as shown in figure 4, the device includes converting unit 41, first acquisition unit 42 With construction unit 43, wherein
Converting unit 41 can be used for being converted to target configuration file corresponding target json file.
First acquisition unit 42 can be used for obtaining the mapping relations of json file Yu web form template, the mapping Relationship is the corresponding relationship of the data structure of json file and the tableau format of web form template.
Construction unit 43, the json file that can be used for being obtained according to the first acquisition unit 42 and web form template Mapping relations, the target json file that the converting unit 41 is converted is built into corresponding web form.
Further, described device further include:
Second acquisition unit 44 can be used for obtaining the data structure of json file and the table knot of web form template Structure.
Matching unit 45 can be used for different in the data structure for the json file of the second acquisition unit 44 acquisition Project matches different content in the tableau format of the web form template, obtains the json file and web form template Mapping relations, so that the first acquisition unit 42 is obtained.
Further, described device further include:
Third acquiring unit 46 can be used for obtaining user instruction, include web form template in the user instruction Setting information.
Setting unit 47, the setting information in user instruction that can be used for being obtained according to the third acquiring unit 46, The tableau format of the web form template is set, it is described to set so that the second acquisition unit 44 obtains the tableau format Setting information comprising one or more data in character string, number and array in web form template in confidence breath, the table Data format and position in the tableau format of single mode plate comprising different data.
Further, described device further include:
Configuration unit 48 can be used for configuring the control event of web form constructed by the construction unit 43, described The control event of web form is for being arranged disparity items and item value in the form structure of the web form, the list knot Project and item value in structure correspond.
Further, described device further include:
Determination unit 49 is determined for the file type of the target configuration file.
The first acquisition unit 42, if can be also used for the files classes that the determination unit 49 determines target configuration file Type is json file, then obtains the mapping relations of json file Yu web form template.
The construction unit 43 can be also used for the json file and webpage table obtained according to the first acquisition unit 42 The target configuration file is built into corresponding web form by the mapping relations of single mode plate.
By above-mentioned technical proposal, the embodiment of the present invention provides the construction method and device of a kind of web form.For existing There is the technology when constructing web form, web form is constructed in a fixed manner according to fixed configuration file, causes to construct Efficiency too low problem utilizes json after the present invention is by being converted to corresponding target json file for target configuration file The target json file is built into corresponding web form with the mapping relations of web form template by file, is realized to net The building of page table list.When needing to construct multiple web forms, it is not necessary that corresponding configuration file is arranged one by one according to each list, Web form building process is simplified, reduces the building time, improves building efficiency.Simultaneously as using json file and The mapping relations of web form template carry out the building of web form, change the prior art and are constructed with fixed configuration file The status of list improves the flexibility of list building.
Also, by obtaining user instruction, with the setting for the web form template for including in this available user instruction Information ensures that the accuracy of the setting up procedure of web form template, and then is subsequent according to the web form template structure The accuracy for building web form lays the foundation.Also, due to enumerating the table knot in web form template in setting information The setting information of the setting information of the data of different-format in structure ensure that the accuracy of the setting result of web form template.
Further, it is closed by establishing mapping between the data structure for json file and the tableau format of web form template System, realize json file to web form corresponding relationship establishment, thus to provide structure when subsequent builds web form Build foundation, it is ensured that the accuracy of subsequent builds result.In addition, before the building for carrying out web form, it is first determined target The file type of configuration file, and after the file type for determining target configuration file is json file, directly closed according to mapping System's building web form, avoids the process of configuration file conversion json file, reduces net described in the embodiment of the present invention Step needed for the building process of page table list reduces the building time, improves building efficiency.In addition, passing through configuration webpage table Single control event, can modify to project and its item value different in web form using the control event, add And deletion, and then the effect control that content is carried out to the web form after building may be implemented, and then realize to net The flexible control of page table list content.
The construction device of the web form includes processor and memory, above-mentioned converting unit, first acquisition unit with Construction unit etc. stores in memory as program unit, executes above procedure list stored in memory by processor Member realizes corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one Or more, by adjusting the consumption of the time in building process of the kernel parameter to reduce web form, improve web form Construct efficiency.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor The construction method of the existing web form.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation The construction method of web form described in Shi Zhihang.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can The program run on a processor, processor execute program when perform the steps of target configuration file is converted to it is corresponding Target json file;The mapping relations of json file and web form template are obtained, the mapping relations are the number of json file According to the corresponding relationship of structure and the tableau format of web form template;According to the mapping of the json file and web form template The target json file is built into corresponding web form by relationship.
Further, before target configuration file being converted to corresponding target json file described, the method is also Include:
Obtain the data structure of json file and the tableau format of web form template;
It is matched in the tableau format of the web form template not for disparity items in the data structure of the json file Same content obtains the mapping relations of the json file and web form template.
Further, before the tableau format of the data structure for obtaining json file and web form template, institute State method further include:
User instruction is obtained, includes the setting information of web form template in the user instruction;
According to the setting information in the user instruction, the tableau format of the web form template, the setting are set Setting information comprising one or more data in character string, number and array in web form template in information, the list Data format and position in the tableau format of template comprising different data.
Further, which is characterized in that, will in the mapping relations according to the json file and web form template The target json file is built into after corresponding web form, the method also includes:
The control event of configuration webpage list, the control event of the web form are used to be arranged the table of the web form Disparity items and item value in single structure, project and item value in the form structure correspond.
Further, before target configuration file being converted to corresponding target json file described, the method is also Include:
Determine the file type of the target configuration file;
If the file type of the target configuration file is json file, json file and web form template are obtained Mapping relations, and be built into the target configuration file pair according to the mapping relations of the json file and web form template The web form answered.
Equipment in the embodiment of the present invention can be server, PC, PAD, mobile phone etc..
The embodiment of the invention also provides a kind of computer program products, when executing on data processing equipment, are suitable for Target configuration file is converted to corresponding target json file by the program for executing initialization there are as below methods step;Obtain json The mapping relations of file and web form template, the mapping relations are the data structure and web form template of json file The corresponding relationship of tableau format;According to the mapping relations of the json file and web form template, by the target json text Part is built into corresponding web form.
Further, before target configuration file being converted to corresponding target json file described, the method is also Include:
Obtain the data structure of json file and the tableau format of web form template;
It is matched in the tableau format of the web form template not for disparity items in the data structure of the json file Same content obtains the mapping relations of the json file and web form template.
Further, before the tableau format of the data structure for obtaining json file and web form template, institute State method further include:
User instruction is obtained, includes the setting information of web form template in the user instruction;
According to the setting information in the user instruction, the tableau format of the web form template, the setting are set Setting information comprising one or more data in character string, number and array in web form template in information, the list Data format and position in the tableau format of template comprising different data.
Further, which is characterized in that, will in the mapping relations according to the json file and web form template The target json file is built into after corresponding web form, the method also includes:
The control event of configuration webpage list, the control event of the web form are used to be arranged the table of the web form Disparity items and item value in single structure, project and item value in the form structure correspond.
Further, before target configuration file being converted to corresponding target json file described, the method is also Include:
Determine the file type of the target configuration file;
If the file type of the target configuration file is json file, json file and web form template are obtained Mapping relations, and be built into the target configuration file pair according to the mapping relations of the json file and web form template The web form answered.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art, Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement, Improve etc., it should be included within the scope of the claims of this application.

Claims (10)

1. a kind of construction method of web form characterized by comprising
Target configuration file is converted into corresponding target json file;
The mapping relations of json file and web form template are obtained, the mapping relations are the data structure and net of json file The corresponding relationship of the tableau format of page form templat;
According to the mapping relations of the json file and web form template, the target json file is built into corresponding net Page table list.
2. the method according to claim 1, wherein target configuration file is converted to corresponding target described Before json file, the method also includes:
Obtain the data structure of json file and the tableau format of web form template;
It is matched in the tableau format of the web form template not for the disparity items in the data structure of the json file Same content obtains the mapping relations of the json file and web form template.
3. according to the method described in claim 2, it is characterized in that, in the data structure and webpage table for obtaining json file Before the tableau format of single mode plate, the method also includes:
User instruction is obtained, includes the setting information of web form template in the user instruction;
According to the setting information in the user instruction, the tableau format of the web form template, the setting information are set In the setting information comprising one or more data in character string, number and array in web form template, the form templat Tableau format in comprising different data data format and position.
4. method according to claim 1-3, which is characterized in that described according to the json file and webpage The mapping relations of form templat, after the target json file is built into corresponding web form, the method also includes:
The control event of configuration webpage list, the control event of the web form are used to be arranged the list knot of the web form Disparity items and item value in structure, project and item value in the form structure correspond.
5. according to the method described in claim 4, it is characterized in that, target configuration file is converted to corresponding target described Before json file, the method also includes:
Determine the file type of the target configuration file;
If the file type of the target configuration file is json file, the mapping of json file Yu web form template is obtained Relationship, and with the mapping relations of web form template be built into the target configuration file according to the json file corresponding Web form.
6. a kind of construction device of web form characterized by comprising
Converting unit, for target configuration file to be converted to corresponding target json file;
First acquisition unit, for obtaining the mapping relations of json file Yu web form template, the mapping relations are json The corresponding relationship of the tableau format of the data structure and web form template of file;
Construction unit, the mapping relations of json file and web form template for being obtained according to the first acquisition unit, The target json file that the converting unit is converted is built into corresponding web form.
7. the device stated according to claim 6, which is characterized in that described device further include:
Second acquisition unit, for obtaining the data structure of json file and the tableau format of web form template;
Matching unit, the disparity items in the data structure of the json file for obtaining for the second acquisition unit match institute The different content in the tableau format of web form template is stated, the mapping for obtaining the json file and web form template is closed System.
8. device according to claim 7, which is characterized in that described device further include:
Third acquiring unit includes the setting information of web form template for obtaining user instruction, in the user instruction;
Setting unit, the setting information in user instruction for being obtained according to the third acquiring unit, is arranged the webpage The tableau format of form templat, in the setting information comprising a kind of in character string, number and array in web form template or The setting information of a variety of data, data format and position in the tableau format of the form templat comprising different data.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program When control the storage medium where equipment perform claim require 1 to the web form described in any one of claim 5 Construction method.
10. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run Benefit require 1 to the web form described in any one of claim 5 construction method.
CN201710914737.8A 2017-09-30 2017-09-30 Method and device for constructing webpage form Active CN110020353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710914737.8A CN110020353B (en) 2017-09-30 2017-09-30 Method and device for constructing webpage form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710914737.8A CN110020353B (en) 2017-09-30 2017-09-30 Method and device for constructing webpage form

Publications (2)

Publication Number Publication Date
CN110020353A true CN110020353A (en) 2019-07-16
CN110020353B CN110020353B (en) 2021-06-25

Family

ID=67186379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710914737.8A Active CN110020353B (en) 2017-09-30 2017-09-30 Method and device for constructing webpage form

Country Status (1)

Country Link
CN (1) CN110020353B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990411A (en) * 2019-12-18 2020-04-10 上海米哈游网络科技股份有限公司 Data structure generation method and device and calling method and device
CN111240677A (en) * 2020-01-13 2020-06-05 浙江吉利汽车研究院有限公司 Robot visual interface generation method and device and computer storage medium
CN111625219A (en) * 2020-05-22 2020-09-04 杭州指令集智能科技有限公司 BO component processing method, device and equipment
CN111753238A (en) * 2020-06-05 2020-10-09 北京有竹居网络技术有限公司 Data mapping method and device and electronic equipment
CN112131495A (en) * 2020-09-11 2020-12-25 重庆誉存大数据科技有限公司 Webpage display method, device and equipment based on decision flow result and storage medium
CN113010473A (en) * 2021-03-05 2021-06-22 山东英信计算机技术有限公司 Method and equipment for editing YAML file
CN114138264A (en) * 2021-12-02 2022-03-04 吉旗(成都)科技有限公司 Information acquisition interface generation method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120232985A1 (en) * 2011-03-07 2012-09-13 Pontilex, Inc. Advertising Using Mobile Devices
CN103870266A (en) * 2012-12-12 2014-06-18 杭州新世纪电子科技有限公司 Method and system for generating page
CN104219295A (en) * 2014-08-25 2014-12-17 上海烟草集团有限责任公司 Server-side configuration based information display method and system for mobile equipment
CN104765760A (en) * 2015-01-04 2015-07-08 北京可思云海科技有限公司 Page generating and display method based on JSON (java script object notation) format
CN106570054A (en) * 2016-09-23 2017-04-19 浪潮电子信息产业股份有限公司 Web form data persistence method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120232985A1 (en) * 2011-03-07 2012-09-13 Pontilex, Inc. Advertising Using Mobile Devices
CN103870266A (en) * 2012-12-12 2014-06-18 杭州新世纪电子科技有限公司 Method and system for generating page
CN104219295A (en) * 2014-08-25 2014-12-17 上海烟草集团有限责任公司 Server-side configuration based information display method and system for mobile equipment
CN104765760A (en) * 2015-01-04 2015-07-08 北京可思云海科技有限公司 Page generating and display method based on JSON (java script object notation) format
CN106570054A (en) * 2016-09-23 2017-04-19 浪潮电子信息产业股份有限公司 Web form data persistence method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990411A (en) * 2019-12-18 2020-04-10 上海米哈游网络科技股份有限公司 Data structure generation method and device and calling method and device
CN110990411B (en) * 2019-12-18 2024-02-06 上海米哈游网络科技股份有限公司 Data structure generation method and device, and calling method and device
CN111240677A (en) * 2020-01-13 2020-06-05 浙江吉利汽车研究院有限公司 Robot visual interface generation method and device and computer storage medium
CN111625219A (en) * 2020-05-22 2020-09-04 杭州指令集智能科技有限公司 BO component processing method, device and equipment
CN111753238A (en) * 2020-06-05 2020-10-09 北京有竹居网络技术有限公司 Data mapping method and device and electronic equipment
CN112131495A (en) * 2020-09-11 2020-12-25 重庆誉存大数据科技有限公司 Webpage display method, device and equipment based on decision flow result and storage medium
CN112131495B (en) * 2020-09-11 2023-05-12 重庆誉存大数据科技有限公司 Webpage display method, device, equipment and storage medium based on decision flow result
CN113010473A (en) * 2021-03-05 2021-06-22 山东英信计算机技术有限公司 Method and equipment for editing YAML file
CN113010473B (en) * 2021-03-05 2023-02-28 山东英信计算机技术有限公司 Method and equipment for editing YAML file
CN114138264A (en) * 2021-12-02 2022-03-04 吉旗(成都)科技有限公司 Information acquisition interface generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110020353B (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN110020353A (en) The construction method and device of web form
CN110058856A (en) Page configuration method and device
CN105335412A (en) Method and device for data conversion and data migration
CN103646016A (en) Implementation method of user-defined financial statement and server
CN109725980A (en) Generate method, equipment and the computer-readable medium of mirror image label
JP2012093911A (en) Data migration system, data migration method, and program
Riliskis et al. Ravel: Programming iot applications as distributed models, views, and controllers
CN103577536A (en) System and method for generating and improving template website
CN108170435A (en) A kind of source code conversion method, device and equipment
CN109657427A (en) The method and device of permission control
CN108170430A (en) A kind of method and system of showing interface
US20190243855A1 (en) Unbounded list processing
CN108134812A (en) Data processing method and device
CN107391528A (en) Front end assemblies Dependency Specification searching method and equipment
CN109753323A (en) A kind of external service call method and device
CN104156209B (en) Cross-platform interface modeling method and device
CN104598554B (en) Webpage loading method and device
CN110020298A (en) Parameter display method and apparatus
CN110457010A (en) Method and device based on cooperation platform mass change job order
CN109977317A (en) Data query method and device
CN109492086A (en) A kind of answer output method, device, electronic equipment and storage medium
CN112579149B (en) Method, device, equipment and storage medium for generating model training program mirror image
CN108614714A (en) A kind of dynamic base update method, device and storage medium
CN108228145A (en) Data processing method, system and the mobile equipment of mixed type application program
CN108304186A (en) A kind of method and apparatus executing multi-mode operation based on synthesized configuration file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant