CN113064594B - Method and system for automatically generating UI (user interface) - Google Patents

Method and system for automatically generating UI (user interface) Download PDF

Info

Publication number
CN113064594B
CN113064594B CN202110494827.2A CN202110494827A CN113064594B CN 113064594 B CN113064594 B CN 113064594B CN 202110494827 A CN202110494827 A CN 202110494827A CN 113064594 B CN113064594 B CN 113064594B
Authority
CN
China
Prior art keywords
data
event
unit
yes
creation
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
CN202110494827.2A
Other languages
Chinese (zh)
Other versions
CN113064594A (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.)
Fujian Tianqing Online Interactive Technology Co Ltd
Original Assignee
Fujian Tianqing Online Interactive 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 Fujian Tianqing Online Interactive Technology Co Ltd filed Critical Fujian Tianqing Online Interactive Technology Co Ltd
Priority to CN202110494827.2A priority Critical patent/CN113064594B/en
Publication of CN113064594A publication Critical patent/CN113064594A/en
Application granted granted Critical
Publication of CN113064594B publication Critical patent/CN113064594B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The invention provides a method for automatically generating a UI interface, which comprises the following steps: s1, inputting UI panel creation data, extracting interface generation required data from the split assembly UI data, selecting a parser or an expansion processor to generate an interface according to the data type, and registering the interface to UI interaction; step S2, judging whether data conversion is needed, if yes, performing data conversion through data processing, and if not, distributing the data; s3, waiting for UI user interaction, and processing the UI data; step S4, judging whether to start an event of closing the UI interface, if yes, stopping, otherwise, continuing to wait for UI interface user interaction; the invention generates a unified universal UI data structure based on Json, and then generates a UI interface through UI data analysis.

Description

