CN115840608A - User interface creating method, device, equipment and storage medium - Google Patents

User interface creating method, device, equipment and storage medium Download PDF

Info

Publication number
CN115840608A
CN115840608A CN202111109789.0A CN202111109789A CN115840608A CN 115840608 A CN115840608 A CN 115840608A CN 202111109789 A CN202111109789 A CN 202111109789A CN 115840608 A CN115840608 A CN 115840608A
Authority
CN
China
Prior art keywords
interface
configuration file
control element
user interface
interface configuration
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.)
Pending
Application number
CN202111109789.0A
Other languages
Chinese (zh)
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.)
Hunan Weibu Information Technology Co ltd
Original Assignee
Hunan Weibu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Weibu Information Technology Co ltd filed Critical Hunan Weibu Information Technology Co ltd
Priority to CN202111109789.0A priority Critical patent/CN115840608A/en
Publication of CN115840608A publication Critical patent/CN115840608A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for creating a user interface, wherein the method comprises the following steps: receiving and responding to a user interface configuration instruction, wherein the user interface configuration instruction carries an interface identifier; acquiring an interface configuration file based on the interface identifier; analyzing the interface configuration file by adopting an anti-sequence algorithm, and determining interface control elements; and responding to the processing operation of the interface control element to generate a user interface. According to the technical scheme, the interface is created without writing or modifying codes, and the interface configuration file is analyzed only through the deserialization algorithm, so that the interface is generated quickly, the operation is simple and convenient, the operations such as dynamic loading and combination can be supported, and the interface creation flexibility is improved to a great extent.

Description

