CN107423051B - Data configuration method and device - Google Patents

Data configuration method and device Download PDF

Info

Publication number
CN107423051B
CN107423051B CN201710313474.5A CN201710313474A CN107423051B CN 107423051 B CN107423051 B CN 107423051B CN 201710313474 A CN201710313474 A CN 201710313474A CN 107423051 B CN107423051 B CN 107423051B
Authority
CN
China
Prior art keywords
field
target
data
page
data item
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.)
Active
Application number
CN201710313474.5A
Other languages
Chinese (zh)
Other versions
CN107423051A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710313474.5A priority Critical patent/CN107423051B/en
Publication of CN107423051A publication Critical patent/CN107423051A/en
Application granted granted Critical
Publication of CN107423051B publication Critical patent/CN107423051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Abstract

The invention discloses a data configuration method and a data configuration device. Wherein, the method comprises the following steps: receiving configuration data for configuring a target field format through a configuration page, wherein the configuration data comprises a field name and a field type, the field name is used for configuring the name of the target field, the field type is used for configuring the type of the target field, the target field is stored in a key-value mode, and a plurality of target fields are nested in a nested value mode; generating a filling page for filling the value of the target field according to the received configuration data; the values of the target fields are received through the pad page and a target file is generated. The invention solves the technical problem of low product operation efficiency caused by the fact that data cannot be freely configured.

Description