Method and system for automatically generating UI (user interface)
Technical Field
The invention relates to the technical field of UI interaction interface generation, in particular to a method and a system for automatically generating a UI interface.
Background
In the prior art, UI interface generation only supports the preset generation of interfaces (an interface is generated by inputting a Json), and the invention supports dynamic generation of interfaces without pre-configuration; in the prior art, only preset UI components are supported, and the method is not limited by the preset components to support the user-defined expansion UI components; the universality of the prior art is low, and the system only supports the use in a preset mode, is not limited by a preset environment, and can be universally used for any platform, development engine and the like; the prior art has no complete UI interaction processing system, does not support processing of custom events, only supports processing of preset events, has more skin-changing functions, focuses on the whole process of UI interaction, meets the requirements of various UI interactions, and is suitable for various UI use environments; therefore, the prior art has high limitation on interface generation, is generally only aimed at a certain functional interface, is difficult to expand and cannot be widely used.
Disclosure of Invention
In order to overcome the problems, the invention aims to provide a method for automatically generating a UI interface, which is used for generating a unified universal UI data structure based on Json and then generating the UI interface through UI data analysis.
The invention is realized by adopting the following scheme: a method of automatically generating a UI interface, the method comprising the steps of:
s1, inputting UI panel creation data, extracting interface generation required data from the split assembly UI data, selecting a parser or an expansion processor to generate an interface according to the data type, and registering the interface to UI interaction;
step S2, judging whether data conversion is needed, if yes, performing data conversion through data processing, and if not, distributing the data;
s3, waiting for UI user interaction, and processing the UI data;
and S4, judging whether to start an event of closing the UI interface, if so, stopping, otherwise, continuing to wait for UI interface user interaction.
Further, the step S1 further includes the following steps:
step S11, inputting UI data and a registration event;
step S12, analyzing the data type in the UI data;
step S13, judging whether the UI data type of the parser is contained, if yes, forwarding the UI data to the parser, if not, judging whether an expansion processor of the UI data is contained, if yes, forwarding the UI data to the expansion processor, if not, returning to the creation failure exception, and stopping;
step S14, creating a data processing controller and forwarding the registration event to the UI event processing;
step S15, the data processor is forwarded to a parser or an expansion processor to perform UI creation processing, and an interface is generated based on UI data;
step S16, in the process of monitoring the UI event by the added event, returning to the UI root node;
step S17, recording the UI root node and other caches in the data processing controller;
and S18, finishing the creation of the UI interface and returning to the data processing controller, and stopping.
Further, the data processing in the step S2 further includes the following steps:
s21, inputting data and judging the input type of the data;
step S22, judging whether the data is Json data, if so, identifying the Json data as a Json instance type; if not, judging whether the path is a Json file path, if yes, reading Json data in the file, and if not, stopping;
step S23, creating new UI data, and filling basic data in the Json data into corresponding field values in the UI data;
step S24, filling data without matching fields into an expansion field queue of the UI data, judging whether the data is root node data, and if so, recording the data as the root node UI data; if not, adding the UI data into the child data of the UI data of the father node;
and S25, judging whether the Json data contains sub data, if yes, returning to create new UI data, otherwise, returning to the created root node UI data, and stopping.
Further, the data distribution in the step S2 further specifically includes the following steps:
s26, inputting UI panel creation data and judging the type of the input data;
step S27, judging whether the Json data is the Json data, if so, converting the Json data into UI data; if not, judging whether the file is a Json file path, if yes, reading the file and converting the read Json data into UI data, if not, judging whether the file is a UI data type, if yes, analyzing the UI data, and if not, stopping;
step S28, analyzing the UI data, transmitting the UI data and the registration event to UI creation processing, returning the UI creation processing to the UI controller, and recording the UI controller;
step S29, judging whether the data is root node data, if yes, the recording controller is a panel controller; if not, adding the controller into a child controller set of the parent node controller;
step S30, judging whether the UI data contains sub item data, if yes, transmitting the UI data and the registration time to UI creation processing; and if not, finishing the creation of the return UI panel controller and stopping.
Further, the step S3 further specifically includes the following steps:
step S31, the UI interaction interface user performs interaction, judges whether the interaction is a data storage event, if yes, judges whether a triggering event of data storage is recorded in the data processing controller, if yes, acquires the data of the UI panel, iteratively acquires the data of all sub-controls, generates complete data, executes the recorded data storage triggering event, transmits the generated completion data, and stops; if not, judging that the event is invalid;
step S32, judging whether the data is a data saving event, if not, judging whether the data is a data restoring event, if yes, applying initial data in the process of creation to a UI interface, and if not, judging whether the data is a data changing event;
step S33, judging whether a triggering event of data change is recorded in the data processing controller, if yes, executing the recorded triggering event of data change and transmitting the restored data; if not, stopping;
step S34, judging whether the event is a data change event, if so, judging whether a monitoring event for registering the change data exists; if not, judging whether the registered expansion event exists;
step S35, judging whether a registered expansion event exists, if yes, executing the registered expansion event, and transmitting current trigger data; if not, judging that the event is invalid;
step S36, judging whether a monitoring event for registering the change data exists, if yes, executing the registered monitoring event for the change data to transmit the change data, otherwise, judging whether a triggering event for data change is recorded in the data processing controller;
step S37, judging whether a triggering event of data change is recorded in the data processing controller, if yes, acquiring the data of the UI panel, iteratively acquiring the data of all sub-controls, generating complete data, executing the recorded data change triggering event, transmitting the generated complete data, and stopping; and if not, stopping.
The invention also provides a system for automatically generating the UI interface, which comprises a data distribution module, a data processing module, a UI creation module and a UI interaction event module; the UI creation module inputs UI panel creation data, extracts data required by interface generation from the split assembly UI data, selects a parser or an expansion processor according to the data type to generate the interface, and registers the interface to UI interaction; the data distribution module and the data processing module judge whether data conversion is needed or not, if yes, the data conversion is carried out through the data processing module, and if not, the data is distributed through the data distribution module; the UI interaction event module waits for UI interface user interaction and processes the UI data; judging whether to start the event of closing the UI interface, if so, stopping, otherwise, continuing to wait for the UI interface user interaction.
Further, the UI creation module further specifically includes: the device comprises an input unit, an analysis unit, a parser unit, a creation unit, a forwarding unit, an adding unit, a recording unit and a return unit; the input unit inputs UI data and registration events; the analyzing unit analyzes the data type in the UI data; the analyzer unit judges whether the UI data type of the UI data is contained in the analyzer, if yes, the UI data is forwarded to the analyzer, if not, whether the UI data is contained in an expansion processor of the UI data is judged, if yes, the UI data is forwarded to the expansion processor, if not, the creation failure abnormality is returned, and the UI data is stopped; the creation unit, namely a creation data processing controller, forwards the registration event to the UI event processing; the forwarding unit forwards the data processor to the parser or the expansion processor for UI creation processing, and generates an interface based on UI data; the adding unit returns to the UI root node in the UI event processing process of the adding event monitoring; the recording unit records the UI root node and other caches in the data processing controller; and the return unit finishes the creation of the UI interface and returns to the data processing controller, and stops.
Further, the data processing module further includes: the device comprises a judging type unit, a data judging unit, a filling unit, a root node unit and a sub-data unit; the judging type unit is used for inputting data and judging the input type of the data; the data judging unit judges whether the data is Json data or not, if yes, the Json data is identified as Json instance type; if not, judging whether the path is a Json file path, if yes, reading Json data in the file, and if not, stopping; the filling unit creates new UI data and fills the basic data in the Json data into the corresponding field values in the UI data; the root node unit fills the data without the matching field into an expansion field queue of the UI data, judges whether the data is the root node data, and records the data as the root node UI data if the data is the root node data; if not, adding the UI data into the child data of the UI data of the father node; and the sub data unit judges whether the Json data contains sub data or not, if yes, a new UI data is created, if not, the created root node UI data is returned, and the stopping is carried out.
Further, the data distribution module further includes: the system comprises a creation unit, a judgment data unit, an analysis data unit, a judgment root node unit and a sub item data unit; the creation unit inputs UI panel creation data and judges the type of the input data; the judging data unit judges whether the data unit is Json data or not, if yes, the Json data is converted into UI data; if not, judging whether the file is a Json file path, if yes, reading the file and converting the read Json data into UI data, if not, judging whether the file is a UI data type, if yes, analyzing the UI data, and if not, stopping; the analysis data unit analyzes UI data, transmits the UI data and the registration event to the UI creation process, and returns the UI creation process to the UI controller to record the UI controller; the judging root node unit judges whether the root node unit is root node data or not, if yes, the recording controller is a panel controller; if not, adding the controller into a child controller set of the parent node controller; the sub item data unit judges whether the UI data contains the sub item data, if yes, the UI data and the registration time are transmitted to the UI creation process; and if not, finishing the creation of the return UI panel controller and stopping.
Further, the UI interaction event module further specifically includes: the system comprises an interaction unit, a data storage unit, a data processing unit, a data changing unit, an expanding unit, a monitoring event unit and a generating unit; the interaction unit, namely a UI interaction interface user carries out interaction, judges whether the interaction is a data storage event, if yes, judges whether a triggering event of data storage is recorded in the data processing controller, if yes, acquires the data of the UI panel, iteratively acquires the data of all sub-controls, generates complete data, executes the recorded data storage triggering event, transmits the generated completion data and stops; if not, judging that the event is invalid; the data storage unit judges whether the data storage event is a data restoration event or not, if not, judges whether the data restoration event is a data restoration event, if yes, initial data in the process of creation is applied to the UI interface, and if not, judges whether the data restoration event is a data change event; the data processing unit judges whether a triggering event of data change is recorded in the data processing controller, if yes, the recorded data change triggering event is executed, and restored data is transmitted; if not, stopping; the data changing unit judges whether the data changing event is a data changing event, if yes, judges whether a monitoring event for registering the changed data exists; if not, judging whether the registered expansion event exists; the expansion unit judges whether the registered expansion event is judged, if yes, the registered expansion event is executed, and the current trigger data is transmitted; if not, judging that the event is invalid; the monitoring event unit is used for judging whether a monitoring event for registering the change data exists or not, if yes, executing the registered monitoring event for the change data to transmit the change data, and if not, judging whether a triggering event for data change is recorded in the data processing controller; the generating unit judges whether a triggering event of data change is recorded in the data processing controller, if yes, the data of the UI panel is obtained, the data of all sub-controls are obtained in an iterative mode, complete data are generated, the recorded data change triggering event is executed, the generated complete data are transmitted, and the data are stopped; and if not, stopping.
The invention has the beneficial effects that: according to the invention, json data are converted into unified universal UI data, automatic generation of a UI interface is realized through the UI data, and a complete UI interaction flow is realized through a UI interaction event module; according to the invention, through Json data or a dynamically constructed universal UI data generation interface, UI production and development consumption are reduced, UI development period is shortened, and development progress is accelerated; the UI interface produced by the method has a uniform style, fewer interface files and codes, is easier to maintain, and has lower later maintenance cost; the UI interaction event module provides a basic event, supports expansion of a user-defined event and can meet the requirements of various application scenes.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
Fig. 2 is a system schematic block diagram of the present invention.
Fig. 3 is a flow diagram of a UI creation module.
FIG. 4 is a block flow diagram of a data processing module.
Fig. 5 is a flow diagram of a data distribution module.
FIG. 6 is a flow diagram of a UI interaction event module.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, a method for automatically generating a UI according to the present invention includes the following steps:
s1, inputting UI panel creation data, extracting interface generation required data from the split assembly UI data, selecting a parser or an expansion processor to generate an interface according to the data type, and registering the interface to UI interaction;
step S2, judging whether data conversion is needed, if yes, performing data conversion through data processing, and if not, distributing the data;
s3, waiting for UI user interaction, and processing the UI data;
and S4, judging whether to start an event of closing the UI interface, if so, stopping, otherwise, continuing to wait for UI interface user interaction.
The invention is further illustrated by the following examples:
referring to fig. 5, a data distribution module;
the module is a main entrance of the invention, and the data processing module is called to convert the effective data in the data created by the UI panel through extracting the effective data, so that the UI data and other registration events are distributed and transmitted to the UI creation module, and the UI creation process is realized.
Valid data definition: the incoming data may contain empty data, unrecognizable data, which we filter, the rest of the data being considered valid data.
Referring to fig. 4, a data processing module;
the module provides data conversion capability for the data distribution module, and enables Json data or Json file paths to be converted into unified UI data.
Referring to fig. 3, a UI creation module;
the module is a core UI generation process, extracts data required by interface generation from the split component UI data, and further selects a parser or an expansion processor to generate an interface according to the data type and registers an event to the UI interaction event module.
Definition of split component UI data: in the data distribution module, one complete UI data is split into a plurality of sub-component UI data for distribution, and each sub-component UI data corresponds to one generation control.
The required data defines: the UI component generates expansion parameter data required to be used in the UI interaction triggering events such as interface configuration data such as interface width and height, numerical change button clicking and the like.
Data type definition: each UI data contains a Type field to describe the corresponding component Type, and each component contains a Type field to be correspondingly matched with the corresponding component.
Referring to FIG. 6, a UI interaction event module;
the module realizes that the created UI interface provides UI interaction capability to realize the processing process of events such as data storage events, data restoration events, data change events, expansion events and the like, and the whole UI interaction requirement is completed.
Event registration and trigger flow definition: in the generated UI interface, we register an event for each interactive UI control (button, input box, option, etc.), for example, when the event registered by the button is a data saving event, the button is clicked to trigger the data saving event.
In a word, the invention generates a unified universal UI data structure based on Json, and then generates a UI interface through UI data analysis. And triggering processing events when receiving the UI interaction instruction, so as to realize a complete UI interaction system.
Referring to fig. 2, the invention also provides a system for automatically generating a UI interface, which comprises a data distribution module, a data processing module, a UI creation module and a UI interaction event module; the UI creation module inputs UI panel creation data, extracts data required by interface generation from the split assembly UI data, selects a parser or an expansion processor according to the data type to generate the interface, and registers the interface to UI interaction; the data distribution module and the data processing module judge whether data conversion is needed or not, if yes, the data conversion is carried out through the data processing module, and if not, the data is distributed through the data distribution module; the UI interaction event module waits for UI interface user interaction and processes the UI data; judging whether to start the event of closing the UI interface, if so, stopping, otherwise, continuing to wait for the UI interface user interaction.
Referring to fig. 3, the UI creation module further specifically includes: the device comprises an input unit, an analysis unit, a parser unit, a creation unit, a forwarding unit, an adding unit, a recording unit and a return unit; the input unit inputs UI data and registration events; the analyzing unit analyzes the data type in the UI data; the analyzer unit judges whether the UI data type of the UI data is contained in the analyzer, if yes, the UI data is forwarded to the analyzer, if not, whether the UI data is contained in an expansion processor of the UI data is judged, if yes, the UI data is forwarded to the expansion processor, if not, the creation failure abnormality is returned, and the UI data is stopped; the creation unit, namely a creation data processing controller, forwards the registration event to the UI event processing; the forwarding unit forwards the data processor to the parser or the expansion processor for UI creation processing, and generates an interface based on UI data; the adding unit returns to the UI root node in the UI event processing process of the adding event monitoring; the recording unit records the UI root node and other caches in the data processing controller; and the return unit finishes the creation of the UI interface and returns to the data processing controller, and stops.
Referring to fig. 4, the data processing module further includes: the device comprises a judging type unit, a data judging unit, a filling unit, a root node unit and a sub-data unit; the judging type unit is used for inputting data and judging the input type of the data; the data judging unit judges whether the data is Json data or not, if yes, the Json data is identified as Json instance type; if not, judging whether the path is a Json file path, if yes, reading Json data in the file, and if not, stopping; the filling unit creates new UI data and fills the basic data in the Json data into the corresponding field values in the UI data; the root node unit fills the data without the matching field into an expansion field queue of the UI data, judges whether the data is the root node data, and records the data as the root node UI data if the data is the root node data; if not, adding the UI data into the child data of the UI data of the father node; and the sub data unit judges whether the Json data contains sub data or not, if yes, a new UI data is created, if not, the created root node UI data is returned, and the stopping is carried out.
Referring to fig. 5, the data distribution module further includes: the system comprises a creation unit, a judgment data unit, an analysis data unit, a judgment root node unit and a sub item data unit; the creation unit inputs UI panel creation data and judges the type of the input data; the judging data unit judges whether the data unit is Json data or not, if yes, the Json data is converted into UI data; if not, judging whether the file is a Json file path, if yes, reading the file and converting the read Json data into UI data, if not, judging whether the file is a UI data type, if yes, analyzing the UI data, and if not, stopping; the analysis data unit analyzes UI data, transmits the UI data and the registration event to the UI creation process, and returns the UI creation process to the UI controller to record the UI controller; the judging root node unit judges whether the root node unit is root node data or not, if yes, the recording controller is a panel controller; if not, adding the controller into a child controller set of the parent node controller; the sub item data unit judges whether the UI data contains the sub item data, if yes, the UI data and the registration time are transmitted to the UI creation process; and if not, finishing the creation of the return UI panel controller and stopping.
Referring to fig. 6, the UI interaction event module further specifically includes: the system comprises an interaction unit, a data storage unit, a data processing unit, a data changing unit, an expanding unit, a monitoring event unit and a generating unit; the interaction unit, namely a UI interaction interface user carries out interaction, judges whether the interaction is a data storage event, if yes, judges whether a triggering event of data storage is recorded in the data processing controller, if yes, acquires the data of the UI panel, iteratively acquires the data of all sub-controls, generates complete data, executes the recorded data storage triggering event, transmits the generated completion data and stops; if not, judging that the event is invalid; the data storage unit judges whether the data storage event is a data restoration event or not, if not, judges whether the data restoration event is a data restoration event, if yes, initial data in the process of creation is applied to the UI interface, and if not, judges whether the data restoration event is a data change event; the data processing unit judges whether a triggering event of data change is recorded in the data processing controller, if yes, the recorded data change triggering event is executed, and restored data is transmitted; if not, stopping; the data changing unit judges whether the data changing event is a data changing event, if yes, judges whether a monitoring event for registering the changed data exists; if not, judging whether the registered expansion event exists; the expansion unit judges whether the registered expansion event is judged, if yes, the registered expansion event is executed, and the current trigger data is transmitted; if not, judging that the event is invalid; the monitoring event unit is used for judging whether a monitoring event for registering the change data exists or not, if yes, executing the registered monitoring event for the change data to transmit the change data, and if not, judging whether a triggering event for data change is recorded in the data processing controller; the generating unit judges whether a triggering event of data change is recorded in the data processing controller, if yes, the data of the UI panel is obtained, the data of all sub-controls are obtained in an iterative mode, complete data are generated, the recorded data change triggering event is executed, the generated complete data are transmitted, and the data are stopped; and if not, stopping.
The foregoing description is only of the preferred embodiments of the invention, and all changes and modifications that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (8)

