An implementation method and system of an application system
By separating the development and deployment of application systems and using template files and configuration parameters, the efficient generation and deployment of application systems were achieved, solving the problems of high professional requirements and long time consumption in existing technologies, and improving the versatility and reusability of the system.
Patent Information
- Application Number
- CN202510699757.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-05-28
AI Technical Summary
The development of existing application systems requires the joint participation of professional software engineers and maintenance personnel. The high level of expertise required, the long development time, and the high development cost make it difficult to achieve low-cost, large-scale promotion and application of similar projects.
The development and deployment of the application system are separated. Parameter files are generated through template files and configuration parameters, decoupling model development and usage. The application system is generated using a graphical programming method.
It lowers the professional skill requirements for industry experts and application debugging personnel, improves the professionalism and quality of application systems, and enhances the practicality and reusability of models.
Smart Images

Figure CN120631427B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of application system software technology, and mainly relates to the intelligent implementation method and implementation system of application system software for the optimization management and control of complex systems in the fields of energy, resources, materials, carbon emissions, etc. Background Technology
[0002] Social production and daily life require a variety of complex application systems, such as building management and control systems, HVAC management and control systems, domestic hot water management and control systems, energy storage management and control systems, regional energy carbon emission management and control systems, regional energy carbon emission governance and control systems, urban and rural energy carbon emission governance and control systems, and enterprise group governance, management, and control systems. These complex application management, control, and governance systems require the integration of multiple software modules and hardware devices for comprehensive governance, management, and control. They are characterized by the integration of multiple subjects, multi-dimensional parameter inputs, multiple control objects, multiple adjustment variables, multiple application objectives, and multi-logical operation of operation and control. Achieving real-time, accurate, and intelligent management, control, and governance oriented towards application objectives or even multiple objectives is very difficult.
[0003] The implementation of conventional governance, management, and control application systems involves customized solution design and program development tailored to the specific characteristics of a particular object to be optimized for governance, management, and control. The application software engineers required for the development of such complex application systems typically need to be experts in programming languages (such as software programming languages like C and JAVA, and intermediate programming languages for configuration logic like PLC and DDC). They need to customize the design and development of application system software based on the characteristics of the project equipment and project requirements, and then deploy the optimized logic and debug the equipment on-site.
[0004] However, professional application software engineers are often unfamiliar with the industry-specific knowledge and performance characteristics of the equipment systems used in their projects. For example, in building application system projects, they need to be familiar with the design schemes for the building's electrical / hydraulic optimization management and control, the types and parameters of the controlled equipment, and the characteristics of the hardware controllers. Similarly, developing a typical domestic hot water application system requires familiarity with the characteristics of relevant heat sources (air source heat pumps, solar water heaters, electric boilers) to design the system's management and control scheme, which is then developed, debugged, and deployed by software engineers. For the development of HVAC application systems, expertise in the rules and logic of matching heating and cooling loads and supply and demand is required, along with the design of corresponding control algorithms and mathematical models. Therefore, writing professional control logic that enables the efficient and energy-saving operation of controlled equipment is a significant challenge for software engineers.
[0005] However, professional maintenance personnel who are familiar with the industry knowledge and equipment characteristics of the project do not have the relevant software development skills and professional ability to debug and deploy systems.
[0006] Therefore, the design, development, debugging, and deployment of the entire application system all require a dedicated project team composed of multiple control engineers and professional operation and maintenance personnel. This team conducts targeted research and customized development based on the characteristics and needs of the project, taking months or even years to complete. This traditional application system development method is severely limited by the professional knowledge and skills of technical personnel, the number of available systems, and personal experience. Application systems developed with a lot of human and material resources are often only applicable to the project they were developed for. When developing application systems for other similar projects, the development process needs to be reorganized. This seriously affects the versatility and replicability of the developed application systems, making low-cost, large-scale development and application in similar projects a challenge.
[0007] It is evident that existing application systems require software engineers or related professional programmers, in conjunction with professional operation and maintenance personnel, to design and develop. The implementation of such application systems has high professional requirements, is time-consuming, and has low development efficiency, resulting in very high development costs and usage barriers. It is difficult to achieve low-cost, large-scale promotion and application of similar application systems. Summary of the Invention
[0008] (a) Purpose of the invention
[0009] The purpose of this invention is to provide an application system implementation method and system. Through the method and system of this invention, the development and deployment of the application system are separated, the model development and model use are decoupled, the difficulty of using the model in the application is reduced, and the efficiency of model reuse is improved.
[0010] (II) Technical Solution
[0011] To address the aforementioned problems, a first aspect of the present invention provides a method for implementing an application system, characterized by comprising: step S1, generating a parameter file based on a template file and configuration parameters; step S2, generating an application system file based on the template file and the parameter file, and generating an application system according to the application system file; wherein the parameter file is a file that records the configuration parameters required to configure the template file, and the configuration parameters include device parameters, control parameters, operating parameters, and requirement parameters.
[0012] The template file is a template file that matches the application system. It includes one or more entities, and each entity includes at least an attribute group, a logical group, and an association group that implements the association between the attribute group and / or the logical group.
[0013] The parameter file is used to configure the attributes and attribute values of all entities and their sub-entities in the corresponding template file in the form of key-value pairs, forming a tree-structured set of configuration entities. The key is a globally unique identifier that can uniquely identify the entity and its attributes, and the value is the attribute value obtained based on the attribute type, so that the entities in the template file are associated with the corresponding configuration entities in the parameter file through the corresponding globally unique identifier.
[0014] Optionally, the application system files include: a logic file, generated based on the template file and parameter file; a driver file, which is a collection of drivers required to run the logic file and is loaded based on the needs of the logic file; and a navigation file, created based on each configuration entity in the parameter file, used to establish the association between the template file, parameter file, logic file and driver file so that the system can automatically call the above-mentioned files.
[0015] Preferably, the steps for generating the parameter file include: step S131, obtaining the associated template entities based on the template file; step S132, creating a corresponding configuration entity for each template entity; step S133, configuring the attributes of each configuration entity; step S134, repeating steps S132-S133 for the template sub-entities of the current template entity until all template sub-entities of the current template entity have been processed; step S135, repeating steps S132-S134 until all template entities have been processed; and step S136, forming a tree-structured set of configuration entities and generating the parameter file.
[0016] Preferably, the step of generating the parameter file further includes: step S1361, associating the entity nodes corresponding to the template entity and the template sub-entity through the belonging relationship to form a tree structure with a hierarchical relationship; step S1362, combining all configuration entities with tree structure and / or single structure to form a configuration entity set; step S1363, generating the configuration entity set into a text file, which is the parameter file.
[0017] Preferably, each template entity contains a unique entity identifier and an entity quantity expression. The number of configuration entities created is obtained through the entity quantity expression, and each template entity is associated with one or more configuration entities created through its unique identifier.
[0018] Optionally, if the template entity has a parent node, the created configuration entity will be set as a child configuration entity of the configuration entity corresponding to that parent node.
[0019] Preferably, the step of configuring attributes for each configuration entity includes: step S1331, obtaining the configuration attributes of the template entity corresponding to the current configuration entity, wherein the configuration attributes include attribute identifier, attribute type and attribute value; step S1332, obtaining the key and value of the configuration attribute, creating a configuration attribute table with key-value pairs, wherein the attribute identifier of the configuration attribute is used as the key of the configuration attribute, the value of the configuration attribute is calculated according to the attribute type and attribute value, and the configuration attribute table is created in the form of a hash table structure of the key-value pairs.
[0020] Preferably, the steps for generating application system files include:
[0021] Step S231: Generate a logic file based on the template file and parameter file; Step S232: Load the driver file required for the logic file; Step S233: Create a navigation file based on each configuration entity in the parameter file; Step S234: Generate an application system file based on the navigation file.
[0022] Preferably, the step of generating the logic file further includes:
[0023] Step S2311: Create a corresponding logical source file based on the configuration entity; Step S2312: Configure all template attributes of the template entity; Step S2313: Configure all template logical blocks of the template entity, and add all corresponding micro-blocks to the logical source file according to the content of the logical blocks; Step S2314: Configure all template associates of the template entity, and connect the logical micro-blocks in the logical source files of the two sides of the template associate by adding connection micro-blocks; Step S2315: Generate a logical file based on the logical source file and save it to the corresponding navigation file.
[0024] Preferably, the step of generating navigation files further includes:
[0025] Step S2331: Create a corresponding navigation node for each configuration entity; Step S2332: Create a navigation file directory corresponding to the configuration entity based on all navigation nodes; Step S2333: Establish the association between all configuration entities and the generated logical files and driver files in each navigation node; Step S2334: Generate navigation files based on navigation nodes and navigation file directories.
[0026] Optionally, the steps also include editing the template file: Step S31, create a new template file according to the type and requirements of the application system; Step S32, revise the specified template file according to user requirements; Step S33, generate a new template file, and export or save it.
[0027] Optionally, the method also includes the step of defining a custom logic micro-block: step S41, obtaining the logic micro-block extension interface; step S42, generating a logic micro-block definition file through the logic micro-block extension interface and the custom logic micro-block program; step S43, generating the logic file of the custom logic micro-block.
[0028] Optionally, the attribute group contains one or more attributes, each attribute describing a static feature of the entity to which it belongs, and each attribute is connected to the corresponding entity through an attribute expression.
[0029] Optionally, the attribute types configured include: static attributes, which are fixed attribute values stored in the template file and obtained by parsing the template file according to the attribute value data type; user attributes, which are attributes that reflect the characteristics of the application system and user needs and are attribute values obtained based on user input; and expression attributes, which are formed as expressions in the template file and are values obtained by performing secondary calculations based on previously obtained attribute values during template parsing. The values remain unchanged in subsequent processes after the template parsing is completed.
[0030] Optionally, the logical group contains one or more logical blocks, each logical block being used to describe a function of the entity to which it belongs, and each logical block being associated with other attributes or other logical blocks of the entity to which it belongs through an associate.
[0031] Optionally, each of the logic blocks includes one or more logic microblocks, each logic microblock including a connection microblock for implementing data connection and an algorithm microblock with a single data processing function. Each logic microblock includes zero or more input pins, zero or more output pins, and an algorithm module.
[0032] Optionally, the data types of the input and output pins of the logic microblock include 0-dimensional constant data, 1-dimensional array data, 2-dimensional matrix data, and multi-dimensional tensor data.
[0033] Optionally, the data processing method for the logical micro-block includes:
[0034] Mathematical operations, including numerical operations, logical operations, bitwise operations, data type conversion, and mathematical function operations; control algorithms, including input / output, network protocol integration, logical algorithms, branch control operations, gate logic, and proportional-integral-derivative control; edge computing, including aggregation operations, matrix operations, SQL operations, neural networks, and database support; and extended support for calls, including calls from Python, EnergyPlus, Excel, and Matlab.
[0035] Optionally, the associator group includes one or more associators, each of which is used to associate a logical block with other attributes or other logical blocks of the entity to which it belongs, so that the data storage address of the two associated entities is the same in the generated application system.
[0036] Preferably, the expression attribute in the entity attribute is associated with other attributes through a globally unique identifier that identifies the corresponding element in its expression.
[0037] Preferably, the calculation of the expression attributes is performed during the process of parsing the template file and generating the parameter file, based on the sorting order of the expression attributes in the template file.
[0038] Optionally, the processing of the input and output data associated with the correlator is performed during system operation after the application system has been generated and deployed.
[0039] Optionally, in the template file, each entity also includes a group of sub-entities, which contains one or more sub-entities, each sub-entity describing components of the entity that have the same type of characteristics.
[0040] According to another aspect of the present invention, an application system implementation system is also provided, comprising:
[0041] Template editor 1 is used to edit and generate template files required by the application system or user; template parser 2 generates parameter files based on the received or invoked template files and input configuration parameters; system generator 3 generates application system files and application systems based on the received or invoked parameter files and template files; wherein, the parameter file is a file that records the configuration parameters required to configure the template file, and the configuration parameters include device parameters, control parameters, operating parameters, and requirement parameters.
[0042] Preferably, the template file is a template file that matches the application system, and it includes one or more entities, each entity including at least an attribute group, a logical group, and an association group that implements the association between the attribute group and / or the logical group.
[0043] Preferably, the parameter file is used to configure the attributes and attribute values of all entities and their sub-entities in the corresponding template file in the form of key-value pairs, forming a tree-structured set of configuration entities; wherein, the key is a globally unique identifier that can uniquely identify the entity and its attributes, and the value is an attribute value obtained based on the attribute type, so that the entities in the template file are associated with the corresponding configuration entities in the parameter file through the corresponding globally unique identifier.
[0044] Optionally, the application system files include: a logic file, generated based on the template file and parameter file; a driver file, which is a collection of drivers required to run the logic file and is loaded based on the needs of the logic file; and a navigation file, created based on each configuration entity in the parameter file, used to establish the association between the template file, parameter file, logic file and driver file so that the system can automatically call the above-mentioned files.
[0045] Optionally, it also includes a system template library 4, which contains pre-compiled general template files or user-revised custom template files, for users to import general template files and / or custom template files to generate application systems.
[0046] Optionally, the template editor 1 creates a new template file according to the type and requirements of the application system; and / or revises the specified template file according to user requirements; generates a new template file, exports it to the template parser 2 and the system generator 3 for use, or stores it in the system template library 4 for the template parser 2 and the system generator 3 to call when needed.
[0047] Optionally, the template parser 2 includes: a template reader 21, used to read template files from the file system into memory and obtain associated template entities based on the template files; an attribute configurator 22, used to create corresponding configuration entities for all entities and sub-entities in the template files, configure attributes for each configuration entity, and / or save the attributes and attribute values of the configuration entities in the form of key-value pairs to form a configuration entity set; a parameter configurator 23, used to call various parameters required for the application system to run, and / or configure parameters according to user input values of the application system; and a parameter file generator 24, used to create a parameter file, deserialize the generated configuration entity set and save it to the parameter file, and / or save attribute values to the parameter file in real time during the traversal of the attribute configurator 22, and save the file to the file system and send it to the system generator 3 after the traversal is completed.
[0048] Optionally, the attribute configurator 22 configures attributes in the following manner: obtaining the configuration attributes of the template entity corresponding to the current configuration entity, wherein the configuration attributes include attribute identifier, attribute type, and attribute value; obtaining the key and value of the configuration attributes, creating a configuration attribute table with key-value pairs, wherein the attribute identifier of the configuration attributes serves as the key of the configuration attributes, calculating the value of the configuration attributes based on the attribute type and attribute value, and creating the configuration attribute table in the form of a hash table structure of the key-value pairs.
[0049] Optionally, in the attribute configurator 22, each template entity contains a unique entity identifier and an entity quantity expression. The number of configuration entities created is obtained through the entity quantity expression, and each template entity is associated with one or more configuration entities created through its unique identifier.
[0050] Optionally, the attribute configurator 22 further associates the entity nodes corresponding to the template entity and the template sub-entity through the membership relationship to form a tree structure with hierarchical relationship, and combines all configuration entities with tree structure and / or single structure to form a configuration entity set.
[0051] Preferably, in the template file and the parameter file it generates, all attributes, connectors and logic appearing in the template file are set with their own independent globally unique identifiers, so that the template entity attributes corresponding to the template file are associated with the configuration entity attributes corresponding to the parameter file through the globally unique identifiers.
[0052] Optionally, the system generator 3 includes:
[0053] File loader 31 receives and loads the parsed template file and corresponding parameter file, or loads the user-selected local template file and corresponding local parameter file; logic builder 32 generates a corresponding logic file for each configuration entity based on the template file and parameter file, and loads the driver file required for the logic file; navigation builder 33 creates a corresponding navigation file based on each configuration entity in the parameter file and its corresponding logic file; system file generator 34 generates application system files based on the navigation files.
[0054] Preferably, the file loader 31 verifies the template file and parameter file in the following manner:
[0055] Retrieve the template entity associated with the template file and the configuration entity associated with the parameter file respectively; verify that the template entity corresponding to each configuration entity exists. If it exists, proceed to the next step; verify that the tree structure of the template file and the parameter file is consistent. If they are consistent, proceed to the next step; verify that the unique identifiers of all configuration attributes of each configuration entity match. If they do, generate the application system file accordingly.
[0056] Optionally, the navigation builder 33 generates navigation files through the following operations:
[0057] Iterate through the set of configuration entities and create a corresponding navigation node for each configuration entity; check if each configuration entity has hidden attributes. If not, create a navigation file directory corresponding to the configuration entity based on all navigation nodes; establish the association between all configuration entities and the generated logic files and driver files in each navigation node; generate navigation files based on navigation nodes and navigation file directories.
[0058] Optionally, the logic builder 32 generates the logic file in the following manner: traverses the set of configuration entities in the parameter file, checks whether each configuration entity has attributes, logic blocks, or associates; if so, creates a corresponding logic source file based on each configuration entity; configures all attributes of each configuration entity in the logic source file; configures all logic blocks of each configuration entity in the logic source file, and adds all corresponding micro-blocks in the logic source file according to the content of the logic blocks; configures all associates of each configuration entity in the logic source file, and connects the logic micro-blocks in the logic source files corresponding to the template associates by adding connection micro-blocks; generates the logic file based on the logic source file and saves it to the corresponding navigation file.
[0059] Optionally, the logic builder 32 loads the driver files required by the logic file in the following ways: querying and loading the driver files required by the micro-block in the driver file library according to the type of the micro-block; or selecting and loading the driver files pre-stored in the local application system file.
[0060] Optionally, the template editor 1 further includes a logic micro-block library 5, which pre-encapsulates general-purpose logic micro-blocks and / or professional logic micro-blocks applicable to various industries. The template editor 1 calls these logic micro-blocks according to the needs of projects in various industries to automatically generate template files or customize and generate template files according to input instructions or parameters of professionals.
[0061] Optionally, the logical micro-block library 5 includes the following logical micro-block sub-libraries based on the data processing type:
[0062] The mathematical operations sub-library 51 includes logic micro-blocks for handling numerical operations, logical operations, bitwise operations, data type conversions, and mathematical function operations;
[0063] The control algorithm sub-library 52 includes logic micro-blocks for processing input / output, network protocol integration, logic algorithms, branch control operations, gate logic, and proportional-integral-derivative adjustment;
[0064] The edge computing sub-library 53 includes logical micro-blocks for processing aggregation operations, matrix operations, SQL operations, neural networks, and database support;
[0065] Extended support sub-libraries 54, including logic micro-blocks for calling Python, EnergyPlus, Excel, and Matlab.
[0066] Optionally, the template editor 1 further includes: a logic micro-block extension interface 6, used by the template editor 1 to generate new logic blocks or logic micro-blocks, or edit existing logic blocks or logic micro-blocks, or customize logic blocks or logic micro-blocks with specific functions, and generate custom logic micro-blocks.
[0067] Optionally, the system template library 4 includes at least one of the following:
[0068] Template files for domestic hot water systems, air-source solar hybrid heating systems, and electric boiler heating systems; template files for ground-source heat pump air conditioning systems, multi-split air conditioning systems, and lithium bromide unit systems for HVAC control systems; template files for building lighting systems, urban street lighting systems, and factory lighting systems for intelligent lighting systems.
[0069] Optionally, the attribute group contains one or more attributes, each describing a static feature of its associated entity, and each attribute is connected to its corresponding entity through an attribute expression. The attribute types configured include: static attributes, which are fixed attribute values stored in the template file and obtained by parsing the template file according to the attribute value data type; user attributes, which reflect the characteristics of the application system and user needs and are attribute values obtained based on user input; and expression attributes, which are formed as expressions in the template file and are values obtained by secondary calculation based on previously obtained attribute values during template parsing, and whose values remain unchanged in subsequent processes after template parsing.
[0070] Optionally, the logic group comprises one or more logic blocks, each logic block describing a function of its associated entity. Each logic block is associated with other attributes or other logic blocks of its associated entity through an associate. Each logic block comprises one or more logic micro-blocks, including connection micro-blocks for implementing data connections and algorithm micro-blocks with single data processing functions. Each logic micro-block includes zero or more input pins, zero or more output pins, and an algorithm module. Optionally, the data types of the input and output pins of the logic micro-block include 0-dimensional constant data, 1-dimensional array data, 2-dimensional matrix data, and multi-dimensional tensor data.
[0071] Optionally, the associator group includes one or more associators, each of which is used to associate a logical block with other attributes or other logical blocks of the entity to which it belongs, so that the data storage address of the two associated entities is the same in the generated application system.
[0072] Preferably, the expression attribute in the entity attribute is associated with other attributes through a globally unique identifier that identifies the corresponding element in its expression.
[0073] Preferably, the calculation of the expression attributes is performed during the process of parsing the template file and generating the parameter file, based on the sorting order of the expression attributes in the template file.
[0074] Preferably, the processing of the input and output data associated by the correlator is performed during system operation after the application system has been generated and deployed.
[0075] Optionally, in the template file, each entity also includes a group of sub-entities, which contains one or more sub-entities, each sub-entity describing components of the entity that have the same type of characteristics.
[0076] (III) Technical Effects
[0077] In summary, the method and system of this invention separate application system development and deployment, decoupling model development from model usage. This significantly reduces the professional skill requirements and workload of industry experts and application debugging personnel, decoupling their work relationship and allowing them to focus on their respective strengths. This improves the professionalism and quality of the application system while lowering the barrier to entry for application debugging personnel.
[0078] This invention innovatively designs a logic block and logic micro-block structure, integrating the algorithm model into algorithm modules within the logic block or logic micro-block, thus treating them as directly callable and runnable logic files. Consequently, controllers capable of running logic micro-blocks and simulation software can also run the algorithm model, enabling the algorithm model to run conveniently and without distortion in various types of application systems.
[0079] Thanks to the uniformity of the logic micro-block interface, logic micro-blocks with algorithm models developed or integrated through this system can be directly simulated and run, thus enhancing the practicality of the model. Attached Figure Description
[0080] Figure 1 This is a schematic diagram of the structure of the application system implementation system of the present invention.
[0081] Figure 2 A schematic diagram of the composition structure of an exemplary template parser of the present invention is shown.
[0082] Figure 3 A schematic diagram of the composition structure of an exemplary system generator of the present invention is shown.
[0083] Figure 4 A schematic diagram illustrating the composition of an exemplary system template library of the present invention is shown.
[0084] Figure 5 This is a flowchart illustrating the application system implementation method of the present invention.
[0085] Figure 6 A schematic diagram of the process for generating parameter files according to an embodiment of the present invention is shown.
[0086] Figure 7a A schematic diagram of the parameter configuration interface of an exemplary air source heat pump of the present invention is shown.
[0087] Figure 7b A schematic diagram of the parameter configuration interface of an exemplary water tank of the present invention is shown.
[0088] Figure 8 The diagram shows a flowchart of a preferred embodiment of the present invention for generating a parameter file.
[0089] Figure 9 This shows an exemplary template entity diagram with a parent node.
[0090] Figure 10 This shows an example of a configuration entity set consisting of all entities.
[0091] Figure 11 The diagram shows a flowchart of the application system generation process according to an embodiment of the present invention.
[0092] Figure 12 The diagram shows a flowchart of a verification template file and parameter file according to an embodiment of the present invention.
[0093] Figure 13 The diagram illustrates the process of generating application system files according to an embodiment of the present invention.
[0094] Figure 14 A schematic diagram of the process for generating logic files in an embodiment of the present invention is shown.
[0095] Figure 15 This diagram illustrates the process of creating a navigation file according to an embodiment of the present invention.
[0096] Figure 16 The flowchart illustrating the process of editing template files according to an embodiment of the present invention is shown.
[0097] Figure 17 A logical structure diagram of the template file according to a preferred embodiment of the present invention is shown.
[0098] Figure 18a An example is shown, illustrating the entity attributes of a template file for an air source heat pump.
[0099] Figure 18b An exemplary diagram further illustrates the heat source type of an air source heat pump.
[0100] Figure 19a An exemplary diagram illustrates the application of logical blocks in the template file entity of the present invention.
[0101] Figure 19b The example further illustrates a schematic diagram of the specific data corresponding to the city as a logical micro-block.
[0102] Figure 20 A schematic diagram of the extended structure of the template editor in a preferred embodiment of the present invention is shown.
[0103] Figure 21 An example of the application of the association group of the present invention is shown.
[0104] Figure 22a This diagram illustrates a logic writing page in a traditional application system development model.
[0105] Figure 22b This diagram illustrates another logic writing page in the traditional application system development model.
[0106] Figure 22c This diagram illustrates another logic writing page in the traditional application system development model.
[0107] Figure 23a This diagram illustrates an application example of the application system development model of the present invention for configuring geographic location.
[0108] Figure 23b This diagram illustrates an application example of the development model of the application system of the present invention to further configure the water demand of a single building. Detailed Implementation
[0109] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0110] To address the aforementioned problems in the prior art, this invention proposes a method and system for implementing an application system based on graphical programming. This system allows for the creation of application system template files that describe the characteristics of a certain type of application system through graphical editing. Then, application template configuration personnel can input actual project parameters into the system to automatically generate a runnable application system.
[0111] Figure 1 This is a schematic diagram of the structure of the application system implementation system of the present invention.
[0112] like Figure 1 As shown, in a preferred embodiment of the present invention, the application system implementation system includes the following parts: template editor 1, template parser 2, and system generator 3.
[0113] Template Editor 1 is used to edit and generate template files required by the application system or user. Specifically, based on the type and requirements of the application system, Template Editor 1 can automatically edit templates and create new template files, which are then sent to the corresponding template parser 2 and system generator 3. Optionally, Template Editor 1 can also revise specified template files according to user requirements to conform to the type and requirements of the application system, or correct errors in the template files.
[0114] Optionally, the template editor 1 of the present invention provides a graphical template editing interface, which allows users to easily perform customized template editing and development work through simple drag-and-drop operations. This can be used by industry experts familiar with the characteristics of project equipment and control requirements.
[0115] Optionally, the template files generated by the template editor 1 can also be stored in the system template library 4, and used by the template parser 2 and the system generator 3 when needed.
[0116] Template parser 2 generates a parameter file based on the received or invoked template file and the input configuration parameters, for use by system generator 3. Specifically, template parser 2 can invoke and parse template files according to the type and requirements of the application system; set the configuration parameters required by the template file, such as invoking the preset configuration parameters of the corresponding device from the template file according to the type and requirements of the application system; or, optionally, customize the input configuration parameters according to the type and requirements of the application system, for example, by generating a parameter configuration interface associated with the template file, through which application configuration personnel input various parameters required by the application system; and finally generate a parameter file based on the invoked template file and the set configuration parameters, for use by system generator 3.
[0117] Figure 2 A schematic diagram of the composition structure of an exemplary template parser of the present invention is shown.
[0118] like Figure 2 As shown, preferably, an exemplary template parser 2 of the present invention includes the following components: template reader 21, attribute configurator 22, parameter configurator 23, and parameter file generator 24.
[0119] Template reader 21 is used to read template files from the file system into memory and obtain associated template entities based on the template files.
[0120] The attribute configurator 22 is used to create corresponding configuration entities for all entities and sub-entities in the template file, configure attributes for each configuration entity, and / or save the attributes and attribute values of the configuration entity in the form of key-value pairs. Each entity can generate multiple configuration entities, forming a tree-structured set of configuration entities.
[0121] Specifically, it is used to obtain the quantity and attribute values of all entities and sub-entities in the template file, and / or generate an object corresponding to each entity, that is, the configuration entity corresponding to the template entity. Specifically, after the template file is successfully read, the attribute configurator 22 traverses all entities and sub-entities in the template file using a depth-first recursive algorithm, calculates the quantity and configuration attributes of entities based on their type, including attribute identifiers, attribute types, and attribute values. Optionally, after calculation, it generates a configuration entity corresponding to each entity based on the quantity of each entity, obtains the keys and values of the configuration attributes, and creates a configuration attribute table using key-value pairs. The attribute identifier of the configuration attribute serves as the key, and the value of the configuration attribute is calculated based on the attribute type and attribute value. The configuration attribute table is created in the form of a hash table structure of the key-value pairs. Further, the entity nodes corresponding to the template entities and template sub-entities are associated through their hierarchical relationships to form a tree structure with hierarchical relationships; all configuration entities with tree structures and / or single structures are combined to form a configuration entity set.
[0122] Here, each template entity contains a unique entity identifier and an entity count expression. The number of configuration entities created is obtained through the entity count expression, and each template entity is associated with one or more configuration entities created through its unique identifier.
[0123] For example, if the number of entities in the user-side booster pump section of the hot water circulation control system template is 3, it indicates that there are three booster pumps. After all objects are successfully generated, the generated objects are saved in an object array, and the parameter file generator is called to generate the parameter file.
[0124] The parameter configurator 23 is used to call various parameters required for the application system to run, and / or configure parameters based on user input values from the application system. The parameters that the parameter configurator 23 needs to call or can call include various device parameters (usually fixed constants) and preset operating parameters, such as device operating power, frequency, and operating temperature. Preferably, after calling these parameters, the parameter configurator 23 can perform parameter type and value matching verification to ensure the correctness of the called parameters. The parameters that the parameter configurator 23 needs to configure typically refer to the requirement parameters reflecting the user's needs in the application system. In this case, the parameter configurator 23 will generate and display a parameter configuration interface for user interaction, assigning the parameter values to the parameter objects based on the input values from the user or application configuration personnel. This generator is called by the attribute configurator when traversing entities. The corresponding parameter configuration interface is only generated and displayed when an entity's attributes require user participation in value generation; otherwise, it is not called. After configuring the entity attributes, it is directly sent to the parameter file generator 24 to create a parameter file.
[0125] Parameter file generator 24 is used to create parameter files, deserialize and save the generated set of configuration entities to the parameter file, and / or save attribute values to the parameter file in real time during attribute configurator traversal. After traversal, the file is saved to the file system and sent to system generator 3.
[0126] The parameter file corresponds to the user attributes of the template entities in the template file. These attributes generally describe the measurable parameters of the entities in the system, such as the length, width, and height of the water tank, the rated power of the equipment, and the acquisition address of the digital instrument.
[0127] Preferably, the parameter file is a text file used to describe all elements of the object tree, including all objects and their attributes and values. This file is in JSON format, where object attributes and values are stored as key-value pairs. The key is a string that uniquely identifies the object and its attribute, and the value is the actual value of the corresponding attribute as defined by the user. Object attribute identifiers can take the following form: "Parent object name - Parent object index / Object name - Object index / Attribute name".
[0128] The parameter file is a data file generated after application configuration personnel input the corresponding parameters through the configuration interface of template parser 2. This file saves the user configuration data, that is, the configuration parameters input by the user, in text format. The association between the user configuration data and each element in the template file is achieved through a unique reference string.
[0129] Optionally, both template files and parameter files can be infinitely nested tree structure files. The parent-child relationship of nodes in this tree structure can reflect the hierarchical relationship between the system and subsystem or the whole and local components in the project, and can be flexibly abstracted and subdivided according to the characteristics of the project.
[0130] Preferably, the template file can be a tree-structured file in XML text format. This file can be deserialized into a template file object. The template file object contains multiple entities, each entity including multiple attributes, multiple logical blocks, multiple associates, and multiple child entities. The specific structure of the template file can be found below. Figure 17 Related textual descriptions.
[0131] Preferably, the parameter file can be a tree-structured text file in JSON character text format. This file can be deserialized into a parameter file object. This file stores the attributes and values of all objects generated by the template file based on its entities. The object attributes are stored in key-value pair format, where the key is the unique identifier (reference string) of the corresponding object attribute, and the value is the value obtained according to the type of the attribute. The values include multiple types: integer type, floating-point type, boolean type, string type, etc. This parameter file is dynamically generated by the template parser based on the template file and the configuration parameters input by the user.
[0132] As mentioned above, both template files and parameter files can be deserialized to form corresponding data structures. Each template file entity can create multiple objects. The number of objects is calculated by the calculation type of the entity's number. The attribute values of the objects are also calculated by the corresponding entity's attribute calculation type. The calculation types include three types: static constants, user input, and expression calculation.
[0133] Preferably, in the template file and its generated parameter file, all attributes, connectors, and logic appearing in the template file are assigned their own independent globally unique identifiers. In this way, the template entity attributes corresponding to the template file are associated with the configuration entity attributes corresponding to the parameter file through a unique identifier (unique reference string). In embodiments of the present invention, the unique identifier (unique reference string) is set to a meaningful string that is not repeated within the same file. For example, the unique identifier can be formed by concatenating the reference name of the template entity or template attribute corresponding to the template file with the parent reference name to which the application name belongs. The identifier generated by concatenation can save some information from the parent for legality checks and also ensures global uniqueness. When there are identical names, a numeric identifier needs to be added to ensure its uniqueness within the file.
[0134] System Generator 3 generates application system files and the application system itself based on the received or invoked parameter files and template files. Specifically, System Generator 3 provides an application system operation interface, through which application configuration personnel operate to ultimately generate all the application system files.
[0135] Figure 3 A schematic diagram of the composition structure of an exemplary system generator of the present invention is shown.
[0136] like Figure 3 As shown, an exemplary system generator 3 of the present invention includes the following components: a file loader 31, a logic builder 32, a navigation builder 33, and a system file generator 34.
[0137] The file loader 31 is used to receive and load parsed template files and corresponding parameter files, or load user-selected local template files and corresponding local parameter files. The loaded template files and parameter files need to be verified to be correct and to confirm their relationship. Specifically, the file loader 31 verifies the template files and parameter files in the following ways: obtaining the template entities associated with the template files and the configuration entities associated with the parameter files; verifying the existence of the template entity corresponding to each configuration entity; if it exists, proceeding to the next step; verifying whether the tree structures of the template files and parameter files are consistent; if they are consistent, proceeding to the next step; verifying whether the unique identifiers of all configuration attributes of each configuration entity match; if so, generating the application system file accordingly.
[0138] The logic builder 32 is used to generate a corresponding logic file for each configuration entity based on the template file and parameter file, and load the driver file required by the logic file. The logic file is a graphical programming language used for data processing or logical operations.
[0139] The logic builder 32 generates logic files through the following engineering process:
[0140] Iterate through the set of configuration entities in the parameter file and check if each configuration entity has attributes, logical blocks, or associates; if so, create a corresponding logical source file (which is empty at this time) based on each configuration entity, preferably named after the unique identifier of the configuration entity.
[0141] First, configure all properties for each configuration entity in the logic source file. Specifically, examine the properties of each configuration entity and generate constant micro-blocks in the logic source file based on these properties.
[0142] Secondly, in the logic source file, configure all logical blocks for each configuration entity, and add all corresponding micro-blocks to the logic source file based on the content of the logical blocks. Specifically, examine the logical blocks corresponding to each configuration entity, and based on the content of the logical blocks, i.e., all logical micro-blocks and connecting micro-blocks included in each logical block, copy and paste them sequentially into the logic source file to add all corresponding micro-blocks.
[0143] Then, in the logical source file, all the associates for each configuration entity are configured, and the logical micro-blocks in the logical source file corresponding to the template associates are connected by adding connection micro-blocks. Specifically, for each configuration entity, all associates are traversed, and based on the corresponding source and destination ends described by all associates, the two ends are connected by adding connection micro-blocks.
[0144] Finally, an executable logic file is generated based on the logic source file and saved to the navigation file corresponding to the configuration entity.
[0145] The navigation builder 33 is used to create a corresponding navigation file based on each configuration entity in the parameter file and its corresponding logic file. Specifically, the navigation builder 33 generates a corresponding navigation file based on the tree-structured set of configuration entities (referred to as the object tree) in the parameter file, which corresponds to the interface navigation of the final generated application system.
[0146] The workflow of Navigation Builder 33 is as follows:
[0147] Iterate through the set of configuration entities and create a corresponding navigation node for each configuration entity;
[0148] Check if each configuration entity has a hidden attribute. If not, create the navigation file directory corresponding to the configuration entity based on all navigation nodes. Otherwise, if a configuration entity has a hidden attribute that is true, then its child objects and the child objects of its child objects also have hidden attributes that are true, and the configuration entity will not generate navigation nodes.
[0149] Establish associations between all configuration entities and the generated logical and driver files in each navigation node.
[0150] Navigation files are generated based on navigation nodes and navigation file directories.
[0151] Specifically, for the configuration entity that generates navigation nodes, a navigation file directory is created in the corresponding file system, and the navigation property file and page file are copied and saved in this directory. The navigation property file is the property section of the object in the parameter file.
[0152] Optionally, if the navigation node has child navigation nodes, a subdirectory is created under this directory to store the relevant files corresponding to the child navigation nodes.
[0153] System file generator 34 generates application system files based on navigation files. Specifically, system file generator 34 packages all the aforementioned generated files, including template files, parameter files, logic files and their driver files, navigation files and navigation file directories, into a single file package according to the structure of the web application, forming the application system files.
[0154] Optionally, the application system implementation system also includes a system template library 4. This system template library 4 contains pre-compiled general template files applicable to various industries. Users can directly import the general template files provided by the system to generate application systems. Optionally, the system template library 4 also stores customized template files revised by users. In this way, customized template files can be formed by adjusting or revising them when needed, thereby generating the corresponding application system.
[0155] The template files provided by the application system of this invention summarize and modularize the general functions of the application system, and then realize the personalized parts through configuration parameters. It has the advantages of maturity and universality. These application system template files not only meet the general and basic characteristics and requirements of various project types, but also facilitate customized template editing for the personalized characteristics and requirements of projects. Therefore, these template files have a wide range of applicability. Furthermore, because they have relatively low requirements for the professional technical threshold of application debugging personnel, they are conducive to rapid promotion and use in similar projects, greatly reducing the application system development and configuration costs and improving development efficiency.
[0156] Figure 4 A schematic diagram illustrating the composition of an exemplary system template library of the present invention is shown.
[0157] like Figure 4 As shown, the system template library 4 of the present invention can provide template files for a variety of prefabricated industry application systems, such as: heating template files for domestic hot water systems, air-source solar hybrid heating template files, electric boiler heating template files; ground source heat pump air conditioning system template files for HVAC control systems, multi-split air conditioning system template files, lithium bromide unit system template files; building lighting system template files for intelligent lighting systems, urban street lighting system template files, factory lighting system template files, etc.
[0158] For different industry applications, the controlled objects and processes differ, and the preset control and operating parameters in the application system's template files also vary. For example, domestic hot water systems only have a heat source, while HVAC systems may have both a cold and heat source. Domestic hot water systems are open systems, where water and heat flow away as users use the system, while HVAC systems are closed systems, where heat is exchanged and water is only replenished in small amounts. The parameters monitored during control are also different.
[0159] Specifically, for domestic hot water systems, the template file can include preset options and parameters such as the selection of heat source type (air source, gas boiler, solar energy, etc.), water tank size, water pump parameters, whether the water pump can be frequency-controlled, and sensor address input.
[0160] By providing these pre-made industry application system template files, industry experts or other template developers can easily select the corresponding industry and system template files, import them, and then develop and optimize the template files based on them, which can significantly improve the efficiency and quality of development.
[0161] Optionally, this system also integrates a logic container. This logic container is used to simulate and execute the compiled executable logic file. Its functionality is completely consistent with the field controller that supports the operation of logic micro-blocks. In other words, the field controller is set as a logic container with special functions, which is an instance implementation of the logic file interface. Therefore, the template files and logic files developed by this system can be seamlessly applied in actual projects. Thus, during the development of the algorithm model, the logic micro-blocks integrating the algorithm model are already integrated with the actual application environment, ensuring that the completed algorithm model can be effectively implemented in actual projects.
[0162] Figure 5 This is a flowchart illustrating the application system implementation method of the present invention.
[0163] like Figure 5 As shown, the application system implementation method of the present invention mainly includes the following two steps:
[0164] Step S1: Generate a parameter file based on the template file and the input configuration parameters.
[0165] Step S2: Generate application system files based on template files and parameter files, and generate the application system based on the application system files.
[0166] Figure 6 A schematic diagram of the process for generating parameter files according to an embodiment of the present invention is shown.
[0167] See Figure 6 In this invention, step S1 exemplarily includes the following steps:
[0168] Step S11: Based on the type and requirements of the application system, call the corresponding template file;
[0169] Step S12: Set the configuration parameters required for the template file;
[0170] Step S13: Generate a parameter file based on the called template file and the set configuration parameters.
[0171] The three steps described above are described in detail below.
[0172] Step S11: Based on the type and requirements of the application system, call the corresponding template file.
[0173] In step S11, the template file library 4 pre-stores various types of general-purpose template files. The template parser 2 can retrieve the corresponding template file from the library based on the project type and requirements. It can perform fuzzy searches using type and keywords, and the search results can be directly loaded into the system via corresponding links. For example, the corresponding template file can generally be determined based on the project's industry and geographical location. If the template file library 4 does not store a corresponding template file, or if the stored template file does not meet the specific requirements of the project, the template parser 2 will notify the template editor 1 to edit and generate a customized template file.
[0174] Optionally, to meet specific project needs, a custom template file can be generated through template editor 1 and then sent to template parser 2 for use, or stored in the template file library. In this case, template parser 2 will prioritize using the received custom template file.
[0175] Therefore, step S11 may include the following sub-steps:
[0176] Step S111: Select to call the custom template file.
[0177] Template parser 2 checks whether it has received the customized template file sent by template editor 1. If it has received it, it determines whether it matches the project type and requirements. If it matches, it prioritizes calling the customized template file and proceeds to step S12. Otherwise, if it has not received it or does not match, it proceeds to the next step S112 and selects to call the general template file.
[0178] In this step, template parser 2 prioritizes receiving and calling the customized template file. Generally speaking, at the start of a project, the template file customized by the designer for that project is usually the one that best matches the project's characteristics and requirements. Therefore, prioritizing the use of the customized template file instead of the generic template file in the template library can significantly improve the efficiency of calling the customized template file with the highest matching degree.
[0179] Step S112: Select to call the general template file.
[0180] If no custom template file is received or found, template parser 2 first queries the template file library 4 for the general template file corresponding to the application system. If found, it determines whether it matches the application system type and requirements. If it matches, it selects to call the general template file and proceeds to step S12; if not found or does not match, it determines not to use the general template file. In this case, template parser 2 will notify template editor 1 to create or revise the template file.
[0181] Step S12: Set the configuration parameters required for the template file.
[0182] Different template files correspond to different project types and are matched with the characteristics and requirements of the project. After calling a template file adapted to a certain project, Template Parser 2 will parse the template file and export the configuration parameters adapted to the template file, that is, the configuration parameters required to configure the template file, including the preset parameters preset in the template file, as well as the customized parameters that need to be entered by on-site maintenance personnel according to the specific characteristics and requirements of the project.
[0183] The operation of an application system requires the pre-setting of various parameters, such as equipment parameters, control parameters, operating parameters, and demand parameters. Specifically, equipment parameters refer to the various preset parameters of the equipment in the application system, usually fixed constants. Examples include the heating capacity, rated power, and number of units for air source heat pumps; the rated heating capacity and rated gas consumption for gas boilers; the maximum water supply temperature, heating capacity, and power for electric boilers; the flow rate, head, and power of water pumps; and the length, width, and height of water tanks. Control parameters typically refer to the parameters of the controlled object, such as control parameters for personnel, equipment, and materials. Examples include the type, start / stop, and number of heat pumps; the type, number, and frequency of water pumps; and the set temperature of water tanks. The type, quality, and quantity of materials; and the number of users or service personnel in the application system. Operating parameters generally refer to parameters generated during equipment operation, usually variable, such as water temperature, pressure, flow rate, and start / stop time. Demand parameters reflect the needs of the application system users, such as temperature, flow rate, and pressure.
[0184] Accurately and appropriately debugging and setting these parameters according to the characteristics of the control equipment, the characteristics of the controlled object, and the requirements of the user is very important for the normal and good operation of the application system.
[0185] Step S12 specifically includes the following steps:
[0186] Step S121: According to the type and requirements of the application system, call the preset configuration parameters of the corresponding device from the template file;
[0187] Step S122: Customize the input configuration parameters according to the type and requirements of the application system;
[0188] Step S123: Verify all configuration parameters.
[0189] The following section details each step.
[0190] Step S121: Based on the type and requirements of the application system, call the preset configuration parameters of the corresponding device from the template file.
[0191] Some configuration parameters for application systems can be preset, such as device attribute parameters, control parameters, and operating parameters. Preset values are mostly options or fixed values that users need to view and modify. For example, sensor addresses require user input and cannot be preset. Because the actual situation of each project is different, preset values are only for reference. For example, the preset value for the domestic hot water supply range is 46-60, and the configuration personnel need to modify this range according to their own needs.
[0192] After opening the template file, the pre-set configuration parameters in the template file can be used first. Template parser 2 can preset these parameters according to the characteristics of the device itself, verify whether these preset parameters meet the requirements, and whether customization or adjustment is needed. If confirmed, the application system can directly call them when running.
[0193] Step S122: Customize the input configuration parameters according to the type and requirements of the application system.
[0194] Other parameters of the application system require customized input configuration parameters based on the characteristics of the application system's on-site operation and user requirements, such as control parameters, operating parameters, and demand parameters. In a preferred embodiment of the present invention, the template parser 2 can parse the called template file, confirm and display the configuration parameters that need to be customized, including the preset parameters that do not meet the application system's requirements, and generate a parameter configuration interface associated with the template file. The parameter configuration interface can at least display the preset parameters related to the called template file and the customized parameters that need to be input by the user. Application configuration personnel can easily verify or modify the preset parameters and input the necessary customized parameters with the graphical prompts and guidance of the parameter configuration interface.
[0195] Figure 7a and Figure 7b The parameter configuration interface of a specific embodiment of the present invention is displayed. Figure 7a This diagram illustrates the parameter configuration interface of an exemplary air source heat pump according to the present invention. Figure 7b A schematic diagram of the parameter configuration interface of an exemplary water tank of the present invention is shown.
[0196] like Figure 7a and Figure 7bAs shown, in an exemplary implementation method of a domestic hot water application system, template parser 2, based on the invoked domestic hot water application system template file, parses and generates preset parameters and customized parameters that require user input, including parameters for the two operating devices: the air source heat pump and the water tank. Some parameters are preset system parameters, such as the heat source's heating capacity, rated power, and flow rate of a single water pump. Other parameters are customized input configuration parameters provided by the application configuration personnel based on the characteristics of the domestic hot water application system's on-site operation and user requirements, such as the number of heat sources, the ambient temperature of the heat sources, the number of air source circulation pumps, and the type of water tank. Figure 7a and Figure 7b In the middle, users fill in the information on the left and the units on the right according to the actual situation, or select the blank columns according to the options.
[0197] Step S123: Verify all configuration parameters.
[0198] Preferably, after the parameter configuration is complete, template parser 2 will verify all configuration parameters, such as verifying whether all configuration parameters have been set and whether each configuration parameter is within the preset reasonable threshold range. If a configuration parameter is not set or the set value exceeds the preset threshold range, the system will provide a reminder and warning to facilitate further verification and modification by application configuration personnel.
[0199] Step S13: Generate a parameter file based on the called template file and the set configuration parameters.
[0200] Template parser 2 generates a parameter file based on the invoked template file and the set configuration parameters, and sends it to system generator 3. Here, the parameter file is a file that records the configuration parameters required to configure the template file.
[0201] Figure 8 The diagram shows a flowchart of a preferred embodiment of the present invention for generating a parameter file.
[0202] like Figure 8 As shown, step S13, which generates the parameter file, includes the following steps:
[0203] Step S131: Obtain the associated template entity based on the template file.
[0204] Step S132: Create a corresponding configuration entity for each template entity.
[0205] Step S133: Configure the attributes for each configuration entity.
[0206] Step S134: Repeat steps S132-S133 for the template sub-entities of the current template entity until all template sub-entities of the current template entity have been processed.
[0207] Step S135, repeat steps S132-S134 until all template entities have been processed.
[0208] Step S136: Form a tree-structured set of configuration entities and generate a parameter file.
[0209] The following section details each sub-step of step S13.
[0210] Step S131: Obtain the associated template entity based on the template file.
[0211] The template file contains information about multiple template entities. In this step, the template file is first deserialized into a template file object, and all template entities contained in the template file object are obtained. Subsequent operations are then performed on each template entity in turn, that is, the template entities of the template file object are traversed to obtain the current template entity.
[0212] Step S132: Create a corresponding configuration entity for each template entity.
[0213] Each template entity contains a unique entity identifier and an entity count expression, which indicates the number of configuration entities created. The entity count expression can be a constant with a fixed quantity, or it can be calculated from variables (i.e., data that can be dynamically entered by the user). Therefore, configuration entities created in this way allow each template entity to be associated with one or more other configuration entities through a unique identifier. Furthermore, if a template entity has a parent node, the created configuration entity is set as a child configuration entity of the parent node's corresponding configuration entity.
[0214] Figure 9 This shows an exemplary template entity diagram with a parent node.
[0215] See the diagram below, which shows a tree structure template entity for water demand: "Water Demand - Building Type - Number of Buildings (Multiple / Single) - Water Demand for a Single Building - Public Bathroom / Dormitory with Washroom". This tree structure analyzes water demand, with each higher-level entity being the parent node of the next level. The analysis and matching are performed level by level until a clear water demand is obtained.
[0216] Step S133: Configure the attributes for each configuration entity.
[0217] Traverse and configure all created configuration entities. The configuration process is as follows:
[0218] Step S1331: Obtain the configuration attributes of the template entity corresponding to the currently configured entity.
[0219] As mentioned earlier, a template entity is associated with multiple configuration entities through a unique identifier. Therefore, each current configuration entity can also be associated with a template entity through a unique identifier, and thus, the configuration attributes in the corresponding template entity can be retrieved. The configuration attribute content includes the attribute identifier (the attribute's unique identifier, usually a unique reference string), the attribute type, and the attribute value (including the attribute value's data type and text).
[0220] Step S1332: Obtain the key and value of the configuration attribute, and create a configuration attribute table using key-value pairs.
[0221] Iterate through the contents of all configuration attributes of the current configuration entity, use the unique identifier (unique reference string) of the configuration attribute as the configuration attribute key, then dynamically calculate the configuration attribute value based on the attribute type and attribute value text, save it in the form of a key-value pair hash table and create a configuration attribute table.
[0222] In this step, the configuration properties have three different types: static properties, user properties, and expression properties. The calculation method for configuration property values differs depending on the property type. Specifically, static property values are obtained by parsing the text value based on the property value data type.
[0223] The user attribute values then generate a corresponding configuration interface, prompting the user to enter their attribute values. Specifically, a pop-up window appears for each entity, allowing the user to modify or input them. The pop-up order is: the parent entity of the template file - its child entity - the next parent entity - its child entity, until all entities are configured. The template file then indicates that the configuration is complete, and the user clicks "OK".
[0224] The value text of the expression attribute is a formula that conforms to the expression syntax of general scripting languages (such as JavaScript, Python, etc.) to calculate its attribute value. Because the calculation order is that static attributes and user attributes are calculated first, and expression attributes are calculated last, the expression can reference other attribute values, but the referenced attribute must be an attribute whose result has already been calculated.
[0225] Step S134: Repeat steps S132-S133 for the template sub-entities of the current template entity until all template sub-entities of the current template entity have been processed.
[0226] In this step, all template sub-entities of the current template entity are obtained, and the operation process of steps S132-S133 is repeated for all template sub-entities until all template sub-entities of the current template entity are processed.
[0227] Step S135, repeat steps S132-S134 until all template entities have been processed.
[0228] The template file contains information about multiple template entities. In this step, all template entities are traversed and steps S132-S134 are executed repeatedly until all template entities contained in the template file are processed. That is, the attributes of each template entity and its subordinate template sub-entities are configured, and the corresponding attribute configuration table is created.
[0229] Step S136: Form a tree-structured set of configuration entities and generate a parameter file.
[0230] This step includes the following steps: Step S1361, the entity nodes corresponding to the template entity and template sub-entities are associated through their membership relationship to form a tree structure with hierarchical relationships. Further, in step S1362, all configuration entities with tree structure and / or single structure (without tree structure) are formed into a configuration entity set (including configuration entities with tree structure and single structure). Finally, in step S1363, the configuration entity set is generated into a text file in the format of a JSON string (exemplary), which is the parameter file.
[0231] Figure 10 This shows an example of a configuration entity set consisting of all entities.
[0232] like Figure 10 As shown, in the configuration entity set for air source heat pumps, the number of heat sources has a key, which is the attribute key, with a default value of 1, and can be changed by the user. The total number of solenoid valve temperature sensors below references the number of heat sources. For example, if there are 5 heat sources, the solenoid valve temperature sensor entity will appear 5 times, allowing the user to input parameters for each solenoid valve temperature sensor.
[0233] Optionally, after the template parser generates the parameter file, the following steps may also be included:
[0234] Step S137: Save the parameter file, or generate the application system file based on the template file and the generated parameter file.
[0235] After the parameter file is generated, you can choose to save it to your local file system for later use when generating the application system file. Alternatively, you can submit the generated parameter file and the corresponding template file to System Generator 3, and then use System Generator 3 to generate the application system file. In this step, it is preferable to set up a pop-up result display interface that prompts the user to choose how to process the parameter file, allowing the user to choose to save the parameter file or directly generate the application system file.
[0236] Step S2 is described below: generating application system files based on template files and parameter files, and generating the application system based on the application system files.
[0237] Step S2 is mainly executed in system generator 3. System generator 3 receives the template file and the generated parameter file called by template parser 2, and automatically generates the application system file based on the parameter file and template file, thereby generating and exporting the application system.
[0238] Figure 11 The diagram shows a flowchart of the application system generation process according to an embodiment of the present invention.
[0239] like Figure 11 As shown, step S2 of generating the application system specifically includes the following steps:
[0240] Step S21: Load the template file and parameter file.
[0241] Step S22: Verify the template file and parameter file.
[0242] Step S23: Generate application system files based on the template file and parameter file.
[0243] Step S24: Generate the application system based on the application system files.
[0244] The steps described above are explained in detail below.
[0245] Step S21: Load the template file and parameter file.
[0246] This step includes two scenarios, which are described below:
[0247] Step S211: Receive and load the parsed template file and the corresponding parameter file.
[0248] System Generator 3 can receive and load the submitted template files and parameter files from Template Parser 2. Specifically, in the aforementioned steps, Template Parser 2 has already invoked, verified, and parsed the customized or general template files, and generated parameter files based on the invoked template files and the set configuration parameters. Therefore, the template files and parameter files received by System Generator 3 from Template Parser 2 are usually template files that match the project requirements. The parameter files here are generated by Template Parser 2 based on the template files it invokes, and therefore correspond to the invoked template files.
[0249] Step S212: Load the local template file and corresponding local parameter file selected by the user.
[0250] In another alternative embodiment, the system generator 3 can receive template files and parameter files selected and input by the user. Specifically, the system generator 3 generates and outputs a call interface, which allows the user to select and load template files stored in the local file system or the system template library 4, as well as select and load parameter files stored in the local file system (see step S137).
[0251] Step S22: Verify the template file and parameter file. This step is mainly used to verify whether the parameter file is consistent with or matches the template file. If they match, it can be considered that they match the project.
[0252] Figure 12 The diagram shows a flowchart of a verification template file and parameter file according to an embodiment of the present invention.
[0253] like Figure 12 As shown, step S22 specifically includes the following steps.
[0254] Step S221: Obtain the template entity associated with the template file and the configuration entity associated with the parameter file, respectively;
[0255] Step S222: Verify that the template entity corresponding to each configuration entity exists;
[0256] Step S223: Verify the tree structure of the template file and parameter file;
[0257] Step S224: Verify whether the unique identifiers of all configuration attributes of each configuration entity match.
[0258] The steps described above are explained in detail below.
[0259] Step S221: Obtain the template entity associated with the template file and the configuration entity associated with the parameter file, respectively. After the template file and parameter file are successfully loaded, the following processing steps are included:
[0260] Step S2211: Deserialize the template file into a template file object.
[0261] System Generator 3 deserializes the template file into a template file object. As mentioned earlier, the template file object generated by deserializing the template file contains multiple template entities. Each template entity includes multiple template attributes, multiple template logic blocks, multiple template associates, and multiple template sub-entities.
[0262] Step S2212: Deserialize the parameter file into a configuration file object.
[0263] The parameter file is deserialized into a configuration file object. This configuration file object, generated from the deserialized parameter file, contains multiple configuration entities. Each configuration entity contains one or more configuration attributes, which together form a configuration attribute table. Furthermore, each template entity is associated with multiple configuration entities through a unique identifier.
[0264] Step S222: Verify that the template entity corresponding to each configuration entity exists.
[0265] In this step, all configuration entities of the configuration file object need to be verified. Specifically, all configuration entities are traversed, and the corresponding template entity is checked for existence based on the unique identifier of each configuration entity. If it exists, proceed to the next step S223; otherwise, a verification failure message is displayed. Here, you can return to step S21 and reload the correct template file and parameter file. Alternatively, you can return to step S13 and regenerate the correct parameter file.
[0266] Step S223: Verify the tree structure of the template file and parameter file.
[0267] The verification process is as follows:
[0268] Verify whether the unique identifier of the template file saved in the parameter file is consistent with the unique identifier of the template file. If they are inconsistent, the verification will fail.
[0269] Iterate through all objects in the parameter files, verify the unique identifier of each object after removing the index, and check if it exists in the template file. If it does not exist, the verification fails.
[0270] Verify whether the unique identifier of the object's attribute exists in the corresponding template entity after removing the object index; if it does not exist, the verification fails.
[0271] If all of the above pass, the verification is successful; if the verification fails, an error message will be displayed and the process will exit.
[0272] In this step, it is necessary to verify whether the tree structure of the template file and the parameter file is consistent. If they are consistent, proceed to the next step S224; otherwise, a verification failure message will be displayed. Here, you can return to step S21 and reload the correct template file and parameter file. Alternatively, you can return to step S13 and regenerate the correct parameter file.
[0273] As mentioned earlier, template files and parameter files can both be infinitely nested tree structure files. The parent-child relationship of nodes in this tree structure can reflect the hierarchical relationship between the system and subsystem or the whole and the parts in the project, and can be flexibly abstracted and subdivided according to the characteristics of the project.
[0274] Since the parameter file is generated based on the template file, the tree structure of a correctly loaded parameter file should be consistent with that of the corresponding template file. Conversely, if the tree structures are inconsistent, it indicates that the loaded parameter file contains errors or does not match the template file. Therefore, it is necessary to go back and reload a matching parameter file, or regenerate a correct parameter file.
[0275] Step S224: Verify whether the unique identifiers of all configuration attributes of each configuration entity match.
[0276] As mentioned earlier, the configuration file object generated by parameter file deserialization contains multiple configuration entities, each configuration entity contains multiple configuration attributes, and the multiple configuration attributes form a configuration attribute table. This configuration attribute table is set as a key-value pair hash table structure, where the key is the unique identifier (ha reference string) of the corresponding template attribute, and the value is the attribute value of the configuration attribute corresponding to the configuration entity.
[0277] In this step, it is necessary to verify whether the unique identifiers of all configuration attributes of each configuration entity match the template attributes of the corresponding template entity. Specifically, the unique identifier of the configuration attribute is used to check if the corresponding template attribute exists and verify that it belongs to the same type of attribute. If it does, the unique identifier of the configuration attribute is marked as a match, and the process proceeds to the next step, S23, to generate the application system file. Otherwise, if the unique identifier of a configuration attribute of a configuration entity does not match the template attribute of the corresponding template entity, a verification failure is indicated. Here, you can return to step S21 to reload the correct template file and parameter file. Alternatively, you can return to step S13 to regenerate the correct parameter file.
[0278] Step S23: Generate application system files based on the template file and parameter file.
[0279] System Generator 3 calls the template file and parameter file from Template Parser 2 to generate a series of application system files.
[0280] Optionally, the application system files consist of three parts: logic files, driver files, and navigation files. The logic files are generated based on the template files and parameter files; the driver files are a collection of drivers required to run the logic files and are loaded based on the needs of the logic files; the navigation files are created based on each configuration entity in the parameter files to establish the relationships between the template files, parameter files, logic files, and driver files, so that the system can automatically call these various files.
[0281] Preferably, both the logic file and the navigation file are in XML text format, which can be deserialized into logic source files and navigation nodes. The driver file is preferably a binary file and is stored in the system's driver library.
[0282] Figure 13 The diagram illustrates the process of generating application system files according to an embodiment of the present invention.
[0283] like Figure 13 As shown, step S23, which generates application system files, includes the following steps:
[0284] Step S231: Generate a logic file based on the template file and parameter file.
[0285] Step S232: Load the driver files required by the logic file.
[0286] Step S233: Create a navigation file based on each configuration entity in the parameter file.
[0287] Step S234: Generate application system files based on navigation files.
[0288] The steps described above are explained in detail below:
[0289] Step S231: Generate a logic file based on the template file and parameter file.
[0290] Figure 14 A schematic diagram of the process for generating logic files in an embodiment of the present invention is shown.
[0291] like Figure 14 As shown, this step requires creating the logic file corresponding to the configuration entity, specifically including the following steps:
[0292] Step S2311: Create the corresponding logical source file based on the configuration entity.
[0293] First, obtain the corresponding configuration entity based on the parameter file, and then create the logical source file corresponding to the configuration entity.
[0294] A logic file is generated through logic blocks and associates. Specifically, a fully functional logic file is ultimately generated by combining and associating multiple logic blocks and associates. A logic file is a program file edited via a graphical interface, consisting of multiple logic micro-blocks and connection micro-blocks (specifically, data connections).
[0295] An executable logic file is generated by compiling a logic source file using a compiler. This file can run on the target computer to perform functions such as data processing or device operation.
[0296] For the template entity corresponding to the configuration entity, perform the following operations:
[0297] Step S2312: Configure all template attributes of the template entity.
[0298] The process iterates through all template attributes of the template entity. If the current template attribute indicates that a logical micro-block needs to be generated, a corresponding data input micro-block is added to the logical source file. In this invention, attributes may or may not be connected to logical micro-blocks; whether to connect is determined when the attribute is created in the template file. The input data type and input data value are the data type of the corresponding template attribute and the value of the corresponding configuration attribute in the configuration attribute table, respectively.
[0299] Step S2313: Configure all template logic blocks of the template entity.
[0300] Iterate through all template logic blocks of the template entity and add all corresponding micro-blocks in the logic source file according to the content of the logic blocks.
[0301] Step S2314: Configure all template associates for the template entity.
[0302] Iterate through all template associates of the template entity, and connect the micro-blocks in the logical source files corresponding to the two sides of the template associate by adding connection micro-blocks.
[0303] Step S2315: Generate a logic file based on the logic source file and save it to the corresponding navigation file.
[0304] In this step, the first step is to determine whether the number of micro-blocks in the logical source file is 0. If the number of micro-blocks in the logical source file is not 0, the logical source file is serialized into a logical file, which is then generated and saved to the corresponding navigation file. Conversely, if the number of micro-blocks is 0, it means that the entity has no logical function and a logical file does not need to be generated.
[0305] Step S232: Load the driver files required by the logic file.
[0306] In this step, the driver files required by the logic file need to be loaded. Specifically, based on the type of micro-block in the logic file, the driver files required by that micro-block are loaded into the currently generated application system file.
[0307] It should be noted that the order in which the logic file and driver file are generated in this invention can be interchanged, and both need to exist before the application system runs.
[0308] In one embodiment, step S2321 involves querying and loading the driver file required by the micro-block from the driver file library based on the type of the micro-block. Specifically, during the previous generation of the logic file, when creating each micro-block, the system searches for the driver file required by the micro-block in the driver file library based on the type of the micro-block. If found, the corresponding driver file is automatically loaded into the currently generated application system file.
[0309] In another optional embodiment, step S2322 involves selecting and loading a pre-stored driver file from the local application system file. Specifically, if a corresponding driver file already exists in the application system file to be generated, the locally saved driver file can be directly called.
[0310] Step S233: Create a navigation file based on each configuration entity in the parameter file.
[0311] Figure 15 This diagram illustrates the process of creating a navigation file according to an embodiment of the present invention.
[0312] like Figure 15 As shown, in a preferred embodiment of the present invention, the step of creating a navigation file includes the following steps.
[0313] Step S2331: Create a corresponding navigation node for each configuration entity.
[0314] In this step, we first create a navigation node for each configuration entity based on the parameter file.
[0315] Step S2332: Create a navigation file directory corresponding to the configuration entity based on all navigation nodes.
[0316] Iterate through the navigation nodes corresponding to each configuration entity in the configuration entity set. Based on the tree structure of the configuration entity set, create a navigation file directory containing the parent-child relationships of all configuration entities. Each configuration entity corresponds one-to-one with its corresponding navigation node, and the relationship between each configuration entity and its superior and subordinate parent and child entities corresponds one-to-one with the hierarchical relationship of the navigation directory of the corresponding navigation node.
[0317] Step S2333: Establish the association between all configuration entities and the generated logical files and driver files in each navigation node.
[0318] In this step, all navigation nodes are traversed in the generated navigation file directory to establish and save the association between the configuration entity corresponding to each navigation node and the generated logical file and driver file.
[0319] Step S2334: Generate navigation files based on navigation nodes and navigation file directories.
[0320] The navigation nodes and navigation file directory are serialized into files of a specific format to generate the navigation file. As mentioned earlier, the previous steps generated a logic file based on the template file and parameter file, and loaded the driver file. The navigation file generated in this step establishes the association between the template file, parameter file, logic file, and driver file. Therefore, the navigation file generated in this step can facilitate the system to automatically call the above-mentioned files, thereby automatically generating application system files.
[0321] The following describes step S24, which generates the application system based on the application system file.
[0322] As mentioned earlier, the generated application system files include logic files, driver files, and navigation files, and preferably also view files and data files. The view files store the interface used by the system's runtime logic and data; the logic files store the written logic for execution on the router; the data files store the data; and the navigation files store the location and relationships of each logic file and driver file, enabling accurate calling and display during system runtime.
[0323] System Generator 3 generates and exports a runnable application system based on the generated application system files, guided by the navigation file.
[0324] As mentioned above, before step S1, industry experts may pre-edit a customized template file based on the project's characteristics and requirements. Alternatively, after step S1, if the template parser 2 does not receive a customized template file, or if the called customized or general template file does not meet the project requirements, it will notify the template editor 1 to edit the template file.
[0325] Therefore, optionally, step S3, editing the template file, may be included before or after step S1.
[0326] Figure 16 The flowchart illustrating the process of editing template files according to an embodiment of the present invention is shown.
[0327] like Figure 16 As shown, the specific steps for editing the template file are as follows:
[0328] Step S31: Create a new template file according to the type and requirements of the application system.
[0329] Template Editor 1, based on the type and requirements of the application system, calls pre-stored logic micro-blocks and the editor for editing to generate new template files.
[0330] Optionally, custom logic micro-blocks can be generated based on user input instructions or parameters, and an editor can be used to edit them to generate new template files.
[0331] Step S32: Revise the specified template file according to user requirements.
[0332] Template editor 1 receives template file editing instructions from template parser 2, and revises and edits the specified customized template file or general template file according to the instructions. After editing is completed, a new template file is generated.
[0333] Step S33: Generate a new template file, and export or save it.
[0334] After creating, editing, or revising a template file, the template editor 1 generates a new template file, which is then exported and sent to the template parser 2, or stored in the template file library.
[0335] In summary, the application system implementation method of this invention divides application system development into two steps using a graphical programming tool. The first step is application system template development, and the second step is generating the application system using the template configuration. This allows control engineers to develop only project-customized template files without needing to fully develop the entire application system, perform complex programming and system debugging, or spend time familiarizing themselves with the industry knowledge and equipment characteristics of the project. Furthermore, professional maintenance personnel do not need complex programming and system development skills. They can directly utilize the pre-developed template files, parse them using the template parser in this invention's system to generate a parameter configuration human-machine interface, input the corresponding configuration data according to the actual project information to generate a parameter file, and finally import the template file and parameter file through the system generator to generate the application system file. Finally, the application system is exported, completing the entire process.
[0336] This significantly reduces the professional skill requirements and workload of industry experts and application debuggers, decoupling their work and allowing them to focus on their respective strengths. This improves the professionalism and quality of the application system while lowering the barrier to entry for application debuggers.
[0337] Figure 17 A logical structure diagram of the template file according to a preferred embodiment of the present invention is shown.
[0338] In the system of the present invention, the template file of the system is generated by editing the template editor 1. The template file is preferably formed as a text file based on XML syntax structure. All elements in the template file can be assigned a globally unique identifier string. This identifier string can identify a certain element and can also represent the hierarchical relationship of the element. In this way, each element has its own globally unique identifier string, which can be conveniently used for legality verification and facilitates mutual reference and association between other elements.
[0339] like Figure 17 As shown, the textual logical structure of the template file generated by the system of this invention includes one or more entities. Each entity in the template file defines an object. For example, an entity is defined as a type of thing describing the composition structure of an application system in reality. It can represent a type of system, a type of area, a type of building, a type of equipment, or a type of sensor, etc. Each entity defines the quantity, attributes, and functions of a certain object. Once the attribute values and functions of an entity are determined, they need to be stored in a data structure. This data structure that stores the values is the template file object.
[0340] Each entity has zero or more child entities, and each child entity has zero or more grandchild entities. Similarly, each template file object has zero or more child objects, and each child object has zero or more grandchild objects. Based on this parent-child hierarchical relationship, all entities in the template file can form an entity tree with multiple root nodes, and all objects formed therefrom can also form an object tree with multiple root nodes.
[0341] For example, a template file for a domestic hot water intelligent control system contains a "domestic hot water intelligent control system" entity, which contains three sub-entities: a "solar heat source system" sub-entity, an "air source system" sub-entity, and a "user-side circulation system" sub-entity; the "user-side circulation system" sub-entity further contains a "booster circulation pump" sub-entity and an "electric regulating valve" sub-entity, etc.
[0342] For example, a hot water circulation control system template file includes multiple entities such as the heat source, the user-side booster pump, and the water supply, each describing a different subsystem of the system. The heat source entity includes multiple attributes such as energy efficiency, power, supply water temperature, and frequency converter, used to describe different performance parameters of this subsystem. It includes multiple logic blocks such as efficiency calculation logic blocks and frequency control logic blocks to implement different functions of the subsystem. It also includes multiple correlators such as frequency converter and frequency control correlators, and power and efficiency calculation correlators, used to associate the parameter values of the attributes with the logic blocks that implement different functions of the subsystem. Finally, it includes multiple sub-entities such as the circulation pump and the air source heat pump.
[0343] Each entity in the template file includes the following sets: attribute group 10, logic group 11, associate group 12, and sub-entity group 13.
[0344] Attribute group 10 contains one or more attributes, such as Figure 17The entity is categorized into attributes 1, 2, 3, etc. Each attribute describes a static characteristic of its associated entity. For example, a building entity's static characteristics, or attributes, include: building area, number of floors, and latitude and longitude. Specifically, an attribute is a parameter that describes the object, including both the parameter name and the calculation method for its value. Attributes support various data types, such as integers, floating-point numbers, and booleans.
[0345] Attribute types include static attributes, user attributes, and expression attributes. Static attributes are fixed attribute values stored in the template file, obtained by parsing the template file based on the attribute value data type. These are fixed values specified in the template file during template editing and remain unchanged after editing. Ideally, static attribute values should not change with different projects within the same application of the template file. Therefore, these unchanging static attribute values are displayed in the system or need to be called multiple times in other logic or formulas, such as the specific heat value of water, gravity coefficient, and heating zone temperature.
[0346] User attributes are attributes that reflect the characteristics of the application system and user needs. They are used to generate corresponding attribute value input interfaces during template file parsing. Application configuration personnel then input the user attribute values in the attribute configuration interface; that is, the user specifies the user attribute values during template parsing. Typically, the values of user attribute values will vary depending on the project in which the template file is applied. However, once the user attribute value is determined through user-specified input, it remains unchanged in subsequent processes after template parsing. Therefore, user attribute values are also attributes displayed in the system or repeatedly used in other logic or formulas, such as the rated power of equipment or the air-conditioned area of a building.
[0347] Expression attributes are formed as expressions bound to the template file. They are values obtained through secondary calculations based on previously obtained attribute values during template parsing, such as polynomial strings with parameter names. The assignment of expression attribute values is performed before the template parser generates the parameter file, based on the bound calculation formula and its associated attribute values. In other words, it's a secondary calculation based on previously assigned attributes during template parsing. Once an expression attribute value is calculated, it remains unchanged in subsequent processes after template parsing. Therefore, expression attribute values are typically values obtained by calculating expressions based on input values specified by different users in the project. These expression attribute values are attribute values displayed in the system or repeatedly used in other logic or formulas, such as the system's overall rated total power.
[0348] Figure 18a and Figure 18b An exemplary embodiment of the template file entity attributes of the present invention is shown, specifically, Figure 18aAn example is shown illustrating the entity attributes of a template file where the entity is an air source heat pump. Figure 18b An exemplary diagram further illustrates the heat source type of an air source heat pump.
[0349] In a preferred embodiment of the present invention, each attribute of the attribute group is connected to the corresponding entity through an attribute expression. For example... Figure 18a As shown, the entity is an air source heat pump, and its attribute is heat source type. When the heat source type (rytype) is 1, the entity air source heat pump will pop up a heat source type attribute configuration window for easy user configuration, such as... Figure 18b As shown, the heat source type can be configured as air source heat pump 1 or solar water heater 2, with the default configuration being air source heat pump 1.
[0350] Logic group 11 contains one or more logic blocks, for example Figure 17 The logic blocks are categorized as Logic Block 1, Logic Block 2, Logic Block 3, etc. A logic block describes the functionality of its constituent entity, such as logical processing. Specifically, it represents a logical processing procedure that obtains and outputs result data by performing a series of arithmetic or logical operations on input data. A logic block can be associated with other attributes of its constituent entity or with other logic blocks through associators. In this case, the input data of any logic block uses the values of other attributes or the output data of other logic blocks.
[0351] Each logic block consists of one or more logic microblocks, which are the smallest units with a single data processing function. Logic microblocks include connection microblocks and algorithm microblocks. Algorithm microblocks include microblocks for addition, subtraction, multiplication, and division; checksums; address read / write microblocks; and microblocks implementing various algorithms, such as those for complex calculations. Connection microblocks can connect to any other logic microblock.
[0352] Each logic microblock consists of zero or more input pins, zero or more output pins, and an algorithm module. Here, the input and output pins are preferably virtual data transmission pins. If there are zero pins, it indicates that the microblock's function can be completed independently without data from other microblocks. Data connections are used to connect input and output pins. Specifically, each input pin can be connected to an output pin of the same dimension of another logic microblock via a data connection. Each output pin can be connected to zero or more input pins of the same dimension of other microblocks via a connection microblock. The data on the input and output pins can be 0-dimensional, 1-dimensional, or multi-dimensional. Zero-dimensional data can be constants (e.g., the rated power of a single device), 1-dimensional data can be arrays (e.g., the rated power of a group of devices), 2-dimensional data can be matrices (e.g., the rated power of multiple groups of different devices), and multi-dimensional data can be tensors (e.g., the rated power, rated voltage, rated current, etc. of multiple groups of different devices).
[0353] The data processing procedure of the logic microblock is as follows: obtain input data through the input pin, process the data and obtain the result data, and output the result data to the output pin.
[0354] Figure 19a and Figure 19b An example is shown illustrating the application of logical blocks in the template file entity of this invention. Specifically, Figure 19a An exemplary diagram illustrates the application of logical blocks in the template file entity of the present invention. Figure 19b The example further illustrates a schematic diagram of the specific data corresponding to the city as a logical micro-block.
[0355] See Figure 19a Below the geographic location entity, there are two attributes: city and district, a logical block called WZ, and two connectors: city connector and district connector. These elements are identified by their unique identifiers, and the connectors modify the user-input values into the logical blocks.
[0356] See Figure 19b In the generated parameter file, the data for the logical micro-block of the city has been updated to the user's input value of 10103.0.
[0357] In embodiments of the present invention, the logic block preferably comprises a series of logic micro-blocks representing the processing of atomic data (indivisible atomic-level data). The data processing methods described by the logic micro-blocks can be various algorithms such as mathematical operations, control algorithms, edge computing, and extended support calls. Specifically, mathematical operations include, for example, numerical operations, logical operations, bitwise operations, data type conversion, and mathematical function operations; control algorithms include, for example, input / output, network protocol integration, logical algorithms, branch control operations, gate logic, and proportional-integral-derivative adjustment; edge computing includes, for example, aggregation operations, matrix operations, SQL operations, neural networks, and database support; extended support calls include, for example, Python calls, EnergyPlus calls, Excel calls, and Matlab calls.
[0358] Optionally, numerical operations can include the four arithmetic operations of addition, subtraction, multiplication, and division. Aggregate operations can include the average, minimum, maximum, and grouping of arrays; matrix operations can include matrix addition, subtraction, multiplication, and division; SQL operations can include querying and grouping of multidimensional tensor data; bitwise operations can include AND, OR, and NOT; branch control operations can include if, switch, for, and goto.
[0359] This invention innovatively designs logic block and logic micro-block structures, achieving a unified interface between the algorithm model and application logic. In the application system automatically generated by this invention, the algorithm model is integrated into the algorithm module within the logic block or logic micro-block. That is, the algorithm model also uses the micro-block structure interface, which consists of three parts: input pins, output pins, and the algorithm model itself. Therefore, an algorithm model can be considered as a high-level logic micro-block. During system runtime, the logic micro-block of the algorithm model is treated as a special logic file, and the interface used is also a logic file interface. Consequently, controllers capable of running logic micro-blocks and simulation software can also run the algorithm model, enabling the algorithm model to run conveniently and without distortion in various types of application systems.
[0360] As mentioned above, a logic block is composed of freely combined logic micro-blocks. The template editor can combine logic micro-blocks into different logic blocks through a graphical operation to realize a certain data processing or logic processing function of the entity. For example, the energy efficiency calculation logic block of the circulating pump entity requires a combination of various micro-blocks, such as data acquisition-related micro-blocks, arithmetic operation-related micro-blocks, logical judgment-related micro-blocks, and data storage-related micro-blocks.
[0361] Figure 20 A schematic diagram of the extended structure of the template editor in a preferred embodiment of the present invention is shown.
[0362] like Figure 20 As shown, in the system of the present invention, preferably, the template editor can provide a logic micro-block library 5. The logic micro-block library 5 pre-encapsulates a large number of general-purpose or specialized logic micro-blocks applicable to various industries. The logic micro-block library 5 includes four sub-libraries based on data processing type: mathematical operations, logic control algorithms, edge computing, and extended support. These sub-libraries support various types and levels of logic functions. For example, it includes: a mathematical operations sub-library 51, comprising logic micro-blocks for handling numerical operations, logical operations, bitwise operations, data type conversion, and mathematical function operations; a control algorithm sub-library 52, comprising logic micro-blocks for handling input / output, network protocol integration, logic algorithms, branch control operations, gate logic, and proportional-integral-derivative adjustment; an edge computing sub-library 53, comprising logic micro-blocks for handling aggregation operations, matrix operations, SQL operations, neural networks, and database support; and an extended support sub-library 54, for extending support for integration with third-party platforms, including logic micro-blocks for calling Python, EnergyPlus, Excel, and Matlab. The template editor can call these pre-stored logical micro-blocks according to project needs, automatically generate template files, or edit and generate template files based on input instructions or parameters from professionals.
[0363] like Figure 20As shown, preferably, the template editor of the present invention also provides a logic micro-block extension interface 6. This extension interface 6 is used for secondary development and encapsulation of custom functions to generate custom logic micro-blocks. This facilitates the template editor in generating new logic blocks or logic micro-blocks, optimizing existing logic blocks or logic micro-blocks, or customizing logic blocks or logic micro-blocks with specific functions. All built-in logic micro-blocks and custom logic micro-blocks follow the same functional interface. They can be integrated equally into the system, having the same functions and status. The logic file formed by the custom logic micro-block can be simulated and run in the editor, or it can be directly run on the field controller. Secondary developers can easily extend and encapsulate custom functions to form custom logic micro-blocks.
[0364] The application system implementation method of the present invention further includes step S4, defining a custom logic micro-block. Specifically, as follows:
[0365] Step S41: Obtain the logical micro-block extension interface.
[0366] For example, users download the logical micro-block extension interface SDK package through the system platform.
[0367] Custom logical micro-blocks can be created based on the logical micro-block extension interface. Specifically, users can develop their own custom logical micro-blocks by calling the API interface of the SDK package.
[0368] Step S42: Generate the logical micro-block definition file.
[0369] Specifically, users package their custom logic micro-block programs using the SDK, generating logic micro-block definition files. For example, using Java programming tools for development and packaging can provide specific user-defined functions and offer a high degree of freedom and extensibility.
[0370] Step S43: Generate the logic file for the custom logic micro-block.
[0371] Specifically, the logic micro-block definition file is loaded using the logic programming tool provided by the system to generate a new logic file.
[0372] As described above, the logic micro-block library provided by this invention covers most of the basic and advanced functions involved in application systems. The template editor can arbitrarily call each logic micro-block to simply and efficiently realize various functional combinations of the application system in a "building block" manner.
[0373] Correlator group 12 contains one or more correlators, such as Figure 17 The related components include Associate 1, Associate 2, Associate 3, etc. Associates are used to describe data connections between logical blocks or between a logical block and an attribute. An associate consists of two parts: a source end and a destination end. When the two ends are connected, it means that data is produced from the source end and then input to the destination end.
[0374] Preferably, the two sides associated by the correlator are the input pin of one logic microblock and the output pin of another logic microblock, so as to realize the association between the attribute group and the logic group of the entity. Specifically, it can realize the association between the input data of a certain logic block of an attribute and the output data of a certain attribute or other logic block of the entity.
[0375] For example, the association can be implemented by using data connections to connect the input pins of the logic micro-blocks of an entity's logic block to the output pins of the micro-blocks that generate data from the entity's attributes, or by using logic connection micro-blocks to connect the input and output pins of subordinate logic micro-blocks of two different logic blocks of the entity. Preferably, the two sides of the connection are an output pin and an input pin, respectively, and the data dimensions of the two pins are the same.
[0376] After the association is established through the correlator, the two pins of both sides have the same data storage address in the generated application system. Thus, in the actual running application system, the two pins of both sides also use the same data storage address, with the output pin being the value writer and the input pin being the value reader.
[0377] Figure 21 An example of the application of the association group of the present invention is shown.
[0378] like Figure 21 As shown, an associate for "Number of Air Source Heat Pumps" is displayed. This associate connects the attribute of the number of heat source units to the heating logic. In other words, the number of air source heat pumps directly determines the amount of heat supplied.
[0379] Specifically, the association between expression attributes and other attributes in entity attributes is preferably achieved through a unique reference string representing the corresponding element in its calculation formula. Expression attributes are usually used to associate attributes, not to associate the input or output of logical blocks. The calculation process of expression attributes is carried out by the template parser parsing the template file and generating the parameter file. The input and output data processing of the association is carried out after the application system has been generated and deployed, and the result calculation is carried out during the system operation.
[0380] The calculation of expression attributes and the data processing of logical blocks are executed according to the order in which they appear in the template file, i.e., the sorting order. Elements that appear earlier in the sorting cannot reference elements that appear later in the sorting to avoid logical loops that could prevent calculations from being completed.
[0381] In the template file above, each entity also includes a sub-entity group 13, which contains one or more sub-entities, for example... Figure 17The sub-entity is categorized as sub-entity 1, sub-entity 2, and sub-entity 3, etc. A sub-entity describes components of an entity that share the same type of characteristics; that is, a sub-entity also describes a class of objects of the same type, and its structural composition is identical to that of the entity.
[0382] The application system implementation method and implementation system of the present invention can quickly build an application system for a project, significantly shortening the development cycle. A mature solution can be deployed in as little as one hour, while the development cycle of traditional applications usually takes several weeks or even months.
[0383] Figure 22a , Figure 22b and Figure 22c This demonstrates an example of a traditional application system development model, specifically... Figure 22a This shows a schematic diagram of a logic writing page in a traditional application system development model. Figure 22b This diagram illustrates another logic writing page in the traditional application system development model. Figure 22c This diagram illustrates another logic writing page in the traditional application system development model.
[0384] For example, in traditional application system development models, professional computer programmers need to work with project maintenance personnel to extensively collect and analyze the specific characteristics and requirements of the project, requiring a significant investment of time and effort in customized software and hardware development. Figure 22a , Figure 22b and Figure 22c This shows a schematic of the logic writing page in the traditional development model.
[0385] In traditional development processes, on-site surveys are required. Automation engineers write complex software and hardware logic based on the site conditions. Each set of control logic needs to be custom-written, and on-site debugging and deployment are necessary. Taking even the smallest deployment project as an example, the traditional development model requires at least 10 people and 60 days for development, with a labor cost of 2,000 yuan per person per day. The development cycle is long and the development cost is high.
[0386] Figure 23a and Figure 23b This invention demonstrates an application example of its application system development model. Specifically, Figure 23a This diagram illustrates an application example of the application system development model of the present invention, specifically a geographical location configuration. Figure 23b This diagram illustrates an application example of the development model of the application system of the present invention to further configure the water demand of a single building.
[0387] like Figure 23a and Figure 23bAs shown, in an exemplary application system development mode of the present invention, ordinary field operation and maintenance personnel can directly select and call project-related template files based on the application system implementation method and implementation system of the present invention, select or input project-related parameters based on the graphical interface, automatically generate parameter files, and then automatically generate the application system.
[0388] As can be seen, when deploying the application system on the project site, the automation engineer does not need to write complex software and hardware logic according to the site conditions. Only ordinary on-site maintenance personnel (who do not need to master computer programming skills) need to make selections through graphical navigation to quickly, efficiently and accurately generate an application system that matches the project.
[0389] The entire application system development cycle requires only 3 people and 7 days, with a labor cost of 2,000 yuan per person per day. The development cycle is significantly shortened, the cost is greatly reduced, and it does not require the participation of highly skilled professionals. Only staff who understand the on-site situation and know how to use computers and perform simple operations are needed.
[0390] This invention aims to protect an application system implementation method and implementation system. Through the method and system of this invention, the development and deployment of the application system are separated, the model development and model use are decoupled, the difficulty of using the model in the application is reduced, and the efficiency of model reuse is improved.
[0391] Furthermore, this invention innovatively designs a logic block and logic micro-block structure, integrating the algorithm model into the algorithm modules within the logic block or logic micro-block, thus treating them as directly callable and runnable logic files. Consequently, the controller and simulation software capable of running the logic micro-blocks can also run the algorithm model, enabling the algorithm model to run conveniently and without distortion in various types of application systems.
[0392] Thanks to the uniformity of the logic micro-block interface, logic micro-blocks with algorithm models developed or integrated through this system can be directly simulated and run, thus enhancing the practicality of the model.
[0393] This invention also provides a rich library of template files and logic micro-blocks, which promotes the rapid development and widespread adoption of high-quality application systems.
[0394] The system of this invention significantly lowers the barriers to model use and application development, and improves application quality. For example, it enables ordinary property maintenance personnel to develop a hot water control system and apply predictive control algorithms for effective control within the system.
[0395] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, systems, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0396] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, cloud servers, etc.) containing computer-usable program code.
[0397] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A method for implementing an application system, characterized in that, include: Step S1: Generate a parameter file based on the template file and configuration parameters; Step S2: Generate application system files based on template files and parameter files, and generate the application system based on the application system files; The parameter file is a file that records the configuration parameters required to configure the template file. The configuration parameters include device parameters, control parameters, operating parameters, and requirement parameters. Step S2 includes the following steps: Step S21: Load the template file and the parameter file; Step S22: Verify the template file and the parameter file; Step S23: Generate application system files based on the template file and the parameter file; Step S24: Generate the application system based on the application system file; Step S23 further includes: Step S231: Generate a logic file based on the template file and the parameter file; Step S232: Load the driver files required by the logic file, wherein the driver files are a collection of drivers required to run the logic file; Step S233: Create a navigation file based on each configuration entity in the parameter file. The navigation file is used to establish the association between the template file, parameter file, logic file and driver file so that the system can automatically call the above-mentioned files. Step S234: Generate application system files based on the navigation files; The template file is a template file that matches the application system. It includes one or more entities, and each entity includes at least an attribute group, a logical group, and an association group that implements the association between the attribute group and / or the logical group. The association group contains one or more associations, each of which is used to associate a logical block with other attributes or other logical blocks of the entity to which it belongs, so that the data storage address of the associated parties is the same in the generated application system.
2. The method according to claim 1, wherein, The parameter file is used to configure the attributes and attribute values of all entities and their sub-entities in the corresponding template file in the form of key-value pairs, forming a tree-structured set of configuration entities. Here, the key is a globally unique identifier that can uniquely identify the entity and its attributes, and the value is the attribute value obtained based on the attribute type, so that the entity in the template file can be associated with the corresponding configuration entity in the parameter file through the corresponding globally unique identifier.
3. The method according to claim 1 or 2, wherein, Step S1 includes the following steps: Step S11: Based on the type and requirements of the application system, call the corresponding template file; Step S12: Set the configuration parameters required for the template file; Step S13: Generate a parameter file based on the called template file and the set configuration parameters.
4. The method according to claim 3, wherein, Step S11 further includes: Step S111: Select to call the custom template file; Step S112: Select to call the general template file.
5. The method according to claim 4, wherein, Step S111 includes: Check if the customized template file has been received; If received, determine whether it matches the application system type and requirements; If the conditions are met, then select to call the custom template file; If not received or does not meet the requirements, proceed to the next step S112.
6. The method according to claim 4, wherein, Step S112 includes: Search for the general template file corresponding to the application system; If the query is successful, determine whether it matches the application system type and requirements; If the conditions are met, select to call the general template file and proceed to step S12; If no template file is found or does not match, it is determined that the general template file will not be used, and a notification to create or revise the template file will be issued.
7. The method according to claim 3, wherein, Step S12 further includes: Step S121: According to the type and requirements of the application system, call the preset configuration parameters of the corresponding device from the template file; Step S122: Customize the input configuration parameters according to the type and requirements of the application system.
8. The method according to claim 7, wherein, Step S121 further includes: Verify whether the preset configuration parameters meet the requirements of the application system; If it matches, then call it directly; If it does not meet the requirements, proceed to the next step S122.
9. The method according to claim 7, wherein, Step S122 further includes: Confirm and display the configuration parameters that need to be customized; Customize the input configuration parameters according to the type and requirements of the application system.
10. The method according to claim 7, wherein, Further steps include S123, verifying all configuration parameters, including: Verify that all configuration parameters have been set; Verify that all configuration parameters are within the preset threshold range.
11. The method according to any one of claims 4-10, wherein step S13 further comprises: Step S131: Obtain the associated template entity based on the template file; Step S132: Create a corresponding configuration entity for each template entity; Step S133: Configure the attributes for each configuration entity; Step S134: Repeat steps S132-S133 for the template sub-entities of the current template entity until all template sub-entities of the current template entity have been processed. Step S135, repeat steps S132-S134 until all template entities have been processed; Step S136: Form a tree-structured set of configuration entities and generate a parameter file.
12. The method according to claim 11, further comprising step S137, Save the parameter file; and / or Application system files are generated based on template files and generated parameter files.
13. The method according to claim 11, wherein in step S132, Each template entity contains a unique entity identifier and an entity count expression. The number of configuration entities created is obtained through the entity count expression, and each template entity is associated with one or more configuration entities created through its unique identifier.
14. The method according to claim 11, if the template entity has a parent node, then the created configuration entity is set as a child configuration entity of the configuration entity corresponding to the parent node.
15. The method according to any one of claims 12-14, wherein step S133 further comprises the following steps: Step S1331: Obtain the configuration attributes of the template entity corresponding to the currently configured entity, wherein... The configuration attributes include attribute identifier, attribute type, and attribute value; Step S1332: Obtain the key and value of the configuration attribute, create a configuration attribute table using key-value pairs, wherein the attribute identifier of the configuration attribute is used as the key of the configuration attribute, the value of the configuration attribute is calculated according to the attribute type and attribute value, and the configuration attribute table is created in the form of a hash table structure of the key-value pairs.
16. The method according to any one of claims 12-14, wherein step S136 further comprises: Step S1361: Associate the entity nodes corresponding to the template entity and the template sub-entity through the membership relationship to form a tree structure with hierarchical relationship; Step S1362: Combine all configuration entities with tree structure and / or single structure to form a configuration entity set; Step S1363: Generate the configuration entity set into a text file, which is the parameter file.
17. The method according to claim 1, wherein step S21 further comprises: Step S211: Receive and load the parsed template file and the corresponding parameter file; Step S212: Load the local template file and corresponding local parameter file selected by the user.
18. The method according to claim 1 or 17, wherein step S22 further comprises: Step S221: Obtain the template entity associated with the template file and the configuration entity associated with the parameter file, respectively; Step S222: Verify whether the template entity corresponding to each configuration entity exists. If it exists, proceed to the next step S223. Step S223: Verify whether the tree structure of the template file and the parameter file is consistent. If they are consistent, proceed to the next step S224. Step S224: Verify whether the unique identifiers of all configuration attributes of each configuration entity match. If they do, proceed to the next step S23 to generate the application system file.
19. The method according to claim 18, step S221 further includes: Step S2211: Deserialize the template file into a template file object. The template file object contains multiple template entities. Each template entity includes multiple template attributes, multiple template logic blocks, multiple template associates, and multiple template sub-entities. Step S2212: Deserialize the parameter file into a configuration file object, which contains multiple configuration entities, each containing one or more configuration attributes. Each template entity is associated with multiple configuration entities through a unique identifier.
20. The method according to claim 18, wherein, In step S222, if the template entity corresponding to each configuration entity does not exist; or In step S223, if the tree structure of the verification template file and the parameter file is inconsistent; or In step S224, if the unique identifier of a configuration attribute of a configuration entity does not match the template attribute of the corresponding template entity, then one or more of the following steps are executed: Verification failed; or Return to step S21 and reload the correct template file and parameter file; or Return to step S13 and regenerate the correct parameter file.
21. The method according to claim 1, wherein step S231 further comprises: Step S2311: Create the corresponding logical source file based on the configuration entity; Step S2312: Configure all template attributes of the template entity; Step S2313: Configure all template logic blocks of the template entity, and add all corresponding micro-blocks in the logic source file according to the content of the logic blocks; Step S2314: Configure all template associates of the template entity, and connect the logical micro-blocks in the logical source files corresponding to the two sides of the template associate by adding connection micro-blocks; Step S2315: Generate a logic file based on the logic source file and save it to the corresponding navigation file.
22. The method according to claim 1, wherein step S232, loading the driver file required by the micro-block in the currently generated application system file according to the type of the micro-block in the logic file, includes: Step S2321: Query and load the driver file required by the micro-block from the driver file library according to the type of the micro-block; or Step S2322: Select and load the driver file pre-stored in the local application system file.
23. The method according to claim 1, wherein step S233 further comprises: Step S2331: Create a corresponding navigation node for each configuration entity; Step S2332: Create a navigation file directory corresponding to the configuration entity based on all navigation nodes; Step S2333: Establish the association between all configuration entities and the generated logical files and driver files in each navigation node; Step S2334: Generate navigation files based on navigation nodes and navigation file directories.
24. The method according to any one of claims 1, 2, 4-10, 12-14, 17, 19-23, further comprising, before or after step S1, step S3, editing the template file, comprising: Step S31: Create a new template file according to the type and requirements of the application system; Step S32: Revise the specified template file according to user requirements; Step S33: Generate a new template file, and export or save it.
25. The method according to any one of claims 1, 2, 4-10, 12-14, 17, 19-23, further comprising step S4, defining a custom logic micro-block, which includes: Step S41: Obtain the logical micro-block extension interface; Step S42: Generate a logic microblock definition file through the logic microblock extension interface and the custom logic microblock program; Step S43: Generate the logic file for the custom logic micro-block.
26. The method according to claim 1, wherein, The attribute group contains one or more attributes, each attribute describes a static feature of the entity to which it belongs, and each attribute is connected to the corresponding entity through an attribute expression.
27. The method according to claim 11, wherein the attribute type of the attribute configuration includes: Static attributes are fixed attribute values stored in the template file, obtained by parsing the template file based on the attribute value data type. User attributes are attributes that reflect the characteristics of the application system and the user's needs. They are attribute values obtained based on user input. Expression attributes, which are formed as expressions in the template file, are values obtained by secondary calculation based on previously obtained attribute values during template parsing. The values remain unchanged in subsequent processes after the template parsing is completed.
28. The method according to claim 1, wherein, The logical group contains one or more logical blocks, each logical block is used to describe a function of the entity to which it belongs, and each logical block is associated with other attributes or other logical blocks of the entity to which it belongs through an associate.
29. The method according to claim 28, wherein, Each of the logic blocks comprises one or more logic microblocks, including connection microblocks for implementing data connections and algorithm microblocks with single data processing functions. Each logic microblock includes zero or more input pins, zero or more output pins, and an algorithm module.
30. The method according to claim 29, wherein the data types of the input pins and output pins of the logic microblock include 0-dimensional constant data, 1-dimensional array data, 2-dimensional matrix data, and multi-dimensional tensor data.
31. The method according to claim 29, wherein the data processing method of the logical micro-block includes: Mathematical operations include numerical operations, logical operations, bitwise operations, data type conversion, and mathematical function operations; Control algorithms include input / output, network protocol integration, logic algorithms, branch control operations, gate logic, and proportional-integral-derivative control. Edge computing includes aggregation operations, matrix operations, SQL operations, neural networks, and database support; Extended support for calls, including calls from Python, EnergyPlus, Excel, and Matlab.
32. The method according to claim 27, wherein, The expression attribute is associated with other attributes through a globally unique identifier that identifies the corresponding element in its expression.
33. The method according to claim 27, wherein, The calculation of the expression attributes is performed during the process of parsing the template file and generating the parameter file, based on the sorting order of the expression attributes in the template file.
34. The method according to claim 1, wherein, The processing of input and output data associated with the correlator is carried out during system operation after the application system has been generated and deployed.
35. The method according to claim 1, wherein, In the template file, each entity also includes a sub-entity group, which contains one or more sub-entities, each sub-entity describing components of the entity that have the same type of characteristics.
36. An application system implementation system, characterized in that, include: Template editor (1), used to edit and generate template files required by application systems or users; Template parser (2) generates a parameter file based on the received or invoked template file and the input configuration parameters; System generator (3) generates application system files and application systems based on the received or called parameter files and template files; The parameter file is a file that records the configuration parameters required to configure the template file. The configuration parameters include device parameters, control parameters, operating parameters, and requirement parameters. The system generator (3) includes: The file loader (31) receives and loads the parsed template file and the corresponding parameter file, or loads the local template file and the corresponding local parameter file selected by the user. The logic builder (32) generates a corresponding logic file for each configuration entity based on the template file and parameter file, and loads the driver file required by the logic file. The navigation builder (33) creates a corresponding navigation file based on each configuration entity in the parameter file and its corresponding logic file; System file generator (34) generates application system files based on navigation files; The template file is a template file that matches the application system. It includes one or more entities, and each entity includes at least an attribute group, a logical group, and an association group that implements the association between the attribute group and / or the logical group. The associator group contains one or more associators, each associating a logical block with other attributes or other logical blocks of its own entity, such that the associated entities have the same data storage address in the generated application system; The navigation file is created based on each configuration entity in the parameter file and is used to establish the association between the template file, parameter file, logic file, and driver file so that the system can automatically call the above-mentioned files.
37. The system according to claim 36, wherein, The parameter file is used to configure the attributes and attribute values of all entities and their sub-entities in the corresponding template file in the form of key-value pairs, forming a tree-structured set of configuration entities. Here, the key is a globally unique identifier that can uniquely identify the entity and its attributes, and the value is the attribute value obtained based on the attribute type, so that the entity in the template file can be associated with the corresponding configuration entity in the parameter file through the corresponding globally unique identifier.
38. The system according to claim 36, wherein, The application system files include: The logic file is generated based on the template file and parameter file; A driver file is a collection of drivers required to run the logic file, and it is loaded based on the needs of the logic file.
39. The system according to any one of claims 36-38, further comprising: The system template library (4) contains pre-compiled general template files or user-revised custom template files, which are used by users to import general template files and / or custom template files to generate application systems.
40. The system according to claim 39, wherein, The template editor (1) creates new template files according to the type and requirements of the application system; and / or Revise the specified template file according to user requirements; Generate a new template file and export it for use by the template parser (2) and the system generator (3), or store it in the system template library (4) for the template parser (2) and the system generator (3) to call when needed.
41. The system according to any one of claims 36-38, wherein, The template parser (2) includes: Template reader (21) is used to read template files from the file system into memory and obtain associated template entities based on the template files; The attribute configurator (22) is used to create corresponding configuration entities for all entities and sub-entities in the template file, configure attributes for each configuration entity, and / or save the attributes and attribute values of the configuration entity in the form of key-value pairs to the configuration entity to form a set of configuration entities. The parameter configurator (23) is used to call the various parameters required for the application system to run, and / or configure the parameters according to the user input values of the application system; The parameter file generator (24) is used to create parameter files, deserialize the generated set of configuration entities and save them to the parameter file, and / or save attribute values to the parameter file in real time when the attribute configurator (22) is traversed. After the traversal is completed, the file is saved to the file system and sent to the system generator (3).
42. The system according to claim 41, wherein, The attribute configurator (22) configures attributes in the following manner: Obtain the configuration attributes of the template entity corresponding to the currently configured entity, wherein the configuration attributes include attribute identifier, attribute type, and attribute value; Obtain the key and value of the configuration attribute, create a configuration attribute table using key-value pairs, wherein the attribute identifier of the configuration attribute is used as the key of the configuration attribute, calculate the value of the configuration attribute according to the attribute type and attribute value, and create the configuration attribute table in the form of a hash table structure of the key-value pairs.
43. In the system according to claim 41, in the attribute configurator (22), Each template entity contains a unique entity identifier and an entity count expression. The number of configuration entities created is obtained through the entity count expression, and each template entity is associated with one or more configuration entities created through its unique identifier.
44. The system according to claim 41, wherein, The attribute configurator (22) further associates the entity nodes corresponding to the template entity and the template sub-entity through the relationship of belonging to form a tree structure with hierarchical relationship, and combines all configuration entities with tree structure and / or single structure to form a configuration entity set.
45. The system according to any one of claims 36-38, wherein, In the template file and its generated parameter file, all attributes, connectors and logic appearing in the template file are set with their own independent globally unique identifiers, so that the template entity attributes corresponding to the template file are associated with the configuration entity attributes corresponding to the parameter file through the globally unique identifiers.
46. The system according to claim 36, wherein, The file loader (31) verifies the template file and parameter file in the following manner: Retrieve the template entity associated with the template file and the configuration entity associated with the parameter file, respectively; Verify that the template entity corresponding to each configuration entity exists. If it exists, proceed to the next step. Verify that the tree structure of the template file and the parameter file are consistent. If they are consistent, proceed to the next step. Verify that the unique identifiers of all configuration attributes for each configuration entity match. If they do, generate the application system file accordingly.
47. The system according to claim 36, wherein, In the file loader (31), If the template entity corresponding to each configuration entity does not exist; or If the tree structure of the validation template file and parameter file is inconsistent; or If the unique identifier of a configuration attribute of a configuration entity does not match the template attribute of the corresponding template entity; but, Verification failed; or Reload the correct template and parameter files; or Regenerate the correct parameter file.
48. The system according to claim 36, wherein, The navigation builder (33) generates navigation files through the following operations: Iterate through the set of configuration entities and create a corresponding navigation node for each configuration entity; Check if each configuration entity has hidden attributes. If not, create the navigation file directory corresponding to the configuration entity based on all navigation nodes. Establish associations between all configuration entities and the generated logical and driver files in each navigation node; Navigation files are generated based on navigation nodes and navigation file directories.
49. The system according to claim 36, wherein, The logic builder (32) generates the logic file in the following manner: Iterate through the set of configuration entities in the parameter file and check whether each configuration entity has attributes, logical blocks, or associates; If so, create a corresponding logical source file for each configuration entity; Configure all properties of each configuration entity in the logical source file; Configure all logical blocks for each configuration entity in the logical source file, and add all corresponding micro-blocks in the logical source file according to the content of the logical blocks; Configure all associated entities for each configuration entity in the logical source file, and connect the logical micro-blocks in the logical source files corresponding to the template associated entities by adding connection micro-blocks; A logic file is generated based on the logic source file and saved to the corresponding navigation file.
50. The system according to claim 49, wherein, The logic builder (32) loads the driver file required by the logic file in the following manner: Based on the type of the micro-block, query the driver file library and load the driver file required for that micro-block; or Select and load the driver file pre-stored in the local application system files.
51. The system according to any one of claims 36-38, wherein the template editor (1) further comprises: The logic micro-block library (5) pre-encapsulates general logic micro-blocks and / or professional logic micro-blocks applicable to various industries. The template editor (1) calls these logic micro-blocks according to the needs of projects in various industries, automatically generates template files, or customizes and generates template files according to the input instructions or parameters of professionals.
52. The system according to claim 51, wherein, The logical micro-block library (5) includes the following logical micro-block sub-libraries according to the data processing type: The mathematical operations sublibrary (51) includes logic micro-blocks for handling numerical operations, logical operations, bitwise operations, data type conversions, and mathematical function operations; The control algorithm sub-library (52) includes logic micro-blocks for processing input / output, network protocol integration, logic algorithms, branch control operations, gate logic, and proportional-integral-derivative adjustment; Edge computing sub-library (53) includes logical micro-blocks for processing aggregation operations, matrix operations, SQL operations, neural networks, and database support; Extended support sub-libraries (54) include logic micro-blocks for calling Python, EnergyPlus, Excel, and Matlab.
53. The system according to claim 51, wherein the template editor (1) further comprises: The logic microblock extension interface (6) is used by the template editor (1) to generate new logic blocks or logic microblocks, or edit existing logic blocks or logic microblocks, or customize logic blocks or logic microblocks with specific functions, and generate custom logic microblocks.
54. The system according to claim 39, wherein, The system template library (4) includes at least one of the following: Template files for domestic hot water systems, air-source solar hybrid heating systems, and electric boiler heating systems; Template files for ground source heat pump air conditioning systems, multi-split air conditioning systems, and lithium bromide unit systems for HVAC control systems; Template files for building lighting systems, city street lighting systems, and factory lighting systems for intelligent lighting systems.
55. The system according to claim 36, wherein, The attribute group contains one or more attributes, each attribute describes a static feature of the entity to which it belongs, and each attribute is connected to the corresponding entity through an attribute expression.
56. The system according to claim 41, wherein, The attribute types configured include: Static attributes are fixed attribute values stored in the template file, obtained by parsing the template file based on the attribute value data type. User attributes are attributes that reflect the characteristics of the application system and the user's needs. They are attribute values obtained based on user input. Expression attributes, which are formed as expressions in the template file, are values obtained by secondary calculation based on previously obtained attribute values during template parsing. The values remain unchanged in subsequent processes after the template parsing is completed.
57. The system according to claim 36, wherein, The logical group contains one or more logical blocks, each logical block is used to describe a function of the entity to which it belongs, and each logical block is associated with other attributes or other logical blocks of the entity to which it belongs through an associate.
58. The system according to claim 57, wherein, Each of the logic blocks comprises one or more logic microblocks, including connection microblocks for implementing data connections and algorithm microblocks with single data processing functions. Each logic microblock includes zero or more input pins, zero or more output pins, and an algorithm module.
59. The system according to claim 58, wherein, The data types of the input and output pins of the logic microblock include 0-dimensional constant data, 1-dimensional array data, 2-dimensional matrix data, and multi-dimensional tensor data.
60. The system according to claim 56, wherein, The expression attribute is associated with other attributes through a globally unique identifier that identifies the corresponding element in its expression.
61. The system according to claim 56, wherein, The calculation of the expression attributes is performed during the process of parsing the template file and generating the parameter file, based on the sorting order of the expression attributes in the template file.
62. The system according to claim 36, wherein, The processing of input and output data associated with the correlator is carried out during system operation after the application system has been generated and deployed.
63. The system according to any one of claims 36-38, 40, 42-44, 46-50, and 52-54, wherein, In the template file, each entity also includes a sub-entity group, which contains one or more sub-entities, each sub-entity describing components of the entity that have the same type of characteristics.
Citation Information
Patent Citations
Intelligent water affair light application rapid building system based on modularization
CN119440731A