Data configuration method and device
Technical Field
The invention relates to the field of data processing, in particular to a data configuration method and device.
Background
The main work of product developers is the development of products, but some inevitable work exists in daily work, namely, the modification of the contents such as documents, activity configuration items and the like. Since some data on the product page (e.g., documentation, pictures, point-in-time logic, etc.) is solidified in the code by the developer, each time these data change, the developer is required to modify the code and release a new version, such as:
1. when the contents such as activity rules, the file case and the like have wrongly written characters, unsmooth language names or wrong activity contents, the codes need to be revised again;
2. when the function of the page is not changed and the data of the page is changed, the code needs to be modified and reissued;
3. when the product requirement changes, the product developer is required to modify and release the code again.
Due to repeated modification of product codes caused by modification of contents such as documents, activity configuration items and the like, a large amount of time is occupied for product developers, development enthusiasm of the developers on the products is influenced, and the operation efficiency of the products is greatly reduced.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a data configuration method and a data configuration device, which at least solve the technical problem of low product operation efficiency caused by the fact that data cannot be freely configured.
According to an aspect of an embodiment of the present invention, there is provided a data processing method, including: receiving configuration data for configuring a target field format through a configuration page, wherein the configuration data comprises a field name and a field type, the field name is used for configuring the name of the target field, the field type is used for configuring the type of the target field, the target field is stored in a key-value mode, and a plurality of target fields are nested in a nested value mode; generating a filling page for filling the value of the target field according to the received configuration data; and receiving the value of the target field through the filling page and generating a target file.
According to another aspect of the embodiments of the present invention, there is also provided a data processing apparatus, including: a first receiving unit, configured to receive configuration data for configuring a target field format through a configuration page, where the configuration data includes a field name and a field type, the field name is used to configure a name of the target field, the field type is used to configure a type of the target field, the target field is stored in a key-value manner, and a plurality of the target fields are nested in a nested value manner; the generating unit is used for generating a filling page used for filling the value of the target field according to the received configuration data; and the second receiving unit is used for receiving the value of the target field through the filling page and generating a target file.
In the embodiment of the invention, configuration data for configuring a target field format is received through a configuration page, wherein the configuration data comprises a field name and a field type, the field name is used for configuring the name of the target field, the field type is used for configuring the type of the target field, the target field is stored in a key-value mode, and a plurality of target fields are nested in a nested value mode; generating a filling page for filling the value of the target field according to the received configuration data; the method comprises the steps of receiving values of target fields through the filling page, generating a target file, storing the target fields in a key-value mode, configuring field names and field types of the target fields, configuring the field types to support nested field types, enabling a plurality of target fields to be nested in a nested value mode, achieving the purpose of freely nesting the plurality of target fields, receiving the values of the target fields through the filling page generated according to configuration data, achieving the technical effect of freely configuring data, and further solving the technical problem of low product operation efficiency caused by the fact that data cannot be freely configured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative data configuration method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a configuration page according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a pad page according to an embodiment of the invention;
FIG. 5 is a diagram illustrating previewing items in a list preview mode according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of previewing items in the big picture preview mode according to an embodiment of the present invention;
FIG. 7 is a diagram of previewing items in thumbnail preview mode according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an alternative data configuration apparatus according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method that may be performed by an embodiment of the apparatus of the present application, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
According to an embodiment of the present invention, a method for configuring data is provided.
Alternatively, in this embodiment, the above data configuration method may be applied to a hardware environment formed by the terminal 102 and the server 104 shown in fig. 1. As shown in fig. 1, a terminal 102 is connected to a server 104 via a network including, but not limited to: the terminal 102 may be a mobile phone terminal, or may also be a PC terminal, a notebook terminal, or a tablet terminal.
Fig. 2 is a flowchart of an optional data configuration method according to an embodiment of the present invention, and the following describes the data configuration method provided in the embodiment of the present invention in detail with reference to fig. 2, as shown in fig. 2, the data configuration method mainly includes the following steps S202 to S206:
step S202, receiving configuration data for configuring a target field format through a configuration page, wherein the configuration data comprises a field name and a field type, the field name is used for configuring the name of the target field, the field type is used for configuring the type of the target field, the target field is stored in a key-value mode, and a plurality of target fields are nested in a nested value mode. As shown in fig. 3, the configuration data may include other configuration items such as "field english name", "chinese comment", and the like, in addition to the field name and the field type. The destination field is stored in a Key-Value manner, wherein the field name is used as a Key (Key), the content of the destination field is used as a Value (Value), and the field type is used for configuring the type of the destination field, namely the type of the content of the destination field. The type of the target field can be various types such as an object, an array, a number, a character string and the like. The target field is nested by means of a nested value, namely the content of the target field can be other fields, and in this case, the type of the target field can be an object or an array. Any nesting of multiple fields can be achieved by using nested values.
Step S204, generating a filling page for filling the value of the target field according to the received configuration data.
Step S206, receiving the value of the target field through the filling page and generating a target file.
And after the configuration data is received through the configuration page to complete the configuration of the target field format, generating a filling page according to the configuration data to fill the content of the target field. As shown in fig. 4, the pad page is generated by the configuration page having received the configuration data, and is used to receive the value of the target field, i.e. the specific content of the target field, wherein the type of the target field that the pad page can receive is consistent with the configuration data received in the configuration page, for example: in the filling page, the field type of a target field with the field name of 'maximum recharging month' is a number, and the receivable content of the field is the number; the field type of a target field with the field name of 'activity description' is an object, and the content which can be received by the field is the object; the field type of the target field with the field name of '7-fold active page' is an array, and the content that the field can receive is an array. In addition, because the field type of the target field "activity description" is an object, the target field can be nested with the field "active page folded by 7", and the field type of the field "active page folded by 7" is an array, the field can also be nested with other fields, as shown in fig. 3, the field type of the field nested in the field "active page folded by 7" is a normal character string, and therefore, the content that the field nested in the field "active page folded by 7" shown in fig. 4 can receive is a character string. Since the field type of the target field can be freely configured in the configuration page, free nesting of a plurality of target fields can be realized, and the specific content of each target field can be freely filled in the pad page. After the value of the target field is received by the filled page, the target file is generated according to the target field received by the filled page, optionally, the generated target file may be a JSON object, and the JSON object may be converted into JSON data to be stored in a background storage server, or a JS module may be generated according to the JSON object and issued to the storage server.
In the embodiment of the invention, the configuration data for configuring the target field format is received through a configuration page, wherein the configuration data comprises a field name and a field type, the field name is used for configuring the name of the target field, the field type is used for configuring the type of the target field, the target field is stored in a key-value mode, and a plurality of target fields are nested in a nested value mode; generating a filling page for filling the value of the target field according to the received configuration data; the method comprises the steps of receiving a value of a target field through a filling page, generating a target file, storing the target field in a key-value mode, configuring a field name and a field type of the target field, configuring the field type to support a nested field type, enabling a plurality of target fields to be nested in a nested value mode, achieving the purpose of freely nesting the plurality of target fields, and receiving the value of the target field through the filling page generated according to configuration data, so that the technical effect of freely configuring data is achieved, and the technical problem of low product operation efficiency caused by the fact that data cannot be freely configured is solved.
Optionally, receiving, by the configuration page, configuration data for configuring the target field format includes: receiving first configuration data through a configuration page, wherein the first configuration data is used for configuring the format of a first target field; judging whether the field type of the first configuration data supports nesting or not; and when the field type of the first configuration data supports nesting, receiving second configuration data nested in the first configuration field, wherein the second configuration data is used for configuring the format of a second target field, and the second target field is the value of the first target field.
In the embodiment of the present invention, since the field type of the target field can be set to a field type supporting nesting, such as: an object or array, etc. After the configuration page receives first configuration data for configuring a first target field, judging whether the field type of the received first configuration data supports nesting or not, and if the field type of the first configuration data does not support nesting, continuing to receive configuration data of other target fields; nesting a second target field in the first target field if the field type of the first configuration data supports nesting, treating the second target field as a value of the first target field, and receiving second configuration data for configuring the second target field. Therefore, the field type of the first target field can be configured into an object or data, so that the nesting of the second target field under the first target field is realized, further, other fields can be nested under the second target field, and the fields nested under the second target field are used as the value of the second target field until all nesting under the first target field is completed, so that the free nesting of a plurality of fields under the first target field is completed.
Optionally, after receiving the value of the target field through the pad page, the method further includes: acquiring a target template, wherein the target template is used for splicing data items included in a filling page, the filling page includes at least one data item, and the data item includes at least one target field; splicing at least one data item included in the target file into a target template; and analyzing the target template spliced with at least one data item to generate a target page.
As an optional implementation manner of the embodiment of the present invention, one or more data items in the pad page may be spliced, so as to generate some pages with simple functions, where one or more associated target fields received by the pad page constitute one data item. Optionally, after the filling page receives the value of the target field, a target template for splicing the data items is obtained, one or more data items in the filling page are spliced into the target template, and the target template spliced with the one or more data items is analyzed to generate a target page, where the target page is generated according to the one or more data items spliced to the target template. The target page may be an html page, which may be posted to a storage server after the html page is generated.
Optionally, after receiving the value of the target field through the pad page, the method further includes: receiving a preview instruction, wherein the preview instruction is used for instructing to preview the data items in the filling page; and displaying the field name and the value of the target field included by the data item according to the preview instruction.
As an optional implementation manner of the embodiment of the present invention, after the target field is received by the pad page, the data item composed of one or more target fields may be previewed to view the field content therein. Optionally, after the value of the target field is received by the pad page, a preview instruction, that is, a preview instruction for instructing to preview the data item in the pad page, may be initiated to the pad page by the preview function. The pad page, upon receiving the preview instruction, displays a data item comprised of the received one or more target fields.
As an optional implementation manner of the embodiment of the present invention, displaying, according to the preview instruction, a field name and a value of a target field included in the data item includes: receiving a mode instruction, wherein the mode instruction is used for indicating a preview mode for previewing the data items in the filling page, and the preview mode comprises the following steps: a list preview mode, a large preview mode and a small preview mode; and displaying the name of the data item and the value of the data item according to the received mode instruction.
As an optional implementation manner of the embodiment of the present invention, when previewing a data item, a preview mode may be selected according to how much content of a target field in the data item is. Optionally, in the preview process, a mode instruction may be initiated by a mode selection function of the preview page, where the mode instruction is used to indicate a display manner during preview, and optionally the preview mode includes a list preview mode, a large-image preview mode and a small-image preview mode, as shown in fig. 5, the list preview mode only displays field names of main fields in each data item, and when the field content included in the data item is too much to be displayed completely, or when the preview purpose is to search for specified content without displaying all the content included in the data item, the preview mode may be used. As shown in fig. 6, each data item in the large-view preview mode is displayed in a large view, and the preview mode can be used when the content of the target field included in the data item is large and it is desired to display the entire content included in the data item. As shown in fig. 7, in the thumbnail preview mode, each data item is displayed by a smaller view, and the preview mode can be used when the content of the target field included in the data item is small.
As an optional implementation manner of the embodiment of the present invention, displaying, according to the preview instruction, a field name and a value of a target field included in the data item includes: receiving a sorting instruction, wherein the sorting instruction is used for indicating to adjust the arrangement position of a target data item in at least one data item, and the target data item is any one of the at least one data item; and adjusting the arrangement position of the data items according to the sorting instruction. When the data items are previewed, the data items are sorted through the sorting function so as to adjust the arrangement positions of the target data items in all the data items, and therefore the display positions of the target data items on the display page are adjusted. Optionally, the sorting function supports four sorting modes of moving up, moving down, setting top and setting tail.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is also provided a data configuration apparatus for implementing the data configuration method, where the data configuration apparatus is mainly used to execute the data configuration method provided in the foregoing content of the embodiment of the present invention, and the following specifically introduces the data configuration apparatus provided in the embodiment of the present invention:
fig. 8 is a schematic diagram of an alternative data configuration apparatus according to an embodiment of the present invention, and as shown in fig. 8, the data configuration apparatus mainly includes:
a first receiving unit 810, configured to receive configuration data for configuring a target field format through a configuration page, where the configuration data includes a field name and a field type, the field name is used for configuring a name of the target field, the field type is used for configuring a type of the target field, the target field is stored in a key-value manner, and a plurality of target fields are nested in a nested value manner. As shown in fig. 3, the configuration data may include other configuration items such as "field english name", "chinese comment", and the like, in addition to the field name and the field type. The destination field is stored in a Key-Value manner, wherein the field name is used as a Key (Key), the content of the destination field is used as a Value (Value), and the field type is used for configuring the type of the destination field, namely the type of the content of the destination field. The type of the target field can be various types such as an object, an array, a number, a character string and the like. The target field is nested by means of a nested value, namely the content of the target field can be other fields, and in this case, the type of the target field can be an object or an array. Any nesting of multiple fields can be achieved by using nested values.
A generating unit 820, configured to generate a padding page for padding a value of the target field according to the received configuration data.
A second receiving unit 830 for receiving a value of the target field through the pad page and generating a target file.
And after the configuration data is received through the configuration page to complete the configuration of the target field format, generating a filling page according to the configuration data to fill the content of the target field. As shown in fig. 4, the pad page is generated by the configuration page having received the configuration data, and is used to receive the value of the target field, i.e. the specific content of the target field, wherein the type of the target field that the pad page can receive is consistent with the configuration data received in the configuration page, for example: in the filling page, the field type of a target field with the field name of 'maximum recharging month' is a number, and the receivable content of the field is the number; the field type of a target field with the field name of 'activity description' is an object, and the content which can be received by the field is the object; the field type of the target field with the field name of '7-fold active page' is an array, and the content that the field can receive is an array. In addition, because the field type of the target field "activity description" is an object, the target field can be nested with the field "active page folded by 7", and the field type of the field "active page folded by 7" is an array, the field can also be nested with other fields, as shown in fig. 3, the field type of the field nested in the field "active page folded by 7" is a normal character string, and therefore, the content that the field nested in the field "active page folded by 7" shown in fig. 4 can receive is a character string. Since the field type of the target field can be freely configured in the configuration page, free nesting of a plurality of target fields can be realized, and the specific content of each target field can be freely filled in the pad page. After the value of the target field is received by the filled page, the target file is generated according to the target field received by the filled page, optionally, the generated target file may be a JSON object, and the JSON object may be converted into JSON data to be stored in a background storage server, or a JS module may be generated according to the JSON object and issued to the storage server.
In the embodiment of the invention, the value of the target field is received through the filling page, the target file is generated, the target field is stored in a key-value mode, the field name and the field type of the target field are configured, the field type is configured to support the nested field type, so that a plurality of target fields are nested in a nested value mode, the purpose of freely nesting the plurality of target fields is achieved, the filling page generated according to the configuration data receives the value of the target field, the technical effect of freely configuring the data is realized, and the technical problem of low product operation efficiency caused by the fact that the data cannot be freely configured is solved.
Optionally, the first receiving unit includes: the first receiving module is used for receiving first configuration data through a configuration page, wherein the first configuration data is used for configuring the format of a first target field; the judging module is used for judging whether the field type of the first configuration data supports nesting or not; and the second receiving module is used for receiving second configuration data nested in the first configuration field when the field type of the first configuration data supports nesting, wherein the second configuration data is used for configuring the format of a second target field, and the second target field is the value of the first target field.
In the embodiment of the present invention, since the field type of the target field can be set to a field type supporting nesting, such as: an object or array, etc. After the configuration page receives first configuration data for configuring a first target field, judging whether the field type of the received first configuration data supports nesting or not, and if the field type of the first configuration data does not support nesting, continuing to receive configuration data of other target fields; nesting a second target field in the first target field if the field type of the first configuration data supports nesting, taking the second target field as a value of the first target field, and receiving second configuration data for configuring the second target field. Therefore, the field type of the first target field can be configured into an object or data, so that the nesting of the second target field under the first target field is realized, further, other fields can be nested under the second target field, and the fields nested under the second target field are used as the value of the second target field until all nesting under the first target field is completed, so that the free nesting of a plurality of fields under the first target field is completed.
Optionally, the apparatus further comprises: the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a target template after receiving a value of a target field through a filling page, the target template is used for splicing data items included in the filling page, the filling page includes at least one data item, and the data item includes at least one target field; the splicing unit is used for splicing at least one data item included in the target file into the target template; and the analysis unit is used for analyzing the target template spliced with at least one data item to generate a target page.
As an optional implementation manner of the embodiment of the present invention, one or more data items in the pad page may be spliced, so as to generate some pages with simple functions, where one or more associated target fields received by the pad page constitute one data item. Optionally, after the filling page receives the value of the target field, a target template for splicing the data items is obtained, one or more data items in the filling page are spliced into the target template, and the target template spliced with the one or more data items is analyzed to generate a target page, where the target page is generated according to the one or more data items spliced to the target template. The target page may be an html page, which may be posted to a storage server after the html page is generated.
Optionally, the apparatus further comprises: a third receiving unit, configured to receive a preview instruction after receiving the value of the target field through the pad page, where the preview instruction is used to instruct to preview the data item in the pad page; and the display unit is used for displaying the field name and the value of the target field included by the data item according to the preview instruction.
As an optional implementation manner of the embodiment of the present invention, after the target field is received by the pad page, the data item composed of one or more target fields may be previewed to view the field content therein. Optionally, after the value of the target field is received by the pad page, a preview instruction, that is, a preview instruction for instructing to preview the data item in the pad page, may be initiated to the pad page by the preview function. The pad page, upon receiving the preview instruction, displays a data item comprised of the received one or more target fields.
Optionally, the display unit comprises: a third receiving module, configured to receive a mode instruction, where the mode instruction is used to indicate a preview mode for previewing a data item in a pad page, and the preview mode includes: a list preview mode, a large preview mode and a small preview mode; and the display module is used for displaying the name of the data item and the value of the data item according to the received mode instruction.
As an optional implementation manner of the embodiment of the present invention, when previewing a data item, a preview mode may be selected according to how much content of a target field in the data item is. Optionally, in the preview process, a mode instruction may be initiated by a mode selection function of the preview page, where the mode instruction is used to indicate a display manner during preview, and optionally the preview mode includes a list preview mode, a large-image preview mode and a small-image preview mode, as shown in fig. 5, the list preview mode only displays field names of main fields in each data item, and when the field content included in the data item is too much to be displayed completely, or when the preview purpose is to search for specified content without displaying all the content included in the data item, the preview mode may be used. As shown in fig. 6, each data item in the large-view preview mode is displayed in a large view, and the preview mode can be used when the content of the target field included in the data item is large and it is desired to display the entire content included in the data item. As shown in fig. 7, in the thumbnail preview mode, each data item is displayed by a smaller view, and the preview mode can be used when the content of the target field included in the data item is small.
As an optional implementation manner of the embodiment of the present invention, the display unit includes: the fourth receiving module is used for receiving a sorting instruction, wherein the sorting instruction is used for indicating that the arrangement position of a target data item in at least one data item is adjusted, and the target data item is any one of the at least one data item; and the adjusting module is used for adjusting the arrangement position of the data items according to the sorting instruction. When the data items are previewed, the data items are sorted through a sorting function so as to adjust the arrangement positions of the target data items in all the data items, and therefore the display positions of the target data items on the display page are adjusted. Optionally, the sorting function supports four sorting modes of moving up, moving down, setting top and setting tail.
Example 3
According to an embodiment of the present invention, there is also provided a terminal for implementing the above data configuration method, as shown in fig. 9, the terminal mainly includes a processor 901, a display 902, a data interface 903, a memory 904, and a network interface 905, where:
the data interface 903 obtains the configuration data and the value of the target field mainly by data transmission.
The memory 904 is primarily used to store configuration data received by the configuration page and values to populate target fields received by the page.
The network interface 905 is mainly used for transmitting the generated target file to the server.
The display 902 is primarily used to display field names and values for target fields included in data items in a configuration page, a fill page, and a fill page.
The processor 901 is mainly configured to perform the following operations:
receiving configuration data for configuring a target field format through a configuration page, wherein the configuration data comprises a field name and a field type, the field name is used for configuring the name of the target field, the field type is used for configuring the type of the target field, the target field is stored in a key-value mode, and a plurality of target fields are nested in a nested value mode; generating a filling page for filling the value of the target field according to the received configuration data; and receiving the value of the target field through the filling page and generating a target file.
Processor 901 is further configured to receive first configuration data through the configuration page, where the first configuration data is used to configure a format of the first target field; judging whether the field type of the first configuration data supports nesting or not; when the field type of the first configuration data supports nesting, receiving second configuration data nested in the first configuration field, wherein the second configuration data is used for configuring the format of a second target field, and the second target field is the value of the first target field.
The processor 901 is further configured to obtain a target template, where the target template is used to splice data items included in the filler page, the filler page includes at least one data item, and the data item includes at least one target field; splicing at least one data item included in the target file into the target template; and analyzing the target template spliced with at least one data item to generate a target page.
The processor 901 is further configured to receive a preview instruction, where the preview instruction is used to instruct to preview the data item in the pad page; and displaying the field name and the value of the target field included by the data item according to the preview instruction.
Processor 901 is further configured to receive a mode instruction, where the mode instruction is configured to indicate a preview mode for previewing the data item in the pad page, and the preview mode includes: a list preview mode, a large preview mode and a small preview mode; and displaying the name of the data item and the value of the data item according to the received mode instruction.
The processor 901 is further configured to receive an ordering instruction, where the ordering instruction is configured to instruct to adjust an arrangement position of a target data item in at least one of the data items, where the target data item is any one of the at least one data item; and adjusting the arrangement position of the data items according to the sorting instruction.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
Example 4
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be configured to store a program code of the data configuring method according to the embodiment of the present invention.
Optionally, in this embodiment, the storage medium may be located in at least one of a plurality of network devices in a network of a mobile communication network, a wide area network, a metropolitan area network, or a local area network.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, receiving configuration data for configuring a target field format through a configuration page, wherein the configuration data comprises a field name and a field type, the field name is used for configuring the name of the target field, the field type is used for configuring the type of the target field, the target field is stored in a key-value mode, and a plurality of target fields are nested in a nested value mode;
s2, generating a filling page for filling the value of the target field according to the received configuration data;
and S3, receiving the value of the target field through the filling page and generating a target file.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium, to receive first configuration data through the configuration page, where the first configuration data is used to configure a format of the first target field; judging whether the field type of the first configuration data supports nesting or not; and when the field type of the first configuration data supports nesting, receiving second configuration data nested in the first configuration field, wherein the second configuration data is used for configuring the format of a second target field, and the second target field is the value of the first target field.
Optionally, in this embodiment, the processor executes, according to a program code stored in the storage medium, to obtain a target template, where the target template is used to splice data items included in a filler page, the filler page includes at least one data item, and the data item includes at least one target field; splicing at least one data item included in the target file into a target template; and analyzing the target template spliced with at least one data item to generate a target page.
Optionally, in this embodiment, the processor executes, according to program code already stored in the storage medium, a preview instruction, where the preview instruction is used to instruct to preview data items in the pad page; and displaying the field name and the value of the target field included by the data item according to the preview instruction.
Optionally, in this embodiment, the processor executes a reception mode instruction according to program code already stored in the storage medium, where the mode instruction is used to indicate a preview mode for previewing a data item in the pad page, and the preview mode includes: a list preview mode, a large preview mode and a small preview mode; and displaying the name of the data item and the value of the data item according to the received mode instruction.
Optionally, in this embodiment, the processor executes, according to program code stored in the storage medium, to receive a sorting instruction, where the sorting instruction is used to instruct to adjust an arrangement position of a target data item in at least one data item, where the target data item is any one of the at least one data item; and adjusting the arrangement position of the data items according to the sorting instruction.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (6)

