CN105988814B - Interface generation method and device - Google Patents

Interface generation method and device Download PDF

Info

Publication number
CN105988814B
CN105988814B CN201510093182.6A CN201510093182A CN105988814B CN 105988814 B CN105988814 B CN 105988814B CN 201510093182 A CN201510093182 A CN 201510093182A CN 105988814 B CN105988814 B CN 105988814B
Authority
CN
China
Prior art keywords
processed
interface
data
control
style
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
CN201510093182.6A
Other languages
Chinese (zh)
Other versions
CN105988814A (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 CN201510093182.6A priority Critical patent/CN105988814B/en
Publication of CN105988814A publication Critical patent/CN105988814A/en
Application granted granted Critical
Publication of CN105988814B publication Critical patent/CN105988814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses an interface generation method, which comprises the following steps: receiving an interface generation instruction, and acquiring to-be-processed data corresponding to the interface generation instruction; dividing the data to be processed into corresponding subdata to be processed according to a preset style control; analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control method; and filling the sub data to be processed to the corresponding style control by the obtained method to generate an interface. The invention also discloses an interface generating device. The invention reduces the data volume of the interface generation mode, improves the stability and compatibility of the interface generation, and further improves the interface generation efficiency.

Description

Interface generation method and device
Technical Field
The present invention relates to the field of communication data processing technologies, and in particular, to an interface generation method and apparatus.
Background
MVC, Model View Controller, is an abbreviation for Model (Model) -View (View) -Controller, a software design paradigm that organizes code by using a method that separates business logic, data, and interface display, aggregates business logic into one component, and does not require rewriting of business logic while improving and personalizing custom interfaces and user interactions. MVC was developed to map traditional input, processing, and output functions into the structure of a logical graphical user interface. For example, a web page mode is adopted to realize rapid interface combination to realize dynamic operation. And html + css + js is used for realizing data, interface and control separately, so that the purpose of decoupling is achieved. The advantages of MVC in this manner: the operation capability is strong, and the release is fast.
However, the disadvantages of MVC in this manner are also evident: 1. the experience is poor; 2. the data volume is large: the CSS and the JS generally have small variation, the CSS and the JS need to be loaded by a server every time the interface is combined, and even if a cache exists locally, the CSS and the JS cached locally by the server need to be inquired whether to be invalid or not; 3. poor stability: most system manufacturers change original codes by themselves, so that browser components are different in implementation and different in quality level; 4. the performance is poor: whether android, ios or pc platforms are adopted, the browser component is large, and the loading of the webpage consumes more resources, so that the loading is slow; 5. poor compatibility: manufacturers' browsers have different implementation modes and do not completely comply with standards, which brings great challenges to program adaptation and cannot achieve compatibility of various browsers. Therefore, the existing interface generation mode has large data volume, poor stability and poor compatibility, and the interface generation process is complicated.
Disclosure of Invention
The embodiment of the invention provides an interface generation method and device, and aims to solve the problem that an interface generation process is complex due to the fact that an existing interface generation mode is large in data size, poor in stability and poor in compatibility.
In order to achieve the above object, an embodiment of the present invention provides an interface generating method, including:
receiving an interface generation instruction, and acquiring to-be-processed data corresponding to the interface generation instruction;
dividing the data to be processed into corresponding subdata to be processed according to a preset style control;
analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control method;
and filling the sub data to be processed to the corresponding style control by the obtained method to generate an interface.
In order to achieve the above object, an embodiment of the present invention further provides an interface generating apparatus, including:
the receiving and sending module is used for receiving an interface generation instruction;
the acquisition module is used for acquiring the data to be processed corresponding to the interface generation instruction;
the processing module is used for dividing the data to be processed into corresponding sub data to be processed according to a preset style control;
the analysis module is used for analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a method corresponding to the control;
and the generating module is used for filling the sub data to be processed to the corresponding style control through the obtained method so as to generate an interface.
According to the method, the data to be processed is divided into different sub data to be processed according to the style control, the sub data to be processed is analyzed to obtain the corresponding control, and the sub data to be processed is filled into the corresponding style control according to the obtained method to generate the interface. The problem that the interface generating process is complex due to the fact that an existing interface generating mode is large in data size, poor in stability and poor in compatibility is effectively solved. The data volume of the interface generation mode is reduced, the stability and compatibility of the interface generation are improved, and the interface generation efficiency is further improved.
Drawings
Fig. 1 is a schematic diagram of a hardware architecture of an interface generating apparatus according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating a first embodiment of an interface generating method according to the present invention;
FIG. 3 is a flowchart illustrating an embodiment of a preset style control according to the present invention;
FIG. 4 is a flowchart illustrating an embodiment of setting parameters of a control according to the present invention;
FIG. 5 is a block diagram illustrating an embodiment of a style control according to the present invention;
FIG. 6 is a flowchart illustrating an embodiment of analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control according to the present invention;
FIG. 7 is a flowchart illustrating an interface generating method according to a second embodiment of the present invention
FIG. 8 is a functional block diagram of the interface generating apparatus according to the first embodiment of the present invention;
FIG. 9 is a block diagram illustrating a refinement function of the parsing module of FIG. 8;
fig. 10 is a functional block diagram of an interface generating apparatus according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: receiving an interface generation instruction, and acquiring to-be-processed data corresponding to the interface generation instruction; dividing the data to be processed into corresponding subdata to be processed according to a preset style control; analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control method; and filling the sub data to be processed to the corresponding style control by the obtained method to generate an interface. The method comprises the steps of dividing data to be processed into different sub data to be processed according to the style control, analyzing the sub data to be processed to obtain a corresponding control, and filling the sub data to be processed into the corresponding style control according to the obtained method to generate an interface. The problem that the interface generating process is complex due to the fact that an existing interface generating mode is large in data size, poor in stability and poor in compatibility is effectively solved. The data volume of the interface generation mode is reduced, the stability and compatibility of the interface generation are improved, and the interface generation efficiency is further improved.
The existing interface generation mode has large data volume, poor stability and poor compatibility, so that the interface generation efficiency is poor.
The embodiment of the invention constructs the interface generating device, and the interface generating device generates the interface by dividing the data to be processed into a plurality of sub data to be processed and filling the sub data to be processed into the style control through the corresponding control method, thereby effectively avoiding the complex interface generating process caused by large data volume, poor stability and poor compatibility of the existing interface generating mode.
The interface generating device of the embodiment can be carried on a PC terminal, and can also be carried on an electronic terminal such as a mobile phone and a tablet computer which needs to generate a data interface. The hardware architecture involved in the interface generating device may be as shown in fig. 1.
Fig. 1 shows a hardware architecture related to an interface generating apparatus according to an embodiment of the present invention. As shown in fig. 1, the hardware related to the interface generating apparatus includes: a processor 301, e.g. a CPU, a network interface 304, a user interface 303, a memory 305, a communication bus 302. The communication bus 302 is used for implementing connection communication between the components in the information push platform. The user interface 303 may include a Display (Display), a Keyboard (Keyboard), a mouse, and the like, and is configured to receive information input by a user and send the received information to the processor 305 for processing. The display screen can be an LCD display screen, an LED display screen, or a touch screen, and is used for displaying data to be displayed by the interface generating device, such as an operation interface for displaying data, setting parameters of a control, and adjusting. The optional user interface 303 may also include a standard wired interface, a wireless interface. The network interface 304 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). Memory 305 may be a high-speed RAM memory or may be a non-volatile memory, such as a disk memory. The memory 305 may alternatively be a storage device separate from the processor 301 described above. As shown in fig. 1, the memory 305, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an interface generating program.
In the hardware related to the interface generating apparatus shown in fig. 1, the network interface 304 is mainly used for connecting to an application platform and performing data communication with the application platform; the user interface 303 is mainly used for connecting a client, performing data communication with the client, and receiving information and instructions input by the client; and the processor 301 may be configured to invoke the interface generation program stored in the memory 305 and perform the following operations:
receiving an interface generation instruction, and acquiring to-be-processed data corresponding to the interface generation instruction;
dividing the data to be processed into corresponding subdata to be processed according to a preset style control;
analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control method;
and filling the sub data to be processed to the corresponding style control by the obtained method to generate an interface.
Further, in one embodiment, the processor 301 invoking the interface generation program stored in the memory 305 may perform the following operations:
analyzing the to-be-processed subdata;
judging whether the tail field of the to-be-processed subdata is analyzed;
when the tail field of the to-be-processed subdata is not analyzed, determining the label of the to-be-processed subdata and the corresponding attribute value of the to-be-processed subdata, and reading the sub label of the to-be-processed subdata and the attribute name of the sub label;
obtaining a corresponding style control according to the attribute value;
and creating a style control according to the read sub-label and the attribute name thereof.
Further, in one embodiment, the processor 301 invoking the interface generation program stored in the memory 305 may perform the following operations:
setting an interface as a plurality of MVC model view controller units, and defining each MVC unit as a pattern;
and setting a corresponding style control for each style.
Further, in one embodiment, the processor 301 invoking the interface generation program stored in the memory 305 may perform the following operations:
receiving a control parameter setting instruction, and setting the control name, the data interface and the parameters of the style control for each style control according to the setting instruction.
Further, in one embodiment, the processor 301 invoking the interface generation program stored in the memory 305 may perform the following operations:
and receiving a control parameter adjusting instruction, and adding parameters of the corresponding style control according to the control parameter adjusting instruction.
According to the scheme, the data to be processed is divided into different sub data to be processed according to the style control, the sub data to be processed is analyzed to obtain the corresponding control, and the sub data to be processed is filled into the corresponding style control according to the obtained method to generate the interface. The problem that the interface generating process is complex due to the fact that an existing interface generating mode is large in data size, poor in stability and poor in compatibility is effectively solved. The data volume of the interface generation mode is reduced, the stability and compatibility of the interface generation are improved, and the interface generation efficiency is further improved.
Based on the hardware architecture, the embodiment of the interface generation method is provided.
As shown in fig. 2, a first embodiment of an interface generation method according to the present invention is provided, where the interface generation method includes:
step S10, receiving an interface generation instruction, and acquiring to-be-processed data corresponding to the interface generation instruction;
when a user needs to combine an interface, an interface combination instruction is sent out, the user enters an interface combination operation window, data to be processed is input through the interface combination operation window, and a combined interface is generated through the data to be processed.
Receiving an interface generation instruction, providing an interface combination operation window, and receiving to-be-processed data corresponding to the interface generation instruction input by a user through the interface combination operation window.
Step S20, dividing the data to be processed into corresponding sub data to be processed according to a preset style control;
the preset style control is an MVC unit. Setting a style control in advance, specifically, referring to fig. 3, the process of setting a style control in advance may be:
step S21, setting the interface as a plurality of MVC model view controller units, and defining each MVC unit as a pattern;
step S22, setting a corresponding style control for each style.
Through a large amount of statistics and practical work experience, in the operation process, the changed parts in the interface combination process are only some characters and pictures, the interface typesetting is relatively fixed, and the control logic rarely changes. And abstracting the interface into MVC units according to the MVC analysis in the design mode, wherein each MVC unit is defined as a pattern. For example, assuming that the interface is divided into N patterns by the product requirement, when the operation is performed, several patterns are selected to be arranged in any order, and a single pattern can be repeatedly used, for example, N2-N1-N4, or N4-N4-N1, so that each pattern must be independent and there is no coupling between the patterns. Therefore, first, N patterns are divided into N independent MVC units. Because the interface style and the control logic are relatively fixed, the two blocks are realized by native (namely Java) codes and are released along with versions. For example, in the Android system, the interface is described by using xml, the data part in the style is placed in a separate file, and the interface is downloaded from the server before being filled.
Specifically, after setting the style control, referring to fig. 4, the process of setting the parameters of the control may include:
and step S23, receiving a control parameter setting instruction, and setting the control name, the data interface and the parameters of the style control for each style control according to the setting instruction.
Each style control must expose the control name, set the interface for the data, and define well-defined parameters. For example, the ticker control, named lantern _ view, sets the interface of the data to addNode, and the parameters imageUrl, junpto, and assumes that we use xml description, that is:
Figure BDA0000676641820000071
specifically, referring to fig. 5, a schematic diagram of an embodiment of a style control is shown.
The description of the data is:
Figure BDA0000676641820000072
after the data to be processed is obtained, dividing the data to be processed into corresponding subdata to be processed according to a preset style control.
Step S30, analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a method corresponding to the control;
after the data format is set, the data to be processed needs to be analyzed to generate an interface. And analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control.
Specifically, referring to fig. 6, the process of the method for analyzing the to-be-processed subdata to obtain the style control object corresponding to the to-be-processed subdata and the corresponding control may include:
step S31, analyzing the to-be-processed subdata;
step S32, judging whether the terminal field of the to-be-processed subdata is analyzed;
step S33, when the end field of the to-be-processed subdata is not analyzed, determining the label of the to-be-processed subdata and the corresponding attribute value thereof, and reading the sub label of the to-be-processed subdata and the attribute name thereof;
step S34, obtaining a corresponding style control according to the attribute value;
and step S35, creating a style control according to the read sub-label and the attribute name thereof.
And analyzing the sub-data to be processed, wherein the analyzing process of each sub-data to be processed is the same. For example, taking Android as an example, parsing xml, whether parsing is to the end, reading a name attribute in tag when parsing is not to the end, calling new class name ('name') of Android to instantiate a style control object according to the attribute value of the name, reading whether a sub-tag is finished, if not, reading the name and the attribute name of the sub-tag, and creating a method corresponding to the control according to the name and the attribute name of the sub-tag. When the analysis is finished, ending the process; and when reading the sub-tag is finished, returning to execute the process of calling the new Classinstance ('name') of the Android to instantiate the style control object according to the attribute value of the name.
And step S40, filling the to-be-processed subdata into the corresponding style control by the obtained method to generate an interface.
And after the method corresponding to the control is obtained, filling the sub data to be processed to the corresponding style control through the obtained method to generate an interface. And dividing the data to be processed into different sub data to be processed according to different controls so as to separate and combine interfaces.
For example, Android is taken as an example, a reflection mechanism exists, and an interface can be conveniently generated by using the reflection mechanism. The analytical procedure was as follows: analyzing tag labels of xml, reflecting style objects according to the names of the tag labels, reflecting the controls according to the labels, filling the controls with the attribute values of the sub-labels by the method of reflection, and finally adding the controls into an interface container to finish the whole assembling process to generate an interface.
The existing interface generation mode has large data volume, poor stability and poor compatibility, which causes poor interface generation efficiency. The interface generation method is different from the existing interface generation process, the data to be processed is divided into different sub data to be processed according to the style control, the sub data to be processed is analyzed to obtain the corresponding control, and the sub data to be processed is filled into the corresponding style control according to the obtained method to generate the interface. The data volume is reduced, and the stability and the compatibility are improved.
In this embodiment, the to-be-processed data is divided into different to-be-processed sub data according to the style control, and the to-be-processed sub data is analyzed to obtain a corresponding control, and the to-be-processed sub data is filled into the corresponding style control according to the obtained method to generate an interface. The problem that the interface generating process is complex due to the fact that an existing interface generating mode is large in data size, poor in stability and poor in compatibility is effectively solved. The data volume of the interface generation mode is reduced, the stability and compatibility of the interface generation are improved, the complexity of the interface generation is reduced, and the interface generation efficiency is improved.
Further, a second embodiment of the present invention is proposed based on the first embodiment of the above-described interface generation method. As shown in fig. 7, after the step S23, the method may further include:
and step S24, receiving a control parameter adjusting instruction, and adding parameters of the corresponding style control according to the control parameter adjusting instruction.
After setting the parameters of the style control. The style can be modified due to the operation requirement, parameters required by interaction are increased, the old parameters are not required any more, but according to the downward compatibility principle, the parameters of the style can only be added, and modification and deletion are not allowed. The low version and the high version of the parameter can reflect failure, and the high version of the parameter can reflect failure to the low version of the parameter, so that the high version and the low version do not influence each other, the purpose of compatibility of the old version and the new version is achieved, and meanwhile, no change is needed. That is, only the parameters of the high version are added when the parameters are changed, and the deletion and modification of the parameters are not carried out.
In the embodiment, only the parameters of the style control are added, so that the parameters of the high version and the low version do not interfere with each other, and the compatibility of interface generation is improved.
Correspondingly, a first embodiment of the interface generating device of the invention is proposed. Referring to fig. 8, the interface generating device includes a transceiver module 10, an obtaining module 20, a processing module 30, a setting module 40, an analyzing module 50, and a generating module 60.
The transceiver module 10 is configured to receive an interface generation instruction;
the obtaining module 20 is configured to obtain to-be-processed data corresponding to the interface generating instruction;
when a user needs to combine an interface, an interface combination instruction is sent out, the user enters an interface combination operation window, data to be processed is input through the interface combination operation window, and a combined interface is generated through the data to be processed.
Receiving an interface generation instruction, providing an interface combination operation window, and receiving to-be-processed data corresponding to the interface generation instruction input by a user through the interface combination operation window.
The processing module 30 is configured to divide the data to be processed into corresponding sub data to be processed according to a preset style control;
the preset style control is an MVC unit. And setting a style control in advance.
The setting module 40 is configured to set the interface as a plurality of MVC model view controller units, and define each MVC unit as a pattern; and the system is also used for setting a corresponding style control for each style.
Through a large amount of statistics and practical work experience, in the operation process, the changed parts in the interface combination process are only some characters and pictures, the interface typesetting is relatively fixed, and the control logic rarely changes. And abstracting the interface into MVC units according to the MVC analysis in the design mode, wherein each MVC unit is defined as a pattern. For example, assuming that the interface is divided into N patterns by the product requirement, when the operation is performed, several patterns are selected to be arranged in any order, and a single pattern can be repeatedly used, for example, N2-N1-N4, or N4-N4-N1, so that each pattern must be independent and there is no coupling between the patterns. Therefore, first, N patterns are divided into N independent MVC units. Because the interface style and the control logic are relatively fixed, the two blocks are realized by native (namely Java) codes and are released along with versions. For example, in the Android system, the interface is described by using xml, the data part in the style is placed in a separate file, and the interface is downloaded from the server before being filled.
The sending and receiving module 10 is further configured to receive a control parameter setting instruction;
the setting module 40 is further configured to set a control name, a data interface, and parameters of the style control for each style control according to the setting instruction.
Each style control must expose the control name, set the interface for the data, and define well-defined parameters. For example, the ticker control, named lantern _ view, sets the interface of the data to addNode, and the parameters imageUrl, junpto, and assumes that we use xml description, that is:
Figure BDA0000676641820000101
Figure BDA0000676641820000111
specifically, referring to fig. 5, a schematic diagram of an embodiment of a style control is shown.
The description of the data is:
Figure BDA0000676641820000112
after the data to be processed is obtained, dividing the data to be processed into corresponding subdata to be processed according to a preset style control.
The analysis module 50 is configured to analyze the to-be-processed sub data to obtain a style control object corresponding to the to-be-processed sub data and a method corresponding to the control;
after the data format is set, the data to be processed needs to be analyzed to generate an interface. And analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control.
Specifically, referring to fig. 9, the parsing module 50 includes a parsing unit 51, a judging unit 52, a determining unit 53, a reading unit 54, a deriving unit 55 and a creating unit 56,
the analyzing unit 51 is configured to analyze the to-be-processed sub data;
the judging unit 52 is configured to judge whether to parse the last field of the to-be-processed sub data;
the determining unit 53 is configured to determine the label of the to-be-processed sub data and the attribute value corresponding to the label when the tail field of the to-be-processed sub data is not parsed;
the reading unit 54 is configured to read the sub-tag and the attribute name of the to-be-processed sub-data;
the obtaining unit 55 is configured to obtain a corresponding style control according to the attribute value;
and the creating unit 56 is used for creating a style control according to the read sub-label and the attribute name thereof.
And analyzing the sub-data to be processed, wherein the analyzing process of each sub-data to be processed is the same. For example, taking Android as an example, parsing xml, whether parsing is to the end, reading a name attribute in tag when parsing is not to the end, calling new class name ('name') of Android to instantiate a style control object according to the attribute value of the name, reading whether a sub-tag is finished, if not, reading the name and the attribute name of the sub-tag, and creating a method corresponding to the control according to the name and the attribute name of the sub-tag. When the analysis is finished, ending the process; and when reading the sub-tag is finished, returning to execute the process of calling the new Classinstance ('name') of the Android to instantiate the style control object according to the attribute value of the name.
The generating module 60 is configured to fill the to-be-processed sub data into the corresponding style control by the obtained method to generate an interface.
And after the method corresponding to the control is obtained, filling the sub data to be processed to the corresponding style control through the obtained method to generate an interface. And dividing the data to be processed into different sub data to be processed according to different controls so as to separate and combine interfaces.
For example, Android is taken as an example, a reflection mechanism exists, and an interface can be conveniently generated by using the reflection mechanism. The analytical procedure was as follows: analyzing tag labels of xml, reflecting style objects according to the names of the tag labels, reflecting the controls according to the labels, filling the controls with the attribute values of the sub-labels by the method of reflection, and finally adding the controls into an interface container to finish the whole assembling process to generate an interface.
The existing interface generation mode has large data volume, poor stability and poor compatibility, which causes poor interface generation efficiency. The interface generation method is different from the existing interface generation process, the data to be processed is divided into different sub data to be processed according to the style control, the sub data to be processed is analyzed to obtain the corresponding control, and the sub data to be processed is filled into the corresponding style control according to the obtained method to generate the interface. The data volume is reduced, and the stability and the compatibility are improved.
In this embodiment, the to-be-processed data is divided into different to-be-processed sub data according to the style control, and the to-be-processed sub data is analyzed to obtain a corresponding control, and the to-be-processed sub data is filled into the corresponding style control according to the obtained method to generate an interface. The problem that the interface generating process is complex due to the fact that an existing interface generating mode is large in data size, poor in stability and poor in compatibility is effectively solved. The data volume of the interface generation mode is reduced, the stability and compatibility of the interface generation are improved, the complexity of the interface generation process is reduced, and the interface generation efficiency is improved.
Further, a second embodiment of the interface generating apparatus of the present invention is proposed based on the first embodiment of the interface generating apparatus described above. As shown in fig. 10, the interface generating apparatus further includes: the adjustment module 70 is used to adjust the position of the optical fiber,
the transceiver module 10 is further configured to receive a control parameter adjustment instruction;
the adjusting module 70 is further configured to add parameters of the corresponding style control according to the control parameter adjusting instruction.
After setting the parameters of the style control. The style can be modified due to the operation requirement, parameters required by interaction are increased, the old parameters are not required any more, but according to the downward compatibility principle, the parameters of the style can only be added, and modification and deletion are not allowed. The low version and the high version of the parameter can reflect failure, and the high version of the parameter can reflect failure to the low version of the parameter, so that the high version and the low version do not influence each other, the purpose of compatibility of the old version and the new version is achieved, and meanwhile, no change is needed. That is, only the parameters of the high version are added when the parameters are changed, and the deletion and modification of the parameters are not carried out.
In the embodiment, only the parameters of the style control are added, so that the parameters of the high version and the low version do not interfere with each other, and the compatibility of interface generation is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
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.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. 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.