1. A method of automatically generating a UI interface, the method comprising the steps of:
s1, inputting UI panel creation data, extracting interface generation required data from the split assembly UI data, selecting a parser or an expansion processor to generate an interface according to the data type, and registering the interface to UI interaction;
step S2, judging whether data conversion is needed, if yes, performing data conversion through data processing, and if not, distributing the data;
s3, waiting for UI user interaction, and processing the UI data;
step S4, judging whether an event triggering the closing of the UI interface is generated, if yes, stopping, otherwise, continuing to wait for the user interaction of the UI interface;
the data processing in step S2 further comprises the steps of:
s21, inputting data and judging the input type of the data;
step S22, judging whether the data is Json data, if so, identifying the Json data as a Json instance type; if not, judging whether the path is a Json file path, if yes, reading Json data in the file, and if not, stopping;
step S23, creating new UI data, and filling basic data in the Json data into corresponding field values in the UI data;
step S24, filling data without matching fields into an expansion field queue of the UI data, judging whether the data is root node data, and if so, recording the data as the root node UI data; if not, adding the UI data into the child data of the UI data of the father node;
and S25, judging whether the Json data contains sub data, if yes, returning to create new UI data, otherwise, returning to the created root node UI data, and stopping.
2. A method of automatically generating a UI interface according to claim 1, wherein: the step S1 further comprises the steps of:
step S11, inputting UI data and a registration event;
step S12, analyzing the data type in the UI data;
step S13, judging whether the UI data type of the parser is contained, if yes, forwarding the UI data to the parser, if not, judging whether an expansion processor of the UI data is contained, if yes, forwarding the UI data to the expansion processor, if not, returning to the creation failure exception, and stopping;
step S14, creating a data processing controller and forwarding the registration event to the UI event processing;
step S15, the data processor is forwarded to a parser or an expansion processor to perform UI creation processing, and an interface is generated based on UI data;
step S16, in the process of monitoring the UI event by the added event, returning to the UI root node;
step S17, recording the UI root node and other caches in the data processing controller;
and S18, finishing the creation of the UI interface and returning to the data processing controller, and stopping.
3. A method of automatically generating a UI interface according to claim 1, wherein: the distributing of the data in step S2 further specifically includes the following steps:
s26, inputting UI panel creation data and judging the type of the input data;
step S27, judging whether the Json data is the Json data, if so, converting the Json data into UI data; if not, judging whether the file is a Json file path, if yes, reading the file and converting the read Json data into UI data, if not, judging whether the file is a UI data type, if yes, analyzing the UI data, and if not, stopping;
step S28, analyzing the UI data, transmitting the UI data and the registration event to UI creation processing, returning the UI creation processing to the UI controller, and recording the UI controller;
step S29, judging whether the data is root node data, if yes, the recording controller is a panel controller; if not, adding the controller into a child controller set of the parent node controller;
step S30, judging whether the UI data contains sub item data, if yes, transmitting the UI data and the registration time to UI creation processing; and if not, finishing the creation of the return UI panel controller and stopping.
4. A method of automatically generating a UI interface according to claim 1, wherein: the step S3 further specifically includes the following steps:
step S31, the UI interaction interface user performs interaction, judges whether the interaction is a data storage event, if yes, judges whether a triggering event of data storage is recorded in the data processing controller, if yes, acquires the data of the UI panel, iteratively acquires the data of all sub-controls, generates complete data, executes the recorded data storage triggering event, transmits the generated completion data, and stops; if not, judging that the event is invalid;
step S32, judging whether the data is a data saving event, if not, judging whether the data is a data restoring event, if yes, applying initial data in the process of creation to a UI interface, and if not, judging whether the data is a data changing event;
step S33, judging whether a triggering event of data change is recorded in the data processing controller, if yes, executing the recorded triggering event of data change and transmitting the restored data; if not, stopping;
step S34, judging whether the event is a data change event, if yes, judging whether a monitoring event for registering the data change exists; if not, judging whether the registered expansion event exists;
step S35, judging whether a registered expansion event exists, if yes, executing the registered expansion event, and transmitting current trigger data; if not, judging that the event is invalid;
step S36, judging whether a monitoring event for registering the data change exists, if yes, executing the registered monitoring event for transmitting the change data, otherwise, judging whether a triggering event for the data change is recorded in the data processing controller;
step S37, judging whether a triggering event of data change is recorded in the data processing controller, if yes, acquiring the data of the UI panel, iteratively acquiring the data of all sub-controls, generating complete data, executing the recorded data change triggering event, transmitting the generated complete data, and stopping; and if not, stopping.
5. A system for automatically generating a UI interface, characterized by: the system comprises a data distribution module, a data processing module, a UI creation module and a UI interaction event module; the UI creation module inputs UI panel creation data, extracts data required by interface generation from the split assembly UI data, selects a parser or an expansion processor according to the data type to generate the interface, and registers the interface to UI interaction; the data distribution module and the data processing module judge whether data conversion is needed or not, if yes, the data conversion is carried out through the data processing module, and if not, the data is distributed through the data distribution module; the UI interaction event module waits for UI interface user interaction and processes the UI data; judging whether an event triggering the closing of the UI interface is generated, if yes, stopping, and if not, continuing to wait for the user interaction of the UI interface;
the data processing module further comprises: the device comprises a judging type unit, a data judging unit, a filling unit, a root node unit and a sub-data unit; the judging type unit is used for inputting data and judging the input type of the data; the data judging unit judges whether the data is Json data or not, if yes, the Json data is identified as Json instance type; if not, judging whether the path is a Json file path, if yes, reading Json data in the file, and if not, stopping; the filling unit creates new UI data and fills the basic data in the Json data into the corresponding field values in the UI data; the root node unit fills the data without the matching field into an expansion field queue of the UI data, judges whether the data is the root node data, and records the data as the root node UI data if the data is the root node data; if not, adding the UI data into the child data of the UI data of the father node; and the sub data unit judges whether the Json data contains sub data or not, if yes, a new UI data is created, if not, the created root node UI data is returned, and the stopping is carried out.
6. The system for automatically generating UI interfaces according to claim 5, wherein: the UI creation module further specifically includes: the device comprises an input unit, an analysis unit, a parser unit, a creation unit, a forwarding unit, an adding unit, a recording unit and a return unit; the input unit inputs UI data and registration events; the analyzing unit analyzes the data type in the UI data; the analyzer unit judges whether the UI data type of the UI data is contained in the analyzer, if yes, the UI data is forwarded to the analyzer, if not, whether the UI data is contained in an expansion processor of the UI data is judged, if yes, the UI data is forwarded to the expansion processor, if not, the creation failure abnormality is returned, and the UI data is stopped; the creation unit, namely a creation data processing controller, forwards the registration event to the UI event processing; the forwarding unit forwards the data processor to the parser or the expansion processor for UI creation processing, and generates an interface based on UI data; the adding unit returns to the UI root node in the UI event processing process of the adding event monitoring; the recording unit records the UI root node and other caches in the data processing controller; and the return unit finishes the creation of the UI interface and returns to the data processing controller, and stops.
7. The system for automatically generating UI interfaces according to claim 5, wherein:
the data distribution module further comprises: the system comprises a creation unit, a judgment data unit, an analysis data unit, a judgment root node unit and a sub item data unit; the creation unit inputs UI panel creation data and judges the type of the input data; the judging data unit judges whether the data unit is Json data or not, if yes, the Json data is converted into UI data; if not, judging whether the file is a Json file path, if yes, reading the file and converting the read Json data into UI data, if not, judging whether the file is a UI data type, if yes, analyzing the UI data, and if not, stopping; the analysis data unit analyzes UI data, transmits the UI data and the registration event to the UI creation process, and returns the UI creation process to the UI controller to record the UI controller; the judging root node unit judges whether the root node unit is root node data or not, if yes, the recording controller is a panel controller; if not, adding the controller into a child controller set of the parent node controller; the sub item data unit judges whether the UI data contains the sub item data, if yes, the UI data and the registration time are transmitted to the UI creation process; and if not, finishing the creation of the return UI panel controller and stopping.
8. The system for automatically generating UI interfaces according to claim 5, wherein: the UI interaction event module further specifically includes: the system comprises an interaction unit, a data storage unit, a data processing unit, a data changing unit, an expanding unit, a monitoring event unit and a generating unit; the interaction unit, namely a UI interaction interface user carries out interaction, judges whether the interaction is a data storage event, if yes, judges whether a triggering event of data storage is recorded in the data processing controller, if yes, acquires the data of the UI panel, iteratively acquires the data of all sub-controls, generates complete data, executes the recorded data storage triggering event, transmits the generated completion data and stops; if not, judging that the event is invalid; the data storage unit judges whether the data storage event is a data restoration event or not, if not, judges whether the data restoration event is a data restoration event, if yes, initial data in the process of creation is applied to the UI interface, and if not, judges whether the data restoration event is a data change event; the data processing unit judges whether a triggering event of data change is recorded in the data processing controller, if yes, the recorded data change triggering event is executed, and restored data is transmitted; if not, stopping; the data changing unit judges whether the data changing event is judged, if yes, whether a monitoring event for registering the data changing is judged; if not, judging whether the registered expansion event exists; the expansion unit judges whether the registered expansion event is judged, if yes, the registered expansion event is executed, and the current trigger data is transmitted; if not, judging that the event is invalid; the monitoring event unit is used for judging whether a monitoring event for registering the data change exists or not, if yes, the registered monitoring event for executing the data change transmits the change data, and if not, whether a triggering event for the data change is recorded in the data processing controller or not is judged; the generating unit judges whether a triggering event of data change is recorded in the data processing controller, if yes, the data of the UI panel is obtained, the data of all sub-controls are obtained in an iterative mode, complete data are generated, the recorded data change triggering event is executed, the generated complete data are transmitted, and the data are stopped; and if not, stopping.
CN202110494827.2A 2021-05-07 2021-05-07 Method and system for automatically generating UI (user interface) Active CN113064594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110494827.2A CN113064594B (en) 2021-05-07 2021-05-07 Method and system for automatically generating UI (user interface)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110494827.2A CN113064594B (en) 2021-05-07 2021-05-07 Method and system for automatically generating UI (user interface)

