CN107168684B - Method and device for generating content editing form - Google Patents

Method and device for generating content editing form Download PDF

Info

Publication number
CN107168684B
CN107168684B CN201610128072.3A CN201610128072A CN107168684B CN 107168684 B CN107168684 B CN 107168684B CN 201610128072 A CN201610128072 A CN 201610128072A CN 107168684 B CN107168684 B CN 107168684B
Authority
CN
China
Prior art keywords
content
data
issued
generating
template
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
CN201610128072.3A
Other languages
Chinese (zh)
Other versions
CN107168684A (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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201610128072.3A priority Critical patent/CN107168684B/en
Publication of CN107168684A publication Critical patent/CN107168684A/en
Application granted granted Critical
Publication of CN107168684B publication Critical patent/CN107168684B/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/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for generating a content editing form. Wherein, the method comprises the following steps: acquiring issued content corresponding to client software and constraint conditions corresponding to the issued content; generating a distributed data template corresponding to distributed contents according to the predefined template format and the distributed contents and the constraint conditions; and generating a content editing form corresponding to the issued content through the issued data template. The method generates the issuing data template corresponding to the issuing content according to the issuing content and the constraint condition, and automatically generates the content editing form corresponding to the issuing content through the issuing data template, thereby greatly reducing manual intervention in the form generation process, improving the form generation efficiency and enhancing the maintainability and expansibility of client software.

Description

Method and device for generating content editing form
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for generating a content editing form.
Background
At present, a plurality of software is installed on a terminal, a server edits the content of management software in the software architecture to generate issuing data, the generated issuing data is sent to the terminal, and the terminal renders the interface of the software according to the issuing data.
Currently, the delivered data is generally delivered in a JSON (JavaScript Object Notation) format. When managing software content, a technician needs to define JSON protocol information corresponding to the software content, compile a content editing form and a content verification algorithm corresponding to the software content according to the JSON protocol information, generate issuing data corresponding to the software content according to the content editing form, verify the issuing data by utilizing the compiled content verification algorithm, and store the issuing data in a server. And when the terminal logs in the server, the server sends the issued data to the terminal.
When the software contents are managed, a large amount of manual intervention is needed, and especially when the software contents are many, a content editing form and a content verification algorithm corresponding to each software content need to be written, so that the efficiency is low, and the maintainability and the expansibility of the software are not strong.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for generating a content editing form, so as to implement automatic generation of a content editing form corresponding to a delivered content, reduce manual intervention in a form generation process, improve form generation efficiency, and enhance maintainability and extensibility of client software.
In a first aspect, an embodiment of the present invention provides a method for generating a content editing form, where the method includes:
acquiring issued content corresponding to client software and constraint conditions corresponding to the issued content;
generating a distributed data template corresponding to the distributed content according to the predefined template format and the constraint condition;
and generating a content editing form corresponding to the delivered content through the delivered data template.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where generating, according to a predefined template format and according to the delivered content and the constraint condition, a delivered data template corresponding to the delivered content includes:
generating data structure information corresponding to the issued content according to a predefined template format and the issued content;
generating data constraint information corresponding to the issued content according to the template format and the constraint condition corresponding to the issued content;
and generating a distributed data template corresponding to the distributed content according to the data structure information and the data constraint information.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where after the generating a content edit form corresponding to the delivered content by using the delivered data template, the method further includes:
displaying the content editing form, and acquiring editing data input by a user from the content editing form;
and generating issuing data corresponding to the issuing content according to the content editing form and the editing data.
With reference to the second possible implementation manner of the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where before generating the delivered data corresponding to the delivered content, the method further includes:
and checking whether the editing data meets the constraint condition corresponding to the issued content or not according to the issued data template, if so, executing the operation of generating the issued data corresponding to the issued content, and if not, displaying prompt information of inputting errors.
With reference to the second possible implementation manner of the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where after generating the delivered data corresponding to the delivered content, the method further includes:
and storing the issued data corresponding to the issued content, and sending the issued data to the terminal when a login request of the terminal is detected.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where before the obtaining of the delivered content corresponding to the client software and the constraint condition corresponding to the delivered content, the method further includes:
extracting common characteristic information of the generated different content editing forms, determining the same composition information of the data structures of the different content editing forms according to the common characteristic information, and generating a template format according to the same composition information of the data structures.
With reference to the first aspect, an embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where the delivered content includes a data type, a data number, an element type, and definition information of each element; the constraint condition comprises a constraint condition corresponding to each element.
With reference to the sixth possible implementation manner of the first aspect, an embodiment of the present invention provides a seventh possible implementation manner of the first aspect, where the method further includes:
acquiring requirement indication information corresponding to each element;
and if the requirement indication information corresponding to the element indicates that the element is a necessary filling element, displaying a necessary filling indicator at a position corresponding to the element in the content editing form.
With reference to the seventh possible implementation manner of the first aspect, an embodiment of the present invention provides an eighth possible implementation manner of the first aspect, where the method further includes:
and when the issued data is generated according to the content editing form, if the editing data corresponding to the filling-in element input by the user is not detected, displaying the indication information of input omission.
In a second aspect, an embodiment of the present invention provides an apparatus for generating a content editing form, where the apparatus includes:
the acquisition module is used for acquiring the issued content corresponding to the client software and the constraint condition corresponding to the issued content;
the first generation module is used for generating an issued data template corresponding to the issued content according to the issued content and the constraint condition according to a predefined template format;
and the second generation module is used for generating a content editing form corresponding to the issued content through the issued data template.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the first generating module includes:
the data structure generating unit is used for generating data structure information corresponding to the issued content according to a predefined template format;
the constraint information generating unit is used for generating data constraint information corresponding to the issued content according to the template format and the constraint condition corresponding to the issued content;
and the template generating unit is used for generating an issued data template corresponding to the issued content according to the data structure information and the data constraint information.
With reference to the second aspect, an embodiment of the present invention provides a second possible implementation manner of the second aspect, where the apparatus further includes:
the editing data acquisition module is used for displaying the content editing form and acquiring editing data input by a user from the content editing form;
and the issuing data generation module is used for generating issuing data corresponding to the issuing content according to the content editing form and the editing data.
With reference to the second possible implementation manner of the second aspect, an embodiment of the present invention provides a third possible implementation manner of the second aspect, where the apparatus further includes:
and the verification module is used for verifying whether the edit data meets the constraint condition corresponding to the issued content or not according to the issued data template, if so, executing the operation of generating the issued data corresponding to the issued content, and if not, displaying prompt information of input errors.
With reference to the second possible implementation manner of the second aspect, an embodiment of the present invention provides a fourth possible implementation manner of the second aspect, where the apparatus further includes:
and the storage module is used for storing the issued data corresponding to the issued content and sending the issued data to the terminal when the login request of the terminal is detected.
With reference to the second aspect, an embodiment of the present invention provides a fifth possible implementation manner of the second aspect, where the apparatus further includes:
and the template format generating module is used for extracting common characteristic information of the generated different content editing forms, determining the same composition information of the data structures of the different content editing forms according to the common characteristic information, and generating a template format according to the same composition information of the data structures.
With reference to the second aspect, an embodiment of the present invention provides a sixth possible implementation manner of the second aspect, where the delivered content includes a data type, a data number, an element type, and definition information of each element; the constraint condition comprises a constraint condition corresponding to each element.
With reference to the sixth possible implementation manner of the second aspect, an embodiment of the present invention provides a seventh possible implementation manner of the second aspect, where the apparatus further includes:
the first display module is used for acquiring the requirement indication information corresponding to each element; and if the requirement indication information corresponding to the element indicates that the element is a necessary filling element, displaying a necessary filling indicator at a position corresponding to the element in the content editing form.
With reference to the seventh possible implementation manner of the second aspect, an embodiment of the present invention provides an eighth possible implementation manner of the second aspect, where the apparatus further includes:
and the second display module is used for displaying the indication information of input omission if the editing data corresponding to the filling-in element input by the user is not detected when the issued data is generated according to the content editing form.
In a third aspect, an embodiment of the present invention provides an apparatus for generating a content editing form, where the apparatus includes: the system comprises a processor, a memory, a bus and a communication interface, wherein the processor, the communication interface and the memory are connected through the bus;
the memory is used for storing programs;
the processor, configured to execute the method of any one of claims 1-9 by calling a program stored in the memory through the bus.
In the method and the device provided by the embodiment of the invention, the issued content corresponding to the client software and the constraint condition corresponding to the issued content are obtained; generating a distributed data template corresponding to distributed contents according to the predefined template format and the distributed contents and the constraint conditions; and generating a content editing form corresponding to the issued content through the issued data template. The method generates the issuing data template corresponding to the issuing content according to the issuing content and the constraint condition, and automatically generates the content editing form corresponding to the issuing content through the issuing data template, thereby greatly reducing manual intervention in the form generation process, improving the form generation efficiency and enhancing the maintainability and expansibility of client software.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1A is a flowchart illustrating a method for generating a content editing form according to embodiment 1 of the present invention;
fig. 1B is a schematic diagram illustrating a content editing form provided in embodiment 1 of the present invention;
fig. 1C is a schematic diagram illustrating another content editing form provided in embodiment 1 of the present invention;
fig. 1D is a schematic diagram illustrating a content editing form corresponding to a vertical site entry according to embodiment 1 of the present invention;
fig. 1E is a schematic diagram illustrating a content editing form corresponding to another vertical site entry provided in embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram illustrating an apparatus for generating a content editing form according to embodiment 2 of the present invention;
fig. 3 is a schematic structural diagram illustrating an apparatus for generating a content editing form according to embodiment 3 of the present invention.
Detailed Description
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. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
In consideration of the fact that when software contents are managed, technicians write content editing forms and content verification algorithms in the related art, a large amount of manual intervention is needed, and especially when the software contents are numerous, the content editing forms and the content verification algorithms corresponding to the software contents need to be written, so that the efficiency is low, and the maintainability and expansibility of the software is not strong. Based on this, the embodiment of the invention provides a method and a device for generating a content editing form. The following is described by way of example.
Example 1
The embodiment of the invention provides a method for generating a content editing form. At present, a plurality of client software are installed on a terminal, and in a software framework of the client software, a server edits and manages the content issued by the client software. The content editing form is an uploading form when the server edits and issues the content, and the server can automatically generate the content editing form through issuing the data template by the method provided by the embodiment of the invention, so that the manual intervention in the form generation process is reduced, and the form generation efficiency is improved.
The client software comprises a plurality of software interfaces, each software interface corresponds to one issued data template, and when the issued content corresponding to a certain software interface is updated, a corresponding content editing form can be generated through the issued data template corresponding to the software interface, so that the manual intervention in updating the issued content corresponding to the software interface every time is greatly reduced, the updating efficiency is improved, and the maintainability and the expansibility of the client software are enhanced.
Before generating the delivered data template and generating the content editing form through the delivered data template, a template format is defined, and the template format defines the structural composition and the format rule of the delivered data template. In the embodiment of the present invention, the template format may be predefined in the following manner, specifically including:
extracting common characteristic information of the generated different content editing forms, determining the same composition information of the data structures of the different content editing forms according to the common characteristic information, and generating a template format according to the same composition information of the data structures.
The server stores a plurality of content editing forms generated in the past, and can acquire form information contained in the content editing forms, compare the form information of different content editing forms, and extract common characteristic information from the different form information, wherein the common characteristic information can be content information contained in different content editing forms or the same style information and the like. The extracted common characteristic information is then analyzed to determine the same composition information of the common characteristic information on the data structure, which may be fields included in the data structure. The template format is generated from the same composition information on the data structure. In an embodiment of the present invention, a technician may also define a template format and upload the defined template format to the server.
The template format generated in the embodiment of the present invention may include four fields of a data type, a constraint rule, an element type data _ type, and an element definition data. The structure of the issued data template generated according to the template format is a nested structure, wherein the elements define each element nested in the data description, and the constraint condition of each element is described by a constraint rule regulated.
Referring to fig. 1A, after the template format is predefined in the above manner, a content edit form corresponding to the delivered content is automatically generated through the following operations of steps 101 and 103.
Step 101: and acquiring the issued content corresponding to the client software and the constraint condition corresponding to the issued content.
Currently, in the process of developing, maintaining and upgrading client software, it is often necessary to add a new software interface or change an original software interface of the client software, where the software interfaces include a lot of interface information, the delivered content is obtained by extracting and refining the interface information of the software interface, and the delivered content includes the data type, the data number, the element type, and the definition information of each element of information extracted from the interface information. The constraint conditions corresponding to the issued content include constraint conditions corresponding to each element, such as the format and size of the element. The issued content and the constraint condition corresponding to the issued content can be obtained and uploaded to the server by technical personnel according to the issued requirement.
Step 102: and according to a predefined template format, generating a distributed data template corresponding to the distributed content according to the distributed content and the constraint condition.
The server generates data structure information corresponding to the issued content according to the acquired issued content according to a predefined template format; generating data constraint information corresponding to the issued content according to the constraint condition corresponding to the issued content according to the template format; and generating a distributed data template corresponding to the distributed content according to the data structure information and the data constraint information.
The data structure information is a data structure composition corresponding to the issued content, and each element included in the issued content is nested in the data structure composition. The data constraint information is a constraint description of each element included in the delivered content. And adding the data constraint information into the data structure information according to a predefined template format to generate a distributed data template corresponding to the distributed content.
To facilitate understanding of the operation of generating the issued data template, the following example is described in detail. For example, if the delivery requirement corresponding to the client software is to deliver site information of 12 websites, and the site types, URLs, titles, and icons of the 12 websites need to be delivered, the generated delivery data template is as follows:
{ type: "array"// denotes that the data type of the delivered content is an array;
regular: "12",// means a total of 12 arrays issued;
data _ type is object, and/represents the data type of the element nested in the array is object;
data {// is used for nesting elements in an array;
type: { type: "select", label: "site type", regular: { show _ face _ site: "jump name station", show _ cool _ site: "inside page spread" }, dependency: "require" },// element definition and constraint condition representing element "site type";
URL: { type: "string", regular: "", label: "site URL", dependent: "require" },// an element definition and constraint condition representing an element "URL";
title: { type: "string", label: "site title", regular: "", dependent: "require" },// an element definition and constraint representing the element "title";
img _ front: { type: "img", label: "site picture", pack:1, regular: { file { type: "png", size: "50000" } }, dependents: "require" }// an element definition and constraint condition representing the element "site picture";
}}
the issued content acquired by the server includes element definitions of 4 elements of an array type "array", an element type "object", and a "site type", "URL", "title", and "site picture", and the constraint condition corresponding to the issued content includes content described by a predetermined number in 4 elements of an array number "12", and "site type", "URL", "title", and "site picture".
The server generates a distributed data template according to a predefined template format, the distributed content and the constraint condition. In the foregoing delivered data template, a field type represents a data type, a field label represents a form field name, a field regular represents a constraint rule, a field size represents a file size, and a field dependent represents whether a must-fill element is present.
The value of the field regular can have a plurality of formats, and only 5 formats are listed below:
(1) the value is a single number, and the data type is data of array, integer int, or string, which indicates that the number of data must be equal to the single number, for example, when regular is 3, the data type is data of array, the number of array is 3, the data type is data of integer int is 3, and the data type is data of string, the length of string is 3.
(2) A value taken as a numerical range represents a number range, and may also be used in data whose data type is array, integer int, or string, and represents that the number of data is within the numerical range, for example, if regular is "1 to 3", then the number of data groups may be 1, 2, or 3 in data whose data type is array, the number of data groups may be any value between "1 to 3" in data whose data type is integer int, and the length of a character string is 1, 2, or 3 in data whose data type is string.
(3) The value is a regular expression, and the regular expression can be used in data with a character string data type, and the content of the character data needs to satisfy the regular expression.
(4) Values are file type and size, and can be used in data with data types of image img and file to limit the format and size of uploaded pictures or files, such as regular ═ file: { type: "png", size: "50000" }.
(5) Taking the value as a list, can be used in the data type of radio, drop-down box select, check box, to limit the range of selectable values, i.e. only the values in the list, such as regular ═ a: "a 1", b: "b 1", can be used.
In the embodiment of the present invention, the server may generate the delivered data template corresponding to the delivered content through the operations of steps 101 and 102. And a technician can also compile a corresponding issued data template according to the content corresponding to the software interface and then upload the compiled issued data template to the server.
After the issued data template corresponding to the issued content is generated, the server also stores the issued data template, and then only the issued data template needs to be modified when the content of the software interface corresponding to the issued data template is modified again.
Step 103: and generating a content editing form corresponding to the issued content through the issued data template.
And the server calls the generated issued data template through a program to generate a content editing form corresponding to the issued content. When a content editing form is generated, if the data type in the issued data template is img or file, generating a file uploading domain in the content editing form; if the data type is selected, generating a drop-down box, wherein the value of the drop-down box is from the content described by the constraint rule regular; if the data type is radio, generating a radio box, wherein the options are from the content described by the constraint rule regular; if the data type is equal to checkbox, a check box is generated, and the options are from the content described by the constraint rule regular; if the data type is datatime, a date selection box is generated. And the value of the field label in the issued data template is the name of the form field in the content editing form. The content editing form shown in fig. 1B is generated according to the issued data template listed in step 102.
After a content editing form corresponding to the issued content is generated, the server displays the content editing form and acquires editing data input by a user from the content editing form; and generating issuing data corresponding to the issuing content according to the content editing form and the editing data.
After the server displays the content editing form, technicians or other users input editing data to be uploaded according to the form field names of the content editing form, and the server generates corresponding issued data according to the content editing form and the editing data. The issued data is program codes in a json format, and after the server issues the issued data to the terminal, the terminal can render a software interface of the client software according to the issued data in the json format.
The content edit form shown in fig. 1C is for a user to input edit data in the content edit form shown in fig. 1B. The distributed data generated by the server according to the content editing form shown in fig. 1B and the editing data input by the user in fig. 1C is as follows:
[
{ type: "show _ face _ site", url: "http:// a. cn/? wm 407, title: "Game Website", img _ front: "http:// image. uc.cn/s/1451907988. png" }// site information indicating "Game Website";
{ … }, { … }, { … }, { … }, { … }, { … }, { … }, { … }, { … }, { … }, { … }// represent site information for another 11 web sites, which are not described in detail herein;
]
in the embodiment of the invention, before generating the delivered data corresponding to the delivered content, whether the edited data meets the constraint condition corresponding to the delivered content is checked according to the delivered data template, if so, the delivered data corresponding to the delivered content is generated according to the content editing form and the edited data, and if not, the prompt information of inputting errors is displayed to a user.
The server can check whether the edit data input by the user meets the corresponding constraint condition according to the constraint condition described by the constraint rule regular in the issued data template, for example, the constraint of the "site picture" element described by img _ front in the delivered data template exemplified in step 102 is regular: { file { type: "png", size: "50000"}, when it is detected that the user inputs a site picture in the content editing form, it is automatically verified whether the format of the input site picture is the png format, and automatically checking whether the size of the input site picture is 50000 or not, if the format and the size of the input site picture both accord with the constraint conditions, and if the format or the size of the site picture does not accord with the constraint condition, displaying prompt information for inputting errors to a user so that the user inputs the site picture which accords with the constraint rule according to the prompt information.
And when the server passes the verification of all the editing data input by the user, generating the issuing data corresponding to the issuing content according to the content editing form corresponding to the issuing content and all the editing data input by the user. The server can automatically verify whether the edit data input by the user accords with the constraint condition corresponding to the issued content according to the issued data template, so that a content verification algorithm corresponding to the issued content does not need to be manually compiled by technicians, manual intervention components in the process of generating the issued data are greatly reduced, the generation efficiency is improved, and the maintainability and the expandability of software are enhanced.
After generating the down data corresponding to the down content, the server also stores the down data corresponding to the down content, and sends the down data to the terminal when detecting the login request of the terminal. And rendering the software interface of the client software by the terminal according to the issued data.
In the embodiment of the present invention, requirement indication information corresponding to each element included in the delivered content is further obtained, where the requirement indication information is used to indicate whether the element is a necessary padding element. When the delivered data template corresponding to the delivered content is generated, the requirement indication information of the element is described by the field dependency, for example, the dependency in the delivered data template in step 102 indicates that the requirement indication information indicates a required element.
When the requirement indication information corresponding to the element included in the distribution content indicates a required filling element, when the content editing form is generated in step 102, a required filling indicator is displayed at a position corresponding to the element in the content editing form, where the required filling indicator may be a symbol or a character "required filling", or the like.
After the server displays the generated content editing form to the user, when the issued data is generated according to the content editing form, the input operation of the user in the content editing form is monitored in real time, and if the situation that the user inputs the editing data corresponding to the required filling element is not detected, the indication information of input omission is displayed to the user, so that the user is ensured to input the editing data corresponding to the required filling element according to the indication information.
In order to further understand the method for generating a content editing form provided by the embodiment of the present invention, an example of issuing an entry list of 5 vertical sites is described below. For example, the nested elements of each vertical entry in the entry list of 5 vertical sites include: name, URL, icon, night mode icon, entry type, and diversion configuration. Wherein, the flow guide configuration comprises a flow guide mode and a flow guide file. Then the issued data template corresponding to the vertical site entry is as follows:
{ type: "array"// denotes that the data type of the delivered content is an array;
regular: "5",// means a total of 5 arrays issued;
data _ type is object, and/represents the data type of the element nested in the array is object;
data {// is used for nesting elements in an array;
name: { type: "string", label: "entry name" },// element definition and constraint condition representing element "name";
URL: { type: "string", label: "entry URL" },// represents the element definition and constraint of the element "URL";
img: { type: "img", label: "entrance picture", bgcolor: "# 0097 FF", pack:1, regular: { file { … } }, dependent: "require" },// represents the element definition and constraint condition of the element "icon";
img _ dark mode: { type: "img", label: "night mode entrance picture", pack:1, regular: { file { … } } }// an element definition and constraint condition representing an element "icon for night mode";
type: { type: "select", label: "entry type", regular: { … }, dependent: "require" },// an element definition and constraint representing the element "entry type";
guide: { type: "object", label: "diversion configuration", data: { guide _ type: { type: "select", label: "diversion mode", regular: { … } }, guide _ desc: { type: "string", label: "diversion document", regular: "},// element definition and constraint condition representing element" site type ";
}}
fig. 1D shows a content editing form corresponding to the vertical site entry automatically generated by the issued data template corresponding to the vertical site entry, and fig. 1E is a schematic diagram of a user inputting editing data in the content editing form shown in fig. 1D. The data sent by the server according to the content editing form shown in fig. 1D and the vertical site entry generated from the editing data input by the user in fig. 1E is as follows:
[
{ name: "website", url: "http:// b.cn/? wm 51 ", img:" http:// image. uc. cn/s/a. png ", img _ darkmode:" ", type:" 1 ", guide: { gui de _ type:" 2 ", guide _ dexc:" official data "}// entry information indicating a vertical site" web site ";
{ … }, { … }, { … }, { … }// denote entry information for 4 further vertical sites, which are not described in detail here;
]
in the embodiment of the invention, as long as the issued data template corresponding to the issued content is generated according to the issuing requirement, the content editing form corresponding to the issued content can be conveniently and automatically generated, and the server can conveniently check the validity of the edited data according to the regular field in the issued data template when the edited data is stored. With the increasing number of data types and constraint rule types supported by the issued data template, more and more complex data issuing can be conveniently and automatically supported without manually compiling a content editing form and a content verification algorithm each time, so that the form generation efficiency is improved, and the maintainability and the expandability of client software are enhanced.
In the embodiment of the invention, the issued content corresponding to the client software and the constraint condition corresponding to the issued content are obtained; generating a distributed data template corresponding to distributed contents according to the predefined template format and the distributed contents and the constraint conditions; and generating a content editing form corresponding to the issued content through the issued data template. The method generates the issuing data template corresponding to the issuing content according to the issuing content and the constraint condition, and automatically generates the content editing form corresponding to the issuing content through the issuing data template, thereby greatly reducing manual intervention in the form generation process, improving the form generation efficiency and enhancing the maintainability and expansibility of client software.
Example 2
Referring to fig. 2, an embodiment of the present invention provides an apparatus for generating a content editing form, where the apparatus is configured to execute the method for generating a content editing form provided in embodiment 1 above. The device specifically includes:
an obtaining module 201, configured to obtain an issued content corresponding to client software and a constraint condition corresponding to the issued content;
the first generating module 202 is configured to generate an issued data template corresponding to issued content according to the issued content and constraint conditions according to a predefined template format;
the second generating module 203 is configured to generate a content editing form corresponding to the delivered content through the delivered data template.
Currently, in the process of developing, maintaining and upgrading client software, it is often necessary to add a new software interface or change an original software interface of the client software, where the software interfaces include a lot of interface information, the delivered content is obtained by extracting and refining the interface information of the software interface, and the delivered content includes the data type, the data number, the element type, and the definition information of each element of information extracted from the interface information. The constraint conditions corresponding to the issued content include constraint conditions corresponding to each element, such as the format and size of the element. The issued content and the constraint condition corresponding to the issued content can be obtained and uploaded to the server by technical personnel according to the issued requirement.
The first generation module 202 generates a delivered data template corresponding to the delivered content by a data structure generation unit, a constraint information generation unit, and a template generation unit.
The data structure generating unit is used for generating data structure information corresponding to the issued content according to the predefined template format and the issued content;
the constraint information generating unit is used for generating data constraint information corresponding to the issued content according to the template format and the constraint condition corresponding to the issued content;
and the template generating unit is used for generating a distributed data template corresponding to distributed contents according to the data structure information and the data constraint information.
After the second generation module 203 generates the content edit form, the apparatus further generates the delivered data corresponding to the delivered content through the edit data acquisition module and the delivered data generation module.
The editing data acquisition module is used for displaying the content editing form and acquiring editing data input by a user from the content editing form;
and the issuing data generation module is used for generating issuing data corresponding to the issuing content according to the content editing form and the editing data.
The issued data is program codes in a json format, and after the server issues the issued data to the terminal, the terminal can render a software interface of the client software according to the issued data in the json format.
Before the distributed data generating module generates distributed data corresponding to distributed contents according to the editing data, the device also verifies whether the editing data input by the user meets constraint conditions through the verifying module.
And the checking module is used for checking whether the edited data meets the constraint condition corresponding to the issued content according to the issued data template, if so, executing the operation of generating the issued data corresponding to the issued content, and if not, displaying the prompt information of inputting errors.
After the sending data generation module generates the sending data, the device also stores the sending data through the storage module.
And the storage module is used for storing the issued data corresponding to the issued content and sending the issued data to the terminal when the login request of the terminal is detected.
In the embodiment of the present invention, before the first generating module 202 generates the delivered data template corresponding to the delivered content according to the predefined template format, the apparatus further predefines the template format through the template format generating module.
And the template format generating module is used for extracting common characteristic information of the generated different content editing forms, determining the same composition information of the data structures of the different content editing forms according to the common characteristic information, and generating a template format according to the same composition information of the data structures.
In the embodiment of the invention, the issued content comprises data type, data number, element type and definition information of each element; the constraints include a constraint corresponding to each element.
In the embodiment of the present invention, the apparatus further displays a required fill indicator corresponding to the required fill element through the following first display module.
The first display module is used for acquiring the requirement indication information corresponding to each element; and if the requirement indication information corresponding to the element indicates that the element is a necessary filling element, displaying a necessary filling indicator at a position corresponding to the element in the content editing form.
In the embodiment of the present invention, when the user does not input edit data corresponding to the fill-necessary element, the apparatus further displays indication information of input omission through the following second display module.
And the second display module is used for displaying the indication information of input omission if the editing data corresponding to the filling-in element input by the user is not detected when the issued data is generated according to the content editing form.
In the embodiment of the invention, the issued content corresponding to the client software and the constraint condition corresponding to the issued content are obtained; generating a distributed data template corresponding to distributed contents according to the predefined template format and the distributed contents and the constraint conditions; and generating a content editing form corresponding to the issued content through the issued data template. The method generates the issuing data template corresponding to the issuing content according to the issuing content and the constraint condition, and automatically generates the content editing form corresponding to the issuing content through the issuing data template, thereby greatly reducing manual intervention in the form generation process, improving the form generation efficiency and enhancing the maintainability and expansibility of client software.
Example 3
Referring to fig. 3, an embodiment of the present invention provides an apparatus for generating a content editing form, where the apparatus is configured to execute the method for generating a content editing form provided in embodiment 1 above. The device specifically includes: a processor 301, a memory 302, a bus 303 and a communication interface 304, wherein the processor 301, the communication interface 304 and the memory 302 are connected through the bus 303;
the memory 302 is used for storing programs;
a processor 301, configured to call the program stored in the memory 302 through the bus 303, and execute the method for generating a content editing form provided in embodiment 1.
When executing the method for generating a content editing form provided in embodiment 1, the processor 301 obtains delivered content corresponding to client software and constraint conditions corresponding to the delivered content; generating a distributed data template corresponding to distributed contents according to the predefined template format and the distributed contents and the constraint conditions; and generating a content editing form corresponding to the issued content through the issued data template.
The details of the processor 301 executing the method provided in embodiment 1 are the same as those described in embodiment 1, and are not described herein again.
In the embodiment of the invention, the issued content corresponding to the client software and the constraint condition corresponding to the issued content are obtained; generating a distributed data template corresponding to distributed contents according to the predefined template format and the distributed contents and the constraint conditions; and generating a content editing form corresponding to the issued content through the issued data template. The method generates the issuing data template corresponding to the issuing content according to the issuing content and the constraint condition, and automatically generates the content editing form corresponding to the issuing content through the issuing data template, thereby greatly reducing manual intervention in the form generation process, improving the form generation efficiency and enhancing the maintainability and expansibility of client software.
The device for generating the content editing form provided by the embodiment of the invention can be specific hardware on the equipment or software or firmware installed on the equipment. It will be clear to those skilled in the art that for convenience and brevity of description, the specific operations of the system, apparatus and unit described above may all refer to corresponding processes in the above described method embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or 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 of devices or units through some communication interfaces, and may be in an electrical, mechanical 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 functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a 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 instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (17)

1. A method of generating a content editing form, the method comprising:
acquiring issued content corresponding to client software and constraint conditions corresponding to the issued content;
generating a distributed data template corresponding to the distributed content according to the predefined template format and the constraint condition;
generating a content editing form corresponding to the issued content through the issued data template;
before the obtaining of the delivered content corresponding to the client software and the constraint condition corresponding to the delivered content, the method further includes: extracting common characteristic information of the generated different content editing forms, determining the same composition information of the data structures of the different content editing forms according to the common characteristic information, and generating a template format according to the same composition information of the data structures.
2. The method according to claim 1, wherein the generating a delivered data template corresponding to the delivered content according to the delivered content and the constraint condition according to a predefined template format comprises:
generating data structure information corresponding to the issued content according to a predefined template format and the issued content;
generating data constraint information corresponding to the issued content according to the template format and the constraint condition corresponding to the issued content;
and generating a distributed data template corresponding to the distributed content according to the data structure information and the data constraint information.
3. The method of claim 1, wherein after the generating the content edit form corresponding to the delivered content by the delivered data template, the method further comprises:
displaying the content editing form, and acquiring editing data input by a user from the content editing form;
and generating issuing data corresponding to the issuing content according to the content editing form and the editing data.
4. The method of claim 3, wherein before generating the delivered data corresponding to the delivered content, the method further comprises:
and checking whether the editing data meets the constraint condition corresponding to the issued content or not according to the issued data template, if so, executing the operation of generating the issued data corresponding to the issued content, and if not, displaying prompt information of inputting errors.
5. The method according to claim 3, wherein after generating the delivered data corresponding to the delivered content, further comprising:
and storing the issued data corresponding to the issued content, and sending the issued data to the terminal when a login request of the terminal is detected.
6. The method according to claim 1, wherein the delivered content includes data type, data number, element type and definition information of each element; the constraint condition comprises a constraint condition corresponding to each element.
7. The method of claim 6, further comprising:
acquiring requirement indication information corresponding to each element;
and if the requirement indication information corresponding to the element indicates that the element is a necessary filling element, displaying a necessary filling indicator at a position corresponding to the element in the content editing form.
8. The method of claim 7, further comprising:
and when the issued data is generated according to the content editing form, if the editing data corresponding to the filling-in element input by the user is not detected, displaying the indication information of input omission.
9. An apparatus for generating a content editing form, the apparatus comprising:
the acquisition module is used for acquiring the issued content corresponding to the client software and the constraint condition corresponding to the issued content;
the first generation module is used for generating an issued data template corresponding to the issued content according to the issued content and the constraint condition according to a predefined template format;
the second generation module is used for generating a content editing form corresponding to the issued content through the issued data template;
wherein the apparatus further comprises: and the template format generating module is used for extracting common characteristic information of the generated different content editing forms, determining the same composition information of the data structures of the different content editing forms according to the common characteristic information, and generating a template format according to the same composition information of the data structures.
10. The apparatus of claim 9, wherein the first generating module comprises:
the data structure generating unit is used for generating data structure information corresponding to the issued content according to a predefined template format;
the constraint information generating unit is used for generating data constraint information corresponding to the issued content according to the template format and the constraint condition corresponding to the issued content;
and the template generating unit is used for generating an issued data template corresponding to the issued content according to the data structure information and the data constraint information.
11. The apparatus of claim 9, further comprising:
the editing data acquisition module is used for displaying the content editing form and acquiring editing data input by a user from the content editing form;
and the issuing data generation module is used for generating issuing data corresponding to the issuing content according to the content editing form and the editing data.
12. The apparatus of claim 11, further comprising:
and the verification module is used for verifying whether the edit data meets the constraint condition corresponding to the issued content or not according to the issued data template, if so, executing the operation of generating the issued data corresponding to the issued content, and if not, displaying prompt information of input errors.
13. The apparatus of claim 11, further comprising:
and the storage module is used for storing the issued data corresponding to the issued content and sending the issued data to the terminal when the login request of the terminal is detected.
14. The apparatus of claim 9, wherein the delivered content includes data type, data number, element type and definition information of each element; the constraint condition comprises a constraint condition corresponding to each element.
15. The apparatus of claim 14, further comprising:
the first display module is used for acquiring the requirement indication information corresponding to each element; and if the requirement indication information corresponding to the element indicates that the element is a necessary filling element, displaying a necessary filling indicator at a position corresponding to the element in the content editing form.
16. The apparatus of claim 15, further comprising:
and the second display module is used for displaying the indication information of input omission if the editing data corresponding to the filling-in element input by the user is not detected when the issued data is generated according to the content editing form.
17. An apparatus for generating a content editing form, the apparatus comprising: the system comprises a processor, a memory, a bus and a communication interface, wherein the processor, the communication interface and the memory are connected through the bus;
the memory is used for storing programs;
the processor, configured to execute the method of any one of claims 1-8 by calling a program stored in the memory through the bus.
CN201610128072.3A 2016-03-07 2016-03-07 Method and device for generating content editing form Active CN107168684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610128072.3A CN107168684B (en) 2016-03-07 2016-03-07 Method and device for generating content editing form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610128072.3A CN107168684B (en) 2016-03-07 2016-03-07 Method and device for generating content editing form

Publications (2)

Publication Number Publication Date
CN107168684A CN107168684A (en) 2017-09-15
CN107168684B true CN107168684B (en) 2021-02-26

Family

ID=59849868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610128072.3A Active CN107168684B (en) 2016-03-07 2016-03-07 Method and device for generating content editing form

Country Status (1)

Country Link
CN (1) CN107168684B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918119A (en) * 2019-02-12 2019-06-21 无锡华云数据技术服务有限公司 A kind of constraint configuration method, device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021890A (en) * 2007-03-20 2007-08-22 华为技术有限公司 Method, system and server for checking page data
CN101626576A (en) * 2008-07-07 2010-01-13 中兴通讯股份有限公司 Method for generating parameter configuration template and method for configuring parameters by utilizing template
CN104572035A (en) * 2013-10-11 2015-04-29 北大方正集团有限公司 Dynamic generation method and dynamic generation system of webpage codes
US20150186124A1 (en) * 2013-12-27 2015-07-02 International Business Machines Corporation Merging weighted recommendations for installation and configuration of software products

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021890A (en) * 2007-03-20 2007-08-22 华为技术有限公司 Method, system and server for checking page data
CN101626576A (en) * 2008-07-07 2010-01-13 中兴通讯股份有限公司 Method for generating parameter configuration template and method for configuring parameters by utilizing template
CN104572035A (en) * 2013-10-11 2015-04-29 北大方正集团有限公司 Dynamic generation method and dynamic generation system of webpage codes
US20150186124A1 (en) * 2013-12-27 2015-07-02 International Business Machines Corporation Merging weighted recommendations for installation and configuration of software products

Also Published As

Publication number Publication date
CN107168684A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
US9501458B2 (en) Executing a populated code template to generate a browser-executable software program to present a web page as a mobile application
CN107729475B (en) Webpage element acquisition method, device, terminal and computer-readable storage medium
CN107909494A (en) Collocation method, device, computer equipment and the storage medium of insurance data information
WO2007145959A2 (en) Message catalogs for remote modules
US8671389B1 (en) Web application resource manager on the web and localizable components
CN107526755B (en) Data processing method and device
US9934291B2 (en) Dynamic presentation of a results set by a form-based software application
US20150161160A1 (en) Application Localization
CN107168684B (en) Method and device for generating content editing form
CN112330308A (en) Case management system and method and electronic device
CN113220381A (en) Click data display method and device
CN115544417B (en) Method and device for verifying web form, electronic equipment and storage medium
US9557898B2 (en) Syndication of slideshow content through a web feed
CN108804889B (en) Website registration method and device
CN115904167A (en) Processing method and device of webpage icon, storage medium and electronic equipment
CN115563942A (en) Contract generation method and device, electronic equipment and computer readable medium
KR101174398B1 (en) Apparatus and method for recommanding contents
JP6552162B2 (en) Information processing apparatus, information processing method, and program
CN112527278A (en) Smart form generating and issuing method, device, terminal and storage medium
US20210042384A1 (en) Generating Edit Suggestions for Transforming Digital Documents
CN113779952B (en) Text processing method and device and electronic equipment
CN114115833B (en) Automatic protocol audit code generation method and device
CN110109842B (en) Method and device for testing numerical system
CN117313674A (en) Processing method, system, equipment and medium of rich text editor
CN114528012A (en) Method, device, equipment and medium for processing layout file

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
TA01 Transfer of patent application right

Effective date of registration: 20200619

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio 14 floor tower square

Applicant before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant