CN112306486B - Interface generation method and device, server and storage medium - Google Patents

Interface generation method and device, server and storage medium Download PDF

Info

Publication number
CN112306486B
CN112306486B CN201910690503.9A CN201910690503A CN112306486B CN 112306486 B CN112306486 B CN 112306486B CN 201910690503 A CN201910690503 A CN 201910690503A CN 112306486 B CN112306486 B CN 112306486B
Authority
CN
China
Prior art keywords
interface
interface element
configuration file
key
target
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
CN201910690503.9A
Other languages
Chinese (zh)
Other versions
CN112306486A (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 CN201910690503.9A priority Critical patent/CN112306486B/en
Publication of CN112306486A publication Critical patent/CN112306486A/en
Application granted granted Critical
Publication of CN112306486B publication Critical patent/CN112306486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides an interface generation method, an interface generation device, a server and a storage medium, wherein an interface generation instruction is received through a user interaction interface; acquiring interface generation parameters from the interface generation instruction; acquiring an interface layout configuration file corresponding to a layout identifier of an interface to be generated; acquiring a basic interface element configuration file corresponding to a layout identifier of an interface to be generated; obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file; and generating an interface by using the interface layout configuration file and the target interface element configuration file. The interface element configuration file set is created in advance, a large number of basic interface element configuration files can be loaded from the interface element configuration file set which is created in advance, key interface element information input by a user is received in the user interaction interface, an interface is generated, a developer does not need to write codes in the interface generation process, the terminal application interface development process is simplified, and the development efficiency is improved.

Description

Interface generation method and device, server and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an interface generating method, an apparatus, a server, and a storage medium.
Background
Any application running in the terminal needs to perform function display through a visual interface, and a user can perform corresponding operation in the visual interface of the terminal application. At present, in the development process of a terminal application interface, an interface layout and interface elements are mainly bound, and then the terminal application interface is generated according to the bound interface layout and interface elements.
In the process of generating the terminal application interface, a developer is required to write codes, particularly, under the condition that more corresponding relations exist between interface layout and interface elements, a large number of codes are required to be written by the developer, and in the process of interface development, once the interface layout or the interface elements are required to be modified, a large number of binding codes are required to be modified, so that the terminal application interface development process is complex and the development efficiency is low.
Disclosure of Invention
In view of the above, the present application provides an interface generating method, apparatus, server and storage medium, so as to simplify the development process of terminal application interfaces and improve the development efficiency.
In order to achieve the above object, in one aspect, the present application provides an interface generating method, including:
receiving an interface generation instruction input by a user through a user interaction interface;
Responding to the interface generation instruction, and acquiring interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
and generating an interface by using the interface layout configuration file and the target interface element configuration file.
In still another aspect, the present application further provides an interface generating apparatus, where the apparatus includes:
the interface generation instruction receiving unit is used for receiving an interface generation instruction input by a user through the user interaction interface;
the interface generation parameter obtaining unit is used for responding to the interface generation instruction and obtaining interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
An interface layout configuration file obtaining unit, configured to obtain an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
a basic interface element configuration file acquisition unit, configured to acquire a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
the target interface element configuration file acquisition unit is used for acquiring a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
and the interface generating unit is used for generating an interface by utilizing the interface layout configuration file and the target interface element configuration file.
In yet another aspect, the present application further provides a server, including:
a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for:
receiving an interface generation instruction input by a user through a user interaction interface;
responding to the interface generation instruction, and acquiring interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
Acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
and generating an interface by using the interface layout configuration file and the target interface element configuration file.
In yet another aspect, the present application further provides a storage medium having stored therein computer-executable instructions that, when loaded and executed by a processor, implement the interface generation method as described above.
Compared with the prior art, the application provides the interface generation method, the device, the server and the storage medium, and the interface generation instruction input by the user is received through the user interaction interface; responding to the interface generation instruction, and acquiring interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated; acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated; acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set; obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file; and generating an interface by using the interface layout configuration file and the target interface element configuration file. Because the interface element configuration file set is created in advance, a large number of basic interface element configuration files required by the interface generation process can be directly loaded from the pre-created interface element configuration file set according to the layout identification, key interface element information input by a user is received in the user interaction interface, the key interface element information and the basic interface element configuration file are utilized to obtain the target interface element configuration file, the interface layout configuration file and the target interface element configuration file are utilized to generate an interface, a developer does not need to write codes in the interface generation process, the interface can be generated through the user interaction interface, the terminal application interface development process is simplified, and the development efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a composition structure of a server according to an embodiment of the present invention;
FIG. 2 is a flowchart of an interface generating method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another interface generating method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an application interface according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a user interface according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another application interface according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a composition structure of an interface generating device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, in the development process of a terminal application interface, an interface layout and interface elements are mainly bound, and then the terminal application interface is generated according to the bound interface layout and interface elements. In the process of generating the terminal application interface, a developer is required to write codes to realize the terminal application interface, and particularly under the condition that more corresponding relations exist between interface layout and interface elements, a large amount of codes are required to be written by the developer.
In order to avoid the need of writing a binding code binding with the interface layout for different types of interface elements, a developer further extracts the binding code as a public library through research, and in the process of developing an interface, the developer can load a proper binding code from the public library without writing repeated binding codes again. However, once the interface layout style is changed, the interface element corresponding to the new interface layout will also change, and in this case, there is no binding code between the new interface element and the new interface layout in the public library, and the binding code between the new interface element and the new interface layout needs to be rewritten and loaded into the public library, and the code referencing the public library needs to be rewritten. In the mode, a developer is still required to write a large amount of codes, and the problems of complex development process and low development efficiency of an application interface still exist.
In order to solve the problems, the application provides an interface generating method, which can be applied to the generating process of any application interface installed in a terminal.
For easy understanding, a server to which the interface generating method according to the embodiment of the present application is applied will be described. As shown in fig. 1, a schematic diagram of a composition structure of a server to which the scheme of the present application is applied is shown. In fig. 1, the server 100 may include: a processor 101 and a memory 102.
The server 100 may further include: a communication interface 103, an input unit 104 and a display 105 and a communication bus 106.
The processor 101, the memory +102, the communication interface 103, the input unit 104, the display 105, all perform communication with each other via the communication bus 106.
In an embodiment of the present application, the processor 101 may be a central processing unit (Central Processing Unit, CPU), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, etc.
The processor may call a program stored in the memory 102, and in particular, the processor may perform operations performed on the server side in the following method embodiments.
The memory 102 is used to store one or more programs, and the programs may include program code that includes computer operation instructions, and in an embodiment of the present application, at least the programs for implementing the following functions are stored in the memory:
receiving an interface generation instruction input by a user through a user interaction interface;
responding to the interface generation instruction, and acquiring interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
Acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
and generating an interface by using the interface layout configuration file and the target interface element configuration file.
In one possible implementation, the memory 102 may include a stored program area and a stored data area, where the stored program area may store an operating system, the above-mentioned programs, and the like; the storage data area may store data created according to the use of the server.
Further, the memory 102 may include a high-speed random access memory, a nonvolatile memory, and the like. The communication interface 103 may be an interface of a communication module, such as an interface of a GSM module. The input unit may include a touch sensing unit sensing a touch event on the touch display panel, a keyboard, and the like. The display 105 includes a display panel, such as a touch display panel or the like.
Of course, the server structure shown in fig. 1 does not limit the server in the embodiment of the present application, and the server may include more or fewer components than shown in fig. 1 or may combine some components in practical applications.
In combination with the above, the interface generating method of the present application will be described.
Referring to fig. 2, a flow chart of an embodiment of an interface generating method of the present application is shown, where the embodiment is applied to a server as mentioned above, and the embodiment includes:
s200, receiving an interface generation instruction input by a user through a user interaction interface;
it can be understood that the user interaction interface is a visual interaction interface provided in the application, and the user refers to an interface developer, and the interface developer can input an interface generation instruction in the user interaction interface. The interface generation instruction generates required relevant parameters for an interface input by an interface developer in a user interaction interface.
S210, responding to the interface generation instruction, and acquiring an interface generation parameter from the interface generation instruction;
the interface generation parameters at least include: layout identification of the interface to be generated and key interface element information related to the interface to be generated.
Alternatively, different kinds of interfaces have different interface layouts, and the different interface layouts are represented by different layout identifiers, which can uniquely identify one interface layout.
The interface layout in the embodiment of the present application is a structural display style of the interface, and the interface layout may include the types, names, arrangements, etc. of the elements in the interface, which is not particularly limited in the present application. The interface layout in the embodiment of the application specifically refers to an XML layout.
The key interface element is a key interface element necessary for distinguishing one interface layout from another interface layout, and the key interface element information refers to related information of the key interface element contained in the interface to be generated, which is input in the user interaction interface by an interface developer. Specifically, the key interface element information may include information capable of describing the key interface element, such as a key interface element attribute name or attribute value. Interface elements mainly refer to various controls displayed in the interface, such as pictures, text, etc. displayed in the interface.
Optionally, in the embodiment of the present application, the key interface element information at least includes: attribute names of key interface elements and attribute value constraint conditions corresponding to the key interface elements; the attribute names of the key interface elements are attribute names of one key interface element in the interface layout, for example, for a display of a commodity, three interface elements of a commodity name, a commodity preview image and a commodity price are provided, and each interface element corresponds to one attribute name, for example, the attribute name of the commodity name is title. The attribute value is a specific value of the interface element, for example, the attribute value corresponding to the attribute name "title" of the commodity name is "video member", and the attribute value of the commodity preview image is a link corresponding to the image.
The attribute name is composed of a word face value and a variable, for example, title_ $ (curContentCnt), title_is the word face value, curContentCnt is the variable, and the value of the variable curContentCnt is 1, then the attribute name is finally resolved into title_1.
The attribute value constraint condition is specifically a constraint condition of the attribute value input by the user in the user interaction interface, can be a constraint condition of the attribute value content, can be a constraint condition of the attribute value, and the like, and the application is not limited in particular.
S220, acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
the layout identifier of each interface uniquely corresponds to an interface layout configuration file, and the interface layout configuration file contains configuration information related to the interface layout, for example: the display style of the interface, the type and number of the elements in the interface or the display style of the elements, etc.
S230, acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
in the embodiment of the application, the interface element configuration file set is created for different types of interface layouts in advance, and the interface element configuration file set contains configuration information of basic interface elements required by the different types of interface layouts.
It should be noted that, the same interface layout may correspond to different kinds of basic interface element configuration files, and the same basic interface element configuration file may also correspond to different kinds of interface layouts.
In the embodiment of the application, the basic interface element configuration file corresponding to the layout identifier of the interface to be generated can be obtained from the pre-created interface element configuration file set, wherein the basic interface element configuration file contains configuration information related to basic interface elements required by the layout of the interface to be generated, and the basic interface element configuration file contains related information such as basic interface element attribute names or attribute values and the like which can describe the basic interface elements.
The basic interface elements are basic interface elements required for generating the interface layout, and may include some interface elements common to various interface layouts, for example: the type of the specific basic interface element such as a picture, a title, etc. may be set by those skilled in the art, and the present application is not particularly limited.
S240, obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
the target interface element configuration file may be a map structure, in the map structure, a key value is used to represent an attribute name of an interface element (including both a key interface element and a basic interface element) corresponding to a layout identifier, a value is used to represent an attribute value corresponding to the attribute name of the interface element, for example, for a picture interface element, the attribute name is imgUrl, and the attribute value is a download link of the picture. And filling interface elements in the layout according to the map structure.
It should be noted that, in the embodiment of the present application, the following specific manner of obtaining the configuration file of the target interface element by using the key interface element information and the configuration file of the basic interface element is provided:
calculating to obtain an attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element; binding the attribute names of the key interface elements with the attribute values corresponding to the attribute names to obtain a key interface element configuration file; and combining the key interface element configuration file and the basic interface element configuration file to obtain a target interface element configuration file.
After the attribute values corresponding to the attribute names of the key interface elements are obtained, the embodiment of the application can establish the corresponding relation between the attribute names of the key interface elements and the attribute values corresponding to the attribute names, so that the attribute names of the key interface elements and the attribute values corresponding to the attribute names of the key interface elements are bound to obtain the binding relation between the attribute names of the key interface elements and the attribute values, a binding id is set for the binding relation between the attribute names of the key interface elements and the attribute values, and the binding id can uniquely identify the binding relation between the attribute names of the key interface elements and the attribute values, namely the binding relation between the attribute names of the key interface elements and the attribute values is the configuration file of the key interface elements.
And combining the key interface element configuration file and the basic interface element configuration file, namely combining the key interface element configuration file and the basic interface element configuration file to generate a target interface element configuration file, wherein the target interface element configuration file comprises the key interface element configuration file and the basic interface element configuration file.
It should be noted that, in the embodiment of the present application, three specific ways for calculating the attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element are provided:
the first mode is a processing mode for executing 'literal value + variable' by using a variable processor, and the specific processing procedure of the first mode is as follows:
a1: determining a variable value from attribute value constraint conditions corresponding to the key interface elements;
a2: and determining the variable value as an attribute value corresponding to the attribute name of the key interface element.
The processing mode mainly analyzes the variables in the parameters consisting of the literal values and the variables and replaces the variables with specific variable values to obtain final attribute values.
For example, a parameter composed of a literal value and a variable corresponding to a key interface element input by a user in a user interaction interface is "title_ $ (curContentCnt)", the variable value is 1, and the calculation process is: the variable part ($ () contains part as variable) is first parsed for $ (curContentCnt), then the variable is replaced with a specific variable value 1, and then the attribute value is finally obtained as "title_1".
The second mode is an interface processing mode, and the specific processing process of the second mode is as follows:
b1: responding to an interface type selection instruction, and determining a target interface corresponding to the attribute name of the key interface element selected by a user;
the interface type of the target interface accords with the attribute value constraint condition; it should be noted that, the target interface type selected by the user is included in the attribute value constraint condition corresponding to the key interface element input by the user.
The interface is a preset operation program for executing different functions, different types of interfaces are used for processing different types of operations and realizing different functions, if a user configures an attribute value calculation mode corresponding to an attribute name title to be the interface through a user interaction interface, the attribute value can be calculated through the interface, the user can select a target interface corresponding to the attribute name in the user interaction interface, the functions which can be realized by the target interface are matched with the constraint conditions of the attribute value, and the user can select the target interface by referring to the function description of the target interface when selecting the target interface.
B2: responding to a target interface parameter selection instruction, and determining target interface parameters selected by a user;
it should be noted that, the target interface parameter selected by the user is included in the attribute value constraint condition corresponding to the key interface element input by the user. The target interface parameter is a processing object of an operation program corresponding to the target interface, and the function which can be realized by the target interface is matched with the attribute value constraint condition, so that the target interface parameter in the embodiment of the application accords with the attribute value constraint condition.
B3: and calling the target interface, and performing interface operation by using the target interface parameters to obtain an attribute value corresponding to the attribute name of the key interface element.
Because the function realized by the target interface is matched with the attribute value constraint condition, the operation result of the target interface is the attribute value corresponding to the attribute name of the key interface element.
For example, a user configures an attribute value calculation mode corresponding to an attribute name "title" to be an "interface" through a user interaction interface, and the interface name is "acquire title and remove special characters". The interface calculation procedure calls the interface "get title and remove special characters" according to the configuration, which finally returns a string as an attribute value. The specific operation steps of the interface are as follows: and extracting the title field from the key interface element, removing special characters in the title, and returning the processed title character string. The target interface parameter is a type of special character set by a user, for example: commas, question marks, periods, etc., the present application is not particularly limited.
The third mode is a script processing mode, and the specific processing procedure of the third mode is as follows:
c1, responding to a script configuration instruction, and determining a target script configured by a user;
The target script corresponding to the attribute name of the key interface element configured by the user is contained in the attribute value constraint condition;
the user inputs the configured target script in the user interaction interface, and different types of scripts are used for processing different types of operations to realize different functions.
The target script in the embodiment of the present application may be a Lua dynamic script, and the embodiment of the present application is not particularly limited.
C2, loading the target script into a script running environment;
and C3, executing the target script to obtain an attribute value corresponding to the attribute name of the key interface element.
For example, if the attribute value corresponding to the attribute name "title" is configured by the user through the user interface as "lua script", then a section of lua script needs to be configured at the same time, and after the script runs, a character string is finally returned, and the character string is used as the final attribute value.
S250, generating an interface by using the interface layout configuration file and the target interface element configuration file.
It should be noted that, in the embodiment of the present application, configuration information related to an interface layout may be extracted from an interface layout configuration file, configuration information related to a key interface element and a basic interface element may be extracted from a target interface element configuration file, the target interface element configuration file may be organized according to a hierarchical structure required by the interface layout, a correspondence between the target interface element configuration file and different interface layout hierarchical structures may be established, so as to obtain a final interface generation file package, and the content in the interface generation file package may be parsed, so as to obtain a parsing result, and generate an interface according to the parsing result.
The interface layout hierarchy may be, for example: card level hierarchy or application level hierarchy, etc., different layout levels may correspond to different target interface element configuration files.
According to the embodiment of the application, the interface generation instruction input by a user is received through the user interaction interface; responding to the interface generation instruction, and acquiring interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated; acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated; acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set; obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file; and generating an interface by using the interface layout configuration file and the target interface element configuration file. Because the interface element configuration file set is created in advance in the embodiment of the application, a large number of basic interface element configuration files required by the interface generation process can be directly loaded from the pre-created interface element configuration file set according to the layout identification, key interface element information input by a user is received in the user interaction interface, the key interface element information and the basic interface element configuration file are utilized to obtain the target interface element configuration file, the interface layout configuration file and the target interface element configuration file are utilized to generate an interface, a developer does not need to write codes in the interface generation process, the interface can be generated through the user interaction interface, the terminal application interface development process is simplified, and the development efficiency is improved.
According to the technical scheme provided by the embodiment of the application, the analysis of parameters and the establishment of binding relation can be realized by the C++ compiling type language, the encapsulated built-in interface is provided for common operation to acquire the attribute value corresponding to the attribute name, and the dynamic script language is used as the supplement of flexible logic operation to acquire the attribute value corresponding to the attribute name for unusual operation, so that the flexibility and the high efficiency are both considered.
Embodiments of the present application may use pure dynamic language in combination with DSL (Domain Specific Language ) to implement the above scheme.
In addition, the application also provides another interface generating method for updating the interface elements in the generated interface to generate a new interface,
referring to fig. 3, a flow chart of an embodiment of an interface generating method according to the present application is shown, where the embodiment includes:
s300, receiving an interface updating instruction input by a user through a user interaction interface;
the interface updating instruction comprises interface updating parameters, and the interface updating parameters at least comprise: layout identification of the interface to be updated and updated interface element information related to the interface to be updated.
In the case that the user needs to update the interface element in the interface, for example, the attribute name and/or the attribute value corresponding to the interface element are updated.
S310, responding to the interface updating instruction, and acquiring interface updating parameters from the interface updating instruction;
the interface updating parameters at least comprise: layout identification of the interface to be updated and updated interface element information related to the interface to be updated; the update interface element information related to the interface to be updated may include: and updating the attribute names and/or attribute values corresponding to the interface elements.
S320, acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be updated;
s330, acquiring an original interface element configuration file corresponding to the layout identifier of the interface to be updated from a pre-created interface element configuration file set;
and before updating the interface, the original interface element configuration file is the configuration file of all interface elements in the interface to be updated, which corresponds to the layout identifier of the interface to be updated.
S340, updating corresponding interface element information contained in the original interface element configuration file by utilizing updated interface element information related to the interface to be updated to obtain an updated interface element configuration file, and taking the updated interface element configuration file as a target interface element configuration file;
the embodiment of the application can determine the attribute name and/or attribute value to be updated contained in the updated interface element information from the original interface element configuration file, and update the attribute name and/or attribute value to be updated into a new attribute name and/or attribute value to obtain the updated interface element configuration file.
For example, if the title and the subTitle in a certain interface need to be transposed, the interface configuration corresponding to the original attribute name title and the subTitle can be interchanged.
S350, generating an interface by using the interface layout configuration file and the target interface element configuration file.
It should be noted that, the present application not only can change a target interface element configuration file corresponding to one interface layout, and establish a corresponding relationship between one interface layout and multiple target interface element configuration files, but also can change an interface layout corresponding to one target interface element configuration file, and establish a corresponding relationship between one target interface element configuration file and multiple interface layout files, and the specific process may be:
receiving an interface updating instruction input by a user through a user interaction interface; the interface updating instruction comprises interface updating parameters, and the interface updating parameters at least comprise: an original layout identifier of the interface to be updated and an updated layout identifier related to the interface to be updated; responding to the interface updating instruction, and acquiring interface updating parameters from the interface updating instruction; acquiring an original interface layout configuration file corresponding to the original layout identifier of the interface to be updated; updating the original interface layout configuration file by using the updated layout identifier to obtain an updated interface layout configuration file; acquiring a target interface element configuration file corresponding to the original layout identifier; and generating an interface by using the interface layout configuration file and the target interface element configuration file.
According to the embodiment of the application, the user can receive the interface updating instruction input by the user through the user interaction interface, so that the interface is directly updated according to the interface updating instruction, a developer does not need to write codes to update the interface, the development process of the terminal application interface is simplified, and the development efficiency is improved. In addition, through the mode, the corresponding relation between one interface layout and multiple target interface element configuration files can be easily established, and the corresponding relation between one target interface element configuration file and multiple interface layouts can be also established, so that the suitability of different types of interface layouts and different types of interface elements can be conveniently tested.
For example: for the attribute subTitle of the interface layout 1, a binding relationship can be newly established, the "small editing recommendation" field of the target interface element configuration file 1 is bound to the attribute subTitle, another binding relationship is newly established, and the "App downloading number" field of the target interface element configuration file 2 is bound to the attribute subTitle. In addition, the "small editing recommendation" field of the configuration file 1 of the target interface element may be bound to the attribute subTitle of the interface layout 1 or the attribute subTitle of the interface layout 2. And flexible configuration of binding relation between interface layout and different kinds of interface elements is realized.
In order to facilitate understanding of the solution of the present application, the following description will take a specific scenario as an example:
referring to a schematic diagram of a display of a certain application interface of the terminal shown in fig. 4, if a developer wants to modify a square icon a corresponding to "camera" into a circular icon, the specific implementation process is as follows:
1. receiving an interface icon updating instruction input by a user through a user interaction interface as shown in fig. 5, modifying a square icon a corresponding to a camera into a circular icon, wherein the contents filled in the user interaction interface are as follows: the data type selects map, the key value is an icon, the level is a card level, the value type is an interface, namely, the attribute value is obtained through interface operation, the shape of the icon is selected and changed at the interface, and the parameters can fill in circles;
2. responding to the interface updating instruction, and acquiring interface updating parameters from the interface updating instruction: the layout identification of the interface to be updated and the updating interface element information (modifying the square icon A corresponding to the camera into a circular icon);
3. acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be updated;
4. acquiring an original interface element configuration file corresponding to the layout identifier of the interface to be updated from a pre-created interface element configuration file set;
5. Modifying an attribute value corresponding to the shape attribute of a square icon corresponding to a camera in an original interface element configuration file from the square to be round to obtain an updated interface element configuration file, and taking the updated interface element configuration file as a target interface element configuration file;
6. and generating an interface by using the interface layout configuration file and the target interface element configuration file as shown in fig. 6.
The application also provides an interface generating device corresponding to the interface generating method. As shown in fig. 7, which shows a schematic view of a composition structure of an interface generating device of the present application, the device of the present embodiment may be applied to the aforementioned server, and the device may include:
an interface generation instruction receiving unit 160, configured to receive an interface generation instruction input by a user through a user interaction interface;
an interface generation parameter obtaining unit 110, configured to obtain, in response to the interface generation instruction, an interface generation parameter from the interface generation instruction, where the interface generation parameter at least includes: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
An interface layout configuration file obtaining unit 120, configured to obtain an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
a basic interface element configuration file obtaining unit 130, configured to obtain, from a pre-created interface element configuration file set, a basic interface element configuration file corresponding to the layout identifier of the interface to be generated;
a target interface element configuration file obtaining unit 140, configured to obtain a target interface element configuration file by using the key interface element information and the basic interface element configuration file;
and an interface generating unit 150, configured to generate an interface by using the interface layout configuration file and the target interface element configuration file.
The key interface element information related to the interface to be generated at least comprises: attribute names of key interface elements and attribute value constraint conditions corresponding to the key interface elements; the target interface element configuration file acquisition unit comprises:
the attribute value calculation unit is used for calculating an attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element;
the binding unit is used for binding the attribute names of the key interface elements with the attribute values corresponding to the attribute names of the key interface elements to obtain a key interface element configuration file;
And the combining unit is used for combining the key interface element configuration file and the basic interface element configuration file to obtain the target interface element configuration file.
The attribute value calculation unit includes:
the variable value determining unit is used for determining a variable value from attribute value constraint conditions corresponding to the key interface elements;
and the attribute value determining unit is used for determining the variable value as an attribute value corresponding to the attribute name of the key interface element.
The attribute value calculation unit includes:
the target interface determining unit is used for responding to the interface type selection instruction and determining a target interface corresponding to the attribute name of the key interface element selected by the user;
the target interface parameter determining unit is used for responding to the target interface parameter selection instruction and determining the target interface parameter selected by the user;
and the interface operation unit is used for calling the target interface, and performing interface operation by utilizing the target interface parameters to obtain an attribute value corresponding to the attribute name of the key interface element.
The attribute value calculation unit includes:
the target script determining unit is used for responding to the script configuration instruction and determining a target script configured by a user;
the loading unit is used for loading the target script into a script running environment;
And the target script execution unit is used for executing the target script to obtain an attribute value corresponding to the attribute name of the key interface element.
When the interface generation instruction includes an interface update instruction, the interface update instruction includes an interface update parameter, where the interface update parameter at least includes: layout identification of the interface to be updated and updated interface element information related to the interface to be updated;
the basic interface element configuration file acquisition unit comprises:
the original interface element configuration file acquisition unit is used for acquiring an original interface element configuration file corresponding to the layout identifier of the interface to be updated from a pre-created interface element configuration file set.
The target interface element configuration file acquisition unit comprises:
and the updating unit is used for updating the corresponding interface element information contained in the original interface element configuration file by utilizing the updated interface element information related to the interface to be updated to obtain an updated interface element configuration file, and taking the updated interface element configuration file as a target interface element configuration file.
In another aspect, the present application further provides a storage medium having stored therein computer executable instructions that, when loaded and executed by a processor, implement the interface generating method according to any of the above embodiments.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (16)

1. An interface generation method, characterized in that the method comprises:
receiving an interface generation instruction input by a user through a user interaction interface;
responding to the interface generation instruction, and acquiring interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
Obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
and generating an interface by using the interface layout configuration file and the target interface element configuration file.
2. The method of claim 1, wherein the key interface element information associated with the interface to be generated comprises at least: attribute names of key interface elements and attribute value constraint conditions corresponding to the key interface elements; the process for obtaining the target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file comprises the following steps:
calculating to obtain an attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element;
binding the attribute names of the key interface elements with the attribute values corresponding to the attribute names to obtain a key interface element configuration file;
and combining the key interface element configuration file and the basic interface element configuration file to obtain a target interface element configuration file.
3. The method according to claim 2, wherein the calculating the attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element comprises:
Determining a variable value from attribute value constraint conditions corresponding to the key interface elements;
and determining the variable value as an attribute value corresponding to the attribute name of the key interface element.
4. The method according to claim 2, wherein the calculating the attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element comprises:
responding to an interface type selection instruction, and determining a target interface corresponding to the attribute name of the key interface element selected by a user;
responding to a target interface parameter selection instruction, and determining target interface parameters selected by a user;
and calling the target interface, and performing interface operation by using the target interface parameters to obtain an attribute value corresponding to the attribute name of the key interface element.
5. The method according to claim 2, wherein the calculating the attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element comprises:
responding to the script configuration instruction, and determining a target script configured by a user;
Loading the target script into a script running environment;
and executing the target script to obtain an attribute value corresponding to the attribute name of the key interface element.
6. The method according to claim 1, wherein in the case that the interface generation instruction includes an interface update instruction, the interface update instruction includes an interface update parameter, and the interface update parameter includes at least: layout identification of the interface to be updated and updated interface element information related to the interface to be updated;
the process of obtaining the basic interface element configuration file corresponding to the layout identifier of the interface to be generated from the pre-created interface element configuration file set comprises the following steps:
and acquiring an original interface element configuration file corresponding to the layout identifier of the interface to be updated from a pre-created interface element configuration file set.
7. The method of claim 6, wherein the obtaining the target interface element profile using the key interface element information and the base interface element profile comprises:
and updating the corresponding interface element information contained in the original interface element configuration file by utilizing the updated interface element information related to the interface to be updated to obtain an updated interface element configuration file, and taking the updated interface element configuration file as a target interface element configuration file.
8. An interface generating device, the device comprising:
the interface generation instruction receiving unit is used for receiving an interface generation instruction input by a user through the user interaction interface;
the interface generation parameter obtaining unit is used for responding to the interface generation instruction and obtaining interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
an interface layout configuration file obtaining unit, configured to obtain an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
a basic interface element configuration file acquisition unit, configured to acquire a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
the target interface element configuration file acquisition unit is used for acquiring a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
and the interface generating unit is used for generating an interface by utilizing the interface layout configuration file and the target interface element configuration file.
9. The apparatus of claim 8, wherein the key interface element information associated with the interface to be generated comprises at least: attribute names of key interface elements and attribute value constraint conditions corresponding to the key interface elements; the target interface element configuration file acquisition unit comprises:
the attribute value calculation unit is used for calculating an attribute value corresponding to the attribute name of the key interface element according to the attribute name of the key interface element and the attribute value constraint condition corresponding to the key interface element;
the binding unit is used for binding the attribute names of the key interface elements with the attribute values corresponding to the attribute names of the key interface elements to obtain a key interface element configuration file;
and the combining unit is used for combining the key interface element configuration file and the basic interface element configuration file to obtain the target interface element configuration file.
10. The apparatus according to claim 9, wherein the attribute value calculation unit includes:
the variable value determining unit is used for determining a variable value from attribute value constraint conditions corresponding to the key interface elements;
and the attribute value determining unit is used for determining the variable value as an attribute value corresponding to the attribute name of the key interface element.
11. The apparatus according to claim 9, wherein the attribute value calculation unit includes:
the target interface determining unit is used for responding to the interface type selection instruction and determining a target interface corresponding to the attribute name of the key interface element selected by the user;
the target interface parameter determining unit is used for responding to the target interface parameter selection instruction and determining the target interface parameter selected by the user;
and the interface operation unit is used for calling the target interface, and performing interface operation by utilizing the target interface parameters to obtain an attribute value corresponding to the attribute name of the key interface element.
12. The apparatus according to claim 9, wherein the attribute value calculation unit includes:
the target script determining unit is used for responding to the script configuration instruction and determining a target script configured by a user;
the loading unit is used for loading the target script into a script running environment;
and the target script execution unit is used for executing the target script to obtain an attribute value corresponding to the attribute name of the key interface element.
13. The apparatus according to claim 8, wherein, in a case where the interface generation instruction includes an interface update instruction, the interface update instruction includes an interface update parameter, and the interface update parameter includes at least: layout identification of the interface to be updated and updated interface element information related to the interface to be updated;
The basic interface element configuration file acquisition unit comprises:
the original interface element configuration file acquisition unit is used for acquiring an original interface element configuration file corresponding to the layout identifier of the interface to be updated from a pre-created interface element configuration file set.
14. The apparatus of claim 13, wherein the target interface element profile acquisition unit comprises:
and the updating unit is used for updating the corresponding interface element information contained in the original interface element configuration file by utilizing the updated interface element information related to the interface to be updated to obtain an updated interface element configuration file, and taking the updated interface element configuration file as a target interface element configuration file.
15. A server, comprising:
a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for:
receiving an interface generation instruction input by a user through a user interaction interface;
responding to the interface generation instruction, and acquiring interface generation parameters from the interface generation instruction, wherein the interface generation parameters at least comprise: layout identification of the interface to be generated and key interface element information related to the interface to be generated;
Acquiring an interface layout configuration file corresponding to the layout identifier of the interface to be generated;
acquiring a basic interface element configuration file corresponding to the layout identifier of the interface to be generated from a pre-created interface element configuration file set;
obtaining a target interface element configuration file by utilizing the key interface element information and the basic interface element configuration file;
and generating an interface by using the interface layout configuration file and the target interface element configuration file.
16. A storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement the interface generation method of any of the preceding claims 1 to 7.
CN201910690503.9A 2019-07-29 2019-07-29 Interface generation method and device, server and storage medium Active CN112306486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910690503.9A CN112306486B (en) 2019-07-29 2019-07-29 Interface generation method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910690503.9A CN112306486B (en) 2019-07-29 2019-07-29 Interface generation method and device, server and storage medium

Publications (2)

Publication Number Publication Date
CN112306486A CN112306486A (en) 2021-02-02
CN112306486B true CN112306486B (en) 2023-09-22

Family

ID=74330080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910690503.9A Active CN112306486B (en) 2019-07-29 2019-07-29 Interface generation method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112306486B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860259B (en) * 2021-03-31 2024-02-06 中国工商银行股份有限公司 Interface processing method, device, electronic equipment and storage medium
CN113791783B (en) * 2021-09-14 2022-11-29 科东(广州)软件科技有限公司 Control generation method, device, equipment and storage medium
CN114995814B (en) * 2022-06-07 2023-03-28 重庆大学 Method and device for engineering intelligent view layout of application system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648666A (en) * 2016-12-23 2017-05-10 深圳市金证科技股份有限公司 User interface generating method and user interface generating system
CN107783762A (en) * 2017-11-24 2018-03-09 重庆金融资产交易所有限责任公司 Interface creating method, device, storage medium and computer equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648666A (en) * 2016-12-23 2017-05-10 深圳市金证科技股份有限公司 User interface generating method and user interface generating system
CN107783762A (en) * 2017-11-24 2018-03-09 重庆金融资产交易所有限责任公司 Interface creating method, device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN112306486A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN111552473B (en) Application processing method, device and equipment
CN109976761B (en) Software development kit generation method and device and terminal equipment
CN110764791B (en) Channel adaptation method and device for applet and electronic equipment
US7610545B2 (en) Annotations for tracking provenance
CN112306486B (en) Interface generation method and device, server and storage medium
CN110580147B (en) Application program development method and device
US20110167403A1 (en) Methods for platform-agnostic definitions and implementations of applications
US9524279B2 (en) Help document animated visualization
RU2459238C2 (en) Managed execution environment for software application interfacing
CN112631580B (en) Data processing method and device and computing equipment
CN110806868A (en) Single-page building and loading method
CN115309516A (en) Application life cycle detection method and device and computer equipment
CN116974620A (en) Application program generation method, operation method and corresponding device
US20240061993A1 (en) Multi-component abstract association and fusion method and apparatus in page design
Urbieta et al. A web-based model-driven platform for web augmentation
CN115328458B (en) Business application development method and device
CN115809056A (en) Component multiplexing implementation method and device, terminal equipment and readable storage medium
JP2021535474A (en) Navigation schema analysis and generation system and method
CN116028062A (en) Target code generation method, NPU instruction display method and device
CN114461960B (en) Page generation method, page display method and page display device
CN114281335A (en) View generation method and related equipment
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN112068895A (en) Code configuration method and device, video playing equipment and storage medium
CN113934959A (en) Program preview method and device, computer equipment and storage medium
Colombo-Mendoza et al. Alexandria: a visual tool for generating multi-device rich internet applications

Legal Events

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