Publications (2)

Publication Number Publication Date
CN113064594A CN113064594A (en) 2021-07-02
CN113064594B true CN113064594B (en) 2023-11-17

Family

ID=76568297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110494827.2A Active CN113064594B (en) 2021-05-07 2021-05-07 Method and system for automatically generating UI (user interface)

Country Status (1)

Country Link
CN (1) CN113064594B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614557A (en) * 2003-11-04 2005-05-11 西门子公司 Method and system for dynamically generating user interfaces
CN102591665A (en) * 2011-12-31 2012-07-18 深圳联友科技有限公司 Method and system for user-defined quick-generation pages
CN102981855A (en) * 2012-11-23 2013-03-20 蓝盾信息安全技术股份有限公司 Template-based interface autogeneration method and system
CN110321112A (en) * 2019-07-02 2019-10-11 北京百度网讯科技有限公司 AI ability research/development platform and data processing method
CN111610973A (en) * 2020-05-28 2020-09-01 广联达科技股份有限公司 Method and device for generating human-computer interaction interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8381113B2 (en) * 2007-04-06 2013-02-19 Microsoft Corporation Metadata-driven automatic UI code generation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614557A (en) * 2003-11-04 2005-05-11 西门子公司 Method and system for dynamically generating user interfaces
CN102591665A (en) * 2011-12-31 2012-07-18 深圳联友科技有限公司 Method and system for user-defined quick-generation pages
CN102981855A (en) * 2012-11-23 2013-03-20 蓝盾信息安全技术股份有限公司 Template-based interface autogeneration method and system
CN110321112A (en) * 2019-07-02 2019-10-11 北京百度网讯科技有限公司 AI ability research/development platform and data processing method
CN111610973A (en) * 2020-05-28 2020-09-01 广联达科技股份有限公司 Method and device for generating human-computer interaction interface