Claims (7)

1. An interface generation method, comprising the steps of:
setting an interface as a plurality of independent MVC model view controller units, and defining each MVC unit as an independent pattern;
setting a corresponding style control for each style;
receiving an interface generation instruction, and acquiring to-be-processed data corresponding to the interface generation instruction;
dividing the data to be processed into corresponding sub data to be processed according to an MVC unit;
analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a corresponding control method; the style control object and the method corresponding to the control are released along with the version;
filling the sub data to be processed to the corresponding style control by the obtained method to generate an interface; the data part in the style control is put in a separate file and downloaded from a server before the interface is filled;
and receiving a control parameter adjusting instruction, adding parameters of the corresponding style control according to the control parameter adjusting instruction, and forbidding to delete and modify the parameters.
2. The interface generating method according to claim 1, wherein the step of the method for analyzing the to-be-processed sub data to obtain a style control object corresponding to the to-be-processed sub data and a corresponding control comprises:
analyzing the to-be-processed subdata;
judging whether the tail field of the to-be-processed subdata is analyzed;
when the tail field of the to-be-processed subdata is not analyzed, determining the label of the to-be-processed subdata and the corresponding attribute value of the to-be-processed subdata, and reading the sub label of the to-be-processed subdata and the attribute name of the sub label;
obtaining a corresponding style control according to the attribute value;
and creating a style control according to the read sub-label and the attribute name thereof.
3. The interface generation method of claim 1, wherein after the step of setting a corresponding style control for each style, further comprising:
receiving a control parameter setting instruction, and setting the control name, the data interface and the parameters of the style control for each style control according to the setting instruction.
4. An interface generating apparatus, comprising:
the setting module is used for setting the interface into a plurality of independent MVC model view controller units and defining each MVC unit as an independent pattern; the system is also used for setting a corresponding style control for each style;
the receiving and sending module is used for receiving an interface generation instruction;
the acquisition module is used for acquiring the data to be processed corresponding to the interface generation instruction;
the processing module is used for dividing the data to be processed into corresponding sub data to be processed according to the MVC unit;
the analysis module is used for analyzing the to-be-processed subdata to obtain a style control object corresponding to the to-be-processed subdata and a method corresponding to the control; the style control object and the method corresponding to the control are released along with the version;
the generation module is used for filling the sub data to be processed to the corresponding style control by the obtained method so as to generate an interface; the data part in the style control is put in a separate file and downloaded from a server before the interface is filled;
and receiving a control parameter adjusting instruction, adding parameters of the corresponding style control according to the control parameter adjusting instruction, and forbidding to delete and modify the parameters.
5. The interface generating apparatus according to claim 4, wherein the parsing module includes a parsing unit, a judging unit, a determining unit, a reading unit, an obtaining unit, and a creating unit,
the analysis unit is used for analyzing the to-be-processed subdata;
the judging unit is used for judging whether the terminal field of the to-be-processed subdata is analyzed;
the determining unit is configured to determine a tag of the to-be-processed sub-data and an attribute value corresponding to the tag when the to-be-processed sub-data is not parsed to the last field of the to-be-processed sub-data;
the reading unit is used for reading the sub-label of the sub-data to be processed and the attribute name of the sub-label;
the obtaining unit is used for obtaining a corresponding style control according to the attribute value;
and the creating unit is used for creating a style control according to the read sub-label and the attribute name thereof.
6. The interface generating apparatus of claim 4, wherein the transceiver module is further configured to receive a control parameter setting instruction;
the setting module is further used for setting the control name, the data interface and the parameters of the style control for each style control according to the setting instruction.
7. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the interface generation method according to any one of claims 1 to 3.
CN201510093182.6A 2015-03-02 2015-03-02 Interface generation method and device Active CN105988814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510093182.6A CN105988814B (en) 2015-03-02 2015-03-02 Interface generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510093182.6A CN105988814B (en) 2015-03-02 2015-03-02 Interface generation method and device