1. A method for configuring data, comprising:
storing a field name of the first target field and contents of the first target field, and a field name of the second target field and contents of the second target field in a key-value manner;
receiving first configuration data through a configuration page, wherein the first configuration data is used for configuring a field name and a field type of the first target field, and the field type of the first target field is used for configuring the type of the content of the first target field;
judging whether the field type of the first configuration data supports nesting or not;
receiving configuration data of other target fields under the condition that the field type of the first configuration data does not support nesting;
under the condition that the field type of the first configuration data indicates that the first target field is an object or an array supporting nesting, receiving second configuration data nested by the first configuration data, and determining the second target field as a value nested by the first target field in a nested value manner, wherein the second configuration data is used for configuring the field name and the field type of the second target field, and the field type of the second target field is used for configuring the type of the content of the second target field;
generating a filling page of values of fields to be filled according to the received first configuration data and second configuration data, and receiving the values of the first target fields and the second target fields to be filled in data items contained in the filling page to generate a JS object, wherein the data items comprise at least one field;
receiving a preview instruction, wherein the preview instruction is used for instructing to preview the data item in the filling page;
displaying field names and values of fields included in the data items according to the preview instruction;
splicing at least one data item included in the JS object into a target template;
and analyzing the target template spliced with the at least one data item to generate a target page.
2. The method of claim 1, wherein displaying the field name and the value of the field included in the data item according to the preview instruction comprises:
receiving a mode instruction, wherein the mode instruction is used for indicating a preview mode for previewing the data item in the filling page, and the preview mode comprises: a list preview mode, a large preview mode and a small preview mode;
and displaying the name of the data item and the value of the data item according to the received mode instruction.
3. The method of claim 1, wherein displaying the field name and the value of the field included in the data item according to the preview instruction comprises:
receiving a sorting instruction, wherein the sorting instruction is used for indicating to adjust the arrangement position of a target data item in at least one data item, and the target data item is any one data item in the at least one data item;
and adjusting the arrangement position of the data items according to the sorting instruction.
4. An apparatus for configuring data, comprising:
the device is used for storing the field name of the first target field and the content of the first target field, and the field name of the second target field and the content of the second target field in a key-value mode;
a first receiving unit, configured to receive first configuration data through a configuration page, where the first configuration data is used to configure a field name and a field type of the first target field, and the field type of the first target field is used to configure a type of content of the first target field; judging whether the field type of the first configuration data supports nesting or not; receiving configuration data of other target fields under the condition that the field type of the first configuration data does not support nesting; under the condition that the field type of the first configuration data indicates that the first target field is an object or an array supporting nesting, receiving second configuration data nested by the first configuration data, and determining the second target field as a value nested by the first target field in a nested value manner, wherein the second configuration data is used for configuring the field name and the field type of the second target field, and the field type of the second target field is used for configuring the type of the content of the second target field;
the apparatus is further configured to receive configuration data of other target fields if the field type of the first configuration data does not support nesting;
the generating unit is used for generating a filling page of the value of the field to be filled according to the received first configuration data and the second configuration data, and receiving the value of the first target field and the value of the second target field to be filled in the data items contained in the filling page to generate the JS object, wherein the data items comprise at least one field;
the device is further configured to receive a preview instruction, where the preview instruction is used to instruct to preview the data item in the pad page; displaying field names and values of fields included in the data items according to the preview instruction; splicing at least one data item included in the JS object into a target template; and analyzing the target template spliced with the at least one data item to generate a target page.
5. The apparatus of claim 4, wherein the display unit comprises:
a third receiving module, configured to receive a mode instruction, where the mode instruction is used to indicate a preview mode for previewing the data item in the pad page, and the preview mode includes: a list preview mode, a large preview mode and a small preview mode;
and the display module is used for displaying the name of the data item and the value of the data item according to the received mode instruction.
6. The apparatus of claim 4, wherein the display unit comprises:
a fourth receiving module, configured to receive a sorting instruction, where the sorting instruction is used to instruct to adjust an arrangement position of a target data item in at least one of the data items, where the target data item is any one of the at least one data item;
and the adjusting module is used for adjusting the arrangement positions of the data items according to the sorting instruction.
CN201710313474.5A 2017-05-05 2017-05-05 Data configuration method and device Active CN107423051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710313474.5A CN107423051B (en) 2017-05-05 2017-05-05 Data configuration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710313474.5A CN107423051B (en) 2017-05-05 2017-05-05 Data configuration method and device

Publications (2)

Publication Number Publication Date
CN107423051A CN107423051A (en) 2017-12-01
CN107423051B true CN107423051B (en) 2023-03-24

Family

ID=60425426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710313474.5A Active CN107423051B (en) 2017-05-05 2017-05-05 Data configuration method and device

Country Status (1)

Country Link
CN (1) CN107423051B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109358943B (en) * 2018-11-09 2022-03-22 金色熊猫有限公司 Page configuration method and device, electronic equipment and storage medium
CN110059305A (en) * 2019-03-04 2019-07-26 广州市辉海计算机科技有限公司 Method and apparatus derived from data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541541A (en) * 2011-12-15 2012-07-04 大唐软件技术股份有限公司 Interface generation method and device
CN102981941A (en) * 2012-11-08 2013-03-20 大唐软件技术股份有限公司 Alarm handling method and alarm handling device
CN103970737A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Data constitution method and device
CN105824787A (en) * 2016-03-15 2016-08-03 江苏中威科技软件系统有限公司 Control method and system for dynamic configuration of HTML template

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541541A (en) * 2011-12-15 2012-07-04 大唐软件技术股份有限公司 Interface generation method and device
CN102981941A (en) * 2012-11-08 2013-03-20 大唐软件技术股份有限公司 Alarm handling method and alarm handling device
CN103970737A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Data constitution method and device
CN105824787A (en) * 2016-03-15 2016-08-03 江苏中威科技软件系统有限公司 Control method and system for dynamic configuration of HTML template