Also Published As

Publication number Publication date
CN113064594A (en) 2021-07-02

Similar Documents

Publication Publication Date Title
US7139978B2 (en) Recording user interaction with an application
CN110321113B (en) Integrated assembly line system taking project batches as standards and working method thereof
CN105426394B (en) Based on cross-platform mobile report form generation method and system
US20110123973A1 (en) Systems and methods for visual test authoring and automation
US20070038683A1 (en) Business intelligence system and methods
CN110928783A (en) RobotFramework-based automatic test datamation reconstruction platform
JP2007531157A (en) Adapter framework for integration of mission critical applications
JP2006018827A (en) Smart user interface record and reproduction framework
CN101902756A (en) M2M (Machine To Machine) business platform and working method thereof
JP5476326B2 (en) Web operation recording and reproducing method and apparatus
CN113658591B (en) Voice interaction adaptation system for intelligent home
US8024706B1 (en) Techniques for embedding testing or debugging features within a service
AU2011213842A1 (en) A system and method of managing mapping information
US8819631B2 (en) System and method for self dependent web automation
CN115905740A (en) Multi-data source service engine interface interconnection method
CN115658529A (en) Automatic testing method for user page and related equipment
CN112988165A (en) Kubernetes-based interactive modeling method and device, electronic equipment and storage medium
CN114416516A (en) Test case and test script generation method, system and medium based on screenshot
CN113064594B (en) Method and system for automatically generating UI (user interface)
Herbold et al. Combining usage-based and model-based testing for service-oriented architectures in the industrial practice
CN114880239B (en) Data-driven-based interface automation test framework and method
CN102597965B (en) Operation verification device, operation verification method
CN115421770A (en) Resource information processing method and device, storage medium and electronic equipment
CN113900953A (en) Software automation testing architecture method based on reflection mechanism
US20080022258A1 (en) Custom database system and method of building and operating the same

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