Computer application system and generation method for rapid construction of knowledge model
The generated computer application system is quickly constructed through the knowledge model, allowing ordinary users to build knowledge graphs through a graph editor and automatically generate executable code, solving the problems of user operation difficulty and high learning costs in existing systems, and improving the efficiency and applicability of system construction.
Patent Information
- Application Number
- CN202411765381.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In existing computer information systems, programs and data are highly professional, which is difficult for ordinary users to understand and operate, resulting in low efficiency in construction of information systems, difficult to control applicability, and high cost of learning professional knowledge.
It provides a computer application system for quickly building and generating knowledge models. It uses model composition definition modules, model relationship definition modules and model behavior definition modules, allowing users to build knowledge graphs through a graph editor and automatically generate executable language code.
It enables ordinary users to build knowledge models by drawing and implement programming work without having to have an in-depth understanding of computer language and professional knowledge, which improves the construction efficiency and applicability of information systems and reduces learning costs.
Smart Images

Figure CN119248252B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology for building knowledge models, and in particular to a computer application system and a generation method for rapidly building and generating knowledge models. Background Art
[0002] In existing computer information systems, information is carried and recorded in the form of programs and data. Programs are generally developed by software engineers using specific computer languages and then compiled into computer instruction sets. Data is stored and processed in a format recognizable by the program. In most cases, data is saved in databases or files.
[0003] However, both programs and data are not easy for ordinary users to understand and operate. They have too high a professional threshold. People who do not understand computer software programming cannot use existing computer programming languages, databases and other software tools to quickly build professional application systems. They can only rely on software developers for customized development. The biggest difficulty people often encounter in the development process is that it is always difficult for software developers to fully and correctly understand the description of requirements by industry personnel (due to the lack of industry knowledge background). A lot of time and money are wasted in the communication between the two parties. Over and over again, the construction efficiency of the information system is extremely low, the applicability is difficult to control, a lot of money is wasted in the communication process, the project construction cycle is long, it is difficult to land, and the benefits are difficult to reflect. In addition, software developers have to spend a lot of time to supplement their understanding of professional knowledge, and the learning cost is very high.
[0004] At present, there are no ready-made suitable methods and software tools on the market that allow an ordinary computer user to express his professional knowledge and application needs in the computer using the text, tables, graphics and other methods he is most familiar with, so that the computer system can generate professional application software and digital twin applications with "zero code programming" by itself.
[0005] In addition, the whole society generally faces the problem of high learning and time costs for learning professional knowledge. New methods are needed to use computers to store and pass on expert knowledge efficiently and at low cost throughout the whole society. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a computer application system for quickly building and generating a knowledge model, comprising:
[0007] The model composition definition module is used to construct a first model with the metamodel as a member for the object corresponding to the real world, then construct a second model with the first model as a member, and then construct a third model with the second model as a member, and so on, until the object model is obtained;
[0008] The model relationship definition module is used to set the model relationships of the members of the object models corresponding to the selected different objects through the graphic editor, and label the model relationships with knowledge tags to form a knowledge graph, wherein the knowledge tags contain logic scripts that can be called to complete calculation and control;
[0009] The model behavior definition module is used to define process components in the form of blocks, and use the process components as components of the object model, so as to synchronize the knowledge graph with the real-world objects and generate a knowledge model that reflects the real world.
[0010] Optionally, the model relationship definition module includes:
[0011] The relationship description submodule is used to establish a model base library for various industry fields based on the metamodel, define the basic relationship between each model member in the model base library, and describe the relationship between the internal parameters of the model members and the relationship between different model members;
[0012] The relationship line drawing submodule is used to draw the relationship lines using a graphic editor according to the basic relationships of each model member;
[0013] The compilation and labeling submodule is used to perform digital analysis based on basic relationships, automatically compile according to the analysis results, form knowledge labels, and associate knowledge labels with relationship lines;
[0014] The graph display submodule is used to perform digital analysis based on basic relationships and form a knowledge graph based on the analysis results.
[0015] Optionally, the model composition definition module includes:
[0016] The interface construction submodule is used to take the basic objects on the interface as members, and / or select the metamodel or other pre-built first models as members, so as to form a second model; the members of the third model include the second model, or the second model and the first model, or the second model and the metamodel, or the second model, the first model and the metamodel; and so on until the object model is obtained;
[0017] The language conversion submodule is used to implement computer language replacement, store the object model into a computer intermediate language file, or reversely parse the stored computer intermediate language file to restore the object model for expression in the interface.
[0018] Optionally, the model behavior definition module includes:
[0019] The process parsing submodule is used to read process-related information from the storage file and parse the process-related information to obtain process components;
[0020] The flowchart block definition submodule is used to define the data and operations used in a single link of the process in the form of blocks for the process components, use lines and / or arrows to express the direction of the process steps, and form and store the flowchart.
[0021] Optionally, the basic objects used by the interface construction submodule include one or more of a single value, a single text, a structure, and an array.
[0022] The present invention also provides a method for quickly constructing and generating a knowledge model, comprising the following steps:
[0023] S100: for an object corresponding to an object in the real world, a first model is constructed using a meta-model as a member, a second model is constructed using the first model as a member, and a third model is constructed using the second model as a member, and so on, until an object model is obtained;
[0024] S200: For object models corresponding to different selected objects, model relationships among members thereof are set through a graphic editor, and knowledge tags are added to the model relationships to form a knowledge graph, wherein the knowledge tags include logic scripts that can be called to complete calculation and control;
[0025] S300: Define process components in the form of blocks and use the process components as components of the object model, so that the knowledge graph is synchronized with the objects in the real world and a knowledge model that reflects the real world is generated.
[0026] Optionally, step S200 includes:
[0027] Establish a model base library for various industries based on the metamodel, define the basic relationships between various model members in the model base library, and describe the relationships between the internal parameters of the model members and the relationships between different model members;
[0028] According to the basic relationship between each model member, use the graphic editor to draw the relationship line;
[0029] Perform digital analysis based on basic relationships, automatically compile based on the analysis results, form knowledge labels, and associate the knowledge labels with relationship lines;
[0030] Digital analysis is performed based on basic relationships, and a knowledge graph is formed based on the analysis results.
[0031] Optionally, step S100 includes:
[0032] The second model is formed by taking the basic objects on the interface as members and / or selecting the metamodel or other pre-built first models as members; the members of the third model include the second model, or the second model and the first model, or the second model and the metamodel, or the second model, the first model and the metamodel; and the process is repeated until the object model is obtained;
[0033] Implement computer language replacement, store the object model into a computer intermediate language file, or reversely parse the stored computer intermediate language file to restore the object model for expression in the interface.
[0034] Optionally, step S300 includes:
[0035] Read the process related information from the storage file, and parse the process related information to obtain the process components;
[0036] For process components, the data and operations used in a single link of the process are defined in the form of blocks, and the direction of the process steps is expressed using lines and / or arrows to form and store a flowchart.
[0037] Optionally, implementing computer language replacement includes:
[0038] When the save action is executed, the content is automatically converted and saved into an intermediate language file recognizable by the computer for storage according to the knowledge model drawn on the interface; the intermediate language file contains the model relationship definition, model composition definition and model process composition definition;
[0039] An intermediate language file is obtained, and according to a preset interpretation rule, the intermediate language file is parsed and translated into a model including a graphical expression form showing the model composition, process, relationship and / or map.
[0040] The computer application system and generation method for quickly building and generating knowledge models of the present invention allow ordinary computer users to express their understanding of the characteristics of things by drawing and building knowledge relationships and models through specific software, and automatically assist in drawing processes to express their logic through knowledge relationships, thereby building the model he needs. The model and process are saved in an executable language to complete the work built by the process. After being compiled to form an execution code, non-IT professionals can also realize programming work by drawing and building models. Models and processes can not only express knowledge, but also be executed as code, so that each model and process is both knowledge, interface, and application. Traditional drawings can only express graphics and logic, but cannot be directly used to generate applications. The result graphics of the present invention can automatically build programs with knowledge and directly generate applications. The construction results themselves have knowledge graphs, which facilitates knowledge inheritance, and the results can be understood by both people and computers at the same time. At the same time, they have graphical, digital, structured, and knowledge-based characteristics, which is the best solution for realizing digital twins.
[0041] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.
[0042] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0044] Figure 1 A block diagram of a computer application system generated by rapid construction of a knowledge model in an embodiment of the present invention;
[0045] Figure 2 A flow chart of a method for quickly building and generating a knowledge model in an embodiment of the present invention;
[0046] Figure 3 For the present invention Figure 2 A flow chart of an embodiment of step S200 in the embodiment;
[0047] Figure 4-Figure 8 A schematic diagram of the process of constructing an air conditioning knowledge model using a computer application system that quickly constructs and generates a knowledge model of the present invention;
[0048] Figure 9-10 A schematic diagram of constructing a model for attendance and salary calculation using a computer application system that is quickly constructed and generated using the knowledge model of the present invention;
[0049] Fig.11 for Figure 4-Figure 8 Schematic diagram of the relationship between the air system label and the water system label of the constructed air conditioning knowledge model;
[0050] Fig.12 A basic logic schematic diagram for constructing a knowledge model for a computer application system applying the present invention. DETAILED DESCRIPTION
[0051] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0052] The model mentioned in the present invention specifically refers to a "knowledge model", which is the twin of an objective object in the real world in the digital field, referred to as a "model".
[0053] The technical concept of the present invention application is to build a knowledge model of all things in the world through software tools (hereinafter referred to as "modeling"). The core work of modeling is to describe what the object is composed of, describe the relationship between objects, describe the behavior flow involved in the object, and the description process is the process of selecting blocks for grouping. The graphics are the application.
[0054] To solve the above problems, corresponding software needs to be developed for support. The software includes core software such as modeling tools, compilers, virtual machine executors, etc. These tools can be put into one software as an integrated platform for object definition, debugging, simulation, and operation.
[0055] During the modeling process, the established knowledge graph can be used to automatically derive and generate part of the required model content, greatly improving the generation efficiency.
[0056] The graphical output of the model is saved in the form of an intermediate language, which can be interpreted and executed (generate virtual machine code and execute it on the virtual machine) and can automatically generate the knowledge graph of the model.
[0057] like Figure 1 As shown, an embodiment of the present invention provides a computer application system for quickly building and generating a knowledge model, including:
[0058] The model composition definition module 10 is used to construct a first model with a meta-model as a member combination for an object corresponding to an object in the real world, and then construct a second model with the first model and the meta-model, or a plurality of first models as members; and then construct a third model with the second model as a member, and so on, until an object model is obtained; that is, the first model and the second model correspond to different objects in the real world, and generally, the second model is more complex than the first model;
[0059] The model relationship definition module 20 is used to set the model relationships of the members of the object models corresponding to the selected different objects through a graphic editor, and label the model relationships with knowledge tags, wherein the knowledge tags include text tags and logic scripts, that is, the knowledge tags include logic scripts (business logic) between models in addition to text tags; the model relationships are associated and set according to the selected first model and / or second model label text, that is, if the label texts of the two models are of the same type, they are associated to form a knowledge graph; the logic script can be automatically called to complete calculation and control during execution;
[0060] The model behavior definition module 30 is used to define the process components in the form of blocks. The process components are part of the model composition, so as to be synchronized with the real-world objects and generate a knowledge model that reflects the real world.
[0061] The working principle and beneficial effects of the above technical solution are as follows: In the technical solution, the first model, the second model, the third model... are all based on the meta-model, which is the model corresponding to the meta-object. The meta-object refers to the indecomposable minimized physical object in the real world. The basic types of the meta-model are: single value, single text, structure, array (same class) and other objects representing single characteristics; the first model and the second model can form a new model (third model), that is, one or more models can be members of the new model, and the definition of model relationship is the basis for building knowledge in application to generate knowledge graph, and the model relationship can be completed by a graphic editor. The main function of this editor is to drag attribute blocks, relationship lines, expressions and other blocks to the interface; the model relationship definition module defines the relationship between objects corresponding to the real world, and the attribute text association selects specific objects from the built model or model parameters, sets the relationship between each other on the relationship line, labels the relationship with knowledge, and gives the relationship with logic code for automatic calculation and control; the present invention allows ordinary computer users to express their cognition of the characteristics of things by drawing knowledge relationships and building models through specific software, and automatically assists in drawing processes to express its logic through knowledge relationships, thereby building the model he needs. The model and process are saved in an executable language to complete the work constructed by the process. After being compiled into an executable code, non-IT professionals can also realize programming work by drawing and building models. Models and processes can not only express knowledge, but also be executed as code, so that each model and process is knowledge, interface, and application. Traditional drawings can only express graphics and logic, but cannot be directly used to generate applications. The result graphics of the present invention can automatically build programs with knowledge and directly generate applications. The construction results themselves have knowledge graphs, which facilitates knowledge inheritance, and the results can be understood by people and computers at the same time. At the same time, they have graphical, digital, structured, and knowledge-based characteristics. It is the best solution to realize digital twins. The model is the twin of the real world in the digital world. It represents the corresponding objects in the real world and can be fully synchronized with the real world objects. The software function of the invention is to define the model, which models it inherits, what attributes it has, and what process activities it has. With the help of the invented software system, anyone who can use a computer can quickly define the model by dragging the mouse according to their understanding, cognition and needs of the business. Complex knowledge graphs can describe all objects and transactions in the world, and are digital twins of real-world scene relationships. Graphs are knowledge, that is, behavior-driven scripts. In the execution of knowledge model processes, predefined logic codes can be automatically called to complete one-to-many, many-to-one, one-to-one logic, and automated execution of calculations or controls. The behavior of the model is defined in the form of a flowchart to form process components. The process components, models, knowledge graphs, etc. are saved to storage media to form a knowledge model of the real world.It allows people to directly understand the logical relationship between models and the system architecture, and it is inheritable and executable.
[0062] In one embodiment, the model relationship definition module includes:
[0063] The relationship description submodule is used to establish a model base library for various industry fields based on the metamodel, define the basic relationship between each model member in the model base library, and describe the relationship between the internal parameters of the model members and the relationship between different model members; the model members in the model base library may include the metamodel, the first model, the second model, the third model, etc., which reflect the real-world objects from different levels. The construction of the model members: the object image can be obtained by three-dimensional physical scanning, and the object information can also be obtained by importing the object image and technical text, or by searching the Internet, and the model construction can be realized by automatic programming according to the object information;
[0064] The relationship line drawing submodule is used to draw the relationship lines using a graphic editor according to the basic relationships of each model member;
[0065] The compilation and labeling submodule is used to perform digital analysis based on basic relationships, automatically compile according to the analysis results, form knowledge labels, and associate knowledge labels with relationship lines;
[0066] The graph display submodule is used to perform digital analysis based on basic relationships and form a knowledge graph based on the analysis results.
[0067] The working principle and beneficial effects of the above technical solution are as follows: This solution describes the relationship between a model and other models and between the internal parameters of a model. One or more labels can be set on the connection line of the relationship, and the labels are used to distinguish business areas and logic. There are many types of relationships, one-to-one, one-to-many, many-to-one, and many-to-many. The connection attributes reflect which side is one and which side is many; there is a text description on the relationship, that is, the label of the relationship. A relationship can have multiple labels, which are used to automatically generate graphs and logic according to label extraction in different application scenarios. In actual applications, the one-to-many attribute means that a certain data of an object requires the data of multiple other objects to be processed one by one. The relationship between multiple different models can automatically calculate a larger range of knowledge graphs, allowing people in different fields to use them directly; process relationships and knowledge graphs can be used in the process editing process to automatically batch generate the action logic of the corresponding models, thereby greatly reducing the workload of manual operation to combine process logic.
[0068] Figure 4The figure shows a simplified partial control diagram of the air conditioning system of a building. In this figure, the chilled water supplied by the chiller is pumped to different floors and distributed to the air conditioners AHU on each floor. The AHU distributes the cooled air to the variable air volume air conditioning terminals VAV on the floor. There are 32 floors in the figure, each with an AHU, and each AHU controls 20 VAVs. To describe the relationship between the various devices in this control diagram, you need to use a graphical editor to construct a relationship description, such as Figure 5 As shown. There are two labels between Chiller.Water Supply and AHU.Water Supply, namely "Air Conditioning Water System" and "Decomposition". Each label of each relationship can logically correspond to an algorithm script generated by an object or process step (for example, the one-to-many script content is a loop for multiple parties, and the decomposition relationship adds up the values of each object one by one). Labels and scripts determine the rules for automatically generating content during the subsequent object and process construction process. The same label means that the objects are in the same business field, and a basic map is formed between objects with the same label. As shown Figure 6 As shown, the air conditioning system also has a power supply relationship. The switch belongs to the field of intelligence, building automation, and power supply. It is marked with three corresponding labels. A switch supplies power to the chiller. In addition, the PLC controller controls the chiller and AHU at the same time. Figure 7 This is their relationship diagram, combined with Figure 5 , Figure 6 , Figure 7 , the system can automatically generate a complex cross-disciplinary map including power supply, control, water supply, and fresh air, such as Figure 8 ,The graph generated by the combination of the three relationships allows users to ,understand the working logic between different objects across disciplines without ,the need of dedicated training or additional documentation.
[0069] In one embodiment, the model composition definition module includes:
[0070] The interface construction submodule is used to form a second model by taking the basic objects on the interface as members and / or selecting a metamodel or other pre-built first model as a member; the members of the third model include the second model, or the second model and the first model, or the second model and the metamodel, or the second model, the first model and the metamodel; and so on until the object model is obtained; wherein the basic objects include one or more of a single value, a single text, a structure and an array;
[0071] The language conversion submodule is used to implement computer language replacement, store the object model into a computer intermediate language file, or reversely parse the stored computer intermediate language file to restore the object model for expression in the interface.
[0072] The working principle and beneficial effects of the above technical solution are as follows: This solution obtains the object information of the corresponding object in the real world, and based on the object information, converts the corresponding object model into a computer intermediate language. The intermediate language is expressed in the form of a programming language and classified to form an attribute set. The attribute set contains the attribute text, which includes the basic attribute text and the structural attribute text. The basic attribute is the basic element of the model, such as temperature, humidity, and name, corresponding to a value or a string of text. The composite attribute is composed of basic attributes, which can be a structure or another model or structure; the structural attribute is composed of a group of basic attributes, corresponding to the structural definition (struct) of the programming software. The structure is composed of 2 or more attribute parameters, which are used to represent multiple attributes that are closely related to each other and have meaning only when they exist at the same time. For example, the initialization setting of the air conditioner terminal is a structure that contains multiple basic attributes such as wind speed, set temperature, and working mode; for example, color, it consists of RGB three-color attributes. In addition to simple attributes, member attributes of structural attributes can also be other structures, collections, and models; attributes correspond to the basic types and variable names of programming languages, and are member definitions of types such as Boolean, integer, floating point, character, time, and enumeration, such as gender (Boolean), height (integer), and weight (floating point); collection attributes are objects formed by the same basic attributes, corresponding to arrays or Array object types in programming languages. For example, there are 31 days in a month, and there may be late records every day, so the lateness every day of a month forms a collection attribute. The members of a collection can be basic attributes, structures, collections, or models; model attributes are another type of model that exists as attributes, corresponding to the class as an object member in programming languages. For example, a floor has a gate, and the gate is an independent model. This gate is a model attribute of a floor. Any model can be constructed by combining inherited parent models, basic attributes, structural attributes, collection attributes, model attributes, and process activities.
[0073] For example, what are the elements of the employee attendance salary calculation model? It must be related to the records of lateness, early departure, and absenteeism, and how much money will be deducted for each violation of discipline. Then there are unit deduction standards for lateness, early departure, and absenteeism, and the monthly deduction can be calculated based on the behavior. This model programming software can be expressed in the programming language form as follows:
[0074] Attendance calculation salary model
[0075] Employee Name xxx
[0076] Basic salary 10000
[0077] Late time
[31] = {40, 34, 0, 0, 0...0, 1} / / Calculate the number of minutes late per day based on a 31-day month
[0078] Early exit time
[31] = {0, 10, 30, 0, 0...0, 0}
[0079] Absenteeism time
[31] = {0, 0, 0, 480, 0...0, 0}
[0080] Lateness per unit time deduction 10
[0081] Early departure unit time deduction fee 10
[0082] Absenteeism unit time deduction 100
[0083] Calculate the monthly deduction
[0084] Total of 31 days of lateness / 30 minutes*deduction of lateness unit time + Total of 31 days of early departure / 30 minutes*deduction of early departure unit time + Total of 31 days of absenteeism / 60 minutes*deduction of absenteeism unit time
[0085] }
[0086] Deduction of remaining wages
[0087] Basic salary - calculate the deductions for the current month ()
[0088] }
[0089] }
[0090] To express the above model, the prior art requires programmers to write codes if it is done through programming. The present invention uses a group of diagrams to express it, such as Fig. 9 As shown in the figure, a salary calculation model for attendance is defined. This model has single numerical attributes such as basic salary, deduction per unit time for lateness, deduction per unit time for early departure, and deduction per unit time for absenteeism. The employee name is a basic attribute of character type. There are three sets, including: 31 days of lateness, 31 days of early departure, and 31 days of absenteeism. The figure also defines three functions to calculate whether full attendance, deduction amount, and remaining salary after deduction. The figure expresses the attribute composition, while the functions such as remaining salary after deduction and calculation of deduction for the current month are defined by the model behavior described later.
[0091] In one embodiment, the model behavior definition module includes:
[0092] The process parsing submodule is used to read process-related information from the storage file and parse the process-related information to obtain process components;
[0093] The flowchart block definition submodule is used to define the data and operations used in a single link of the process in the form of blocks for the process components, use lines and / or arrows to express the direction of the process steps, and form and store the flowchart.
[0094] The working principle and beneficial effects of the above technical solution are as follows: The function of this solution is to define the execution program by defining the process, and the process is composed of different model blocks combined with lines and arrows. The components of the process include input blocks, output blocks, model blocks, conditional blocks, loop blocks, time blocks, function blocks, collection blocks, temporary variable blocks, expression blocks, script blocks, etc. Lines are used to indicate the sequence, and arrows are used to indicate the assignment; all blocks used in the flowchart correspond to a certain grammatical structure of the intermediate language, for example:
[0095] Attributes are members of the model. Temporary variable blocks correspond to variable assignments in the intermediate language. Arrows coming in indicate assignments to the variables.
[0096] The conditional block corresponds to the conditional statement (if, else), and has two branches of code: the conditional expression is true or false.
[0097] The loop block corresponds to the conditional loop (while loop) of the intermediate language;
[0098] The time block corresponds to a delay loop function in the intermediate language;
[0099] The function graph block corresponds to the function call statement of the intermediate language;
[0100] The collection block corresponds to the array definition of the intermediate language;
[0101] The expression blocks correspond to arithmetic expressions in the intermediate language;
[0102] A script tile directly corresponds to a piece of code in the intermediate language;
[0103] A knowledge graph tile directly corresponds to a knowledge-labeled reference.
[0104] The models, temporary variables, collections, structures, etc. used in the process all come from the various attribute objects dragged in the previous model definition, or the block objects temporarily dragged in the process. So after the flowchart is drawn, it can be converted into the corresponding intermediate code according to the above corresponding rules, such as Fig.10As shown, a function (process / procedure / behavior) for calculating the deduction amount is defined. The late time, early leave time, and absenteeism time are defined in the previous model. They are directly referenced and sent to set a. Then, the objects in it are taken out one by one in a loop (the loop between the empty set (a) and the thick horizontal line). The deduction per unit time for lateness, early leave, and absenteeism (also defined in the previous model) is multiplied by the deduction per unit time for every 30 minutes, every 30 minutes, and every 60 minutes (also defined in the previous model), and the total deduction amount is added up to return the total deduction amount.
[0105] like Figure 2 As shown, an embodiment of the present invention provides a method for quickly building a knowledge model, and a computer application system quickly built and generated using the above-mentioned knowledge model includes the following steps:
[0106] S100: for an object corresponding to an object in the real world, a first model is constructed using a meta-model as a member, a second model is constructed using the first model as a member, and a third model is constructed using the second model as a member, and so on, until an object model is obtained;
[0107] S200: For object models corresponding to different selected objects, model relationships among members thereof are set through a graphic editor, and knowledge tags are added to the model relationships to form a knowledge graph, wherein the knowledge tags include logic scripts that can be called to complete calculation and control;
[0108] S300: Define process components in the form of blocks, and use process components as components of the object model (that is, they may be components of one or more member models such as the first model, the second model, the third model, etc. in the object model, and use the process as a component of the object model, so that the object model and the knowledge graph have computing and control capabilities), so that the knowledge graph is synchronized with the real-world objects to generate a knowledge model that reflects the real world.
[0109] The working principle and beneficial effects of the above technical solution are as follows: the model relationship definition of the model relationship definition module in the technical solution is the basis for constructing knowledge generation knowledge graph in the application, and the model relationship can be completed by a graphic editor. The main function of this editor is to drag attribute blocks, relationship lines, expressions and other blocks to the interface; attribute text association is to select specific objects from the built model or model parameters, set the relationship between each other on the relationship line, and label the relationship with knowledge; the present invention allows ordinary computer users to express their cognition of the characteristics of things by drawing and constructing knowledge relationships and models through specific software, and automatically assist in drawing processes to express their logic through knowledge relationships, so as to construct the model he needs. This solution takes the process as a component of the object model, so that the object model and the knowledge graph have the ability to calculate and control, so that the knowledge graph is synchronized with the real world object. When the real world object changes, it is fed back to the knowledge graph through calculation and control, and corresponding changes are formed in the knowledge graph, so that the knowledge model can synchronously reflect the evolution of the real world; the model and the process are saved in an executable language to complete the work constructed by the process. After compiling to form an execution code, non-IT professionals can also realize programming work by drawing and constructing models. Models and processes can not only express knowledge, but also be executed as code, so each model and process is knowledge, interface, and application. Traditional drawings can only express graphics and logic, but cannot be used directly to generate applications. The result graphics of the present invention can automatically build programs with knowledge and directly generate applications. The construction results themselves have knowledge graphs, which facilitate knowledge inheritance, and the results can be understood by people and computers at the same time. At the same time, they have graphical, digital, structured, and knowledge-based characteristics. It is the best solution to realize digital twins. The model is the twin of the real world in the digital world. It represents the corresponding objects in the real world and can be completely synchronized with the real world objects. The software function of the invention is to define the model, which models it inherits, what attributes it has, and what process activities it has. With the help of the invented software system, anyone who can use a computer can quickly define the model by dragging the mouse according to their understanding, cognition, and needs of the business. Complex knowledge graphs can describe all objects and transactions in the world, and are digital twins of the real-world scene relationships. Graphs are knowledge, that is, behavior-driven scripts. It allows people to directly understand the logical relationship between models and understand the system architecture. It can be inherited and executed.
[0110] In one embodiment, Figure 3 As shown, step S200 includes:
[0111] S210: Establish a model base library for each industry field based on the metamodel, define the basic relationship between each model member in the model base library, and describe the relationship between the internal parameters of the model members and the relationship between different model members;
[0112] S220: according to the basic relationship of each model member, a graphical editor is used to draw a relationship line;
[0113] S230: Perform digital analysis based on the basic relationship, automatically compile according to the analysis result, form knowledge labels, and associate the knowledge labels with the relationship lines;
[0114] S240: Perform digital analysis based on basic relationships and form a knowledge graph based on the analysis results.
[0115] The working principle and beneficial effects of the above technical solution are as follows: This solution describes the relationship between model members and other model members and between the internal parameters of the model members themselves. One or more labels can be set on the connection line of the relationship, and the labels are used to distinguish business areas and logic. There are many types of relationships, one-to-one, one-to-many, many-to-one, and many-to-many. The connection attributes reflect which side is one and which side is many; there is a text description on the relationship, that is, the label of the relationship. A relationship can have multiple labels, which are used to extract graphs and automatically generate logic according to labels in different application scenarios. In actual applications, the one-to-many attribute means that a certain data of an object requires the data of multiple other objects to be processed one by one. The relationship between multiple different models can automatically calculate a larger range of knowledge graphs, allowing people in different fields to use them directly; process relationships and knowledge graphs can be used in the process editing process to automatically batch generate the action logic of the corresponding models, thereby greatly reducing the workload of manual operation to combine process logic.
[0116] In one embodiment, step S100 includes:
[0117] The second model is formed by taking the basic objects on the interface as members and / or selecting the metamodel or other pre-built first models as members; the members of the third model include the second model, or the second model and the first model, or the second model and the metamodel, or the second model, the first model and the metamodel; and the process is repeated until the object model is obtained;
[0118] Implement computer language replacement, store the object model into a computer intermediate language file, or reversely parse the stored computer intermediate language file to restore the object model for expression in the interface.
[0119] The working principle and beneficial effects of the above technical solution are as follows: This solution obtains the object information of the corresponding object in the real world, and based on the object information, converts the corresponding object model into a computer intermediate language. The intermediate language is expressed in the form of a programming language and classified to form an attribute set. The attribute set contains the attribute text, which includes the basic attribute text and the structural attribute text. The basic attribute is the basic element of the model, such as temperature, humidity, and name, corresponding to a value or a string of text. The composite attribute is composed of basic attributes, which can be a structure or another model or structure; the structural attribute is composed of a group of basic attributes, corresponding to the structural definition (struct) of the programming software. The structure is composed of 2 or more attribute parameters, which are used to represent multiple attributes that are closely related to each other and have meaning only when they exist at the same time. For example, the initialization setting of the air conditioner terminal is a structure that contains multiple basic attributes such as wind speed, set temperature, and working mode; for example, color, it consists of RGB three-color attributes. In addition to simple attributes, member attributes of structural attributes can also be other structures, collections, and models; attributes correspond to the basic types and variable names of programming languages, and are member definitions of types such as Boolean, integer, floating point, character, time, and enumeration, such as gender (Boolean), height (integer), and weight (floating point); collection attributes are objects formed by the same basic attributes, corresponding to arrays or Array object types in programming languages. For example, there are 31 days in a month, and there may be late records every day, so the lateness every day of a month forms a collection attribute. The members of a collection can be basic attributes, structures, collections, or models; model attributes are another type of model that exists as attributes, corresponding to the class as an object member in programming languages. For example, a floor has a gate, and the gate is an independent model. This gate is a model attribute of a floor. Any model can be constructed by combining inherited parent models, basic attributes, structural attributes, collection attributes, model attributes, and process activities.
[0120] In one embodiment, step S300 includes:
[0121] Read the process related information from the storage file, and parse the process related information to obtain the process components;
[0122] For process components, the data and operations used in a single link of the process are defined in the form of blocks, and the direction of the process steps is expressed using lines and / or arrows to form and store a flowchart.
[0123] The working principle and beneficial effects of the above technical solution are as follows: The function of this solution is to define the execution program by defining the process, and the process is composed of different model blocks combined with lines and arrows. The components of the process include input blocks, output blocks, model blocks, conditional blocks, loop blocks, time blocks, function blocks, collection blocks, temporary variable blocks, expression blocks, script blocks, etc. Lines are used to indicate the sequence, and arrows are used to indicate the assignment; all blocks used in the flowchart correspond to a certain grammatical structure of the intermediate language, and are expressed in blocks, which can be easily used.
[0124] In one embodiment, the method further comprises:
[0125] When the save action is executed, the content is automatically converted and saved into an intermediate language file that can be recognized by the computer according to the knowledge model drawn on the interface; the intermediate language file contains the content defined by the model relationship, model composition and model process composition;
[0126] Obtain the intermediate language file and translate it into a graphical expression according to the pre-set interpretation rules, including displaying the model composition, process, relationship, and map.
[0127] The working principle and beneficial effects of the above technical solution are as follows: This solution adopts a computer-recognizable intermediate language file to organize the logical relationship between different attributes into two pairs of structured relationships, and forms a chain relationship between attributes based on this relationship, including the parent-child relationship, the same-level relationship between attributes, and the chain relationship, execution sequence relationship, affected relationship, and cross-process logical relationship between attributes and various temporary variables; the collection formed by these relationships can draw the knowledge graph of this model, and combine the aforementioned model composition and behavior definition to form a holographic model of the model; when an intermediate language file is opened, it is translated from language into graphics according to the previous translation rules, so that the programming work can be completed here by editing the graphics through the interface; after the model definition is completed, the model can be compiled from the intermediate language into machine execution code and executed or interpreted and executed through the intermediate language interpreter.
[0128] This solution uses a computer-recognizable intermediate language file to organize the logical relationship between different attributes into two pairs of structured relationships, and form a chain relationship between attributes based on this relationship, including parent-child relationships, peer relationships, and chain relationships between attributes and various temporary variables, execution order relationships, affected relationships, and cross-process logical relationships; the collection formed by these relationships can draw the knowledge graph of this model, and combine the aforementioned model structure and behavior definition to form a holographic model of the model; when an intermediate language file is opened, it is translated from language into graphics according to the previous translation rules, so that programming can be completed here by editing the graphics through the interface; after the model definition is completed, the model can be compiled from the intermediate language into machine execution code and executed or interpreted and executed through the intermediate language interpreter.
[0129] Still taking the air conditioning system as an example, for example, if a one-to-many relationship between the chiller and the AHU on each floor is defined, when drawing, you can drag in the knowledge graph block to use this label relationship to automatically generate the logic for starting the chiller in the entire building and the cycle start-up logic for the AHU on each floor. There is no need for people to drag elements one by one to program. When executing, the system will automatically convert the relationship into the corresponding intermediate language code, and the two can replace each other. Fig.11 The figure shows the calculation flow chart generated by the relationship between the air system label and the water system label in the control relationship of the air conditioning system in Building A. Figure 5 A one-to-many decomposition relationship is defined. When generating a flow chart, the chilled water supply of the chiller is automatically summed up by the chilled water required by the AHU to generate a control flow chart. The fresh air volume generated by each AHU is the sum of the fresh air volume of the VAV under the AHU. Normally, when expressing in the interface, only the previous Figure 5 The one-to-many relationship shown in Figure 1 shows the flowchart it generates, which is Fig.11 .
[0130] The computer application system of the present invention uses the basic logic of constructing the knowledge model as follows Fig.12 As shown, first, the model relationship of the model members is constructed through the model relationship definition module; second, the object model composition is described through the model composition definition module; third, the behavior process is drawn through the model behavior definition module to form a corresponding knowledge model; the above three steps are all driven by the knowledge graph; then, the knowledge model is saved, and the knowledge model and the process are compiled into a virtual machine code (an intermediate file expressed by the programming software) and executed to obtain and display the knowledge model diagram. The present invention can achieve the following effects:
[0131] 1. By defining the relationship between models and labeling the models with different knowledge tags, the knowledge graph of the knowledge field can be automatically generated between models through the same knowledge tags. Knowledge graphs of different fields are uniformly displayed on the same model through different tags to form a cross-domain knowledge graph. All models can be displayed together through the knowledge graph to express the internal connections between models at various levels.
[0132] 2. When using a model, you can call on relationships or knowledge graphs to express the operating logic, or automatically generate the operating logic from relationships or graphs. In this way, the model defined by experts can be used by non-software personnel without knowing the principles, so that models can be defined quickly, application systems can be generated quickly, and knowledge can be passed on quickly.
[0133] 3. Traditional knowledge graphs only have relationships but no actions or controls, while programs only have controls but no graphs or knowledge. The graphical model defined in this method is a program that contains a knowledge graph and is a runnable application. It is a holographic model that can be directly inherited and used without documentation or personnel training and can be understood by both computers and humans.
[0134] 4. Graphic construction, i.e. programming, is achieved by translating the relationships and spectra in the graphics into an intermediate language, and corresponding the attributes and processes to the computer intermediate language statements one by one. In this way, ordinary non-computer professionals can complete programming by dragging and dropping graphics, thus eliminating the gap between computers and professional business knowledge.
[0135] 5. Complete the entire knowledge-driven and graphical inheritance through a combination of model construction, process construction, relationship construction, intermediate language, virtual machine compiler and executor.
[0136] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A computer application system for rapidly building and generating knowledge models, characterized in that: include: The model composition definition module is used to construct a first model with the metamodel as a member for the object corresponding to the real world, then construct a second model with the first model as a member, and then construct a third model with the second model as a member, and so on, until the object model is obtained; The model relationship definition module is used to set the model relationships of the members of the object models corresponding to the selected different objects through the graphic editor, select specific objects from the built models or model parameters, set the relationships between them on the relationship lines, and label the model relationships with knowledge tags. By assigning logical codes to the relationships for automatic calculation and control, a knowledge graph is formed, wherein the knowledge tags contain logic scripts that can be called to complete calculation and control; The model behavior definition module is used to define process components in the form of blocks and use the process components as components of the object model, so that the knowledge graph is synchronized with the real-world objects and a knowledge model that reflects the real world is generated; The model relationship definition module includes: The relationship description submodule is used to establish a model base library for various industry fields based on the metamodel, define the basic relationship between each model member in the model base library, and describe the relationship between the internal parameters of the model members and the relationship between different model members; The relationship line drawing submodule is used to draw the relationship lines using a graphic editor according to the basic relationships of each model member; The compilation and labeling submodule is used to perform digital analysis based on basic relationships, automatically compile according to the analysis results, form knowledge labels, and associate knowledge labels with relationship lines; The graph display submodule is used to perform digital analysis based on basic relationships and form a knowledge graph based on the analysis results; The model composition definition module includes: The interface construction submodule is used to take the basic objects on the interface as members, and / or select the metamodel or other pre-built first models as members, so as to form a second model; the members of the third model include the second model, or the second model and the first model, or the second model and the metamodel, or the second model, the first model and the metamodel; and so on until the object model is obtained; The language conversion submodule is used to implement computer language replacement, store the object model into a computer intermediate language file, or reversely parse the stored computer intermediate language file to restore the object model for expression in the interface.
2. The computer application system for rapidly building and generating knowledge models according to claim 1 is characterized in that: The model behavior definition module includes: The process parsing submodule is used to read process-related information from the storage file and parse the process-related information to obtain process components; The flowchart block definition submodule is used to define the data and operations used in a single link of the process in the form of blocks for the process components, use lines and / or arrows to express the direction of the process steps, and form and store the flowchart.
3. The computer application system for rapidly building and generating knowledge models according to claim 1 is characterized in that: The basic objects used by the interface construction submodule include one or more of a single value, a single text, a structure, and an array.
4. A method for rapidly constructing and generating a knowledge model, characterized in that: The following steps are involved: S100: for an object corresponding to an object in the real world, a first model is constructed using a meta-model as a member, a second model is constructed using the first model as a member, and a third model is constructed using the second model as a member, and so on, until an object model is obtained; S2 00: For the object models corresponding to the selected different objects, the model relationships of the members are set through the graphic editor, and specific objects are selected from the built models or model parameters, and the relationships between them are set on the relationship lines. The model relationships are marked with knowledge tags, and the relationships are given logical codes for automatic calculation and control to form a knowledge graph, where the knowledge tags contain logic scripts that can be called to complete calculation and control; S300: defining process components in the form of blocks, and using the process components as components of the object model, so that the knowledge graph is synchronized with the objects in the real world, and a knowledge model reflecting the real world is generated; Step S200 includes: S210: Establish a model base library for each industry field based on the metamodel, define the basic relationship between each model member in the model base library, and describe the relationship between the internal parameters of the model members and the relationship between different model members; S220: according to the basic relationship of each model member, a graphical editor is used to draw a relationship line; S230: Perform digital analysis based on the basic relationship, automatically compile according to the analysis result, form a knowledge label, and associate the knowledge label with the relationship line; S240: Perform digital analysis based on the basic relationship and form a knowledge graph according to the analysis result; Step S100 includes: The second model is formed by taking the basic objects on the interface as members and / or selecting the metamodel or other pre-built first models as members; the members of the third model include the second model, or the second model and the first model, or the second model and the metamodel, or the second model, the first model and the metamodel; and the process is repeated until the object model is obtained; Implement computer language replacement, store the object model into a computer intermediate language file, or reversely parse the stored computer intermediate language file to restore the object model for expression in the interface.
5. The method for rapidly constructing and generating a knowledge model according to claim 4, characterized in that: Step S300 includes: Read the process related information from the storage file, and parse the process related information to obtain the process components; For process components, the data and operations used in a single link of the process are defined in the form of blocks, and the direction of the process steps is expressed using lines and / or arrows to form and store a flowchart.
6. The method for rapidly constructing and generating a knowledge model according to claim 4, characterized in that: Implementing computer language replacement includes: When the save action is executed, the content is automatically converted and saved into an intermediate language file recognizable by the computer for storage according to the knowledge model drawn on the interface; the intermediate language file contains the model relationship definition, model composition definition and model process composition definition; An intermediate language file is obtained, and according to a preset interpretation rule, the intermediate language file is parsed and translated into a model including a graphical expression form showing the model composition, process, relationship and / or map.
Citation Information
Patent Citations
Method and system for implementing suite mechanism based on low-code platform
CN118312167A