User interface creating method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for creating a user interface.
Background
With the continuous development of the big data age, more and more electronic devices can communicate or interact with each other through a network, and can be specifically realized through a user interface or configuration software. The user interface, as a physical or virtual medium through which the user interacts with the electronic device, can provide visually exposed services to the user, e.g., providing various types of data such as text, audio, video, fonts, images, and the like.
At present, in the related art, a user interface may be created by loading a resource file through a UIloader function in a Qt system, specifically, a resource file description needs to be created in the user interface file and associated with a class name of a designated Qt base control, however, the process is complicated, and the Qt system only supports configuration of a static user interface by default and does not support dynamic loading and combination, which results in poor interface creation flexibility.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a method, an apparatus, a device and a storage medium for creating a user interface.
In a first aspect, the present invention provides a method for creating a user interface, the method comprising:
receiving and responding to a user interface configuration instruction, wherein the user interface configuration instruction carries an interface identifier;
acquiring an interface configuration file based on the interface identifier;
analyzing the interface configuration file by adopting an anti-sequence algorithm, and determining interface control elements;
and responding to the processing operation of the interface control element to generate a user interface.
In one embodiment, the analyzing the interface configuration file by using an anti-sequence algorithm to determine the interface control element includes:
analyzing the interface configuration file by adopting an anti-sequence algorithm, and judging whether a component nesting structure is included;
and when the component nesting structure is included, determining the divider, the component container and the service component according to a preset analysis rule.
And generating an interface control element based on the divider, the component container and the business component.
In one embodiment, generating an interface control element based on the segmenter, the component container, and the business component includes:
acquiring attribute information corresponding to the divider, the component container and the service component;
and determining interface control elements based on the attribute information corresponding to the divider, the component container and the service components according to a preset interface control creating rule.
In one embodiment, prior to receiving and responding to the user interface configuration instruction, the method further comprises:
acquiring a control to be registered and attribute information corresponding to the control to be registered;
and registering the control to be registered and the attribute information corresponding to the control to be registered through a plug-in system in the Qt system.
In one embodiment, generating a user interface in response to the processing operation on the interface control element comprises:
responding to the selection and dragging operation of the interface control element, determining a target control element and displaying the target control element;
and performing combined processing operation on the target control elements to generate a user interface.
In one embodiment, determining a target control element and displaying the target control element in response to a selection and dragging operation on the interface control element includes:
responding to the selection and dragging operation of the interface control element, and determining the target control element and the position to be displayed of the target control element;
and calling a drawing function to display the target control element at the position to be displayed corresponding to the target control element according to the position to be displayed of the target control element.
In one embodiment, obtaining an interface configuration file based on the interface identifier includes:
sending an interface configuration file acquisition request carrying an interface identifier to a server to acquire an interface configuration file, wherein the interface configuration file is determined by the server according to the interface identifier after responding to the interface configuration file acquisition request; alternatively, the first and second electrodes may be,
and searching an interface configuration file corresponding to the interface identifier from a preset interface configuration file library according to the interface identifier.
In a second aspect, an embodiment of the present application provides an apparatus for creating a user interface, where the apparatus includes:
the instruction response module is used for receiving and responding to a user interface configuration instruction, and the user interface configuration instruction carries an interface identifier;
the file acquisition module is used for acquiring an interface configuration file based on the interface identifier;
the element determining module is used for analyzing the interface configuration file by adopting an anti-sequence algorithm and determining interface control elements;
and the interface generating module is used for responding to the processing operation of the interface control element and generating a user interface.
In a third aspect, an embodiment of the present application provides an apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for creating a user interface according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, the computer program being used to implement the method for creating a user interface according to the first aspect.
According to the method, the device, the equipment and the storage medium for creating the user interface, the user interface configuration instruction is received and responded, the user interface configuration instruction carries the interface identification, the interface configuration file is obtained based on the interface identification, then the interface configuration file is analyzed and processed by adopting an anti-sequence algorithm, the interface control element is determined, and the user interface is generated in response to the processing operation of the interface control element. Compared with the related technology, the technical scheme does not need to write or modify codes to create the interface, and only needs to analyze the interface configuration file through the deserialization algorithm, so that the interface is generated quickly, the operation is simple and easy, the operations such as dynamic loading and combination can be supported, and the interface creation flexibility is improved to a great extent.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a schematic structural diagram of an implementation environment of a method for creating a user interface according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for creating a user interface according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a method for determining interface control elements according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for creating a user interface according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a creating apparatus of a user interface provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a creating apparatus of a user interface provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
It can be understood that in the process of increasing mobile internet, more and more enterprises need to display and apply products or services through visual user interfaces. Currently, in the related art, a resource file is loaded or a code is written to create a user interface through a UIloader function in a Qt system, where the resource file may be, for example, an xx. The specific implementation process comprises the steps of abstracting and managing a plug-in system under the bottom layer of a desktop application framework, registering, loading, unloading and the like on components capable of being instantiated under the plug-in system, managing and initializing the components capable of being instantiated under the initialization of the desktop application framework, then dynamically creating windows and business components according to json configuration files cached locally or json configuration files issued by a background, and combining all business interfaces to be displayed on the windows. However, the scheme only supports the configuration of the static user interface, and because the Qt system defaults the mode of creating the user interface, the customized operations such as interface configurability, combinability and dragability of the user cannot be satisfied, so that the effect of the user interface of the old version can only be modified by updating the program, and the flexible and convenient dynamic configuration of the user interface cannot be realized.
It should be noted that Qt is a cross-platform C + + GUI application development framework, and can be used to develop both GUI programs and non-GUI programs. The system has excellent cross-platform characteristics, users can deploy on different operating systems and desktops by only once program development, and the system is more and more mainstream in application software development due to the object-oriented exquisite and rich API and a large number of development documents.
Based on the defects, the application provides a user interface creating method, compared with the related technology, the technical scheme does not need to write or modify codes to create the interface, and only needs to analyze the interface configuration file through an deserialization algorithm, so that the interface is quickly generated, the operations of dynamic loading, combination and the like can be supported, and the interface creating flexibility is improved to a great extent.
Fig. 1 is an implementation environment architecture diagram of a method for creating a user interface according to an embodiment of the present application. As shown in fig. 1, the implementation environment architecture includes: a terminal 100 and a server 200.
The terminal 100 may have a client running thereon, and the client may be one or more clients, for example, each of which may be of a different type. The client is used for sending an interface configuration file acquisition request to the server, receiving the interface configuration file sent by the server, analyzing the interface configuration file by adopting an anti-sequence algorithm, determining interface control elements, and generating a user interface in response to the processing operation on the interface control elements.
The Qt system can be installed on the terminal 100, can be used as a tool for secondary development, supports various operating systems, has a good encapsulation mechanism, is very high in modularization degree and good in reusability, and provides rich APIs.
The operating system may be, for example, a Microsoft Windows, linux, freeBSD, BSD, or OS system.
Optionally, the types of the terminal 100 may include, but are not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like, which is not particularly limited in this embodiment of the application.
The server 200 is configured to, when receiving an interface configuration file acquisition request sent by a client, respond to the interface configuration file acquisition request, acquire an interface configuration file corresponding to an interface identifier according to the interface identifier, and send the interface configuration file to the corresponding client.
Optionally, the server 200 may be configured on an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform, where the server cluster may be a plurality of servers.
The terminal 100 and the server 200 establish a communication connection through a wired or wireless network.
For convenience of understanding and explanation, a method, an apparatus, a device, and a storage medium for creating a user interface provided by an embodiment of the present application are described in detail below with reference to fig. 2 to 7.
Fig. 2 is a flowchart illustrating a method for creating a user interface according to an embodiment of the present application, where the method may be executed by a system for creating a user interface. As shown in fig. 2, the method includes:
s101, receiving and responding to a user interface configuration instruction, wherein the user interface configuration instruction carries an interface identifier.
It should be noted that the Qt system may use a plug-in system to perform system registration on all instantiated Qt classes or custom classes under the desktop application framework, so that the Qt system has the capability of dynamically creating service components and interfaces, and may abstract and manage the plug-in system at the bottom layer of the desktop application framework, and perform management initialization on the instantiated components under the initialization of the desktop application framework.
Specifically, the control to be registered and the attribute information corresponding to the control to be registered are obtained and processed into a Qt class, and then the control to be registered and the attribute information corresponding to the plug-in to be registered are registered through a plug-in system in the Qt class. The control to be registered and the attribute information corresponding to the control to be registered are designed and determined on the terminal in advance by a designer according to actual requirements.
Optionally, the control to be registered may include a content control, an entry control, a text control, and a scope control according to the application, where the content control may be, for example, a button, the entry control may be, for example, a tab TabControl and a status bar control StatusBar, and the text control may be, for example, a text box TextBox, a Rich TextBox, a PasswordBox, and the like. The attribute information corresponding to the control to be registered refers to the basic attribute corresponding to the control to be registered.
In this step, when a user needs to create a user interface, an interface creation operation may be triggered at the client to generate a user interface configuration instruction, so as to receive and respond to the user interface configuration instruction, where the user interface configuration instruction carries an interface identifier.
S102, acquiring an interface configuration file based on the interface identifier.
Specifically, the designer may determine the interface configuration file in advance according to actual requirements by self-definition, and then send the interface configuration file to the server for storage, or store the interface configuration file locally in the client to the interface configuration file library.
As an implementation manner, after the client receives and responds to the user interface configuration instruction, an interface configuration file acquisition request carrying an interface identifier may be sent to the server, where the interface configuration file acquisition request carries the interface identifier, and the server responds to the interface configuration file acquisition request, determines an interface configuration file according to the interface identifier and sends the interface configuration file to the client, so that the client acquires the interface configuration file corresponding to the interface identifier. The client sends an interface configuration file acquisition request to the server through the interface or receives the interface configuration file sent by the server. The interface may be, for example, an http interface.
As another implementation manner, after receiving and responding to the user interface configuration instruction, the client searches for an interface configuration file corresponding to the interface identifier from a preset interface configuration file library according to the interface identifier, where the preset interface configuration file may be stored in the cache resource folder.
Optionally, the interface configuration file may be a json format file or an xml format file.
In the embodiment, the interface configuration file can be acquired under the local cache resource folder of the client, and can also be issued according to the background server, so that the user interface can be dynamically created according to the favorite service interface or layout of the user.
S103, analyzing the interface configuration file by adopting an anti-sequence algorithm, and determining interface control elements.
Specifically, after the interface configuration file is obtained, the interface configuration file can be analyzed by adopting an anti-sequence algorithm based on a Qt system, and the interface control element is determined. The serialization processing is a process of converting an object into a byte sequence, and the deserialization processing is a process of restoring the byte sequence to the object.
In the embodiment, the interface configuration file is analyzed, and the object can be reconstructed through deserialization according to the object state and the description information stored in the byte stream, so that the integrity and the transferability of the object are ensured.
Optionally, on the basis of the foregoing embodiment, as an optional implementation manner, as shown in fig. 3, fig. 3 is a schematic flow diagram of a method for analyzing and processing an interface configuration file according to an embodiment of the present application, where the method includes:
s201, analyzing the interface configuration file by adopting an anti-sequence algorithm, and judging whether a component nested structure is included.
S202, when the component nesting structure is included, the divider, the component container and the business component are determined according to a preset analysis rule.
S203, generating an interface control element based on the divider, the component container and the business component.
In this embodiment, after the interface configuration file is obtained, whether the component nesting structure is included can be judged, and when the component nesting structure is included, the splitter, the component container and the service component are determined according to a preset analysis rule; when the component nesting structure is not included, the segmenter, the component container and the business component can be directly determined. The preset analysis rule may be, for example, from the outer layer to the inner layer, and the interface elements from the outer layer to the inner layer are the divider QSplitter, the component container, and the service component, respectively. And then acquiring attribute information corresponding to the divider, the component container and the service component, and determining interface control elements based on the attribute information corresponding to the divider, the component container and the service component according to a preset interface control creation rule.
It can be understood that the segmenter is used for segmenting the interface, and the corresponding attribute information includes the index and the stretching ratio of the child control; the component container is used for accommodating at least one business component, and the corresponding attribute information can comprise height, width, background color, blank area and the like; the business components are used for constructing interface control elements to generate the user interface, and the business components can be buttons, textboxes, text description tables, check boxes, drop-down boxes, and the like.
Wherein, the button attribute information may include an anchor: lock button distance from window position, autosize: automatically adjusting the size according to the content in the button, maximum size: maximum pull size, minmumsize: minimum pull size, visiable: hidden button, name: button name, text: the button displays a name. The attribute information of the textbox control may include: hide selection: whether the selected content is continuously selected when the focus disappears, max length: maximum input length, multiline: whether it is multiline, passWordchar: password character style, textalign: and aligning the characters.
Illustratively, the following json format interface configuration file can be obtained, and the contents of the json format can be shown as follows:
Figure BDA0003273272010000091
it should be noted that the json format includes a custom class, and the interface control element includes a component category, a component name, a direction orientation, and a size, where the content corresponding to the direction is vertical, and the content corresponding to the size is 337. Orientation represents whether the component container is split horizontally or vertically, and size represents the size of the reduction component.
The following is a corresponding custom class of another part of json format, and the interface configuration file of the json format is as follows:
Figure BDA0003273272010000092
Figure BDA0003273272010000101
it should be noted that the interface control element includes a component type, a component name, a direction orientation, and a size, where the content corresponding to the direction is vertical, and the content corresponding to the size is 420.
In the embodiment, the interface control element can be accurately acquired by adopting the analysis rule from the outer layer to the inner layer.
And S104, responding to the processing operation of the interface control element, and generating the user interface.
In this step, after the interface control element is determined, the user can drag the interface control element, so that the client responds to the selection and drag operation of the interface control element, determines the target control element and displays the target control element, the target control element and the position to be displayed of the target control element can be determined first, then the drawing function is called to display the target control element at the position to be displayed corresponding to the target control element according to the position to be displayed of the target control element, and then the target control element is combined according to actual requirements, so as to generate the user interface.
Optionally, the interface control element may be dragged by using a qdockwdge widget.
For example, as shown in fig. 4, a control to be registered and attribute information corresponding to the control to be registered may be registered by a plug-in system in a Qt system in a plug-in registration manner, so that the Qt system has a capability of dynamically creating a service component and an interface, a designer may configure an interface configuration file in a json format in a client in advance and store the interface configuration file in a local interface configuration file library, or may send the interface configuration file in the json format to a server, and when receiving and responding to a user interface configuration instruction, obtain the interface configuration file based on an interface identifier, where the interface configuration file may be obtained by sending an interface configuration file obtaining instruction to the server, or may be obtained by finding a corresponding interface configuration file from the local interface configuration file library according to the interface identifier, and then analyze and process the interface configuration file by using an anti-sequence algorithm at the client, determine an interface control element, thereby display the interface control element in a window, and respond to a processing operation on the interface control element, perform free combination processing on the interface element, thereby generating a corresponding user interface.
In the method for creating a user interface provided in this embodiment, a user interface configuration instruction is received and responded, the user interface configuration instruction carries an interface identifier, an interface configuration file is obtained based on the interface identifier, then the interface configuration file is analyzed and processed by using an anti-sequence algorithm, an interface control element is determined, and a user interface is generated in response to a processing operation on the interface control element. Compared with the related technology, the technical scheme does not need to write or modify codes to create the interface, and only needs to analyze the interface configuration file through the deserialization algorithm, so that the interface is generated quickly, the operation is simple and easy, the operations such as dynamic loading and combination can be supported, and the interface creation flexibility is improved to a great extent.
It should be noted that while the operations of the method of the present invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
On the other hand, please continue to refer to fig. 5, an embodiment of the present application provides a device for creating a user interface. The apparatus may include:
the instruction response module 10 is configured to receive and respond to a user interface configuration instruction, where the user interface configuration instruction carries an interface identifier;
the file acquisition module 20 is configured to acquire an interface configuration file based on the interface identifier;
the element determining module 30 is configured to analyze the interface configuration file by using an anti-sequence algorithm, and determine interface control elements;
and the interface generating module 40 is used for responding to the processing operation of the interface control element and generating the user interface.
Optionally, referring to fig. 6, the element determining module 30 includes:
the analysis unit 301 is configured to analyze the interface configuration file by using an anti-sequence algorithm, and determine whether a component nesting structure is included;
a determining unit 302, configured to determine, when a component nesting structure is included, a splitter, a component container, and a service component according to a preset parsing rule.
And a generating unit 303, configured to generate an interface control element based on the splitter, the component container, and the service component.
Optionally, the generating unit 303 is specifically configured to:
acquiring attribute information corresponding to the divider, the component container and the service component;
and determining interface control elements based on attribute information corresponding to the divider, the component container and the service component according to a preset interface control creating rule.
Optionally, the apparatus is further configured to:
acquiring a control to be registered and attribute information corresponding to the control to be registered;
and registering the control to be registered and the attribute information corresponding to the control to be registered through a plug-in system in the Qt system.
Optionally, the interface generating module 40 is specifically configured to:
responding to the selection and dragging operation of the interface control element, determining a target control element and displaying the target control element;
and carrying out combined processing operation on the target control elements to generate a user interface.
Optionally, the interface generating module 40 is specifically configured to:
responding to the selection and dragging operation of the interface control element, and determining a target control element and a position to be displayed of the target control element;
and calling a drawing function to display the target control element at the position to be displayed corresponding to the target control element according to the position to be displayed of the target control element.
Optionally, the instruction response module 10 is specifically configured to:
sending an interface configuration file acquisition request carrying an interface identifier to a server to acquire an interface configuration file, wherein the interface configuration file is determined by the server according to the interface identifier after responding to the interface configuration file acquisition request; alternatively, the first and second electrodes may be,
and searching an interface configuration file corresponding to the interface identifier from a preset interface configuration file library according to the interface identifier.
The user interface creating device provided by the embodiment of the application receives and responds to a user interface configuration instruction through the instruction response module, the user interface configuration instruction carries an interface identifier, the file acquisition module acquires an interface configuration file based on the interface identifier, the element determination module analyzes and processes the interface configuration file by adopting an anti-sequence algorithm to determine an interface control element, and the interface generation module responds to processing operation on the interface control element to generate a user interface. Compared with the related technology, the technical scheme does not need to write or modify codes to create the interface, and only needs to analyze the interface configuration file through the deserialization algorithm, so that the interface is generated quickly, the operation is simple and easy, the operations such as dynamic loading and combination can be supported, and the interface creation flexibility is improved to a great extent.
On the other hand, the terminal device provided by the embodiment of the present application includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the method for creating the user interface as described above.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a computer system of a server according to an embodiment of the present application.
As shown in fig. 7, the computer system 600 includes a Central Processing Unit (CPU) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 603 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to embodiments of the present application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 603, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor, comprising: the device comprises an instruction response module, a file acquisition module, an element determination module and an interface generation module. The names of the units or modules do not form a limitation on the units or modules themselves in some cases, for example, the command response module may also be described as "configured to receive and respond to a user interface configuration command, where the user interface configuration command carries an interface identifier".
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may be separate and not incorporated into the electronic device. The computer-readable storage medium stores one or more programs that, when executed by one or more processors, perform the method for creating a user interface described in the present application:
receiving and responding to a user interface configuration instruction, wherein the user interface configuration instruction carries an interface identifier;
acquiring an interface configuration file based on the interface identifier;
analyzing the interface configuration file by adopting an anti-sequence algorithm, and determining interface control elements;
and responding to the processing operation of the interface control element to generate a user interface.
To sum up, the method, the apparatus, the device, and the storage medium for creating a user interface provided in the embodiments of the present application receive and respond to a user interface configuration instruction, where the user interface configuration instruction carries an interface identifier, acquire an interface configuration file based on the interface identifier, then analyze and process the interface configuration file by using an anti-sequence algorithm, determine an interface control element, and generate a user interface in response to a processing operation on the interface control element. Compared with the related technology, the technical scheme does not need to write or modify codes to create the interface, and only needs to analyze the interface configuration file through the deserialization algorithm, so that the interface is generated quickly, the operation is simple and easy, the operations such as dynamic loading and combination can be supported, and the interface creation flexibility is improved to a great extent.
The foregoing description is only exemplary of the preferred embodiments of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A method for creating a user interface, the method comprising:
receiving and responding to a user interface configuration instruction, wherein the user interface configuration instruction carries an interface identifier;
acquiring an interface configuration file based on the interface identifier;
analyzing the interface configuration file by adopting an anti-sequence algorithm, and determining interface control elements;
and responding to the processing operation of the interface control element to generate a user interface.
2. The method of claim 1, wherein parsing the interface configuration file using an anti-sequence algorithm to determine interface control elements comprises:
analyzing the interface configuration file by adopting an anti-sequence algorithm, and judging whether a component nesting structure is included;
when the component nesting structure is included, determining a divider, a component container and a service component according to a preset analysis rule;
and generating an interface control element based on the divider, the component container and the business component.
3. The method of claim 2, wherein generating an interface control element based on the segmenter, the component container, and the business component comprises:
acquiring attribute information corresponding to the divider, the component container and the service component;
and according to a preset interface control creating rule, determining interface control elements based on the attribute information corresponding to the divider, the component container and the business component.
4. The method of claim 1, wherein prior to receiving and responding to user interface configuration instructions, the method further comprises:
acquiring a control to be registered and attribute information corresponding to the control to be registered;
and registering the control to be registered and the attribute information corresponding to the control to be registered through a plug-in system in the Qt system.
5. The method of claim 1, wherein generating a user interface in response to the processing operation on the interface control element comprises:
responding to the selection and dragging operation of the interface control element, determining a target control element and displaying the target control element;
and performing combined processing operation on the target control elements to generate a user interface.
6. The method of claim 5, wherein determining a target control element and displaying the target control element in response to a selection drag operation on the interface control element comprises:
responding to the selection and dragging operation of the interface control element, and determining the target control element and the position to be displayed of the target control element;
and calling a drawing function to display the target control element at the position to be displayed corresponding to the target control element according to the position to be displayed of the target control element.
7. The method of claim 1, wherein obtaining an interface configuration file based on the interface identifier comprises:
sending an interface configuration file acquisition request carrying an interface identifier to a server to acquire an interface configuration file, wherein the interface configuration file is determined by the server according to the interface identifier after responding to the interface configuration file acquisition request; alternatively, the first and second electrodes may be,
and searching an interface configuration file corresponding to the interface identifier from a preset interface configuration file library according to the interface identifier.
8. An apparatus for creating a user interface, characterized in that,
the instruction response module is used for receiving and responding to a user interface configuration instruction, and the user interface configuration instruction carries an interface identifier;
the file acquisition module is used for acquiring an interface configuration file based on the interface identifier;
the element determining module is used for analyzing the interface configuration file by adopting an anti-sequence algorithm and determining interface control elements;
and the interface generating module is used for responding to the processing operation of the interface control element and generating a user interface.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method of creating a user interface according to any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium on which a computer program for implementing the method of creating a user interface according to any one of claims 1-7 is stored.
CN202111109789.0A 2021-09-22 2021-09-22 User interface creating method, device, equipment and storage medium Pending CN115840608A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111109789.0A CN115840608A (en) 2021-09-22 2021-09-22 User interface creating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111109789.0A CN115840608A (en) 2021-09-22 2021-09-22 User interface creating method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115840608A true CN115840608A (en) 2023-03-24

