Interface generation method based on ontology semantics, communication system and storage medium
By using an ontology-based interface generation method, the rich ontology model of an enterprise-level business management system is parsed to generate a rich interactive interface. This solves the problems of low development efficiency and interface mismatch in traditional development, and achieves deep decoupling between the front-end and back-end and autonomous interface configuration, thereby improving development efficiency and user experience.
Patent Information
- Application Number
- CN202611266812.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-24
AI Technical Summary
In existing enterprise-level business management systems, traditional front-end interface development is inefficient, the front-end and back-end are tightly coupled, and changes in business requirements require synchronous modifications. Low-code platforms cannot generate complex interactive interfaces, and artificial intelligence models generate inconsistent interfaces and lack structured mapping, resulting in low development efficiency and mismatched interfaces.
An interface generation method based on ontology semantics is adopted. The user's business requirements information is obtained from the front end, and the rich ontology model of the back end is parsed, including metadata of attribute, relationship and behavior dimensions, to generate a rich interactive interface, which supports deep decoupling of front end and back end and incremental updates.
It enables self-configuration of the front end, generates rich interactive interfaces, improves adaptability and business integrity, supports independent iterative evolution, and optimizes user interaction experience and system iteration efficiency.
Smart Images

Figure CN123157307A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of artificial intelligence and software engineering technology, and in particular to interface generation methods, communication systems and storage media based on ontology semantics. Background Technology
[0002] As enterprises deepen their digital transformation, the requirements for front-end user interfaces in enterprise-level business management systems are increasing.
[0003] The software industry is currently trending towards a return to command-line interface (CLI) and conversational interaction. However, in the enterprise business management field, the aforementioned demand for rich interactive interfaces dictates that pure CLI or conversational interaction cannot replace graphical interfaces. The input of structured business data, browsing and batch operations of multi-dimensional data, real-time visual feedback of business status, intuitive presentation of master-slave relationships and related data, data visualization analysis and decision support, multi-role collaboration and differentiated permission display—these requirements essentially rely on rich interactive interfaces with a two-dimensional spatial layout and visual hierarchy.
[0004] However, traditional front-end interface development methods require a lot of manual coding, the front-end and back-end interfaces are tightly coupled, and when business requirements change, the front-end and back-end need to be modified simultaneously, resulting in low development efficiency.
[0005] Specifically, in terms of front-end interface generation and front-end / back-end interaction, the current mainstream technical solutions include the following:
[0006] First, there's the traditional manual front-end development approach. Traditional enterprise software front-end interfaces are implemented through manual coding. Front-end developers write code page by page using frameworks like React and Vue, based on the interface documentation provided by the back-end. The layout, component selection, data binding, interaction logic, and validation rules for each page all need to be implemented manually. The front-end and back-end communicate via REST APIs or GraphQL interfaces. This traditional manual coding approach requires manual coding for every page and interaction logic, resulting in tight coupling between the front-end and back-end interfaces. When business requirements change, both the front-end and back-end typically need to be modified synchronously, leading to low development efficiency. Furthermore, for enterprise management systems containing multiple business domain objects, each domain object's forms, lists, detail pages, statistics pages, etc., all need to be developed manually. A business domain object with 15 attributes typically requires 1500-2500 lines of front-end code.
[0007] Secondly, there's the visual interface building solution for low-code / no-code platforms. Low-code and no-code platforms build front-end interfaces through visual drag-and-drop and configuration. Users can select components from a pre-built component library and configure layouts and attributes via a graphical interface. However, this solution only supports simple CRUD interfaces—existing automatic generation solutions typically only generate basic CRUD interfaces based on the database table structure, failing to generate complex master-detail table layouts, conditional displays, field linkage, status operation buttons, and other rich interactive functions. Furthermore, this solution only utilizes the field names and data types of the data model, without leveraging domain object relationship information and business rule information to generate richer interface layouts and interaction logic. Additionally, when the backend model definition changes, it usually requires regenerating all interface code, making incremental updates of affected interface areas impossible.
[0008] Currently, some platforms use popular artificial intelligence models (such as large language models) to directly generate front-end interface code. However, the quality of front-end code generated by AI models varies greatly; multiple generation attempts for the same requirement may produce different results, lacking consistency. Furthermore, there is a lack of structured association between the large language model and the back-end model. When generating interface code, the large language model primarily relies on natural language descriptions and does not establish a formal mapping relationship with the back-end business definitions, leading to potential mismatches between the generated interface and the back-end data structure. Summary of the Invention
[0009] In view of the shortcomings of the prior art described above, the purpose of this disclosure is to provide an interface generation method, communication system and storage medium based on ontology semantics to solve the problems in the related technologies.
[0010] This disclosure provides a method for generating an interface based on ontology semantics, comprising: a front-end acquiring business requirement information from a user, wherein the business requirement information can be described in natural language; the front-end requesting a rich ontology model of business domain objects matching the business requirement information from a back-end, wherein the rich ontology model includes metadata in attribute dimensions, relation dimensions, and behavior dimensions; the attribute dimension metadata is used to define the data structure and constraints represented by the attribute set of the business domain objects, the relation dimension metadata is used to define the semantic relationships and topology of the domain objects and their attributes, and the behavior dimension metadata is used to define state transitions, business rules, and executable operations; the front-end parsing the semantic information of the metadata of each dimension in the rich ontology model and mapping interface configuration information based on the semantic information; the front-end generating an interface structure description based on the interface configuration information; and the front-end rendering an interactive interface corresponding to the business requirement information based on the interface structure description.
[0011] In an embodiment of the first aspect, the method includes: generating an updated interactive interface when a change in the congested ontology model is detected; wherein the change in the congested ontology model is caused by at least one of the following: the interactive interface at the front end is operated by a user; or the data at the back end is updated.
[0012] In an embodiment of the first aspect, the step of generating an updated interactive interface when a change in the congestion ontology model is detected includes: the front end obtaining a model fragment of the congestion ontology model that has changed from the back end; the front end obtaining local difference information corresponding to the changes in the interface structure description based on semantic parsing and mapping of the model fragment; and the front end rendering based on the local difference information to generate the updated interactive interface.
[0013] In an embodiment of the first aspect, the front end obtains the model fragment in which the congestion ontology model has changed from the back end, including: the back end, in response to the change in the congestion ontology model, actively notifies the front end of the change event indicating the model fragment through a real-time data synchronization channel with the front end.
[0014] In an embodiment of the first aspect, the backend only notifies the domain objects subscribed to by the frontend of change events on the real-time data synchronization channel.
[0015] In an embodiment of the first aspect, the front end parses the semantic information of the metadata of each dimension in the rich ontology model and maps the interface configuration information based on the semantic information, including: mapping the semantic information of the attribute dimension metadata to the corresponding interface elements to obtain the attribute dimension mapping result; mapping the semantic information of the relation dimension metadata to the corresponding interface layout to obtain the relation dimension mapping result; and mapping the semantic information of the behavior dimension metadata to the corresponding interface interaction logic to obtain the behavior dimension mapping result.
[0016] In the first aspect of the embodiment, the mapping of semantic information based on the attribute dimension metadata to the corresponding interface element includes at least one of the following: mapping semantic information based on the data type and / or semantic annotation of the attribute dimension metadata to the corresponding input control; mapping semantic information based on the constraint conditions of the attribute dimension metadata to the corresponding front-end validation rules; and mapping semantic information based on the display prompt information of the attribute dimension metadata to the corresponding prompt content.
[0017] In the first aspect of the embodiment, the semantic information based on the relation dimension metadata is mapped to the corresponding interface layout, including at least one of the following: mapping to master-detail / nested form layout based on composition relationship; mapping to reference selection control based on association relationship; mapping to conditional explicit / implicit rules driven by domain object type based on inheritance relationship; and mapping to associated data panel based on dependency relationship.
[0018] In the first aspect of the embodiment, the mapping of semantic information based on the behavioral dimension metadata to the corresponding interface interaction logic includes at least one of the following: mapping semantic information based on the semantic annotation of the business state machine in the attribute dimension metadata to the conditional display of the corresponding state operation control; mapping semantic information based on the front-end validation rules to the corresponding front-end validation logic; and mapping semantic information based on the business rules to the corresponding business interaction logic.
[0019] In the first aspect of the embodiment, the front end renders and generates an interactive interface corresponding to the business requirement information based on the interface structure description, including at least one of the following selectable rendering functions: form view rendering adapted to data input / editing scenarios; list view rendering adapted to data query / display scenarios; and meter view rendering adapted to data analysis / monitoring scenarios.
[0020] In the first aspect of the embodiment, the front end renders and generates an interactive interface corresponding to the business requirement information based on the interface structure description, and further includes at least one of the following: 1) The front end adapts the layout of the interactive interface according to user habits and / or the characteristics of the current business scenario; 2) When the front end detects that the user is performing a preset business operation, it requests auxiliary decision-making information from the back end and presents it in the interactive interface.
[0021] In an embodiment of the first aspect, the method further includes: the backend acquiring input business rules about domain objects described in natural language during the training phase; the backend converting the business rules into semantic annotations of the attributes of the domain objects; and the backend injecting the audited and tested semantic annotations into a business knowledge graph along with the corresponding attributes for matching by the rich ontology model.
[0022] A second aspect of this disclosure provides a business processing method, comprising: a backend acquiring user business requirement information transmitted from a frontend, the business requirement information being describable in natural language; the backend matching a rich ontology model of a corresponding business domain object based on the business requirement information, the rich ontology model including metadata in attribute dimensions, relation dimensions, and behavior dimensions; the backend transmitting the rich ontology model to the frontend; wherein the rich ontology model includes metadata in attribute dimensions, relation dimensions, and behavior dimensions; the attribute dimension metadata is used to define a data structure and constraints represented by the attribute set of the business domain object, the relation dimension metadata is used to define the semantic relationships and topology of the domain object and its attributes, and the behavior dimension metadata is used to define state transitions, business rules, and executable operations; the rich ontology model is used by the frontend to map interface configuration information based on the semantic information of the metadata in each dimension; the interface configuration information is used to generate an interface structure description, and the interface structure description is used to generate an interactive interface corresponding to the business requirement information through rendering.
[0023] This disclosure provides a communication system in a third aspect, comprising a communication front-end and a back-end; the front-end includes: a front-end interaction proxy module, a semantic parsing and mapping module, and a dynamic interface generation engine; the back-end includes: a business knowledge graph; wherein, the front-end interaction proxy module is used to acquire user business requirement information, the business requirement information being allowed to be described in natural language, and semantically matching a rich ontology model of business domain objects in the business knowledge graph of the back-end based on the business requirement information; the rich ontology model includes metadata in attribute dimensions, relation dimensions, and behavior dimensions; the attribute dimension metadata is used to define the data structure and constraints represented by the attribute set of the business domain objects, the relation dimension metadata is used to define the semantic relationships and topology of domain objects and their attributes, and the behavior dimension metadata is used to define state transitions, business rules, and executable operations; the semantic parsing and mapping module is used to parse the semantic information of the metadata of each dimension in the rich ontology model, and map interface configuration information based on the semantic information; the dynamic interface generation engine generates an interface structure description according to the interface configuration information, and renders and generates an interactive interface corresponding to the business requirement information based on the interface structure description.
[0024] This disclosure provides a fourth aspect of a computer-readable storage medium, characterized in that it stores a computer program or instructions, which are executed to perform the interface generation method as described in any one of the first aspects; or the business processing method as described in the second aspect.
[0025] As described above, this disclosure relates to the fields of artificial intelligence and software engineering technology, and provides an interface generation method, communication system, and storage medium based on ontology semantics, including: a front-end acquiring business requirement information described in natural language; matching a rich ontology model of business domain objects in the back-end based on the business requirement information, including metadata of attribute dimensions, relation dimensions, and behavior dimensions; the front-end parsing the semantic information of the metadata of each dimension and mapping it to obtain interface configuration information; and the front-end generating an interface structure description according to the interface configuration information and rendering an interactive interface corresponding to the business requirement information.
[0026] On the one hand, it enables autonomous front-end configuration based on ontology semantics, reducing costs and improving efficiency. This publicly available front-end relies on the semantic definitions of attributes, relationships, constraints, and business state machines in the back-end rich ontology model to achieve fully dynamic autonomous interface configuration, without relying on customized back-end page interfaces. Changes in business requirements only require automatic modification of the rich ontology model; the front-end can automatically detect and reconstruct the interface, completely eliminating the traditional manual coding mode and significantly reducing the workload of front-end development.
[0027] On the other hand, it enables the construction of a semantic mapping system for multi-dimensional metadata of business domain objects, supporting the generation of rich interactive interfaces. By establishing three-dimensional semantic mapping rules for attributes, relationships, and behaviors, interface elements, interface layouts, and interaction logic are generated accordingly, fully capturing the semantics of the backend business model. Compared to traditional solutions that can only generate basic CRUD interfaces, this disclosure can automatically realize complex rich interactive capabilities such as master-slave layout, associated selection, state transition, field linkage, and automatic calculation, significantly improving interface adaptability and business integrity.
[0028] On the other hand, it enables a deeper decoupling architecture between the front-end and back-end, supporting independent iterative evolution. This deep decoupling allows the back-end to focus on business knowledge graph modeling (and business rule reasoning and verification) without participating in UI display logic. The front-end autonomously configures itself based on the semantics of multi-dimensional metadata of business domain objects, eliminating the need for hard-coding business rules. The front-end and back-end iterate independently, linked by the semantics of the rich ontology model, without interfering with each other, effectively improving system iteration efficiency and scalability.
[0029] On the other hand, it can also support incremental interface updates, optimizing the user interaction experience. The front-end dynamic interface generation engine has incremental update capabilities. When the back-end rich ontology model undergoes fragment changes, only the affected interface area is refreshed locally, without the need for a full interface reload. This effectively reduces system refresh overhead and improves the smoothness of front-end interaction and user experience. Attached Figure Description
[0030] Figure 1 A schematic diagram illustrating an application scenario in one embodiment of this disclosure is shown.
[0031] Figure 2A flowchart illustrating an embodiment of the interface generation method based on ontology semantics is shown.
[0032] Figure 3 A flowchart illustrating the incremental update interface in one embodiment of this disclosure is shown.
[0033] Figure 4 A flowchart illustrating a business processing method according to an embodiment of this disclosure is shown.
[0034] Figure 5 A schematic diagram of the communication system is shown in yet another embodiment of this disclosure.
[0035] Figure 6 A schematic diagram illustrating the principle of the TEDA communication protocol in one embodiment of this disclosure is shown.
[0036] Figure 7 A flowchart illustrating a training method in one embodiment of this disclosure is shown.
[0037] Figure 8 A schematic diagram of the interface generation apparatus in one embodiment of this disclosure is shown.
[0038] Figure 9 A schematic diagram of the circuit structure of a computer device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0039] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed herein. This disclosure can also be implemented or applied through other different specific embodiments, and various details in this disclosure can also be modified or changed according to different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this disclosure can be combined with each other.
[0040] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings, so that those skilled in the art to which this disclosure pertains can readily implement it. This disclosure may be embodied in many different forms and is not limited to the embodiments described herein.
[0041] In the description of this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or a group of embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this disclosure, as well as the features of those different embodiments or examples.
[0042] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a set" means two or more, unless otherwise explicitly specified.
[0043] For the purpose of clarity, devices unrelated to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.
[0044] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.
[0045] While the terms first, second, etc., are used in some examples herein to describe various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, descriptions such as first interface and second interface, etc. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, step, operation, element, module, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, modules, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition occur only when combinations of elements, functions, steps, or operations are inherently mutually exclusive in some way.
[0046] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this disclosure. The singular form used herein includes the plural form unless the statement explicitly states otherwise. The word "comprising" as used in this specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.
[0047] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the message of the present disclosure, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.
[0048] While the software industry is currently seeing a trend towards CLI and conversational interaction, in enterprise-level business management scenarios, business capabilities such as structured business data entry, multi-dimensional browsing and batch operations, business status visualization, master-slave related data display, data analysis, and differentiated presentation of multi-role permissions highly rely on rich graphical interactive interfaces with two-dimensional layout and visual hierarchy. Pure command line or conversational interaction cannot replace these capabilities.
[0049] Existing technologies can be mainly divided into three categories, all of which have obvious drawbacks:
[0050] First, the traditional manual coding development model involves writing interfaces page by page based on frameworks such as React and Vue, relying on REST APIs and GraphQL for front-end and back-end communication. This approach results in highly coupled front-end and back-end interfaces, requiring simultaneous modifications to both when business requirements change. Forms, lists, and detail pages for different business domains all require manual coding, leading to a large amount of code and low development and maintenance efficiency.
[0051] Second, low-code / no-code visual building solutions rely on drag-and-drop configuration of components to build the interface, but most of them can only generate simple CRUD interfaces; they only use the attribute dimension information corresponding to the database table, without utilizing domain object relationships and business behavior rules, making it difficult to achieve complex interactions such as master-detail nested layouts, conditional display and hiding, field linkage, and state transitions; when the backend model changes, the entire interface generally needs to be regenerated, and incremental partial updates are not supported.
[0052] Third, the approach of directly generating front-end code using a large language model results in unstable and inconsistent output; moreover, it relies solely on natural language descriptions and lacks a formal and structured mapping with the back-end business model, which can easily lead to mismatches between the interface and the back-end business data structure.
[0053] In view of this, this disclosure provides an interface generation method and system based on ontology semantics, etc., by having the backend expose business knowledge graphs related to business to the frontend to obtain a dynamically changeable rich ontology model, which includes metadata of multiple dimensions related to interface building elements. Thus, the frontend can autonomously configure the interface to generate an interactive interface based on the semantics of the rich ontology model, achieving deep decoupling between the frontend and backend and solving the problems in related technologies.
[0054] like Figure 1 The diagram shown illustrates an application scenario in one embodiment of this disclosure.
[0055] exist Figure 1 In this context, the application scenario is a communication system. The communication system includes a communication front-end 110 and a communication back-end 120.
[0056] The front-end 110 is an interactive subsystem running on the client side, used to receive user input, render information interfaces, send requests to the server and process response results. It generally does not perform business data persistence or authoritative business logic verification. Its implementation can be at least one of browser web applications, desktop applications, mobile applications, and command-line terminals.
[0057] The backend 120 is a business processing system running on the server side, used to process business requests, execute business logic, complete data storage and computation, return processing results to the client, and can also actively push events to the client. In some embodiments, the backend 120 can be implemented as at least one of a relational database-based server system, a graph database-based knowledge graph service system, and a microservice system.
[0058] In some embodiments, the front-end 110 and the back-end 120 may be located on different devices for network communication, such as the front-end 110 being located on a user terminal and the back-end 120 being a remote server / server group. Alternatively, in other embodiments, the front-end 110 and the back-end 120 may be located on a single device.
[0059] In some embodiments, the front-end 110 can accept business requirement information input by a user in natural language form, and forward the business requirement information to the back-end 120. The back-end 120 parses the business requirement information using a semantic parsing tool to obtain the semantics of the business requirement information. Based on the semantics of the business requirement information, the back-end 120 matches and obtains a rich ontology model of business domain objects in a pre-established business knowledge graph. In some embodiments, the back-end 120 can parse the semantics of the business requirement information using, for example, a Large Language Model (LLM) or other types of Natural Language Processing (NLP) models. In the business knowledge graph, metadata is organized as knowledge nodes with existing relationships. Thus, based on the semantics of the requirement information, the metadata sets of corresponding domain entities in multiple dimensions can be matched in the knowledge graph through semantic similarity to obtain a rich ontology model.
[0060] A rich ontology model is a domain modeling approach that deeply integrates rich domain modeling with ontology modeling. Domain objects possess information across multiple dimensions, including attribute, relation, and behavioral dimensions. By defining these dimensions, real-world business concepts can be mapped to computable digital models.
[0061] Therefore, the rich ontology model may include metadata in the attribute dimension, relation dimension and behavior dimension respectively.
[0062] The attribute dimension metadata is used to define the data structure and constraints represented by the attribute set of the business domain object. In some embodiments, the attribute dimension metadata may include attribute names, data types, and constraints.
[0063] Taking the domain object "Order" as an example, the metadata of a "Sales Order" in the attribute dimension includes attribute names such as "Order Number," "Customer," "Total Amount," "Discount Amount," "Amount Payable," "Order Status," and "Creation Date." Each attribute name can carry semantic annotations, which can relate to the attribute's data type, constraints, state machine, business rules, etc.
[0064] The metadata of the attribute dimension may also include the data type and constraints of the attribute.
[0065] In some embodiments, the data type of the attribute includes at least one of the following: “text / string”, “date”, “enum”, “boolean”, “currency”, “ref”, “number”, “file”, etc.
[0066] In some embodiments, the constraints on an attribute may include at least one of the following: a required constraint (@Constraint(required=true)), a length constraint (@Constraint(maxLength=N)), a range constraint (@Constraint(min=X, max=Y)), and a format constraint (@Constraint(pattern="...")).
[0067] In some embodiments, the metadata of the attribute dimension may also include display prompts for the attribute. For example, displaying a prompt for the specific amount of the "discount amount" attribute.
[0068] The relational dimension metadata is used to define the semantic relationships and topology of domain objects and their attributes.
[0069] In some embodiments, the relational dimension metadata may include at least one of composition, association, inheritance, and dependency relationships. Taking the domain object "order" as an example, a composition relationship can be exemplified as the composition relationship between "order" and "order details," such as the order details being a component of an order; an association relationship can be exemplified as the relationship between "order" and "customer," such as one customer being associated with multiple orders; an inheritance relationship can be exemplified as the relationship between "subclasses" under the parent class "order," i.e., different types of orders such as "sales order" and "purchase order," each with different attributes; and a dependency relationship can be exemplified as the relationship where "order amount" depends on "budget amount" for verification.
[0070] The behavioral dimension metadata is used to define state transitions, business rules, and executable operations.
[0071] In some embodiments, the metadata of the behavioral dimension can be obtained based on the semantic annotations of attributes regarding state transitions, business rules, and executable operations. For example, based on the semantic annotations in "Order Status (enumeration: Draft / Confirmed / Shipped / Completed / Cancelled)", the state transition "Draft / Confirmed / Shipped / Completed / Cancelled" can be obtained, from which the state machine definition of the behavioral dimension metadata can be obtained: "Draft → Confirmed → Shipped → Completed" and the fallback path. As another example, based on "Total Amount (Currency, @Computed)", the "@Computed" indicates the automatically calculated business rule, which serves as one of the metadata of the behavioral dimension. Furthermore, based on "Discount Amount (Currency, @Rule)", the "@Rule" indicates rule calculation, that is, calling the bound operation rule to calculate the "discount amount".
[0072] It should be noted that the above "XX(xxxx)" is only a convenient way of expressing the information. The metadata does not need to be organized in this way in the backend. For example, "total amount, currency, and @Computed" can be associated and stored in a predefined data structure, and are not limited to the above example.
[0073] Therefore, when the backend 120 receives business requirement information such as "sales order" from the frontend 110, it will parse the semantic information of the "sales order" (for example, through natural language model parsing), and use the similarity of semantic information to query the relevant rich ontology model in the pre-stored business knowledge graph, that is, the collection of metadata of "sales order" in attribute dimension, relation dimension and behavior dimension, and return it to the frontend 110.
[0074] The metadata for each dimension is relevant to the constituent elements of the interactive interface to be generated. For example, metadata for the attribute dimension is related to interface elements; text corresponds to a text box, and the text length cannot exceed the limit. Metadata for the relationship dimension is related to the interface layout; for example, the combination relationship between "order" and "order details" corresponds to the master-detail table or nested form layout of the two in the interface. Metadata for the behavior dimension is related to the business interaction logic. For example, when the status is "draft," "confirm" and "cancel" buttons are displayed; when the status is "confirmed," a "ship" button is displayed, etc.
[0075] Therefore, by designing the aforementioned correlations into mapping rules, the front-end 110 can use these mapping rules to map the semantic information parsed from metadata of each dimension into mapping results such as interface elements, interface layout, and interface interaction logic. Furthermore, the front-end 110 can autonomously generate an interactive interface based on the interface elements, interface layout, and interface interaction logic determined by these mapping results.
[0076] As can be seen, the front-end 110 and back-end 120 generate an interactive interface through multi-dimensional mapping results such as attributes, relationships, and interaction logic. The interface can fully reflect the business information of the back-end 120. Compared with existing solutions that only use data type information to generate simple CRUD interfaces, the interactive interface generated in this embodiment can be a rich interactive interface with rich interactive functions. A rich interactive interface refers to a front-end 110 interface with rich user interaction capabilities, including but not limited to: dynamic forms (supporting field linkage, condition display, and automatic calculation), data lists (supporting multi-dimensional filtering, sorting, and page layout), master-detail table layout (supporting nested sub-tables and cascading operations), data visualization dashboards, etc., or one or more of these.
[0077] Furthermore, the backend 120 exposes a rigorous and precise business knowledge graph to the frontend 110. This graph is used to match the corresponding rich ontology model according to business requirements, thus constraining the frontend 110 to complete the mapping based on the rich ontology model and preset mapping rules. This results in accurate mapping results for interface elements, layout, and interaction logic, generating an interactive interface. On the one hand, this ensures consistency in data structure between the frontend and backend 120; on the other hand, it avoids the randomness and illusion defects of large language models, solving the problems of inconsistent interface generation effects and unstable code quality under the same business requirements.
[0078] like Figure 2 The diagram illustrates a flowchart of an interface generation method based on ontology semantics according to an embodiment of this disclosure. In this embodiment, the method is executed on the front-end 110 side and includes the following steps:
[0079] Step S201: Front-end 110 obtains the user's business requirement information, which can be described in natural language.
[0080] In some embodiments, a user can input business requirement information at the front end 110. This business requirement information can be a business operation requirement described in natural language. For example, a user can input a business operation requirement described in natural language such as "create a new sales order" or "view all pending purchase requests". The front end 110 forwards the user-input business requirement information to the back end 120.
[0081] In some embodiments, the business requirement information may be natural language text directly input by the user via an input device such as a keyboard. In other embodiments, the business requirement information may also be audio data input by the user via voice, which is then converted into natural language text using methods such as automatic speech recognition (ASR).
[0082] Step S202: Front-end 110 requests a rich ontology model of a business domain object that matches the business requirement information from back-end 120. The rich ontology model includes metadata in the attribute dimension, relation dimension, and behavior dimension.
[0083] In the previous embodiments, the content of metadata for the attribute dimension, relationship dimension, and behavior dimension has been exemplarily shown and explained.
[0084] The metadata of the attribute dimension defines which attribute fields a domain object has, the data type of each attribute field (such as text, date, enumeration, currency, etc.), constraints (such as required, length limit, value range, format requirements, etc.), and display prompts (such as label text, placeholders, help instructions, etc.). The metadata of the attribute dimension is the foundation for subsequent interface element mapping, determining what input controls the front-end uses, what validation rules are executed, and what prompts are displayed.
[0085] Metadata for the relationship dimension is used to define the semantic relationships and topology between domain objects and their attributes. The relationship dimension defines various types of semantic relationships between domain objects, including composition relationships (such as the whole-part relationship between "order" and "order details"), association relationships (such as a one- or many-to-one reference relationship between "order" and "customer"), inheritance relationships (such as the parent-child relationship between "order" and specific orders of different types), and dependency relationships (such as the validation dependency between "order amount" and "budget amount"). This relationship information determines the layout structure of the front-end interface and the way controls are associated and laid out.
[0086] Behavioral dimension metadata is used to define state transitions, business rules, and executable operations. The behavioral dimension defines the business state machine of domain objects (e.g., the state transition path and conditions from "draft" to "confirmed" to "shipped" defined in semantic annotations), business rules (e.g., calculation rules @Computed, constraints @Constraint, conditional rules @Rule, etc. in semantic annotations), and executable business operation methods. These behavioral definitions directly map to the interaction logic of the front-end 110 interface, including the conditional display of status buttons, the linkage / calculation between attribute fields, and pre-validation of operations.
[0087] Step S203: The front-end 110 parses the semantic information of the metadata of each dimension in the hyperactive ontology model, and obtains the interface configuration information based on the semantic information.
[0088] After receiving the rich ontology model returned by the backend 120, the frontend 110 performs semantic parsing and interface mapping on the metadata of each dimension contained therein.
[0089] In some embodiments, the front end 110 may map the semantic information of the attribute dimension metadata to the corresponding interface elements to obtain the attribute dimension mapping result, including at least one of the following methods.
[0090] As an example, the front-end 110 can map the data type and / or semantic information of the attribute dimension metadata to the corresponding input control, as shown in Table 1 below.
[0091] For example, if the data type of the attribute is "text / string", then it maps to the "text input box" control; if the semantic label is "multiline text", then "text / string" corresponds to the "text field" in the "text input box" that supports "multiline text" input. And so on.
[0092] Table 1 Property Mapping Controls
[0093] Data types Mapping Control Semantic annotation impact text / string Text input box When the semantic tag is "multiline text", it is mapped to a text field. date Date picker When the semantic tag is "time range", it is mapped to a date range selector. Enumeration / enum drop-down selection box When the semantic tag is "single selection", it is mapped to a group of radio buttons. Boolean Switches / Checkboxes When the semantic tag is "Confirm", it is mapped to a confirmation checkbox. currency Amount input box Automatically add currency symbols and thousands separators Reference / ref Related Entity Selector Generate an options list based on the target entity's main display attributes. number Number input box When the semantic tag is "percentage", it is mapped to a slider with a percentage sign. Attachment / file File upload control The allowed file formats are restricted by semantic annotation based on the permitted file types.
[0094] As an example, front-end 110 can map the semantic information of the constraints of attribute dimension metadata to the corresponding front-end 110 validation rules, including mapping required constraints (@Constraint(required=true)) to required validation; length constraints (@Constraint(maxLength=N)) to input length limit; value range constraints (@Constraint(min=X,max=Y)) to input range validation; and format constraints (@Constraint(pattern="...")) to format validation.
[0095] As an example, frontend 110 can map the semantic information of display prompts based on attribute dimension metadata to corresponding prompt content. For example, the display prompts for the attributes of domain objects can be mapped to the label text, placeholder text, and help prompts on the interface.
[0096] In some embodiments, the front end 110 may map the semantic information of the relation dimension metadata to the corresponding interface layout to obtain the relation dimension mapping result, including at least one of the following methods.
[0097] As an example, the front-end 110 can map combination relationships to master-detail tables or nested form layouts. For instance, the combination relationship between "orders" and "order details" automatically generates an order form containing a details list. In the interface layout, the editing interface of "orders," as the main entity, embeds an inline editing list of the sub-entity "order details," supporting the dynamic addition and deletion of sub-records.
[0098] As an example, frontend 110 can map relationships to reference selection controls. For instance, the relationship between "orders" and "customers" automatically generates a customer selector control. The selector generates a list of options based on the target entity's (e.g., "orders") attributes (e.g., "customers"), supporting search and filtering.
[0099] As an example, frontend 110 can map inheritance relationships to conditional explicit / implicit rules driven by domain object types. For instance, different order types display different attribute fields. The interface dynamically shows or hides the corresponding attribute input controls based on the entity type selected by the user.
[0100] As an example, the front-end 110 can map dependencies to related data panels. For instance, "Order Amount" depends on "Budget Amount" validation, and the interface automatically displays the relevant budget information panel when editing an order.
[0101] In some embodiments, the semantic information based on the behavioral dimension metadata is mapped to the corresponding interface interaction logic to obtain the behavioral dimension mapping result, including at least one of the following.
[0102] As an example, the front-end 110 can map the semantic information of the business state machine's semantic annotations in the attribute dimension metadata to the conditional display of corresponding state operation controls. For example, the business state machine definition is mapped to operation buttons and state displays for state transitions. Specifically, based on the state set and valid transition paths corresponding to the semantic annotation "@StateMachine", the current state label and operable state operation buttons are displayed on the interface, such as "Draft → Confirm → Ship → Complete". Furthermore, only the state operation buttons corresponding to the target states that the current state can legally transition to are displayed; buttons are not generated for unreachable transitions.
[0103] As an example, Front-end 110 can map the semantic information of its validation rules to the corresponding Front-end 110 validation logic. For instance, based on the validation rules defined by the semantic annotation "@Constraint", pre-validation can be performed on Front-end 110 before the user submits the operation, providing immediate feedback on the validation results. For example, a text box can be mapped based on the data type of the attribute being text, and the length constraint @Constraint(maxLength=N) defined in the semantic annotation of that attribute can be used to validate whether the user's input text in the text box exceeds the input length limit N.
[0104] As an example, Frontend 110 can map semantic information from business rules to corresponding business interaction logic. For instance, based on the conditional rules and automatic calculation rules defined by the attribute semantic annotations "@Rule" and "@Computed", Frontend 110 implements linked display and automatic calculation between fields. For example, @Computed(expr="unit price * quantity") maps to the real-time automatic calculation logic of the amount field as "unit price * quantity".
[0105] Therefore, semantic information based on attribute dimension metadata is mapped to corresponding interface elements (including input controls, validation rules, and prompts), resulting in attribute dimension mapping results. Semantic information based on relation dimension metadata is mapped to corresponding interface layouts (including master-detail tables, selection controls, conditional display rules, etc.), resulting in relation dimension mapping results. Semantic information based on behavior dimension metadata is mapped to corresponding interface interaction logic (including status operation buttons, validation logic, linked calculations, etc.), resulting in behavior dimension mapping results. The mapping results from multiple dimensions together constitute the interface configuration information.
[0106] Step S204: The front end 110 generates an interface structure description based on the interface configuration information.
[0107] In some embodiments, the front-end 110 can convert the aforementioned interface configuration information into a platform-independent interface structure description, such as a declarative interface description tree. This declarative interface description tree defines the structure, layout, and interaction logic of the interface elements (such as controls). This declarative description method allows the same interface configuration information to be interpreted and executed by renderers on different platforms (such as React, Vue, Flutter, etc.), achieving the technical effect of "defining once and rendering on multiple platforms," thus improving efficiency.
[0108] In other embodiments, the interface structure description uses JSON Schema format, which is compatible with the industry-standard JSON Schema specification. Compared to a declarative interface description tree, this approach has a higher degree of standardization, but its ability to express complex interactive logic (such as field linkage and state transition buttons) is limited.
[0109] In other embodiments, the interface structure description can also be implemented using an XML-formatted interface description language (such as XForms). This approach has mature standards and tools supporting form descriptions, but it is less flexible than a declarative interface description tree in describing list views and statistical views.
[0110] In other embodiments, the interface structure description may be generated directly using methods such as a large language model to generate front-end 110 component code (e.g., generating React or Vue component source code), instead of generating a declarative interface description tree. The generated front-end 110 component code is compiled and executed, supporting more flexible custom interfaces. This approach offers greater flexibility, but the consistency and stability of the generated results may not be as good as the declarative description tree approach.
[0111] Step S205: The front-end 110 renders and generates an interactive interface corresponding to the business requirement information based on the interface structure description.
[0112] Specifically, the front-end 110 parses the interface structure description and renders it into an interactive interface that can be displayed and interacted with in a browser. During the rendering process, the renderer creates corresponding controls based on the definition of interface elements in the interface structure description, sets the position and hierarchy of controls according to the definition of interface layout, sets status buttons and condition displays according to the definition of interface interaction logic, and determines rules such as data validation, linked display between fields, and automatic calculation, automatically forming and presenting an interactive interface to the user corresponding to the business requirement information.
[0113] To adapt to the rendering requirements of different scenarios, the front-end 110 can be configured with one or more renderers corresponding to different rendering objects. In some embodiments, the front-end 110 can be configured with a form view renderer, which can be used to adapt form view rendering for data input / editing scenarios. As an example, the form view renderer can generate input control layouts based on attribute dimension mapping results, embed master-detail tables and reference selectors based on relationship dimension mapping results, and add pre-validation and interaction logic based on behavior dimension mapping results. In some embodiments, the front-end 110 can be configured with a list view renderer, which can be used to adapt list view rendering for data query / display scenarios. As an example, the list view renderer can generate column definitions and filtering conditions based on attribute dimension mapping results, support multi-dimensional filtering, sorting, and pagination, and display status operation buttons and status indicators in list rows according to state machine definitions. In some embodiments, the front-end 110 can be configured with a statistical view renderer, which can be used to adapt instrument view rendering for data analysis / monitoring scenarios. As an example, the statistical view renderer automatically generates trend charts, distribution charts, and statistical cards based on the attribute type being numeric and the semantic annotation "@Aggregate" indicating aggregation calculation in the attribute dimension.
[0114] Let's illustrate this with an application example. If a user inputs the business requirement "View all purchase orders exceeding 10,000 yuan this month," the backend 120 performs semantic recognition and matches it with a rich ontology model corresponding to the domain object "purchase order," and automatically constructs the query condition "all purchase orders exceeding 10,000 yuan this month." The purchase order data matching the query condition is returned to the frontend 110 as the result. The frontend 110 then constructs the corresponding purchase order query result interface based on the rich ontology model and displays it, for example, in a list format. Furthermore, the retrieved purchase order data is displayed in the list.
[0115] In some embodiments, when the front-end 110 detects a change in the rich ontology model, it generates an updated interactive interface accordingly. In some embodiments, the change in the rich ontology model can be caused by user operations on the interactive interface of the front-end 110. For example, a user modifies the value of a field in a form, triggering an update of the associated domain object data, or the user operates a control button, resulting in updated business requirement information. The front-end 110 sends the updated business requirement information to the back-end 120, thus causing a change in the rich ontology model. In other embodiments, the change in the rich ontology model can also be caused by data updates in the back-end 120. For example, cascading data changes caused by constraint propagation performed by the business rule inference engine of the back-end 120, or changes caused by other modifications to the structural definition of the rich ontology model by the back-end 120.
[0116] Therefore, following the principles of steps S201 to S205 above, it can be seen that the updated hyperemia ontology model will generate an updated interactive interface.
[0117] In some embodiments, this disclosure may provide a method for incrementally updating the congested ontology model and the user interface.
[0118] like Figure 3 The diagram shown illustrates a flowchart of an incremental update interface in one embodiment of this disclosure.
[0119] exist Figure 3 The process includes:
[0120] Step S301: The front end 110 obtains the model fragment of the congested body model that has changed from the back end 120.
[0121] It is understandable that this model fragment only contains metadata for the changed parts, rather than a complete rich ontology model.
[0122] In some embodiments, the backend 120 may proactively notify the frontend 110 of changes to the enriched ontology model via a real-time data synchronization channel with the frontend 110. This event-driven push mechanism ensures that the frontend 110 can promptly detect data changes without polling the backend 120 interface, reducing network overhead and server load.
[0123] Step S302: The front end 110 obtains the local difference information of the corresponding changes in the interface structure description based on the semantic parsing and mapping of the model fragment.
[0124] Step S303: The front end 110 renders based on the local difference information, that is, only refreshes the affected interface area to generate the updated interactive interface.
[0125] In some embodiments, referring to steps S203-S205, the updated configuration information in the interface configuration configuration information is obtained based on the updated metadata mapping corresponding to the model fragment. Further, local difference information in the interface construction information, such as local differences (diff) in the declarative interface description tree, is obtained. The renderer performs local re-rendering and incremental updates to the affected interface areas, without needing to reload the entire interactive interface. This incremental update method avoids the overhead of full re-parsing and rendering, significantly improving the performance and user experience of interface updates.
[0126] In some embodiments, the front-end 110 may employ a template library plus optional template configuration items to pre-set interface templates for each type of rich domain ontology model. Users can select a template and adjust it by selecting template configuration items, balancing interface generation efficiency and personalization needs.
[0127] In some embodiments, the front-end 110 adaptively adjusts the layout of the interactive interface based on user habits and / or the characteristics of the current business scenario. The front-end 110 can collect user operation behavior data and current business scenario information, and, combined with the basic interface configuration results output by the rich ontology model, intelligently adjust the interface layout and information display priority according to user habits. The rich ontology model provides baseline configuration constraints for interface elements, layout structure, and interaction logic, ensuring the correctness of business semantics. User habits and scenario information can be used as runtime optimization parameters, allowing for adaptive adjustments to the display position, display level, and exposure priority of interface elements without changing the business semantics and mapping rules defined in the ontology. For example, for users who frequently perform order entry operations, frequently used data entry forms and shortcut operation buttons are automatically placed in prominent positions.
[0128] Specifically, the front-end (110) can statistically determine frequently used data and operations by users. In the order editing interface, it can prioritize the display of controls related to frequently used data and operations (such as data entry forms and quick operation buttons) and place them in prominent visual positions. Conversely, less frequently used controls can be moved to the back, thus adapting to different user preferences. This intelligent adjustment only changes the presentation of the interactive interface and does not modify the metadata definition of the back-end (120) ontology model.
[0129] In some embodiments, when the front-end 110 detects that a user is performing a preset business operation, it requests auxiliary decision-making information from the back-end 120 and presents it in the interactive interface. Specifically, when a user performs a critical business operation, the front-end 110 requests decision support information (such as data quality prompts and business suggestions) from the back-end 120 and presents it in a visual manner in the operation interface. For example, before submitting the next operation, a prompt is displayed suggesting that the user confirm / check the information.
[0130] like Figure 4 The diagram shown illustrates a flowchart of a business processing method according to an embodiment of this disclosure. The business processing method can be executed on the backend 120.
[0131] exist Figure 4 The business processing method includes the following steps:
[0132] Step S401: Backend 120 obtains user service requirement information transmitted by frontend 110, wherein the service requirement information can be described in natural language.
[0133] Specifically, the front-end 110 transmits the business requirement information input by the user to the back-end 120.
[0134] Step S402: Backend 120 matches the rich ontology model of the corresponding business domain object based on the business requirement information. The rich ontology model includes metadata in the attribute dimension, relationship dimension and behavior dimension.
[0135] In some embodiments, the backend 120 matches the rich ontology model of the business domain object corresponding to the business requirement information in the business knowledge graph. The meanings of the metadata of the multiple dimensions included in the rich ontology model are as described above.
[0136] Step S403: The backend 120 transmits the congested body model to the frontend 110.
[0137] Specifically, the backend 120 transmits the matched congested body model to the frontend 110.
[0138] Therefore, referring to previous implementations of interface generation methods, the front-end 110 maps the semantic information of metadata of each dimension in the rich ontology model to the interface configuration configuration information, generates an interface structure description according to the interface configuration configuration information, and generates an interactive interface with corresponding business requirement information through rendering.
[0139] In some embodiments, when the hyperbolic body model changes, the backend 120 can transmit only the changed model fragment to the frontend 110, so that the frontend 110 can obtain incremental updates of the local difference information in the interface structure description based on the model fragment. Then, the interactive interface is rendered and updated based on the local difference information, which will only refresh the corresponding affected interface area locally. There is no need to reload the entire interface, which effectively reduces the system refresh overhead and improves the smoothness of the interaction and user experience of the frontend 110.
[0140] like Figure 5 The diagram shown illustrates the structure of a communication system in yet another embodiment of this disclosure.
[0141] The front-end 110 may include a front-end interaction proxy module 111, a semantic parsing and mapping module 112, and a dynamic interface generation engine 113.
[0142] The front-end interaction proxy module 111 serves as the entry point for user interaction, collecting user intent and presenting the system's execution results to the user in a visual manner. The front-end interaction proxy module 111 supports natural language interaction. Users can describe business needs using natural language. The front-end 110 interaction proxy forwards this information to the back-end 120 for processing. The back-end 120 parses the intent based on the business needs, executes the business operation, and returns the result. The front-end interaction proxy module 111 also presents the result returned by the back-end 120 to the user in a suitable interactive interface. For example, if a user enters "View all purchase orders exceeding 10,000 yuan this month" on the front-end 110, the front-end 110 interaction proxy transmits this to the back-end 120. The back-end 120 parses the semantics and automatically constructs query conditions, queries the corresponding rich ontology model and filtered purchase order data, and returns the result, which is then displayed in a list format by the front-end 110 interaction proxy.
[0143] In some embodiments, the front-end 110 interaction agent can adaptively adjust the layout of the interactive interface according to user habits and / or the characteristics of the current business scenario. Specifically, the front-end 110 interaction agent can intelligently adjust the interface layout and information display priority according to user habits and the current business scenario.
[0144] In some embodiments, when the front-end 110 detects that a user is performing a preset business operation, it requests auxiliary decision-making information from the back-end 120 and presents it in the interactive interface. When a user performs a critical business operation, the front-end 110 interactive agent requests decision support information (such as data quality prompts and business suggestions) from the back-end 120 and presents it in a visual manner in the operation interface.
[0145] In some embodiments, the semantic parsing and mapping module 112 (in a specific implementation, the rich ontology model semantic parsing and interface mapping module) is responsible for parsing the definition of the rich ontology model of the backend 120 and mapping the semantic information to the construction instructions of the frontend interface 110. This module executes the above-mentioned three-dimensional mapping rules: mapping from attribute dimension to interface elements, mapping from relationship dimension to interface layout, and mapping from behavior dimension to interaction logic.
[0146] In some embodiments, the interface dynamic generation engine 113 is used to generate an interface structure description based on interface configuration information, and to render an interactive interface corresponding to business requirements based on the interface structure description. In some embodiments, the interface dynamic generation engine 113 may include the interface structure description and a renderer (e.g., a multi-view renderer mentioned in previous embodiments, such as a form view renderer, a list view renderer, or a statistics view renderer). Optionally, the interface dynamic generation engine 113 supports an incremental update mechanism, automatically sensing changes and incrementally updating the affected interface areas when the backend 120 rich ontology model definition changes.
[0147] As described in the previous embodiments, optionally, the interface structure description may use JSON Schema format to describe the interface structure, or use an XML format interface description language (such as XForms) to replace the declarative interface description tree.
[0148] Backend 120 includes a business knowledge graph 121. In some embodiments, the business knowledge graph 121 is a structured knowledge base where the backend 120 stores a rich ontology model. The metadata of the domain objects defined by the rich ontology model and their attribute dimensions, relation dimensions, and behavior dimensions are all permanently stored in the business knowledge graph 121. In some embodiments, the backend 120 may also include a business rule reasoning engine 122. When the frontend 110 submits a user's operation request from the interactive interface to the backend 120, the backend 120 can perform deterministic logical reasoning through the business rule reasoning engine 122 and return the execution result. As an example, the business rule reasoning engine 122 can be implemented as a deterministic rule reasoning system based on a Resource Description Framework (RDF) knowledge graph, adopting a closed-world assumption, that is, only believing the business data that is explicitly recorded in the business knowledge graph 121, and considering facts that are not explicitly recorded as invalid without making subjective speculations, thereby effectively constraining the large language model used from forcibly generating content illusions. The business rule reasoning engine 122 can compile various semantic annotations used by metadata of each dimension into production rules during the offline compilation stage. Then, the production rules can be run to perform deterministic logical operations and constraint verification on the business data, ensuring that the business data meets the preset business constraints.
[0149] In some alternative embodiments, the front-end 110 and the back-end 120 can communicate via a communication protocol layer 130. The communication protocol layer 130 may include an interface autonomous configuration communication protocol 131 between the front-end 110 and the back-end 120. This interface autonomous configuration communication protocol is defined as a four-stage interaction protocol (Train-Explore-Discover-Act Protocol, TEDA). This communication protocol defines the complete lifecycle of the interaction between the front-end 110 and the back-end 120.
[0150] like Figure 6 The diagram shown illustrates the principle of the TEDA communication protocol in one embodiment of this disclosure.
[0151] The training phase is an offline phase designed to define and compile business rules.
[0152] like Figure 7 The diagram shows a flowchart of a training method according to an embodiment of this disclosure. The training method is applied to the backend 120 side.
[0153] like Figure 7 As shown, the process includes:
[0154] Step S701: Backend 120 obtains the business rules about domain objects described in natural language as input during the training phase.
[0155] In some embodiments, the training phase can be operated by an administrator or business expert. The administrator or business expert submits business rules described in natural language to the backend 120 through the training interface. For example, business rules described in natural language such as "the total order amount equals the sum of the amounts of all detail lines" or "order details cannot be modified when the order status is 'shipped'" can be entered.
[0156] Step S702: Backend 120 converts the business rule into semantic annotations of the attributes of the domain object.
[0157] Backend 120 can use a rule converter based on a natural language processing model (such as a large language model) to compile business rules described in natural language into formal semantic annotations.
[0158] For example, semantic annotations transformed from business rules include, but are not limited to, state machine definitions (@StateMachine), computation rules (@Computed), constraints (@Constraint), and conditional rules (@Rule).
[0159] Step S703: The backend 120 associates the reviewed and tested semantic annotations with the corresponding attributes and injects them into the business knowledge graph 121 for matching of the rich ontology model.
[0160] In some embodiments, the transformed semantic annotations can be audited and tested (e.g., interactive verification, manual review, etc.). The approved semantic annotations are then embedded as metadata into the business knowledge graph 121, associated with corresponding attributes such as total amount and @Computed. Thus, the business knowledge graph 121 can be used to match and provide a rich ontology model at runtime (i.e., during the exploration, discovery, and action phases).
[0161] In some embodiments, the communication protocol may provide a training interface for the training phase, providing one or more of the following capabilities:
[0162] The rule submission interface is used to receive business rule descriptions in natural language.
[0163] The conversion preview interface returns a formalized logical expression of the converted semantic annotations for review. For example, it can be displayed as natural language text on the interface for human review.
[0164] The test verification interface is used to input the test dataset with semantic annotations into the business rule inference engine 122, obtain the production rules compiled by the business rule inference engine 122, and obtain the inference results; and test and verify whether there are any problems with the semantic annotations based on the inference results.
[0165] The rule solidification interface is used to write the semantic annotation into the business knowledge graph 121 after the above review and testing are confirmed.
[0166] The rule version management interface is used to support version control and rollback of semantic annotations corresponding to business rules.
[0167] The Explore phase is the stage where the front-end 110 discovers the metadata and structure of the back-end 120. During the Explore phase, the front-end 110 obtains the structural definition information of the back-end 120's business knowledge graph 121 through the Explore interface, for use in the autonomous configuration of the interface. The structural definition information includes definitions in dimensions such as attributes, relationships, and behaviors (constraints, state machines).
[0168] In some embodiments, the exploration interface provides one or more of the following capabilities:
[0169] The domain object structure query interface is used to obtain the attribute definitions related to the metadata of a specified domain object in the attribute dimension, which may include data types, constraints, semantic annotations, prompts, etc.
[0170] The relation topology query interface is used to obtain the relation definition of metadata for the relation dimension, which for example includes the relation type, cardinality, semantic description, etc. between domain objects / attributes.
[0171] The constraint query interface is used to obtain the constraint definitions of business rules related to behavioral dimension metadata, such as the formal semantic annotations corresponding to the constraints.
[0172] The state machine query interface is used to obtain state transition definitions related to behavioral dimension metadata, which may include, for example, state sets, valid transition paths, and transition conditions.
[0173] The ontology change notification interface is used to proactively notify the front-end 110 to update the interface configuration when the structure definition of the business knowledge graph 121 changes (such as adding metadata).
[0174] The Discover phase is the data discovery phase where the frontend (110) discovers business data and the status of business rules from the backend (120). Unlike the Exploration phase, which obtains static structure definitions, the Discover phase focuses on dynamic business data and the real-time execution status of business rules. During the Discover phase, the frontend (110) obtains business data and the execution status of business rules through the Discover interface.
[0175] In some embodiments, the discovery interface provides one or more of the following capabilities:
[0176] The data query discovery interface is used to respond to the corresponding requests based on the business requirements information of the front-end 110. The back-end 120 parses the semantics based on the business requirements information and constructs query conditions, and returns a set of business data that meets the query conditions.
[0177] The rule status discovery interface is used to expose the currently effective business rules and their applicable conditions on the backend 120, so that the frontend 110 can perform pre-verification accordingly.
[0178] The constraint discovery interface is used to output the constraints that are in effect in the current operation context. The front end 110 dynamically adjusts the interface input restrictions and prompts based on these constraints.
[0179] The status push interface is used to push status change events of domain objects in real time through the real-time data synchronization channel 133 based on the event-driven mechanism, so that the front-end interface 110 can automatically refresh according to the event.
[0180] The Action phase (Act) is the stage where the front-end 110 submits the user's operation request to the back-end 120 for execution and feedback of the result. After receiving the operation request from the front-end 110, the back-end 120 performs deterministic logic reasoning and constraint verification through the business rule reasoning engine 122 to complete the business operation and return the result.
[0181] In some embodiments, the action interface provides one or more of the following capabilities:
[0182] The operation submission interface is used to receive operation requests submitted by the front-end 110. The operation request carries the target domain object, operation type, and parameter data.
[0183] The pre-verification interface is used to perform constraint verification on the business operation before the corresponding business operation of the operation request is officially executed, and return the verification results and conflict information to realize the pre-verification of business operations.
[0184] The execution feedback interface is used to return the execution results of business operations, including execution status, affected data changes, and cascading triggered business events.
[0185] The result readability interface is used to convert the formal reasoning results and constraint conflict information obtained by the business rule reasoning engine 122 into natural language descriptions for the front end 110 to display to the user.
[0186] In some embodiments, the communication protocol layer may further include a semantic interface adapter 132. The semantic interface adapter 132 can automatically generate standardized interface implementations based on the definition of the rich ontology model and the TEDA protocol specification. The backend 120 does not need to manually write interface code; the adapter automatically generates all interfaces for the four stages mentioned above based on the rich ontology interface model of the domain objects. The interface protocol carries semantic annotations, which the frontend 110 uses to automatically configure the interactive interface.
[0187] As an example, the semantic interface adapter 132 reads the attribute dimension metadata of the rich ontology model of the domain object and automatically generates the response format of the domain object structure query interface. The semantic interface adapter 132 reads the relation dimension metadata and automatically generates the response format of the relation topology query interface. The semantic interface adapter 132 reads the constraints and business state machines in the behavior dimension metadata and automatically generates constraint query interfaces and business state machine query interfaces. The semantic interface adapter 132 reads the business operation method definitions and automatically generates operation submission interfaces and pre-validation interfaces. All of these interfaces can carry semantic annotations, allowing the front-end 110 to independently determine the configuration method of the interactive interface.
[0188] In some embodiments, the communication protocol layer further includes a real-time data synchronization channel 133, through which the front-end 110 and the back-end 120 synchronize data. Specifically, the real-time data synchronization channel 133 achieves real-time data synchronization between the front-end and back-end 120 through an event-driven mechanism. The real-time data synchronization channel 133 can be used for incremental updates of the interactive interface. As an example, when the data of the domain objects in the back-end 120 changes (including model fragments whose data changes due to user operations, cascading changes caused by constraint propagation of the business rule inference engine 122, etc.), the change event is pushed to the front-end 110 through the real-time data synchronization channel 133, and the front-end 110 interface automatically updates the displayed content.
[0189] In some embodiments, the real-time data synchronization channel 133 can support event filtering and subscription. The front-end 110 can subscribe to change notifications for specific domain objects or specific event types as needed, avoiding receiving irrelevant events. This subscription mechanism ensures that the front-end 110 obtains necessary updates in a timely manner, while avoiding unnecessary data transmission and interface refreshes.
[0190] In some embodiments, when the business data of the rich ontology model of the backend 120 changes, the data change event can be actively pushed to the frontend 110 through the real-time data synchronization channel 133, so that the interface dynamic generation engine 113 of the frontend 110 can perform incremental updates of the interactive interface.
[0191] In a specific embodiment, when the data of the domain object in the backend 120 changes (including cascading changes caused by the constraint propagation of the business rule inference engine 122), the model change event will also be pushed to the frontend 110 through the real-time data synchronization channel 133, and the frontend 110 interface will automatically update the displayed content.
[0192] In some embodiments, when the structural definition (rather than business data) of the rich ontology model of the backend 120 changes, the backend 120 can also actively push the model change event to the frontend 110 through the real-time data synchronization channel 133, and the interface dynamic generation engine 113 of the frontend 110 performs incremental updates accordingly.
[0193] In some embodiments, the real-time data synchronization channel 133 can also be used to push status change events in real time (such as an order changing from "draft" to "confirmed"), and the front-end interface 110 will automatically update the status indicator and available controls (such as buttons).
[0194] In some embodiments, the TEDA protocol and semantic interface adapter 132 may be replaced by other solutions, and are not limited to the above embodiments.
[0195] As an alternative example, a graph query language (such as GraphQL) can be used as the communication protocol between the frontend 110 and the backend 120. The definition of the rich ontology model is automatically mapped to the graph query pattern definition, and the frontend 110 can flexibly query the required subset of data. This example is superior in terms of data query flexibility, but lacks the ability to obtain structured metadata during the training and exploration phases as in the TEDA protocol.
[0196] As another example, an event sourcing model can be adopted, where the front-end 110 and the back-end 120 communicate via event streams. All business operations are transmitted and stored in the form of events, supporting complete backtracking and auditing of business operations. This solution is superior in terms of historical tracing, but the implementation complexity of real-time interface updates is relatively high.
[0197] It is understood that the communication system architecture of the front-end 110 and back-end 120 provided in this embodiment adopts a headless architecture design for the back-end 120. That is, the back-end 120 does not contain presentation layer logic and only provides pure business logic, data management, and interface capabilities. The responsibility boundary of the back-end 120 focuses on the construction of the business knowledge graph 121 and the guarantee of logical constraints, and is completely decoupled from the interface display and user interaction of the front-end 110. The front-end 110 autonomously configures the interface based on the rich ontology model provided by the business knowledge graph 121 exposed by the back-end 120.
[0198] Therefore, this disclosure achieves "decoupling" between the front-end 110 and the back-end 120 through a headless architecture and the TEDA protocol. The traditional division of front-end 110 and back-end 120 only separates them in terms of deployment and technology stack; however, front-end 110 still relies on specific API interfaces provided by back-end 120 to build pages, and the page structure and interaction logic of front-end 110 usually need to be customized based on the back-end 120's interfaces. The "decoupling of front-end 110 and back-end 120" proposed in this disclosure goes a step further than separation; that is, back-end 120 adopts a headless architecture and is completely unconcerned about how data is displayed. Front-end 110 autonomously configures its interface based on the semantic definition of the business knowledge graph 121 exposed by back-end 120, without relying on specific page interfaces provided by back-end 120. The two can collaborate through the TEDA protocol and the semantic definition of the rich ontology model as a contract, evolving independently.
[0199] This disclosure adopts a metadata-driven architecture pattern, in which system behavior is defined and controlled by business-related metadata (data describing data) rather than hard-coded in the program, thereby achieving a high degree of flexibility and configurability.
[0200] This disclosure enables standardized interaction between the front-end 110 and the back-end 120 through a self-configurable interface communication protocol (TEDA protocol, short for Training-Exploration-Discovery-Action Protocol). The TEDA protocol defines the complete lifecycle of the interaction between the headless back-end 120 and the front-end 110, enabling the front-end 110 to obtain the complete logical semantic definition of the back-end 120's business knowledge graph 121 and self-configure the interface accordingly, rather than relying on specific page interfaces provided by the back-end 120.
[0201] In practical applications, the backend 120 transmits the matched rich ontology model to the frontend 110. The semantic parsing and mapping module 112 of the frontend 110 parses the semantic information of the metadata of each dimension in the rich ontology model and maps the interface configuration information based on the semantic information. The interface dynamic generation engine 113 generates an interface structure description based on the interface configuration information and renders the corresponding interactive interface based on this interface structure description to generate the corresponding business requirement information. Throughout this process, the frontend 110 does not need to manually write any interface code; the interface is automatically generated entirely by the semantic definition of the rich ontology model from the backend 120.
[0202] Taking the "enterprise customer order management" scenario as an example, this paper explains the dynamic configuration process of the front-end 110 interface.
[0203] First, the front-end 110 obtains the rich ontology model definition through the TEDA protocol exploration phase.
[0204] For example, frontend 110 sends an exploration request to backend 120 to obtain the complete definition of the "sales order" rich ontology model, including:
[0205] Metadata for attribute dimensions: Order number (text, unique identifier, automatically generated), customer (reference to associated domain object), order details (collection of combined subdomain objects), total amount (currency, automatically calculated by @Computed), discount amount (currency, calculated by @Rule rules), amount due (currency, automatically calculated by @Computed), creation date (date, automatically populated), order status (enumeration: draft / confirmed / shipped / completed / cancelled).
[0206] Metadata for the relationship dimension: It has a one-to-one relationship with "customer" and a combination relationship with "order details" (one-to-many).
[0207] Metadata for the behavioral dimension: Business state machine definition (draft → confirmed → shipped → completed, and rollback path).
[0208] Secondly, the front-end 110 performs semantic parsing and interface mapping.
[0209] The semantic parsing and interface mapping module of front-end 110 automatically performs the following mappings of the enriched ontology model according to the mapping rules:
[0210] Mapping results of attribute dimension metadata:
[0211] Order number → Read-only text box (because the semantic annotation is "automatically generated");
[0212] Customer → Related Domain Object Selector (because the relationship type is "Association");
[0213] Total Amount → Read-only Amount Display Box (due to semantic annotation "@Computed automatic calculation");
[0214] Discount Amount → Read-only Amount Display Box (because the semantic annotation is "@Rule rule calculation");
[0215] Order Status → Status Label + Status Transition Button Group (due to the semantic annotation defined by @StateMachine);
[0216] Creation date → Read-only date display (due to semantic annotation of "autofill");
[0217] Mapping results of relational dimension metadata:
[0218] The relationship between "Sales Orders" and "Order Details" → Master-detail table layout (order form embeds an inline editable list of detail rows);
[0219] The relationship between "Sales Orders" and "Customers" → Customer Search Selector (displays customer names and numbers);
[0220] Mapping results of behavioral dimension metadata:
[0221] Business state machine definition → When the status is "Draft", display "Confirm" and "Cancel" buttons; or, when the status is "Confirmed", display "Ship" button;
[0222] @Computed automatic calculation rule → Interaction logic for automatically recalculating the total amount when the unit price or quantity in the details row changes;
[0223] Then, the interface is generated dynamically.
[0224] The UI dynamic generation engine 113 generates a declarative UI description tree based on the mapping results, which is then rendered by the renderer. From this point on, the following interactive interfaces can be automatically generated without writing any front-end code:
[0225] Sales order entry form: includes a customer selector, a detailed sub-form (supports dynamic addition / deletion of detailed rows), automatic amount calculation, automatic discount filling, and status operation buttons;
[0226] Sales order query list: supports filtering and sorting by status, date, customer, and amount range;
[0227] Sales order statistics dashboard: Displays order amount trends, customer distribution, and product sales rankings.
[0228] Finally, runtime interaction.
[0229] After the user selects a customer in the form, the front-end 110 automatically loads the customer's credit information through the TEDA discovery phase.
[0230] After the user modifies the number of detail rows, the front-end 110 automatically recalculates the total amount based on the interaction logic mapped by @Computed;
[0231] When the user clicks the "Confirm" button, the front-end 110 submits a state change request through the TEDA action phase, and the back-end 120 performs deterministic reasoning and verification before returning the result.
[0232] After the business rule reasoning engine 122 of the backend 120 executes constraint propagation, it pushes cascading change events through the real-time data synchronization channel 133, and the frontend 110 interface updates automatically.
[0233] The significance and advantages of this disclosed solution in the relevant field are explained below.
[0234] On the one hand, rich interactive interfaces (RIAs) are irreplaceable in the field of enterprise business management. Although the software industry is currently trending towards CLI and conversational interaction, the rigid demands of enterprise-level business management for structured data entry, multi-dimensional data browsing, real-time status feedback, related data display, visual analysis, and role-based presentation determine that RIAs remain an indispensable form of interaction in this field. Specifically, the entry and editing of structured business data requires the simultaneous display of multiple fields and support for inter-field linkage, which pure CLI interaction cannot achieve due to insufficient information density; multi-dimensional data browsing and batch operations rely on two-dimensional spatial layouts such as tables; real-time visual feedback of business status relies on visual mechanisms such as color indicators, progress bars, and inline prompts; the intuitive presentation of master-detail relationships and related data requires master-detail table layouts, reference pop-ups, and other controls; data visualization analysis requires graphical presentations such as charts; and multi-role collaboration requires role-based differentiated interface presentations.
[0235] Based on this understanding, this disclosure proposes to automatically generate rich interactive interfaces that meet the above requirements by utilizing the semantic definition of a rich ontology model.
[0236] On the other hand, the traditional "separation of frontend 110 and backend 120" only achieves independence in deployment and technology stack between frontend 110 and backend 120. However, frontend 110 still relies on specific API interfaces provided by backend 120 to build pages, and the page structure and interaction logic of frontend 110 usually need to be customized according to the backend 120 interface. The "decoupling of frontend 110 and backend 120" proposed in this disclosure goes a step further on the separation: backend 120 adopts a headless architecture and is completely unconcerned about how the data is displayed. Frontend 110 autonomously configures its interface based on the semantic definition of the business knowledge graph 121 exposed by backend 120, without relying on backend 120 to provide specific page interfaces. The two collaborate through the semantic definition of the TEDA protocol and the rich ontology model as a contract, and evolve independently.
[0237] On the other hand, traditional front-end development uses an imperative approach, where developers specify every detail of the interface (component creation, event binding, data flow, etc.) by writing code. This embodiment of the present disclosure can employ a declarative interface description tree, describing only "what the interface should look like" (component structure, data binding, interactive behavior), with the specific rendering implementation handled by the renderer. The declarative approach achieves decoupling from the underlying rendering technology (the same description tree can be interpreted by renderers from different frameworks), facilitates serialization and transmission, and enables incremental difference calculation.
[0238] Furthermore, based on technical feasibility, the key technologies involved in this disclosure all have a mature engineering practice foundation. One of the innovations of this disclosure is to systematically map the multidimensional semantic information (attribute dimension, relation dimension, and behavior dimension) of the rich ontology model with the interface generation, and to achieve deep decoupling between the front-end 110 and the back-end 120 through the TEDA protocol.
[0239] like Figure 8 The diagram illustrates a module schematic of an interface generation device according to an embodiment of this disclosure. It should be noted that the principle and technical implementation of the interface generation device can be referred to the method embodiments in previous embodiments, therefore, they will not be repeated in this embodiment. The interface generation device can be applied to a front-end.
[0240] exist Figure 8 In the interface generation device 800, the interface generation device includes:
[0241] Input module 801 is used to obtain user business requirement information, which can be described in natural language.
[0242] The communication module 802 is used to request a rich ontology model of a business domain object that matches the business requirement information from the backend. The rich ontology model includes metadata in the attribute dimension, relation dimension, and behavior dimension. The attribute dimension metadata is used to define the data structure and constraints represented by the attribute set of the business domain object. The relation dimension metadata is used to define the semantic relationship and topology of the domain object and its attributes. The behavior dimension metadata is used to define state transitions, business rules, and executable operations.
[0243] The semantic mapping module 803 is used to parse the semantic information of the metadata of each dimension in the hyperactive ontology model, and to obtain the interface configuration information based on the semantic information.
[0244] The interface generation module 804 is used to generate an interface structure description based on the interface configuration information, and to render and generate an interactive interface corresponding to the business requirement information based on the interface structure description.
[0245] It should be noted that, in Figure 8The various functional modules in the embodiments can be implemented, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, they can be implemented, in whole or in part, in the form of a program instruction product. A program instruction product includes one or a set of program instructions. When the program instructions are loaded and executed on a computer, all or part of the flow or function according to this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The program instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0246] and, Figure 8 The apparatus disclosed in the embodiments can be implemented through other modular division methods. The apparatus embodiments described above are merely illustrative. For example, the module division is only a logical functional division, and in actual implementation, there may be other division methods. For example, a group of modules or modules may be combined or dynamically integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces, and the indirect couplings or communication connections between devices or modules may be electrical or other forms.
[0247] in addition, Figure 8 The functional modules and sub-modules in the embodiments can be integrated into a single processing unit, or each module can exist physically separately, or two or more modules can be integrated into a single unit. The integrated unit can be implemented in hardware or as a software functional module. If the integrated unit is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0248] It should be specifically noted that the flowchart descriptions or method descriptions of the above embodiments of this disclosure can be understood as describing a module, segment, or portion of code comprising one or more executable instructions configured to implement a specific logical function or process. Furthermore, the scope of the preferred embodiments of this disclosure includes other implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved.
[0249] For example, Figure 2 The order of the steps in the method embodiments may vary in specific scenarios and is not limited to the above description.
[0250] like Figure 9 The diagram shown illustrates the structure of a computer device according to an embodiment of the present disclosure.
[0251] The computer device can execute computer program instructions to act as a front-end or back-end device, performing the methods in the aforementioned embodiments. The computer device 900 includes a bus 901, a processor 902, and a memory 903. The processor 902 and the memory 903 can communicate via the bus 901. The memory 903 can store program instructions. The processor 902 implements the method steps in the previous embodiments by executing the program instructions in the memory 903, for example... Figure 2 Example.
[0252] Bus 901 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of description, although only a single thick line is used in the diagram, it does not imply that there is only one bus or one type of bus.
[0253] In some embodiments, processor 902 may be implemented as a central processing unit (CPU), microprocessor module (MCU), system on chip (System on Chip), or field-programmable array (FPGA). Memory 903 may include volatile memory for temporary data storage during program execution, such as random access memory (RAM).
[0254] The memory 903 may also include non-volatile memory for data storage, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state disk (SSD).
[0255] In some embodiments, the computer device 900 may further include a communicator 904. The communicator 904 is used for communication with external devices. In specific examples, the communicator 904 may include one or more wired and / or wireless communication circuit modules. For example, the communicator 904 may include one or more of, such as a wired network card, a USB module, a serial interface module, etc. The wireless communication protocols followed by the wireless communication module include, for example, Nearfield Communication (NFC) technology, Infrared (IR) technology, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), Bluetooth (BT), Global Navigation Satellite System (GNSS), etc.
[0256] This disclosure also provides a computer-readable storage medium, characterized in that it stores program instructions, which, when executed, perform the method of any of the previous embodiments, such as... Figure 2 Example.
[0257] That is, the method steps in the above embodiments are implemented as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as computer code that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium after being downloaded via a network, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special processor or programmable or special hardware (such as ASIC or FPGA).
[0258] In summary, this disclosure relates to the fields of artificial intelligence and software engineering technology, providing a method, communication system, and storage medium for interface generation based on ontology semantics. The method includes: a front-end acquiring business requirement information described in natural language; matching a rich ontology model of business domain objects on the back-end based on the business requirement information, including metadata for attribute, relation, and behavior dimensions; parsing the semantic information of each dimension's metadata and mapping it to obtain interface configuration information; and generating an interface structure description based on the interface configuration information and rendering an interactive interface corresponding to the business requirement information. The back-end adopts a headless architecture that is independent of the front-end interface. The front-end autonomously configures the interface based on the semantics of the rich ontology model exposed by the back-end, achieving decoupling between the front-end and back-end. This automatically converts natural language into a rich interactive interface that meets enterprise-level business management needs, significantly improving interface development efficiency.
[0259] The above embodiments are merely illustrative of the principles and effects of this disclosure and are not intended to limit this disclosure. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this disclosure. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this disclosure should still be covered by the claims of this disclosure.
Claims
1. A method for generating interfaces based on ontology semantics, characterized in that, include: The front end obtains the user's business requirements information, which can be described in natural language; The front end requests a rich ontology model of business domain objects that match the business requirement information from the back end. The rich ontology model includes metadata in the attribute dimension, relation dimension, and behavior dimension. The attribute dimension metadata is used to define the data structure and constraints represented by the attribute set of the business domain objects. The relation dimension metadata is used to define the semantic relationship and topology of the domain objects and their attributes. The behavior dimension metadata is used to define state transitions, business rules, and executable operations. The front end parses the semantic information of the metadata of each dimension in the hyperactive ontology model, and obtains the interface configuration information based on the semantic information. The front end generates an interface structure description based on the interface configuration information. The front-end renders and generates an interactive interface corresponding to the business requirement information based on the interface structure description.
2. The method according to claim 1, characterized in that, include: When a change in the congested ontology model is detected, an updated interactive interface is generated accordingly; wherein the change in the congested ontology model is caused by at least one of the following: the interactive interface at the front end is operated by the user; or the data at the back end is updated.
3. The method according to claim 2, characterized in that, When a change in the congested body model is detected, an updated interactive interface is generated accordingly, including: The front end obtains the model fragments of the congested body model that have changed from the back end; The front end obtains local difference information of corresponding changes in the interface structure description based on the semantic parsing and mapping of the model fragment; The front end renders based on the local difference information to generate an updated interactive interface.
4. The method according to claim 3, characterized in that, The front-end obtains model fragments from the back-end that show changes in the hyperemia ontology model, including: In response to changes in the business data or structural definition of the enriched ontology model, the backend actively notifies the frontend of the change event indicating the model fragment through a real-time data synchronization channel with the frontend.
5. The method according to claim 4, characterized in that, The backend only notifies the frontend-subscribed domain objects of change events on the real-time data synchronization channel.
6. The method according to claim 1, characterized in that, The front-end parses the semantic information of the metadata of each dimension in the hyperemesis ontology model, and obtains the interface configuration information based on the semantic information, including: The semantic information of the attribute dimension metadata is mapped to the corresponding interface elements to obtain the attribute dimension mapping result; The semantic information of the relation dimension metadata is mapped to the corresponding interface layout to obtain the relation dimension mapping result; The semantic information of the behavioral dimension metadata is mapped to the corresponding interface interaction logic to obtain the behavioral dimension mapping result.
7. The method according to claim 6, characterized in that, The mapping of semantic information based on the attribute dimension metadata to corresponding interface elements includes at least one of the following: Based on the data type and / or semantic information of the attribute dimension metadata, the semantic information is mapped to the corresponding input control; The semantic information of the constraints based on attribute dimension metadata is mapped to the corresponding front-end validation rules; The semantic information of the display prompts is mapped to the corresponding prompt content based on the attribute dimension metadata; And / or, the semantic information based on the relational dimension metadata is mapped to the corresponding interface layout, including at least one of the following: Mapping to master / detail / nested form layouts based on composition relationships; Mapping to a reference selection control based on association relationships; Conditional explicit / implicit rules are driven by domain object types based on inheritance relationships; Mapping dependencies to associated data dashboards; And / or, the mapping of semantic information based on the behavioral dimension metadata to the corresponding interface interaction logic includes at least one of the following: The semantic information of the business state machine in the attribute dimension metadata is mapped to the conditional display of the corresponding state operation control. The semantic information of the front-end validation rules is mapped to the corresponding front-end validation logic; Semantic information based on business rules is mapped to the corresponding business interaction logic.
8. The method according to claim 6, characterized in that, The front-end renders and generates an interactive interface corresponding to the business requirement information based on the interface structure description, including at least one of the following selectable rendering functions: Rendering of form views to adapt to data input / editing scenarios; Rendering of list views to adapt to data query / display scenarios; Adapt instrument view rendering for data analysis / monitoring scenarios; And / or, the front-end, based on the interface structure description, renders and generates an interactive interface corresponding to the business requirement information, further including at least one of the following: 1) The front-end adapts the layout of the interactive interface according to user habits and / or the characteristics of the current business scenario; 2) When the front end detects that the user is performing a preset business operation, it requests auxiliary decision-making information from the back end and presents it in the interactive interface.
9. The method according to claim 1, characterized in that, Also includes: During the training phase, the backend obtains input business rules about domain objects described in natural language. The backend converts the business rules into semantic annotations of the attributes of domain objects; The backend will associate the audited and tested semantic annotations with the corresponding attributes and inject them into the business knowledge graph for matching of the rich ontology model.
10. A communication system, characterized in that, This includes both the front-end and back-end of the communication. The front end includes: a front-end interaction proxy module, a semantic parsing and mapping module, and a dynamic interface generation engine; The backend includes: a business knowledge graph; The front-end interaction proxy module is used to obtain the user's business requirement information, which can be described in natural language. Based on the business requirement information, the module performs semantic matching of the business domain objects in the back-end business knowledge graph to form a rich ontology model. The rich ontology model includes metadata in the attribute dimension, relation dimension, and behavior dimension. The attribute dimension metadata is used to define the data structure and constraints represented by the attribute set of the business domain objects. The relation dimension metadata is used to define the semantic relationships and topology of the domain objects and their attributes. The behavior dimension metadata is used to define state transitions, business rules, and executable operations. The semantic parsing and mapping module is used to parse the semantic information of the metadata of each dimension in the hyperactive ontology model, and to map the interface configuration information based on the semantic information. The interface dynamic generation engine generates an interface structure description based on the interface configuration information, and renders an interactive interface corresponding to the business requirement information based on the interface structure description.
11. A computer-readable storage medium, characterized in that, The device stores a computer program or instructions that are executed to perform the interface generation method as described in any one of claims 1 to 9.