Publications (2)

Publication Number Publication Date
CN105988814A CN105988814A (en) 2016-10-05
CN105988814B true CN105988814B (en) 2020-07-03

Family

ID=57038108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510093182.6A Active CN105988814B (en) 2015-03-02 2015-03-02 Interface generation method and device

Country Status (1)

Country Link
CN (1) CN105988814B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391175B (en) * 2017-06-20 2021-03-30 福建天泉教育科技有限公司 Control data configuration method and computer readable storage medium
CN107861782A (en) * 2017-10-18 2018-03-30 福建中金在线信息科技有限公司 Implementation method, device and the electronic equipment of input frame input control
CN110502198B (en) * 2018-09-29 2023-06-16 国核自仪***工程有限公司 Interface display system based on FPGA
CN110502199A (en) * 2018-09-29 2019-11-26 国核自仪***工程有限公司 FPGA component
CN110442342B (en) * 2019-07-25 2020-07-31 北京金堤科技有限公司 Interface generation method and device, storage medium and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202665A (en) * 2007-12-06 2008-06-18 中兴通讯股份有限公司 Method for generating graphical user interface
CN102103491A (en) * 2009-12-18 2011-06-22 Tcl集团股份有限公司 System and method for generating interface
CN103902256A (en) * 2012-12-24 2014-07-02 航天信息股份有限公司 Interface generating system and method
CN104239044A (en) * 2014-09-05 2014-12-24 北京航天自动控制研究所 Dynamic generation method for graphical user interface

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002023336A1 (en) * 2000-09-14 2002-03-21 Bea Systems, Inc. Xml-based graphical user interface application development toolkit
CN101187864A (en) * 2007-11-21 2008-05-28 浪潮集团山东通用软件有限公司 Method for exhibiting abstraction and integration for interface
US20090157734A1 (en) * 2007-12-18 2009-06-18 Zubair Khan Dynamically generated mvc based user interface
US20100333065A1 (en) * 2009-06-30 2010-12-30 Computer Assoicates Think, Inc. Binary code modification system and method for implementing a web service interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202665A (en) * 2007-12-06 2008-06-18 中兴通讯股份有限公司 Method for generating graphical user interface
CN102103491A (en) * 2009-12-18 2011-06-22 Tcl集团股份有限公司 System and method for generating interface
CN103902256A (en) * 2012-12-24 2014-07-02 航天信息股份有限公司 Interface generating system and method
CN104239044A (en) * 2014-09-05 2014-12-24 北京航天自动控制研究所 Dynamic generation method for graphical user interface

