A user interface generation method, an electronic device, and a storage medium
By receiving natural language commands in industrial automation systems, performing semantic parsing and knowledge graph alignment, and automatically generating industrial user interfaces, the problem of insufficient semantic understanding capabilities in existing technologies is solved, achieving efficient and intelligent interface generation and operation.
Patent Information
- Application Number
- CN202610483532.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies for industrial automation and human-computer interaction systems, user interface generation relies on manual configuration or fixed templates, which suffers from insufficient semantic understanding, semantic gap, lack of context completion capabilities, and disconnect between interface generation and data binding, resulting in low operational efficiency and high costs.
By receiving natural language instructions and performing semantic parsing, structured semantic information is generated. This information is then linked to entities and semantically aligned with a pre-built industrial knowledge graph. Based on the knowledge graph, range reasoning is performed to automatically determine the target data source, query parameters, and visualization component types, generating interface configuration information and finally rendering the user interface.
It enables the automated generation of natural language commands into industrial user interfaces, ensuring the accuracy of semantic understanding and the rationality of interface layout, reducing development cycle and maintenance costs, and improving operational efficiency and intelligence.
Smart Images

Figure CN122363694A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent manufacturing technology, and more specifically, to a user interface generation method, an electronic device, and a storage medium. Background Technology
[0002] In current industrial automation and human-machine interaction systems, the generation of user interfaces (UIs) mainly relies on manual configuration by engineers or development based on fixed templates. When operators interact with industrial platforms such as Manufacturing Execution Systems (MES) and Supervisory Control and Data Acquisition (SCADA) systems, they typically need to input structured commands or search for functions through multi-level menus. This results in high operational barriers and low efficiency, especially in industrial environments with a wide variety of equipment and complex control parameters.
[0003] The related technologies have the following shortcomings in semantic understanding: First, they lack a dedicated semantic parsing mechanism for industrial ontology, resulting in limited parsing capabilities for natural language instructions and difficulty in accurately identifying equipment entities, attribute parameters, and operational intentions in industrial scenarios; second, there is a semantic gap between the parsing results and the data model of the industrial system, making it impossible to directly map to specific equipment locations or control variables; third, they lack the ability to complete and reason about semantic information context, making it difficult to handle scenarios with incomplete or ambiguous instructions; and fourth, interface generation is disconnected from data binding, requiring manual configuration of interface components and data sources, leading to long deployment cycles and high maintenance costs.
[0004] Therefore, how to achieve the automated generation of natural language instructions into industrial user interfaces, and ensure the accuracy of semantic understanding, the reliability of data sources, and the rationality of interface layout, are technical problems that need to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a user interface generation method, an electronic device, and a storage medium that realizes the automated generation of industrial user interfaces from natural language instructions, and ensures the accuracy of semantic understanding, the reliability of data sources, and the rationality of interface layout.
[0006] To achieve the above objectives, this application provides a user interface generation method, comprising: The system receives natural language commands input by the user and performs semantic parsing on the natural language commands to generate structured semantic information; wherein, the structured semantic information includes device entities, attribute parameters, and operation intentions. The structured semantic information is linked to a pre-built industrial knowledge graph for entity linking and semantic alignment to generate standardized semantic triples; wherein, the industrial knowledge graph includes multiple nodes and the relationships between different nodes, and the nodes include device nodes, attribute parameter nodes, and operation intention nodes; Based on the industrial knowledge graph, range reasoning is performed on the standardized semantic triples to determine the target data source, target query parameters, and target visualization component type of the target data required for rendering the user interface; Call the interface of the target data source, obtain the target data according to the target query parameters, and generate interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph; The user interface is rendered based on the interface configuration information and the target data.
[0007] Optionally, the natural language instructions are semantically parsed to generate structured semantic information, including: The natural language instructions are subjected to terminology standardization and expression normalization processing to generate standardized instructions; The standardized instructions are abstracted and their meanings are represented to generate a global semantic graph; The standardized instructions are semantically labeled to generate an argument role structure centered on predicates; The structured semantic information is obtained by fusing the global semantic graph and the argument role structure.
[0008] Optionally, the structured semantic information is linked to a pre-built industrial knowledge graph for entity linking and semantic alignment, including: The device entities, attribute parameters, and operation intentions in the structured semantic information are linked one-to-one to the corresponding device nodes, attribute parameter nodes, and operation intention nodes in the pre-built industrial knowledge graph. If at least one of the device entity, attribute parameters, and operation intentions is missing in the structured semantic information, then the missing device entity and / or attribute parameters and / or operation intentions are filled in based on the interaction context of the current operation session rendering the user interface or a preset rule. The terminology with multiple meanings in the structured semantic information is identified as the target term, and semantic disambiguation is performed on the target term based on the context of the corresponding node in the industrial knowledge graph.
[0009] Optionally, the step of performing range reasoning on the standardized semantic triples based on the industrial knowledge graph to determine the target data source, target query parameters, and target visualization component type of the target data required for rendering the user interface includes: Graph pattern matching is performed in the industrial knowledge graph to find matching results that match the standardized semantic triples; wherein, the matching results include any one or a combination of predefined rules, process templates, and associated nodes; An executable task chain is generated based on the matching results; wherein, the executable task chain includes the interface path of the target data source, the target query parameters of the target data, the target permission verification conditions, and the target time range parameters; The target visualization component type is determined based on the predefined mapping relationship in the industrial knowledge graph, which corresponds to both the attribute parameters and operational intent in the standardized semantic triple.
[0010] Optionally, the step of calling the interface of the target data source to obtain the target data according to the target query parameters includes: The current operation session rendering the user interface is subjected to permission verification based on the target permission verification conditions in the executable task chain. After the permission verification is successful, the executable task chain is executed to obtain the target data from the industrial data system corresponding to the interface path of the target data source.
[0011] Optionally, generating interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph includes: Select one or more user interface components from the preset component library that correspond to the target visualization component type; The selected user interface components are arranged according to the interface layout rules to generate an interface layout description, which is then used as the interface configuration information. The interface layout description includes the type and position information of the user interface components, as well as the binding relationship between the user interface components and the target data source.
[0012] Optionally, rendering the user interface based on the interface configuration information and the target data includes: Load the user interface component instance corresponding to the user interface component in the interface layout description; Based on the binding relationship between the user interface components and the target data source in the interface layout description, the target data is bound to the user interface component instance and a binding result is generated; The user interface component instance is rendered in the user interface based on the binding result and the position information of the user interface component in the interface layout description.
[0013] Optionally, after rendering the user interface based on the interface configuration information and the target data, the method further includes: Collect interactive behavior data from the user interface, analyze the interactive behavior data, and generate analysis results; Based on the analysis results, optimize the rules used in semantic parsing and / or range reasoning.
[0014] To achieve the above objectives, this application provides a user interface generation apparatus, comprising: The parsing module is used to receive natural language commands input by the user, perform semantic parsing on the natural language commands to generate structured semantic information; wherein, the structured semantic information includes device entities, attribute parameters, and operation intentions; The generation module is used to link the structured semantic information with the pre-built industrial knowledge graph and perform entity linking and semantic alignment to generate standardized semantic triples; wherein, the industrial knowledge graph includes multiple nodes and the association relationships between different nodes, and the nodes include device nodes, attribute parameter nodes, and operation intention nodes; The determination module is used to perform range reasoning on the standardized semantic triples based on the industrial knowledge graph, so as to determine the target data source, target query parameters and target visualization component type of the target data required for rendering the user interface; The acquisition module is used to call the interface of the target data source, acquire the target data according to the target query parameters, and generate interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph. The rendering module is used to render the user interface based on the interface configuration information and the target data.
[0015] To achieve the above objectives, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor for implementing the steps of the user interface generation method described above when executing the computer program.
[0016] To achieve the above objectives, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the user interface generation method described above.
[0017] The user interface generation method provided in this application accurately captures the user's true intentions in industrial scenarios by parsing structured semantic information such as device entities, attribute parameters, and operational intentions from natural language commands, reducing ambiguity and the risk of misoperation. Standardized semantic triples generated by linking and semantically aligning structured semantic information with a pre-built industrial knowledge graph enable natural language expressions to be directly mapped to specific device nodes, attribute parameters, and control intentions, bridging the semantic gap between user language and industrial systems. Based on this, range reasoning is performed on the standardized semantic triples using the industrial knowledge graph to automatically determine the target data source, target query parameters, and target visualization component types required for rendering the user interface. This avoids the tedious process of manually configuring data interfaces and components, improving system deployment efficiency and intelligence. Finally, by calling the target data source interface to obtain the target data, and combining it with interface layout rules to generate interface configuration information and render the user interface, end-to-end automated generation from natural language input to the visualization interface is achieved, significantly reducing the interface development cycle and maintenance costs. Therefore, this application, through its overall technical solution of semantic parsing, knowledge graph alignment, reasoning, and automatic rendering, solves the problems of weak semantic understanding, high dependence on manual intervention, and complex system integration existing in related technologies, thereby improving the intelligence level and operational efficiency of industrial human-computer interaction. This application also discloses a user interface generation device, an electronic device, a computer-readable storage medium, and a computer program product, which can achieve the same technical effects.
[0018] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0019] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating a user interface generation method according to an exemplary embodiment; Figure 2 This is a flowchart illustrating another user interface generation method according to an exemplary embodiment; Figure 3 This is a structural diagram of a user interface generation apparatus according to an exemplary embodiment; Figure 4 This is a structural diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Furthermore, in the embodiments of this application, "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0022] This application discloses a user interface generation method that automates the generation of industrial user interfaces from natural language instructions, while ensuring the accuracy of semantic understanding, the reliability of data sources, and the rationality of interface layout.
[0023] See Figure 1 A flowchart illustrating a user interface generation method according to an exemplary embodiment, such as... Figure 1 As shown, it includes: S101: Receive natural language instructions input by the user, perform semantic parsing on the natural language instructions to generate structured semantic information; wherein, the structured semantic information includes device entities, attribute parameters, and operation intentions; In this step, the natural language commands input by the user refer to interactive requests made by the operator to the system through voice input, text input, etc., described in everyday language, such as checking the abnormal temperature record of mold A or turning off pump number three. Natural language commands are unstructured and colloquial, making them difficult for machines to understand directly. Semantic parsing is the process of converting unstructured natural language into structured data that machines can understand. Structured semantic information refers to the core information units extracted from natural language and organized according to a predetermined semantic framework, specifically including device entities, attribute parameters, and operational intentions. Device entities refer to the physical or logical devices involved in the command, such as mold A or pump number three; attribute parameters refer to the device status or data indicators that the user is concerned about, such as temperature or on / off status; operational intentions refer to the type of action the user wants to perform on the target, such as checking or turning off.
[0024] As a feasible implementation method, semantic parsing of the natural language instructions to generate structured semantic information includes: performing terminology standardization and expression normalization on the natural language instructions to generate standardized instructions; performing abstract meaning representation parsing on the standardized instructions to generate a global semantic graph; performing semantic role labeling on the standardized instructions to generate an argument role structure with predicates as the core; and fusing the global semantic graph and the argument role structure to obtain structured semantic information.
[0025] Terminology standardization and expression normalization refer to the process of converting colloquial expressions, industry slang, or abbreviations in instructions into standard terminology forms that the system can recognize. For example, if a user enters "Check if the temperature of mold A is abnormal," after terminology standardization, "check" is converted to "query," and "if there is any abnormality" is converted to "abnormal record," generating the standardized instruction "Query mold A temperature abnormality record." Standardized instructions are instruction texts with a unified expression format after the above processing.
[0026] Abstract Meaning Representation (AMR) is a semantic representation method that abstracts the semantics of a sentence into a directed acyclic graph (DAG). Nodes in the graph represent concepts such as entities, attributes, and events, while edges represent semantic relationships between these concepts. In this embodiment, the system performs AMR parsing on the standardized command "Query Mold A Temperature Anomaly Record," generating a global semantic graph centered on the anomaly monitoring event. This graph contains nodes such as "Mold A," "Temperature," and "Historical Records," as well as the semantic relationships between them, such as "Monitoring Object: Mold A," "Monitoring Indicator: Temperature," and "Record Type: Historical Records."
[0027] Semantic Role Labeling (SRL) refers to identifying predicates and their associated arguments in a sentence and labeling them with their semantic roles. Predicates are typically the core verbs in a sentence, while arguments are semantic components used in conjunction with predicates to fully express event information, such as agent, patient, time, and location. In this embodiment, the system performs SRL parsing on standardized instructions, identifying the predicate "query," whose arguments include "query target: abnormal record" and "query object: mold A temperature," generating an argument role structure centered on the predicate.
[0028] Semantic fusion refers to the process of aligning and merging the global semantic graph generated by AMR with the argument role structure generated by SRL, eliminating potential conflicts between the two, and generating unified and complete structured semantic information. For example, there may be structural differences between "anomaly monitoring (mold A, temperature, historical record)" in the AMR parsing result and "query (target: anomaly record, object: mold A temperature)" in the SRL parsing result. The system aligns the two through a semantic fusion layer, ultimately generating structured semantic information containing complete information: the operation intent is "query", the device entity is "mold A", the attribute parameter is "temperature", and the additional information is "anomaly record" and "historical record".
[0029] As can be seen, this implementation method, by combining global semantic understanding of AMR and local argument analysis of SRL, can more comprehensively and accurately capture the true intent of user commands, overcoming the potential limitations or ambiguities of single semantic analysis methods. Through terminology standardization, it can effectively address the diverse colloquial expressions in industrial scenarios, improving the system's robustness and applicability, and laying the foundation for subsequent accurate industrial knowledge graph linking and task execution.
[0030] S102: Link the structured semantic information with the pre-built industrial knowledge graph and perform entity linking and semantic alignment to generate standardized semantic triples; wherein, the industrial knowledge graph includes multiple nodes and the relationships between different nodes, and the nodes include device nodes, attribute parameter nodes, and operation intention nodes; An industrial knowledge graph is a database that organizes and stores industrial knowledge using a graph structure. Its core consists of nodes and edges connecting them. Nodes represent entities or concepts in the real world, including device nodes, attribute parameter nodes, and operation intent nodes. Device nodes correspond to specific physical or logical devices, such as mold A-001 or injection molding machine No. 5; attribute parameter nodes correspond to various status indicators or process parameters of the device, such as temperature, pressure, and speed; operation intent nodes correspond to executable user operation types, such as query, control, start, and stop. Relationships define the semantic connections between nodes. For example, the device node "mold A-001" is connected to the attribute node "temperature" via an edge that indicates it has attributes, and to the operation node "query" via an edge that indicates it supports operations. An industrial knowledge graph can also include UI component mapping rule nodes, data source nodes, and permission rule nodes, forming a knowledge system covering the entire industrial interaction process.
[0031] Entity linking is the process of linking entity references identified in text to their corresponding standard nodes in a knowledge graph. For example, linking the device entity "InjectionMolder No. 5" to the device node "InjectionMolder_005" in the graph. Semantic alignment, building upon entity linking, ensures an accurate match between the semantic information parsed from natural language and the conceptual model defined in the knowledge graph, handling potential semantic discrepancies. Standardized semantic triples are standard format data generated after entity linking and semantic alignment, used to accurately describe user intent. They are typically represented in the form of <device node, attribute parameter node, operation intent node>, such as <InjectionMolder_005, Temperature, Query_Anomaly>.
[0032] As a feasible implementation method, the structured semantic information is linked to a pre-built industrial knowledge graph for entity linking and semantic alignment, including: linking the device entities, attribute parameters, and operation intentions in the structured semantic information to the corresponding device nodes, attribute parameter nodes, and operation intention nodes in the pre-built industrial knowledge graph; if at least one of the device entities, attribute parameters, and operation intentions is missing in the structured semantic information, the missing device entities and / or attribute parameters and / or operation intentions are filled in based on the interaction context of the current operation session rendering the user interface or preset rules; terms with multiple meanings in the structured semantic information are identified as target terms, and semantic disambiguation is performed on the target terms based on the context of the corresponding nodes in the industrial knowledge graph.
[0033] The interaction context of the current operation session refers to the background information accumulated by the user during the current or historical interactions, such as the device the user is currently monitoring, the devices recently operated, the user's role and permissions, workshop environment information, and the current production task. Preset rules are logical conditions predefined by the system for inference and completion when information is missing, such as "if no device is specified, the device associated with the current operation interface will be used by default" or "if no time range is specified, the data from the last 24 hours will be queried by default." Inference completion refers to using contextual information or preset rules to infer and fill in missing components in structured semantic information. Semantic disambiguation refers to determining the exact meaning of a term with multiple meanings in the current instruction based on the context of its node in the knowledge graph. Target terms refer to words in structured semantic information that may have multiple interpretations.
[0034] In practice, the elements in the structured semantic information are first linked to the corresponding standardized nodes in the industrial knowledge graph. For example, the equipment entity "Mold A" is linked to the equipment node "Mold_A_001" in the graph, the attribute parameter "temperature" is linked to the attribute node "temperature", and the operation intent "query anomaly" is linked to the operation node "query_anomaly_log".
[0035] If the user's command information is incomplete, such as the user only entering "check temperature," resulting in a missing device entity in the structured semantic information, the context completion mechanism is activated. The completion mechanism first queries the context of the current operation session. For example, if the user interface is currently displaying the monitoring panel for "Dryer D-03," and the session log shows that the user has been operating this device for the past five minutes, then the system infers and completes the device entity as "Dryer D-03." If the context cannot provide information, completion is performed according to preset rules, such as "if no specific device is specified, query the default device under the user's permissions" or "if there is only one running injection molding machine in the current workshop, then use that device by default."
[0036] For ambiguous target terms, semantic disambiguation is performed using a knowledge graph. For example, the term "pressure" in an industrial context might refer to "injection pressure of an injection molding machine," "hydraulic system pressure," or "pneumatic pipeline pressure." By examining the association between the "pressure" attribute node and currently linked device nodes in the knowledge graph, its specific meaning can be determined. If the currently linked device is an "injection molding machine," then the "pressure" node is connected to the "injection pressure" sub-node through the "has attribute" relationship, thus confirming that the term refers to injection pressure and eliminating ambiguity.
[0037] After completing entity linking, context completion, and semantic disambiguation, a precise standardized semantic triple is generated. Taking "querying the temperature anomaly record of mold A" as an example, the generated standardized semantic triple is <Mold_A_001, temperature, query_anomaly_log>.
[0038] As can be seen, this implementation anchors natural language expressions to a precise industrial knowledge system through entity links, enhances the system's ability to handle incomplete instructions through a context completion mechanism, making it more in line with actual human-computer interaction habits, and solves the problem of ambiguity in industrial terms through knowledge graph semantic disambiguation, ensuring the accuracy of semantic understanding. The generated standardized semantic triples provide unambiguous and directly processable standardized inputs for subsequent range reasoning and execution.
[0039] S103: Based on the industrial knowledge graph, perform range reasoning on the standardized semantic triples to determine the target data source, target query parameters, and target visualization component type of the target data required for rendering the user interface; In this step, after obtaining accurate standardized semantic triples, further reasoning is performed on the graph to determine the specific technical details required to execute the user intent. Here, the target data source refers to the industrial information system or physical device interface that stores the target data, such as a Programmable Logic Controller (PLC), Manufacturing Execution System (MES), or Monitoring and Data Acquisition System. Target query parameters refer to the conditions required to retrieve target data from the target data source, such as device identifiers, start and end times, data granularity, exception types, and permission verification conditions. Target visualization component types refer to the types of interface elements used to display target data or receive user operations on the user interface, such as line charts, dashboards, tables, switches, and sliders.
[0040] As a feasible implementation, the step of performing range reasoning on the standardized semantic triples based on the industrial knowledge graph to determine the target data source, target query parameters, and target visualization component type required for rendering the user interface includes: performing graph pattern matching in the industrial knowledge graph to find matching results that match the standardized semantic triples; wherein the matching results include any one or a combination of predefined rules, process templates, and associated nodes; generating an executable task link based on the matching results; wherein the executable task link includes the interface path of the target data source, the target query parameters of the target data, the target permission verification conditions, and the target time range parameters; and determining the target visualization component type that corresponds to both the attribute parameters and operation intentions in the standardized semantic triples according to the predefined mapping relationship in the industrial knowledge graph.
[0041] Graph pattern matching is a technique for finding subgraphs or paths in a graph database that match a given query pattern. In this embodiment, information associated with standardized semantic triples and capable of guiding task execution is searched within the industrial knowledge graph. Predefined rules are conditional statements stored in the graph that express specific business logic or technical constraints. For example, querying historical data requires specifying a time range, control operations require operator or higher permissions, and the default time range for querying abnormal records is the most recent 30 days. Process templates are a predefined sequence of steps for completing specific types of tasks. For example, executing control operations requires permission verification before sending instructions, and finally confirmation of the execution result. Associated nodes refer to other graph nodes directly or indirectly connected to nodes in the standardized semantic triples. For example, device nodes are associated with the "data interface address" attribute, "IP address" node, and "communication protocol" node; attribute parameter nodes are associated with nodes such as "unit," "range," and "normal range"; and operation nodes are associated with nodes such as "required permission level" and "operation log template."
[0042] An executable task chain refers to assembling the results of graph pattern matching into a structured sequence of instructions that can be executed by a computer. It specifies where to retrieve data, what data to retrieve, how to retrieve the data, and how to display the data after retrieval. Permission verification conditions refer to the authorization requirements that must be met to access specific data or perform specific operations; for example, a user must be an operator or have operating permissions for a specific device.
[0043] In practical implementation, standardized semantic triples (device, attribute, operation) are used as input, and graph pattern matching is performed in the industrial knowledge graph. The graph pattern matching process aims to find predefined rules, process templates, or associated nodes that encapsulate domain knowledge and are related to this triple. Taking the standardized semantic triples (Mold_A_001, temperature, query_anomaly_log) as an example, graph pattern matching may find the following information: Through the "target data source" node associated with the device node Mold_A_001, it is found that its abnormal log data is stored in the abnormal log database of the MES system, with the interface path / api / mes / anomalies; through the "unit" node associated with the attribute node temperature, it is determined that the temperature unit is degrees Celsius; through the "default rule" node associated with the operation node query_anomaly_log, it is found that "the default time range for abnormal record queries is the most recent 30 days"; through the "permission rule" node associated with the device node, it is found that accessing the device data requires "device operator" or higher permissions. At the same time, based on the combination of attribute parameters and operation intent, the predefined "attribute-intent-component" mapping relationship in the graph is queried. For example, the mapping of "temperature + query_anomaly_log" might point to a combined component of "anomaly event table + temperature trend overlay". Furthermore, all matching and inference results are integrated to generate a complete executable task chain, including: permission verification conditions: the user role must be a device operator or higher; target data source interface path: MES system anomaly log API (Application Programming Interface), specifically GET / api / mes / anomalies; query parameters: device=Mold_A_001, days=30 (default time range); visualization component type: anomaly event table + temperature trend overlay.
[0044] As can be seen, this step utilizes knowledge graphs for range reasoning, automatically transforming abstract semantic triples into executable task chains containing specific technical details, achieving intelligent mapping from what the user wants to what the system should do. This process encapsulates complex industrial domain knowledge, eliminating the need for users to understand the underlying data architecture and interface details, significantly reducing the barrier to entry and development / configuration costs for industrial applications.
[0045] As a feasible implementation method, the step of calling the interface of the target data source and obtaining the target data according to the target query parameters includes: performing permission verification on the current operation session rendering the user interface based on the target permission verification conditions in the executable task chain; after the permission verification is passed, executing the executable task chain to obtain the target data from the industrial data system corresponding to the interface path of the target data source.
[0046] In this context, permission verification refers to the process by which the system checks whether the currently logged-in user or their assigned role is authorized to perform any data access or control operation, based on the permission verification conditions defined in the executable task chain. An industrial data system refers to various software or hardware systems responsible for data acquisition, storage, and provision in an industrial production environment, including but not limited to PLCs, MES, SCADA, Enterprise Resource Planning (ERP) systems, and historical databases. Target data refers to the actual data values or datasets successfully obtained from the industrial data system based on query parameters, meeting the requirements of the user's original instructions; examples include a temperature reading, a historical trend data set, or a list of abnormal events.
[0047] In practice, an authorization verification step is performed before acquiring the target data. The system first parses the target authorization verification conditions in the executable task chain, such as requiring an operator or higher role, or requiring read-only access to device Mold_A_001. Then, it obtains the user's identity and role information for the current operation session and compares it with the authorization verification conditions. If the user's permissions meet the conditions, the verification passes, and the system continues executing the task chain; if permissions are insufficient, the system will refuse execution and return an authorization error message, ensuring the operational security and data access compliance of the industrial system.
[0048] After successful authorization, the system sends a data request to the corresponding industrial data system, carrying query parameters, based on the data source interface path specified in the task chain. For example, based on the information in the chain, it constructs an API call command: GET / api / mes / anomalies?device=Mold_A_001&days=30, and sends an HTTP (Hypertext Transfer Protocol) request to the MES system. After processing the request, the MES system returns the target data that meets the query criteria, such as a list of temperature anomaly event records from the past 30 days.
[0049] As can be seen, this implementation method, by embedding permission verification into the data acquisition process and enforcing it as a prerequisite step, provides crucial protection for the secure operation of industrial systems, preventing unauthorized access and misoperation. Simultaneously, by strictly adhering to the definition of executable task chains, it achieves an automated and standardized process from semantic understanding to data acquisition, ensuring the accuracy and consistency of data access.
[0050] S104: Call the interface of the target data source, obtain the target data according to the target query parameters, and generate interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph; Interface configuration information refers to a set of structured data describing how the user interface should be constructed and displayed. It includes information such as which components should be placed on the interface, their positions and sizes, their layout, and the data each component should display. Interface layout rules are design specifications and experiential knowledge stored in the industry knowledge graph that guide how the user interface should be organized. For example, monitoring charts should be placed at the top of the interface, control buttons should be grouped at the bottom or right, similar information should be displayed side-by-side, and emergency alarm information should be highlighted. Being pre-defined in the graph means that these rules are not hard-coded into the program logic but are part of the knowledge graph, allowing them to be queried, reasoned about, and dynamically updated.
[0051] As a feasible implementation method, generating interface configuration information based on the target visualization component type and interface layout rules includes: selecting one or more user interface components corresponding to the target visualization component type from a preset component library; arranging the selected user interface components according to the interface layout rules to generate an interface layout description and using the interface layout description as the interface configuration information; wherein, the interface layout description includes the type and position information of the user interface components and the binding relationship between the user interface components and the target data source.
[0052] The pre-built component library is a collection of pre-developed, reusable user interface components, such as line chart components, table components, button components, card components, dashboard components, and switch components. Each component encapsulates its own visual style and basic interaction logic. The interface layout description is a blueprint describing the final form of the interface in a data format. In this embodiment, the Server-Driven UI (SDUI) standard can be used to generate a JSON-formatted interface layout description. This description details the type, location information, and binding relationship of each component on the interface to the target data source. The binding relationship to the target data source clarifies how the interface components acquire and display data. For example, binding a table component to an exception event list data and a line chart component to temperature trend data decouples the interface display from business data.
[0053] In practical implementation, firstly, based on one or more target visualization component types determined by range inference, corresponding components are selected from the component library. For example, if the inference result requires an anomaly event table and a temperature trend overlay chart, a table component and an overlay line chart component are selected from the component library. Next, the interface layout rules in the industrial knowledge graph are queried to obtain layout knowledge applicable to the current scenario. The graph pre-stores various layout patterns, such as LayoutPattern rules, including industrial interface design specifications such as displaying similar information side-by-side and separating control areas from display areas. Based on these rules, combined with contextual information such as screen size and the number of components, the specific position and size of each component on the interface are calculated and assigned, generating a JSON-formatted interface layout description. For example, a rule might indicate that for an anomaly monitoring scenario, the trend chart should be placed above the table; accordingly, the overlay line chart component is placed in the upper half of the interface, and the table component in the lower half. Simultaneously with generating the layout description, the target data source and query parameter information are bound to the components, clarifying which component displays which part of the target data. For example, the overlay line chart component is bound to the temperature trend data, and the table component is bound to the anomaly event list data. Finally, output a complete JSON interface configuration information that conforms to the SDUI standard.
[0054] As can be seen, this step achieves automated generation from semantics to the interface through rule-based dynamic layout and component selection. Storing the interface layout rules in a knowledge graph allows for the separation of interface design knowledge from program logic, improving the system's flexibility and maintainability. Using the SDUI standard to generate JSON configuration decouples the interface description from the final rendering engine, laying the foundation for supporting multi-platform rendering and dynamic switching of interface styles.
[0055] S105: Render the user interface based on the interface configuration information and the target data.
[0056] In this step, the front-end rendering engine receives the interface configuration information and target data, performs drawing operations, and finally presents a graphical interface on the screen that users can view and interact with.
[0057] As a feasible implementation method, rendering the user interface based on the interface configuration information and the target data includes: loading the user interface component instance corresponding to the user interface component in the interface layout description; binding the target data to the user interface component instance and generating a binding result according to the binding relationship between the user interface component and the target data source in the interface layout description; and rendering the user interface component instance in the user interface according to the binding result and the position information of the user interface component in the interface layout description.
[0058] In this context, a user interface component instance refers to a concrete, operable component object created in memory based on the target visualization component type specified in the interface layout description. For example, creating an overlay line chart object based on the type "overlay line chart," and creating a table object based on the type "table." Binding target data to a component instance means passing the acquired actual data values, in the data format expected by the component, to the component instance's interface or properties, enabling the component to draw based on this data. For example, passing an array of temperature trend data to the data interface of an overlay line chart instance, and passing a list of abnormal events to the data interface of a table instance.
[0059] In practice, the front-end rendering engine parses the JSON interface configuration information. First, based on the component type of each entry in the configuration, the engine dynamically loads and instantiates the corresponding user interface component, creating component instances in memory. For example, based on the type "overlay line chart," it loads and creates an instance of the overlay line chart component; based on the type "table," it loads and creates an instance of the table component. Then, according to the data binding relationships defined in the configuration, the engine accurately injects the acquired and prepared target data into the corresponding component instances. For example, it passes the `temperatureTrend` data to the `setData` method of the overlay line chart instance and the `anomalyEvents` data to the `setData` method of the table instance. Finally, based on the position information specified in the configuration, the engine calculates the precise drawing area of each component instance on the screen and calls the component's own rendering method to draw the data-bound component, forming the final user interface.
[0060] As can be seen, this step achieves dynamic and automated rendering of the user interface. This mechanism makes interface generation entirely data- and configuration-driven, eliminating the need to write page code for each new requirement, greatly improving the development efficiency and flexibility of industrial interfaces. At the same time, separating interface rendering from business logic minimizes the impact of upgrading or changing the front-end technology stack on the overall system.
[0061] The user interface generation method provided in this application accurately captures the user's true intentions in industrial scenarios by parsing structured semantic information such as device entities, attribute parameters, and operational intentions from natural language commands, reducing ambiguity and the risk of misoperation. Standardized semantic triples generated by linking and semantically aligning structured semantic information with a pre-built industrial knowledge graph enable natural language expressions to be directly mapped to specific device nodes, attribute parameters, and control intentions, bridging the semantic gap between user language and industrial systems. Based on this, range reasoning is performed on the semantic triples using the industrial knowledge graph to automatically determine the target data source, target query parameters, and target visualization component types required for rendering the user interface. This avoids the tedious process of manually configuring data interfaces and components, improving system deployment efficiency and intelligence. Finally, by calling the target data source interface to obtain target data, and combining it with interface layout rules to generate interface configuration information and render the user interface, end-to-end automated generation from natural language input to the visualization interface is achieved, significantly reducing interface development cycle and maintenance costs. Therefore, the embodiments of this application solve the problems of weak semantic understanding, high dependence on manual intervention, and complex system integration in related technologies by using a comprehensive technical solution of semantic parsing, knowledge graph alignment, reasoning and automatic rendering, thereby improving the intelligence level and operational efficiency of industrial human-computer interaction.
[0062] This application discloses a user interface generation method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically: See Figure 2 A flowchart illustrating another user interface generation method according to an exemplary embodiment, such as... Figure 2 As shown, it includes: S201: Receive natural language instructions input by the user, perform semantic parsing on the natural language instructions to generate structured semantic information; wherein, the structured semantic information includes device entities, attribute parameters, and operation intentions; S202: Link the structured semantic information with the pre-built industrial knowledge graph and perform entity linking and semantic alignment to generate standardized semantic triples; wherein, the industrial knowledge graph includes multiple nodes and the relationships between different nodes, and the nodes include device nodes, attribute parameter nodes, and operation intention nodes; S203: Based on the industrial knowledge graph, perform range reasoning on the standardized semantic triples to determine the target data source, target query parameters, and target visualization component type of the target data required for rendering the user interface; S204: Call the interface of the target data source, obtain the target data according to the target query parameters, and generate interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph; S205: Render the user interface based on the interface configuration information and the target data; S206: Collect interactive behavior data in the user interface, analyze the interactive behavior data, and generate analysis results; Interactive behavior data refers to various operation records generated during the interaction between the user and the generated user interface, including but not limited to click events, swipe trajectories, dwell time, button click frequency, mouse movement paths, interface switching records, input box filling behavior, and control usage order.
[0063] In this step, front-end tracking technology is used to capture and record all user actions on the interface in real time, and this behavioral data is uploaded to the back-end server for storage. The interaction data is then analyzed using methods such as data statistics, pattern recognition, and machine learning to process the collected raw behavioral data, uncover user operating habits, identify high-frequency functional areas, discover operational pain points, evaluate interface usability, and generate a visual analysis report.
[0064] As can be seen, this step transforms implicit user interactions with the interface into explicit, quantifiable metrics through systematic behavioral data collection and analysis. These analytical results not only objectively assess the actual usability of the interface but also reveal the gap between the user's true intent and the system design, providing a data foundation and decision-making basis for subsequent targeted optimization.
[0065] S207: Optimize the rules used in semantic parsing and / or range reasoning based on the analysis results.
[0066] In this step, optimization refers to adjusting and improving the rules, models, or knowledge graph content used by the system in the semantic parsing and scope reasoning stages based on the behavioral data analysis results generated in step S206, forming a closed-loop iterative mechanism of data collection-evaluation analysis-strategy optimization. The rules used in the semantic parsing process include a terminology standardization dictionary, AMR parsing rules, SRL annotation rules, and semantic fusion strategies. The rules used in the scope reasoning process include predefined rules, process templates, attribute-intent-component mapping relationships, and interface layout rules.
[0067] As a feasible implementation method, the rules used in the semantic parsing and / or range reasoning process are optimized based on the analysis results as follows: misidentification cases in the semantic parsing process are identified based on the analysis results, and the natural language understanding model is fine-tuned online; entity relationships and attributes in the industrial knowledge graph are expanded or adjusted according to the user's actual operation mode; the mapping rules of attribute-intent-component are optimized according to the user's frequency of use and preference for interface components; the interface layout rules are automatically adjusted according to the user's high-frequency click areas and operation paths; and the optimized rules and models are updated to the system, forming a continuously iterative optimization loop.
[0068] Online fine-tuning refers to incrementally training existing machine learning models using newly collected user behavior data, enabling the models to adapt to new language expressions and usage habits, and correcting known recognition errors. Expanding or adjusting the knowledge graph involves adding entity nodes, relationship edges, or attributes, or adjusting the association weights of existing nodes, to make the graph more accurately reflect users' cognitive models and actual business scenarios. Optimizing mapping rules involves adjusting the correspondence between attributes, intents, and components based on users' actual component preferences, such as promoting frequently used component types to default recommended components. Adjusting interface layout rules involves modifying rules in the interface layout rule base based on user click heatmaps and operation path analysis results, such as moving components corresponding to high-frequency click areas to more prominent positions, hiding or merging rarely used components, and automatically adjusting button sizes based on button click frequency.
[0069] In practice, the system periodically receives behavior analysis reports and automatically executes optimization operations based on predefined optimization strategies. Specifically, for semantic parsing optimization, misidentification cases are extracted from the behavior analysis reports. For example, analysis reveals that when a user inputs the natural language command "Check the temperature of machine number five," the system incorrectly interprets it as a query for "dryer number five" instead of the correct "injection molding machine number five," leading to multiple subsequent corrections by the user. These misidentification cases are treated as negative samples, along with the corrected results from the user, as positive samples. The system then fine-tunes the semantic parsing model online, updating model parameters to ensure the model can correctly distinguish the specific reference of "machine number five" in different contexts in the future. For range inference optimization, rules are adjusted based on user operation patterns. For example, behavior analysis reveals that when users query historical data, they change the default time range from the last 24 hours to the last 7 days in over 60% of cases. Based on this, the system optimizes the default rules in range inference, adjusting the default time range for such queries to the last 7 days, reducing manual modification operations by users. For example, analysis revealed that users viewed the temperature trend graph far more frequently than the pressure trend graph in the anomaly monitoring interface. Based on this, the system adjusted the weights of the attribute-intent-component mapping rules, prioritizing the temperature trend graph in subsequent similar interface generation. For interface layout optimization, layout rules were adjusted based on heatmap analysis results. For instance, the emergency stop button in the lower right corner of the heatmap display interface was clicked very frequently, but its small size occasionally led to accidental clicks on adjacent buttons. The system automatically enlarged the button by 1.2 times using a predefined size adjustment algorithm and increased the spacing between adjacent buttons to reduce the risk of accidental clicks. Furthermore, analysis showed that the three most frequently used functions were scattered across different areas of the interface, resulting in long operation paths. Based on layout optimization rules, the system automatically aggregated and displayed these three functional components side-by-side in subsequent interface generation, shortening the user's operation distance.
[0070] As can be seen, this embodiment, by establishing a closed-loop optimization mechanism based on real user behavior, enables the system to continuously learn and self-evolve. Unlike solutions that rely on static configuration based on human experience, this embodiment can dynamically adjust and optimize each processing step according to the user's actual usage patterns. This data-driven optimization approach not only continuously improves the accuracy of semantic understanding but also makes the interface layout and component recommendations more aligned with the user's actual operating habits.
[0071] The following describes a user interface generation apparatus provided in an embodiment of this application. The user interface generation apparatus described below and the user interface generation method described above can be referred to each other.
[0072] See Figure 3 A structural diagram of a user interface generation apparatus according to an exemplary embodiment is shown, such as... Figure 3 As shown, it includes: The parsing module 100 is used to receive natural language instructions input by the user, and perform semantic parsing on the natural language instructions to generate structured semantic information; wherein, the structured semantic information includes device entities, attribute parameters, and operation intentions; The generation module 200 is used to link the structured semantic information with the pre-built industrial knowledge graph and perform entity linking and semantic alignment to generate standardized semantic triples; wherein, the industrial knowledge graph includes multiple nodes and the association relationships between different nodes, and the nodes include device nodes, attribute parameter nodes, and operation intention nodes; The determination module 300 is used to perform range reasoning on the standardized semantic triples based on the industrial knowledge graph, so as to determine the target data source, target query parameters and target visualization component type of the target data required for rendering the user interface; The acquisition module 400 is used to call the interface of the target data source, acquire the target data according to the target query parameters, and generate interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph. The rendering module 500 is used to render the user interface based on the interface configuration information and the target data.
[0073] The user interface generation device provided in this application accurately captures the user's true intent in industrial scenarios by parsing structured semantic information such as device entities, attribute parameters, and operational intentions from natural language commands, reducing ambiguity and the risk of misoperation. Standardized semantic triples generated by linking and semantically aligning structured semantic information with a pre-built industrial knowledge graph enable natural language expressions to be directly mapped to specific device nodes, attribute parameters, and control intentions, bridging the semantic gap between user language and the industrial system. Based on this, range reasoning is performed on the standardized semantic triples using the industrial knowledge graph to automatically render the target data source, target query parameters, and target visualization component types required for the user interface, avoiding the tedious process of manually configuring data interfaces and components, and improving system deployment efficiency and intelligence. Finally, by calling the target data source interface to obtain target data, and combining it with interface layout rules to generate interface configuration information and render the user interface, end-to-end automated generation from natural language input to the visualization interface is achieved, significantly reducing the interface development cycle and maintenance costs. Therefore, the embodiments of this application solve the problems of weak semantic understanding, high dependence on manual intervention, and complex system integration in related technologies by using a comprehensive technical solution of semantic parsing, knowledge graph alignment, reasoning and automatic rendering, thereby improving the intelligence level and operational efficiency of industrial human-computer interaction.
[0074] Based on the above embodiments, as a preferred embodiment, the parsing module 100 includes: The processing unit is used to perform terminology standardization and expression normalization processing on the natural language instructions to generate standardized instructions; Abstract meaning representation unit, used to represent the standardized instructions in abstract meaning and generate a global semantic graph; The semantic role annotation unit is used to perform semantic role annotation on the standardized instructions and generate an argument role structure with predicates as the core. The fusion unit is used to fuse the global semantic graph and the argument role structure to obtain the structured semantic information.
[0075] Based on the above embodiments, as a preferred embodiment, the generation module 200 includes: The linking unit is used to link the device entities, attribute parameters, and operation intentions in the structured semantic information to the corresponding device nodes, attribute parameter nodes, and operation intention nodes in the pre-built industrial knowledge graph. The missing completion unit is used to complete the missing device entity and / or attribute parameter and / or operation intent based on the interaction context reasoning of the current operation session rendering the user interface or a preset rule if at least one of the device entity, attribute parameter and operation intent is missing in the structured semantic information. The semantic disambiguation unit is used to identify terms with multiple meanings in the structured semantic information as target terms, and to perform semantic disambiguation on the target terms based on the context of the corresponding node in the industrial knowledge graph.
[0076] Based on the above embodiments, as a preferred embodiment, the determining module 300 includes: A matching unit is used to perform graph pattern matching in the industrial knowledge graph to find matching results that match the standardized semantic triples; wherein, the matching results include any one or a combination of predefined rules, process templates, and associated nodes; The first generation unit is used to generate an executable task link based on the matching result; wherein, the executable task link includes the interface path of the target data source, the target query parameters of the target data, the target permission verification conditions, and the target time range parameters; The determining unit is used to determine the target visualization component type that corresponds to both the attribute parameters and operational intent in the standardized semantic triple, based on the predefined mapping relationship in the industrial knowledge graph.
[0077] Based on the above embodiments, as a preferred embodiment, the acquisition module 400 includes: The permission verification unit is used to perform permission verification on the current operation session that renders the user interface based on the target permission verification conditions in the executable task chain. The acquisition unit is used to execute the executable task chain after the permission verification is passed, so as to acquire the target data from the industrial data system corresponding to the interface path of the target data source.
[0078] Based on the above embodiments, as a preferred embodiment, the acquisition module 400 includes: The selection unit is used to select one or more user interface components corresponding to the target visual component type from a preset component library; The second generation unit is used to arrange the selected user interface components according to the interface layout rules, generate an interface layout description, and use the interface layout description as the interface configuration information; wherein, the interface layout description includes the type and position information of the user interface components and the binding relationship between the user interface components and the target data source.
[0079] Based on the above embodiments, as a preferred embodiment, the rendering module 500 includes: The loading unit is used to load the user interface component instance corresponding to the user interface component in the interface layout description. A binding unit is used to bind the target data to the user interface component instance according to the binding relationship between the user interface component and the target data source in the interface layout description and generate a binding result; A rendering unit is used to render the user interface component instance in the user interface based on the binding result and the position information of the user interface component in the interface layout description.
[0080] Based on the above embodiments, as a preferred embodiment, it further includes: The analysis module is used to collect interactive behavior data in the user interface, analyze the interactive behavior data, and generate analysis results. An optimization module is used to optimize the rules used in semantic parsing and / or range reasoning based on the analysis results.
[0081] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0082] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device. Figure 4 This is a structural diagram of an electronic device according to an exemplary embodiment, such as... Figure 4As shown, the electronic device includes: Communication interface 1 enables information exchange with other devices, such as network devices; Processor 2 is connected to communication interface 1 to enable information interaction with other devices and, when running a computer program, executes the user interface generation method provided by one or more of the above-mentioned technical solutions. The computer program is stored in memory 3.
[0083] Of course, in practical applications, the various components in an electronic device are coupled together through bus system 4. It can be understood that bus system 4 is used to achieve communication and connection between these components. In addition to the data bus, bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 The general will label all buses as Bus System 4.
[0084] The memory 3 in this embodiment is used to store various types of data to support the operation of the electronic device. Examples of such data include any computer program used to operate on the electronic device.
[0085] It is understood that memory 3 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or CD-ROM; magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 3 described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0086] The methods disclosed in the embodiments of this application can be applied to processor 2, or implemented by processor 2. Processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 2 or by instructions in the form of software. The processor 2 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 2 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 3. Processor 2 reads the program in memory 3 and completes the steps of the aforementioned method in combination with its hardware.
[0087] When processor 2 executes the program, it implements the corresponding processes in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.
[0088] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 3 that stores a computer program, which can be executed by a processor 2 to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0089] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0090] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0091] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for generating a user interface, characterized in that, include: The system receives natural language commands input by the user and performs semantic parsing on the natural language commands to generate structured semantic information; wherein, the structured semantic information includes device entities, attribute parameters, and operation intentions. The structured semantic information is linked with a pre-built industrial knowledge graph through entity linking and semantic alignment to generate standardized semantic triples; wherein, the industrial knowledge graph includes multiple nodes and the association relationships between any different nodes among the multiple nodes, and the nodes include device nodes, attribute parameter nodes, and operation intention nodes; Based on the industrial knowledge graph, range reasoning is performed on the standardized semantic triples to determine the target data source, target query parameters, and target visualization component type of the target data required to render the user interface; Call the interface of the target data source, obtain the target data according to the target query parameters, and generate interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph; The user interface is rendered based on the interface configuration information and the target data.
2. The user interface generation method according to claim 1, characterized in that, Semantic parsing of the natural language instructions to generate structured semantic information includes: The natural language instructions are subjected to terminology standardization and expression normalization processing to generate standardized instructions; The standardized instructions are abstracted and their meanings are represented to generate a global semantic graph; Semantic role labeling is performed on the standardized instructions to generate an argument role structure centered on predicates; The structured semantic information is obtained by fusing the global semantic graph and the argument role structure.
3. The user interface generation method according to claim 1, characterized in that, The structured semantic information is linked to a pre-built industrial knowledge graph for entity linking and semantic alignment, including: The device entities, attribute parameters, and operation intentions in the structured semantic information are linked one-to-one to the device nodes, attribute parameter nodes, and operation intention nodes in the pre-built industrial knowledge graph. If at least one of the device entity, attribute parameters, and operation intentions is missing in the structured semantic information, the missing device entity and / or attribute parameters and / or operation intentions are completed based on the interaction context reasoning of the current operation session rendering the user interface or a preset rule. The terminology with multiple meanings in the structured semantic information is identified as the target term, and semantic disambiguation is performed on the target term based on the context of the corresponding node in the industrial knowledge graph.
4. The user interface generation method according to claim 1, characterized in that, The process of performing range reasoning on the standardized semantic triples based on the industrial knowledge graph to determine the target data source, target query parameters, and target visualization component type of the target data required for rendering the user interface includes: Graph pattern matching is performed in the industrial knowledge graph to find matching results that match the standardized semantic triples; wherein, the matching results include any one or a combination of predefined rules, process templates, and associated nodes; An executable task chain is generated based on the matching results; wherein, the executable task chain includes the interface path of the target data source, the target query parameters of the target data, the target permission verification conditions, and the target time range parameters; The target visualization component type is determined based on the predefined mapping relationship in the industrial knowledge graph, which corresponds to both the attribute parameters and operational intent in the standardized semantic triple.
5. The user interface generation method according to claim 4, characterized in that, The step of calling the interface of the target data source to obtain the target data according to the target query parameters includes: The current operation session rendering the user interface is subjected to permission verification based on the target permission verification conditions in the executable task chain. After the permission verification is successful, the executable task chain is executed to obtain the target data from the industrial data system corresponding to the interface path of the target data source.
6. The user interface generation method according to claim 1, characterized in that, The process of generating interface configuration information based on the target visualization component type and the interface layout rules preset in the industrial knowledge graph includes: Select one or more user interface components from the preset component library that correspond to the target visualization component type; The selected user interface components are arranged according to the interface layout rules to generate an interface layout description, which is then used as the interface configuration information. The interface layout description includes the type and position information of the user interface components, as well as the binding relationship between the user interface components and the target data source.
7. The user interface generation method according to claim 6, characterized in that, Rendering the user interface based on the interface configuration information and the target data includes: Load the user interface component instance corresponding to the user interface component in the interface layout description; Based on the binding relationship between the user interface components and the target data source in the interface layout description, the target data is bound to the user interface component instance and a binding result is generated; The user interface component instance is rendered in the user interface based on the binding result and the position information of the user interface component in the interface layout description.
8. The user interface generation method according to claim 1, characterized in that, After rendering the user interface based on the interface configuration information and the target data, the process further includes: Collect interactive behavior data from the user interface, analyze the interactive behavior data, and generate analysis results; Based on the analysis results, optimize the rules used in semantic parsing and / or range reasoning.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the user interface generation method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the steps of the user interface generation method as described in any one of claims 1 to 8.