Family

ID=85574412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111109789.0A Pending CN115840608A (en) 2021-09-22 2021-09-22 User interface creating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115840608A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107686A (en) * 2023-04-13 2023-05-12 福建自贸试验区厦门片区Manteia数据科技有限公司 Interface processing method and device of medical software, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107686A (en) * 2023-04-13 2023-05-12 福建自贸试验区厦门片区Manteia数据科技有限公司 Interface processing method and device of medical software, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US11966409B2 (en) Extensible attributes for data warehouses
CN110109670B (en) Method and device for processing view list data, electronic equipment and storage medium
US20130117652A1 (en) Techniques to generate custom electronic forms
US20090085921A1 (en) Populate Web-Based Content Based on Space Availability
WO2023040443A1 (en) Method and device for drawing canvas
CN113031946A (en) Method and device for rendering page component
CN109582317B (en) Method and apparatus for debugging hosted applications
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
CN110795649A (en) Target page display method, device and system and electronic equipment
WO2023077951A1 (en) Data rendering method and apparatus
CN113158101A (en) Visual page rendering method, device, equipment and storage medium
CN113805973A (en) Application program control method and device and application program development method and device
CN111506300A (en) Applet generation method, device, equipment and storage medium
CN115982491A (en) Page updating method and device, electronic equipment and computer readable storage medium
CN115840608A (en) User interface creating method, device, equipment and storage medium
US9721038B1 (en) Collaborative data visualization
CN107330087B (en) Page file generation method and device
CN114756228A (en) Page processing method, device, equipment and storage medium
CN112486482A (en) Page display method and device
CN113342450B (en) Page processing method, device, electronic equipment and computer readable medium
CN116010736A (en) Vector icon processing method, device, equipment and storage medium
CN113553123B (en) Data processing method, device, electronic equipment and storage medium
US20220405064A1 (en) Robotic process automation
CN113656041A (en) Data processing method, device, equipment and storage medium
CN113986258A (en) Service publishing method, device, equipment and storage medium

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