Also Published As

Publication number Publication date
CN105988814A (en) 2016-10-05

Similar Documents

Publication Publication Date Title
CN110889270B (en) Form page document generation method, form page rendering method and device
CN105988814B (en) Interface generation method and device
WO2017088509A1 (en) Page customization method and device
CN110309451B (en) Method and device for generating web preloading page
CN108664239B (en) Cross-technology-stack web front-end development system and method based on micro-service
CN107741844B (en) Method and device for generating application installation package
US20150040000A1 (en) Methods and systems for generating server-side media queries
KR20150079867A (en) Html5-protocol-based webpage presentation method and device
CN110908712A (en) Data processing method and equipment for cross-platform mobile terminal
CN104704468A (en) Cross system installation of WEB applications
CN107122398B (en) Data display chart generation method and system
CN111339458A (en) Page presenting method and device
US11677807B2 (en) System and method to standardize and improve implementation efficiency of user interface content
US20160012147A1 (en) Asynchronous Initialization of Document Object Model (DOM) Modules
CN114138372B (en) Front-end component loading method and device
JP2023541186A (en) Visualization page rendering method, device, equipment and storage medium
US20160012144A1 (en) Javascript-based, client-side template driver system
CN111506300A (en) Applet generation method, device, equipment and storage medium
CN113495730A (en) Resource package generation and analysis method and device
CN111796727B (en) Interface data processing method and device
US8112500B2 (en) Technique of relaying communications between client apparatus and server apparatus
CN110597508A (en) Interface dynamic configuration method, device and storage medium
CN105989010B (en) Web page data generation method, Web server and Web application system
CN112214202B (en) Mobile phone program development system without writing codes
CN113110829A (en) Multi-UI component library data processing method and device

Legal Events

Date Code Title Description
C06 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