Also Published As

Publication number Publication date
CN107423051A (en) 2017-12-01

Similar Documents

Publication Publication Date Title
CN108121539B (en) Component processing method and device
US20170337168A1 (en) System and method for generating and monitoring feedback of a published webpage as implemented on a remote client
CN108040278A (en) Active page processing method, server, system and the storage medium of smart television
US10013263B2 (en) Systems and methods method for providing an interactive help file for host software user interfaces
CN102930523A (en) Picture processing system and picture slicing implementation method
CN105335132B (en) Method, device and system for customizing application program function
CN109783757B (en) Method, device and system for rendering webpage, storage medium and electronic device
CN108647348A (en) Textual presentation method, apparatus, equipment and storage medium
CN106406839A (en) Processing method and device of screen adaption file
CN108089865A (en) Using method of cutting out, device and storage medium
CN110990345A (en) Method and device for online preview of Excel file
CN105094775A (en) Webpage generation method and apparatus
CN115526160A (en) Rich text processing method, device and equipment and storage medium
CN107423051B (en) Data configuration method and device
CN110888634B (en) Game floor page generation method, game floor page generation device, computer equipment and storage medium
CN110515514B (en) Data processing method, device and storage medium
CN106022010A (en) File display method and device
CN113407254B (en) Form generation method and device, electronic equipment and storage medium
CN113312083A (en) Application generation method, device and equipment
CN109634610B (en) Interface marking data generation method and device
US10567472B2 (en) Manipulation of PDF files using HTML authoring tools
CN109992580A (en) Processing method and processing device, storage medium, the computer equipment of table data
CN107147732A (en) Image processing method, device, client and service end
CN112612964A (en) Picture display method and device, computer equipment and storage medium
CN106934958A (en) The method to set up and device of POS printing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant