Implementation method and system of application system
Through a graphical programming method based on template files and configuration parameters, the development and usage processes are decoupled, which solves the problem of high professional requirements for complex application system development and achieves efficient system generation and improved versatility.
Patent Information
- Application Number
- CN202510699757.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-05-28
AI Technical Summary
In existing technologies, the development of complex application systems requires the joint participation of professional software engineers and operation and maintenance personnel. This has high professional requirements and is time-consuming, resulting in high development costs and difficulty in achieving low-cost, large-scale promotion of similar projects. In addition, the system's versatility and replicability are poor.
By generating parameter files based on template files and configuration parameters, decoupling model development and use, and adopting graphical programming methods, industry experts and operation and maintenance personnel are allowed to focus on their own areas of expertise and generate application system files.
It reduces professional skill requirements, improves the professionalism and quality of application systems, enhances the versatility and replicability of systems, and simplifies the development and deployment process.
Smart Images

Figure CN120631427A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of application system software technology, and mainly relates to an intelligent implementation method and implementation system of application system software for optimizing management and control of complex systems in the fields of energy, resources, materials, carbon emissions, etc. Background Art
[0002] A variety of complex application systems are needed in social production and life, such as building management and control application systems, HVAC management and control application systems, domestic hot water management and control application 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 township energy carbon emission governance and control systems, enterprise group governance, management, and control application systems. These complex application management, control, and governance systems need to be connected to multiple software modules and multiple hardware devices for comprehensive governance, management, and control. They have the characteristics of accessing multiple subjects, multi-dimensional parameter input, multiple control objects, multiple adjustment variables, multiple application targets, and multiple logic operations for operation and control. It is very difficult to achieve real-time, accurate, and intelligent management, control, and governance for application targets or even multiple targets.
[0003] The implementation of conventional governance, management, and control application systems is to carry out customized solution design and program development based on the characteristics of a specific optimized governance, management, and control object. The application software engineers required for the development of such complex application systems usually have to be experts in programming languages (such as software programming languages C, JAVA, etc. and logic programming languages PLC, DDC and other configuration logic intermediate programming languages ), and design and develop application system software customized according to the characteristics of project equipment and project requirements, and carry out optimized logic deployment and equipment debugging at the application site.
[0004] However, professional application software engineers are often unfamiliar with the specialized knowledge of the industry to which the project belongs and the performance characteristics of the equipment systems. For example, building application system projects require familiarity with the design of optimized management and control solutions for the building's electrical / plumbing, the types and parameters of the controlled equipment, and the characteristics of the hardware controllers. For another example, developing a typical domestic hot water application system requires familiarity with the characteristics of related heat sources (air-source heat pumps, solar water heaters, electric boilers), and other equipment before designing the system's management and control solutions. Software engineers then develop, debug, and deploy these solutions. The development of HVAC application systems requires proficiency in the rules and logic for matching cooling and heating loads, supply and demand, and the corresponding design control algorithms and mathematical models. Therefore, writing specialized control logic that enables efficient and energy-efficient operation of controlled equipment is a major challenge for software engineers.
[0005] However, professional operation and maintenance personnel who are familiar with the professional knowledge and equipment characteristics of the project's industry 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 require a dedicated project team composed of multiple control engineers and professional operation and maintenance personnel. They conduct targeted research and customized development based on the project characteristics and needs, and spend months or even years on specialized development. This traditional application system development method is severely limited by the professional knowledge and skills, available number, personal experience, etc. of professional and technical personnel. The application system developed with a lot of manpower and material resources is often only applicable to the project being developed. When developing application systems for other similar projects, the development needs to be reorganized, which seriously affects the versatility and replicability of the developed application system, resulting in challenges in low-cost, large-scale development and application in similar projects.
[0007] It can be seen that the application system of the existing technology must be designed and developed by software engineers or related professional programmers in conjunction with professional operation and maintenance debugging personnel. The implementation method of this application system has high professional requirements, is time-consuming, and has low development efficiency, resulting in very high development costs and usage thresholds. It is difficult to promote and apply the same type of application system at low cost and in large quantities. Summary of the Invention
[0008] (1) Purpose of the invention
[0009] The purpose of the present invention is to provide an implementation method and implementation system of an application system. Through the method and system of the present invention, the development and deployment of the application system are separated, 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] (2) Technical solution
[0011] To solve the above problems, the first aspect of the present invention provides a method for implementing an application system, which is characterized in that it includes: 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, operation parameters, and demand parameters.
[0012] The template file is a template file that matches the application system, and includes one or more entities, each entity including at least an attribute group, a logic group, and an associator group for realizing association between the attribute groups and / or logic groups.
[0013] Among them, 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 configuration entity set; 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 entity of the template file is associated with the configuration entity corresponding to the parameter file through the corresponding globally unique identifier.
[0014] Optionally, the application system files include: a logic file, which is generated based on the template file and the parameter file; a driver file, which is a collection of driver programs required to run the logic file and is loaded based on the needs of the logic file; a navigation file, which is created based on each configuration entity in the parameter file and is used to establish an association relationship between the template file, parameter file, logic file and driver file, so that the system can automatically call the above-mentioned various files.
[0015] Preferably, the steps of generating a parameter file include: step S131, obtaining associated template entities based on the template file; step S132, creating a corresponding configuration entity for each template entity; step S133, configuring attributes for 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 are processed; step S135, repeating steps S132-S134 until all template entities are processed; step S136, forming a tree-structured configuration entity set to generate a parameter file.
[0016] Preferably, the step of generating a parameter file further includes: step S1361, associating the entity nodes corresponding to the template entity and the template sub-entity through the ownership relationship to form a tree structure with a superior-subordinate relationship; step S1362, combining all configuration entities with a tree structure and / or a single structure into 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 includes an entity unique identifier and an entity quantity expression, the number of created configuration entities is obtained through the entity quantity expression, and the unique identifier of each template entity is associated with one or more created configuration entities.
[0018] Optionally, if the template entity has a parent node, the created configuration entity is set as a child configuration entity of the configuration entity corresponding to the 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 identifiers, attribute types, and attribute values; step S1332, obtaining the keys and values of the configuration attributes, and 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, and 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 step of generating the application system file includes:
[0021] Step S231, generating a logic file based on the template file and the parameter file; step S232, loading the driver file required by the logic file; step S233, creating a navigation file based on each configuration entity in the parameter file; step S234, generating an application system file based on the navigation file.
[0022] Preferably, the step of generating a logic file further comprises:
[0023] Step S2311, create a corresponding logic 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 block; step S2314, configure all template associators of the template entity, connect the logic micro-blocks in the logic source files corresponding to both parties of the template associator by adding connecting micro-blocks; step S2315, generate a logic file based on the logic source file, and save it to the corresponding navigation file.
[0024] Preferably, the step of generating the navigation file further comprises:
[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 an association between all configuration entities and the generated logic files and driver files in each navigation node; step S2334, generate a navigation file based on the navigation node and the navigation file directory.
[0026] Optionally, the process also includes the steps of editing the template file: step S31, creating a new template file according to the type and requirements of the application system; step S32, revising the specified template file according to user requirements; step S33, generating a new template file, exporting or storing it.
[0027] Optionally, the process further includes the following steps: Step S41, obtaining a logic microblock extension interface; Step S42, generating a logic microblock definition file through the logic microblock extension interface and a customized logic microblock program; Step S43, generating a logic file for the customized logic microblock.
[0028] Optionally, the attribute group includes 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.
[0029] Optionally, the attribute types of the attribute configuration include: static attributes, which are fixed attribute values saved in the template file and are 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; 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. After the template parsing is completed, the value remains unchanged in the subsequent process.
[0030] Optionally, the logic group includes one or more logic blocks, each logic block is used to describe a function of the entity to which it belongs, and each logic block is associated with other attributes of the entity or other logic blocks through an associator.
[0031] Optionally, each of the logic blocks includes one or more logic microblocks, the logic microblocks including a connection microblock for realizing data connection and an algorithm microblock with a single data processing function, and each logic microblock includes 0 or more input pins, 0 or more output pins, and an algorithm module.
[0032] Optionally, the data types of the input pins 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.
[0033] Optionally, the data processing method of the logic micro-block includes:
[0034] Mathematical operations, including digital operations, logical operations, bit operations, data type conversion, and mathematical function operations; control algorithms, including input and output, network protocol integration, logical algorithms, branch control operations, gate circuit logic, and proportional integral differential regulation; edge computing, including aggregation operations, matrix operations, SQL operations, neural networks, and database support; extended support calls, including Python calls, EnergyPlus calls, Excel calls, and Matlab calls.
[0035] Optionally, the associator group includes one or more associators, each of which is used to associate a certain logic block with other attributes of the entity or other logic blocks to which it belongs, so that the data storage addresses of the associated parties in the generated application system are the same.
[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 expression attributes are calculated according to the sorting order of the expression attributes in the template file during the process of parsing the template file and generating the parameter file.
[0038] Optionally, the processing of the input data and output data associated by the associator is performed after the application system has been generated and deployed and during the operation of the system.
[0039] Optionally, in the template file, each entity further includes a sub-entity group, which includes one or more sub-entities, and each sub-entity describes a component of the entity with the same type of characteristics.
[0040] According to another aspect of the present invention, there is also provided an implementation system of an application system, comprising:
[0041] Template editor 1, used to edit and generate template files required by application systems or users; template parser 2, generates parameter files based on received or called template files and input configuration parameters; system generator 3, generates application system files and application systems based on received or called 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, operation parameters, and demand parameters.
[0042] Preferably, the template file is a template file matching the application system, which includes one or more entities, each entity including at least an attribute group, a logic group, and an associator group for realizing association between the attribute groups and / or logic groups.
[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 configuration entity set with a tree structure; 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 entity of the template file is associated with the configuration entity corresponding to the parameter file through the corresponding globally unique identifier.
[0044] Optionally, the application system files include: a logic file, which is generated based on the template file and the parameter file; a driver file, which is a collection of driver programs required to run the logic file and is loaded based on the needs of the logic file; a navigation file, which is created based on each configuration entity in the parameter file and is used to establish an association relationship between the template file, parameter file, logic file and driver file, so that the system can automatically call the above-mentioned various files.
[0045] Optionally, a system template library 4 is also included, which includes pre-compiled general template files or customized template files revised by users, for users to import general template files and / or customized 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 revise 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, which is used to read the template file from the file system into the memory, and obtain the associated template entity based on the template file; a property configurator 22, which is used to create corresponding configuration entities for all entities and sub-entities in the template file, perform property configuration on each configuration entity, and / or save the properties and property values of the configuration entity in the form of key-value pairs to the configuration entity to form a configuration entity set; a parameter configurator 23, which calls various parameters required for the operation of the application system, and / or configures parameters according to the user input values of the application system; a parameter file generator 24, which is used to create a parameter file, deserialize the generated configuration entity set and save it to the parameter file, and / or save the property values to the parameter file in real time when the property configurator 22 traverses, and save the file to the file system after the traversal is completed and send it to the system generator 3.
[0048] Optionally, the attribute configurator 22 performs attribute configuration in the following manner: obtaining the configuration attributes of the template entity corresponding to the current configuration entity, wherein the configuration attributes include attribute identifiers, attribute types, and attribute values; obtaining the keys and values of the configuration attributes, and creating a configuration attribute table in the form of key-value pairs, wherein the attribute identifier of the configuration attribute is used as the key of the configuration attribute, and 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.
[0049] Optionally, in the attribute configurator 22, each template entity includes an entity unique identifier and an entity quantity expression, the number of created configuration entities is obtained through the entity quantity expression, and the unique identifier of each template entity is associated with one or more created configuration entities.
[0050] Optionally, the attribute configurator 22 further associates the entity nodes corresponding to the template entity and the template sub-entity through ownership relationships to form a tree structure with a hierarchical relationship, and combines all configuration entities with a tree structure and / or a single structure into a configuration entity set.
[0051] Preferably, in the template file and the parameter file generated therefrom, all properties, connectors, and logics appearing in the template file are provided with their own independent globally unique identifiers, so that the template entity properties corresponding to the template file are associated with the configuration entity properties corresponding to the parameter file through the globally unique identifier.
[0052] Optionally, the system generator 3 includes:
[0053] 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 the 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; the system file generator 34 generates an application system file based on the navigation file.
[0054] Preferably, the file loader 31 verifies the template file and the parameter file in the following manner:
[0055] Get the template entity associated with the template file and the configuration entity associated with the parameter file respectively; verify whether the template entity corresponding to each configuration entity exists, if so, proceed to the next step; verify whether the tree structures of the template file and the parameter file are consistent, if so, proceed to the next step; verify whether the unique identifiers of all configuration attributes of each configuration entity match, if so, generate the application system file accordingly.
[0056] Optionally, the navigation builder 33 generates a navigation file by the following operations:
[0057] Traverse the configuration entity collection and create a corresponding navigation node for each configuration entity; check whether each configuration entity has hidden attributes. If not, create a navigation file directory corresponding to the configuration entity based on all navigation nodes; establish an association between all configuration entities and the generated logic files and driver files in each navigation node; generate a navigation file based on the navigation nodes and navigation file directory.
[0058] Optionally, the logic builder 32 generates a logic file in the following manner: traverse the configuration entity set in the parameter file to check whether each configuration entity has attributes, logic blocks or associators; if so, create a corresponding logic source file based on each configuration entity; configure all attributes of each configuration entity in the logic source file; configure all logic blocks of each configuration entity in the logic source file, and add all corresponding microblocks to the logic source file according to the content of the logic blocks; configure all associators of each configuration entity in the logic source file, connect the logic microblocks in the logic source files corresponding to both sides of the template associator by adding connection microblocks; generate a logic file based on the logic source file and save it to the corresponding navigation file.
[0059] Optionally, the logic builder 32 loads the driver file required by the logic file in the following manner: querying and loading the driver file required by the microblock in the driver file library according to the type of the microblock; or selecting and loading the driver file pre-stored in the local application system file.
[0060] Optionally, the template editor 1 also includes: a logic microblock library 5, which pre-encapsulates general logic microblocks and / or professional logic microblocks suitable for various industries. The template editor 1 calls these logic microblocks according to the needs of various industry projects, automatically generates template files, or customizes the generated template files according to the input instructions or parameters of professionals.
[0061] Optionally, the logic micro-block library 5 includes the following logic micro-block sub-libraries according to the data processing type:
[0062] Mathematical operation sub-library 51, including logic micro-blocks for processing digital operations, logical operations, bit operations, data type conversion, and mathematical function operations;
[0063] The control algorithm sub-library 52 includes logic micro-blocks for processing input and output, network protocol integration, logic algorithms, branch control operations, gate circuit logic, and proportional-integral-derivative regulation;
[0064] Edge computing sub-library 53, including logic micro-blocks for processing aggregation operations, matrix operations, SQL operations, neural networks, and database support;
[0065] The extended support sub-library 54 includes logic micro-blocks for calling Python, EnergyPlus, Excel, and Matlab.
[0066] Optionally, the template editor 1 further includes: a logic microblock extension interface 6, which 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 to generate custom logic microblocks.
[0067] Optionally, the system template library 4 includes at least one of the following:
[0068] Heating template files for domestic hot water systems, air source solar hybrid heating template files, and electric boiler heating template files; ground source heat pump air conditioning system template files, multi-split air conditioning system template files, and lithium bromide unit system template files for HVAC control systems; building lighting system template files, urban street lighting system template files, and factory lighting system template files for intelligent lighting systems.
[0069] Optionally, the attribute group contains one or more attributes, each of which describes a static feature of the entity to which it belongs, and each attribute is connected to the corresponding entity through an attribute expression. The attribute types of the attribute configuration 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; 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. After the template parsing is completed, the value remains unchanged in subsequent processes.
[0070] Optionally, the logic group includes one or more logic blocks, each logic block is used to describe a function of the entity to which it belongs, and each logic block is associated with other attributes of the entity or other logic blocks through an associator. Each of the logic blocks includes one or more logic microblocks, and the logic microblocks include connection microblocks for realizing data connection and algorithm microblocks with a single data processing function. Each logic microblock includes 0 or more input pins, 0 or more output pins, and an algorithm module. Optionally, 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.
[0071] Optionally, the associator group includes one or more associators, each of which is used to associate a certain logic block with other attributes of the entity or other logic blocks to which it belongs, so that the data storage addresses of the associated parties in the generated application system are the same.
[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 expression attributes are calculated according to the sorting order of the expression attributes in the template file during the process of parsing the template file and generating the parameter file.
[0074] Preferably, the processing of the input data and the output data associated by the associator is performed after the application system has been generated and deployed and during the operation of the system.
[0075] Optionally, in the template file, each entity further includes a sub-entity group, which includes one or more sub-entities, and each sub-entity describes a component of the entity with the same type of characteristics.
[0076] (3) Technical effects
[0077] In summary, the method and system of the present invention separate application system development and deployment, decoupling model development from model usage. This significantly reduces the professional skill requirements and workload for both industry experts and application debuggers, decoupling their work ties and allowing them to focus on their respective areas of expertise. This not only improves the professionalism and quality of application systems, but also lowers the barrier to entry for application debuggers.
[0078] This invention innovatively designs logic blocks and logic microblocks, integrating algorithm models into the algorithm modules within the logic blocks or logic microblocks. These algorithms can be treated as directly callable and executable logic files. Consequently, controllers and simulation software capable of running logic microblocks can also run algorithm models, enabling convenient and undistorted operation of algorithm models in a variety of application systems.
[0079] Thanks to the uniformity of the logic microblock interface, the logic microblocks developed or integrated with algorithm models through this system can be directly simulated and run, which enhances the practicality of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 It is a structural diagram 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 showing the composition structure of an exemplary system generator of the present invention is shown.
[0083] Figure 4 A schematic diagram showing the composition of an exemplary system template library of the present invention is shown.
[0084] Figure 5 It is a flow chart of the application system implementation method of the present invention.
[0085] Figure 6 A schematic diagram of a process for generating a parameter file according to an embodiment of the present invention is shown.
[0086] FIG7 shows a parameter configuration interface of a specific embodiment of the present invention.
[0087] Figure 7a Display the parameter configuration interface of the air source heat pump, Figure 7b The parameter configuration interface of the water tank is displayed.
[0088] Figure 8 A schematic diagram of a process for generating a parameter file according to a preferred embodiment of the present invention is shown.
[0089] Figure 9 An exemplary schematic diagram of a template entity with a parent node is shown.
[0090] Figure 10 An exemplary configuration entity set formed by all entities is shown.
[0091] Figure 11 A schematic diagram of a process for generating an application system according to an embodiment of the present invention is shown.
[0092] Figure 12 A schematic diagram of a process for verifying template files and parameter files according to an embodiment of the present invention is shown.
[0093] Figure 13 A schematic diagram of a process for generating application system files according to an embodiment of the present invention is shown.
[0094] Figure 14 A schematic diagram of a process for generating a logic file in an embodiment of the present invention is shown.
[0095] Figure 15 A schematic diagram of the process of creating a navigation file according to an embodiment of the present invention is shown.
[0096] Figure 16 A schematic diagram of the process of editing a template file according to an embodiment of the present invention is shown.
[0097] Figure 17 A logical structure diagram of a template file according to a preferred embodiment of the present invention is shown.
[0098] FIG. 18 exemplarily shows an embodiment of the template file entity attributes of the present invention.
[0099] FIG19 exemplarily shows an example of application of logic blocks in a template file entity of the present invention.
[0100] Figure 20 A schematic diagram of the extended structure of the template editor in a preferred embodiment of the present invention is shown.
[0101] Figure 21 The application examples of the correlator group of the present invention are exemplarily shown.
[0102] Figure 22 shows an example of a traditional application system development model.
[0103] FIG23 shows an application example of the application system development model of the present invention. DETAILED DESCRIPTION
[0104] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present invention.
[0105] In order to solve the above-mentioned problems of the prior art, the present invention proposes an implementation method and system of an application system based on graphical programming. Through this system, an application system template file for describing the characteristics of a certain type of application system can be generated through graphical operation editing. Then, the application template configuration personnel can input the actual project parameter configuration through this system, and an executable application system can be automatically generated through the system of the present invention.
[0106] Figure 1 It is a structural diagram of the application system implementation system of the present invention.
[0107] like Figure 1 As shown, in a preferred embodiment of the present invention, the application system implementation system includes the following parts: a template editor 1, a template parser 2, and a system generator 3.
[0108] Template Editor 1 is used to edit and generate template files required by an application system or user. Specifically, based on the application system type and requirements, Template Editor 1 automatically edits templates and creates new template files, which are then sent to the corresponding Template Parser 2 and System Generator 3 for use. Optionally, Template Editor 1 can also revise a specified template file based on user requirements to conform to the application system type and requirements, or to correct errors in the template file.
[0109] Optionally, the template editor 1 of the present invention provides a graphical template editing interface, which allows users to perform customized template editing and development through simple 'drag and drop' operations, thereby enabling industry experts who are familiar with project equipment characteristics and control requirements to use the interface.
[0110] Optionally, the template file generated by the template editor 1 can also be stored in the system template library 4, and can be called and used by the template parser 2 and the system generator 3 when needed.
[0111] The template parser 2 generates a parameter file based on the received or called template file and the input configuration parameters for use by the system builder 3. Specifically, the template parser 2 can call and parse the template file according to the type and requirements of the application system; set the configuration parameters required by the template file, for example, calling 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 the application configuration personnel enter various parameters required by the application system; and finally generate a parameter file based on the called template file and the set configuration parameters for use by the system builder.
[0112] Figure 2 A schematic diagram of the composition structure of an exemplary template parser of the present invention is shown.
[0113] like Figure 2 As shown, preferably, an exemplary template parser 2 of the present invention includes the following components: a template reader 21 , an attribute configurator 22 , a parameter configurator 23 , and a parameter file generator 24 .
[0114] The template reader 21 is used to read the template file from the file system into the memory, and obtain the associated template entity based on the template file.
[0115] 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. Each entity can generate multiple configuration entities to form a tree-structured configuration entity set.
[0116] Specifically, it is used to obtain the number and attribute values of all entities and sub-entities in a template file and / or generate an object corresponding to each entity, namely, a configuration entity corresponding to the template entity. Specifically, after successfully reading the template file, the attribute configurator 22 traverses all entities and sub-entities in the template file using a depth-first recursive algorithm, calculating the number of entities and configuration attributes based on type, including attribute identifiers, attribute types, and attribute values. Optionally, after the calculation is completed and a configuration entity corresponding to each entity is generated based on the number of each entity, the key and value of the configuration attribute are obtained, and a configuration attribute table is created using key-value pairs, wherein the attribute identifier of the configuration attribute serves as the key of the configuration attribute, 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. Furthermore, the entity nodes corresponding to the template entity and template sub-entities are associated through ownership relationships to form a tree structure with a hierarchical relationship; all configuration entities with a tree structure and / or a single structure are combined to form a configuration entity set.
[0117] Here, each template entity includes an entity unique identifier and an entity quantity expression. The number of created configuration entities is obtained through the entity quantity expression, and the unique identifier of each template entity is associated with one or more created configuration entities.
[0118] For example, the number of entities in the user-side booster pump part of the hot water circulation control system template is 3, indicating that there are three booster pumps. After all objects are successfully generated, the generated objects are saved in the object array and the parameter file generator is called to generate the parameter file.
[0119] The parameter configurator 23 is used to call various parameters required for the operation of the application system and / or configure parameters based on user input values of 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 the power, frequency, operating temperature, etc. of the device operation. Preferably, after calling these parameters, the parameter configurator 23 can perform a matching verification of the parameter type and value to ensure the correctness of the called parameters. The parameters that the parameter configurator 23 needs to configure usually refer to the required parameters that reflect the user needs of the application system. In this case, the parameter configurator 23 will generate and display a parameter configuration interface for interaction with the user, and assign the parameter values entered by the user of the application system or the application configuration personnel to the parameter object. This generator is called by the attribute configurator when traversing the entity. When the user's participation in the value generation is required in the entity's attributes, the corresponding parameter configuration interface will be generated and displayed. Otherwise, it will not be called. After the entity attributes are configured, it will be directly sent to the parameter file generator 24 to create the parameter file.
[0120] The parameter file generator 24 is used to create a parameter file, deserialize the generated configuration entity set and save it into the parameter file, and / or save the attribute value into the parameter file in real time when the attribute configurator traverses, and save the file into the file system after the traversal is completed and send it to the system generator 3.
[0121] The parameter file corresponds to the user attributes of the template entity in the template file. The attributes generally describe the measurable parameters of the entity in the system, such as the length, width and height of the water tank, the rated power of the equipment, the collection address of the digital instrument, etc.
[0122] Preferably, the parameter file is a text file that describes all elements of the object tree, including all objects, their attributes, and their values. This file is formatted in JSON data format, where the 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 the user actually uses for the attribute. Object attribute identifiers can be in the following format: "parent object name - parent object index / object name - object index / attribute name".
[0123] The parameter file is a data file formed after the application configuration personnel enter the corresponding parameters through the configuration interface of the template parser 2. This file saves the user configuration data in text form, that is, the configuration parameters entered by the user. The association between the user configuration data and the elements in the template file is realized through a unique reference string.
[0124] Optionally, both the template file and the parameter file can be infinitely nested tree structure files. The parent-child relationship of the nodes in the tree structure can reflect the hierarchical relationship between the system and subsystem or the overall and local components in the project, and can be flexibly abstracted and subdivided according to the project characteristics.
[0125] Preferably, the template file can be a tree structure file in XML text format, which can be deserialized into a template file object. The template file object contains multiple entities, each of which includes multiple attributes, multiple logic blocks, multiple associaters and multiple sub-entities. The specific structure of the template file can be referred to below. Figure 17 Relevant text description.
[0126] Preferably, the parameter file can be a tree-structured text file in the form of JSON character text, which can be deserialized into a parameter file object. The file saves the attributes and values of all objects generated by the template file based on its entities, wherein the attributes of the object are saved in the form of key-value pairs, the key is the unique identifier of the attribute of the corresponding object (reference string), and the value is the value obtained according to the type of its attribute, which includes multiple types: integer type, floating point type, Boolean type, string type, etc. The parameter file is dynamically generated by the template parser based on the template file and the configuration parameters entered by the user.
[0127] 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 number of entities, and the attribute values of the objects are also calculated by the attribute calculation type of the corresponding entity. The calculation types include static constants, user input, and expression calculation.
[0128] Preferably, in the template file and the parameter file generated by it, all attributes, connectors, and logics that appear in the template file are provided with their own independent global 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 an embodiment of the present invention, the unique identifier (unique reference string) is set to a meaningful string that is not repeated in the same file. For example, the unique identifier can be a reference name of the template entity or template attribute corresponding to the template file, and the superior reference name to which the application name belongs. The identifier generated by splicing can save part of the superior information for legitimacy checking, and also ensures global uniqueness. When there is an identical name, a digital identifier needs to be added to ensure its uniqueness within the file.
[0129] The system generator 3 generates application system files and application systems based on the received or called parameter files and template files. Specifically, the system generator 3 provides an application system operation interface, through which the application configuration personnel operate and finally generate all the files of the application system.
[0130] Figure 3 A schematic diagram showing the composition structure of an exemplary system generator of the present invention is shown.
[0131] 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 .
[0132] The file loader 31 is used to receive and load the parsed template file and the corresponding parameter file, or load the local template file and the corresponding local parameter file selected by the user. The loaded template file and parameter file need to be verified to see if they are correct files and whether the relationship between the two is matched. Specifically, the file loader 31 verifies the template file and parameter file in the following ways: respectively obtain the template entity associated with the template file and the configuration entity associated with the parameter file; verify whether the template entity corresponding to each configuration entity exists, if so, proceed to the next step; verify whether the tree structure of the template file and the parameter file is consistent, if so, proceed to the next step; verify whether the unique identifiers of all configuration attributes of each configuration entity match, if so, generate the application system file accordingly.
[0133] 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.
[0134] The logic builder 32 generates a logic file through the following engineering process:
[0135] Traverse the configuration entity set in the parameter file to check whether each configuration entity has attributes, logic blocks or associators; if so, create a corresponding logic source file based on each configuration entity (an empty logic source file at this time), preferably named with the unique identifier of the configuration entity.
[0136] First, configure all properties of each configuration entity in the logic source file. Specifically, check the properties of each configuration entity and generate constant microblocks based on the properties in the logic source file.
[0137] Next, in the logic source file, configure all logic blocks for each configuration entity and add all corresponding microblocks to the logic source file based on the logic block's contents. Specifically, view the logic block corresponding to each configuration entity and, based on the logic block's contents (i.e., all logic microblocks and connection microblocks within each logic block), copy and paste them sequentially into the logic source file to add all corresponding microblocks.
[0138] Then, in the logic source file, configure all correlators for each configuration entity. Connect the logic microblocks in the logic source files corresponding to the template correlators on both sides by adding connection microblocks. Specifically, for each configuration entity, traverse all correlators and connect the source and destination ends described by all correlators by adding connection microblocks.
[0139] Finally, a logic file executable in the target system is generated based on the logic source file and saved in the navigation file corresponding to the configuration entity.
[0140] The navigation builder 33 is used to create a corresponding navigation file based on each configuration entity and its corresponding logic file in the parameter file. Specifically, the navigation builder 33 generates a corresponding navigation file based on the tree-structured configuration entity set (referred to as the object tree) in the parameter file. The navigation file corresponds to the interface navigation of the final generated application system.
[0141] The workflow of the navigation builder 33 is as follows:
[0142] Traverse the configuration entity collection and create a corresponding navigation node for each configuration entity;
[0143] Check whether each configuration entity has a hidden attribute. If not, create a navigation file directory corresponding to the configuration entity based on all navigation nodes; conversely, if the hidden attribute of a configuration entity is true, then the hidden attributes of its child objects and the child objects' child objects are all true, and the configuration entity does not generate a navigation node.
[0144] In each navigation node, associations are established between all configuration entities and the generated logic files and driver files.
[0145] Generates navigation files based on navigation nodes and navigation file directories.
[0146] For the configuration entity that generates the navigation node, a navigation file directory is created in the corresponding file system, and the navigation attribute file and the page file are copied and saved in the navigation file directory. The navigation attribute file is the attribute part of the object in the parameter file.
[0147] Optionally, if the navigation node has a sub-navigation node, a sub-directory is created under the directory to store related files corresponding to the sub-navigation node.
[0148] The system file generator 34 generates an application system file based on the navigation file. Specifically, the system file generator 34 packages all the previously generated files, including template files, parameter files, logic files and their driver files, navigation files, and navigation file directories, into a file package according to the structure of the web program to form the application system file.
[0149] Optionally, the application system implementation system further includes a system template library 4. The 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 adjusted or revised to generate corresponding application systems when needed.
[0150] The template files provided by the application system of the present invention summarize and modularize the general functions of the application system, and then implement its personalized parts through configuration parameters. They have the advantages of both maturity and versatility. These application system template files not only meet the general and basic characteristics and requirements of various project types, but are also convenient for customized template editing based on the personalized characteristics and requirements of the projects. Therefore, these template files have very wide applicability. Since the professional and technical threshold requirements for application debugging personnel are relatively low, they are conducive to rapid promotion and use in similar projects, greatly reducing the development and configuration costs of the application system and improving development efficiency.
[0151] Figure 4 A schematic diagram showing the composition of an exemplary system template library of the present invention is shown.
[0152] like Figure 4 As shown, the system template library 4 of the present invention can provide a variety of prefabricated template files for industry application systems, including, for example: heating template files for domestic hot water systems, air source solar hybrid heating template files, and electric boiler heating template files; ground source heat pump air conditioning system template files, multi-split air conditioning system template files, and lithium bromide unit system template files for HVAC control systems; building lighting system template files for intelligent lighting systems, urban street lighting system template files, and factory lighting system template files, etc.
[0153] Different industry applications have different control objects and processes, resulting in different control and operating parameters preset in the application system's template files. For example, domestic hot water systems may only have a heat source, while HVAC systems may use both a cooling and a heat source. Domestic hot water systems are open systems, with water and heat flowing as users use them. HVAC systems, on the other hand, are closed systems, with heat exchanged and water only replenished in small quantities. Consequently, the parameters monitored during control are also different.
[0154] Specifically, for a domestic hot water system, the template file may 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, etc., and the address input of the sensor.
[0155] By providing these pre-made industry application system template files, industry experts or other template developers can easily select template files corresponding to the industry and system, import them, and then develop and optimize the template files based on them, which can significantly improve development efficiency and quality.
[0156] Optionally, the system also integrates a logic container, which is used to simulate the executable logic file generated by the compilation. The functions it implements are exactly the same as those of the field controller that supports the operation of the logic micro-block. In other words, the field controller is set as a logic container with special functions, which is an example implementation of the logic file interface. Therefore, the template files and logic files developed by this system can be seamlessly applied in actual projects. Therefore, during the development process of the algorithm model, the logic micro-block integrated with the algorithm model has been integrated with the actual application environment, ensuring that the algorithm model can be effectively implemented in actual projects after development.
[0157] Figure 5 It is a flow chart of the application system implementation method of the present invention.
[0158] like Figure 5 As shown, the application system implementation method of the present invention mainly includes the following two steps:
[0159] Step S1: Generate a parameter file based on the template file and input configuration parameters.
[0160] Step S2: Generate an application system file based on the template file and the parameter file, and generate an application system according to the application system file.
[0161] Figure 6 A schematic diagram of a process for generating a parameter file according to an embodiment of the present invention is shown.
[0162] See also Figure 6 In the present invention, step S1 exemplarily includes the following steps:
[0163] Step S11, calling the corresponding template file according to the type and requirements of the application system;
[0164] Step S12, setting the configuration parameters required by the template file;
[0165] Step S13: Generate a parameter file based on the called template file and the set configuration parameters.
[0166] The above three steps are described in detail below.
[0167] Step S11: Call the corresponding template file according to the type and requirements of the application system.
[0168] In step S11, the template file library 4 pre-stores various types of designed general template files. The template parser 2 can call the corresponding template file from the template file library according to the project type and requirements, and can perform fuzzy query by type and keyword. The query results can be directly loaded into the system through the corresponding link. For example, the corresponding template file can generally be determined based on the industry and geographical location to which the project belongs. If the corresponding template file is not stored in the template file library 4, or the stored template file cannot 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, that is, a customized template file.
[0169] Optionally, in order to meet the specific needs of the project, a customized template file can be generated by customized editing through the template editor 1, and then sent to the template parser 2 for use, or stored in the template file library. In this case, the template parser 2 will give priority to calling the received customized template file.
[0170] Therefore, step S11 may include the following sub-steps:
[0171] Step S111, select and call a customized template file.
[0172] The template parser 2 queries whether the customized template file sent by the template editor 1 is received. If it is received, and it is determined to meet the project type and requirements, if it meets the requirements, it will give priority to calling the customized template file and enter step S12; otherwise, if it is not received or does not meet the requirements, it will enter the next step S112 and choose to call the general template file.
[0173] In this step, the template parser 2 preferentially receives and calls the customized template file generated. Generally speaking, at the beginning of a project, the template file customized by the designer for the project is generally the template file that best matches the characteristics and requirements of the project. Therefore, prioritizing the customized template file over the general template file in the template library can significantly improve the efficiency of calling the customized template file with the highest matching degree.
[0174] Step S112: Select and call a general template file.
[0175] If no custom template file call is received or found, the template parser 2 first searches the template file library 4 for a generic template file corresponding to the application system. If found, it determines whether it meets the application system type and requirements. If so, it selects and calls the generic template file, and then proceeds to step S12. If no custom template file is found or does not meet the requirements, it determines not to use the generic template file. In this case, the template parser 2 notifies the template editor 1 to create or revise a template file.
[0176] Step S12: setting the configuration parameters required by the template file.
[0177] Different template files correspond to different project types and are matched to the project's characteristics and requirements. After calling a template file adapted for a project, the template parser 2 parses the template file and derives the configuration parameters adapted to the template file, i.e., the configuration parameters required to configure the template file, including the preset parameters preset in the template file and the customized parameters that need to be entered by on-site operation and maintenance personnel based on the specific characteristics and requirements of the project.
[0178] 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. These are typically fixed constants, such as the heating capacity, rated power, and number of air-source heat pumps; the rated heating capacity and rated gas consumption of gas boilers; the maximum water supply temperature, heating capacity, and power of 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 objects, such as those for personnel, equipment, and materials. Examples include the type, start / stop schedule, and number of heat pumps; the type, number, and frequency of water pumps; and the set water tank temperature. The type, quality, and quantity of materials also include the number of users or service personnel for the application system. Operating parameters generally refer to parameters generated during equipment operation and are typically variable, such as water temperature, pressure, flow rate, and start / stop times. Demand parameters reflect the needs of the application system's users, such as temperature, flow rate, and pressure.
[0179] Accurate and adaptive debugging and setting of these parameters according to the characteristics of the control equipment, the characteristics of the controlled object, the requirements of the user, etc. are very important for the normal and smooth operation of the application system.
[0180] Step S12 specifically includes the following steps:
[0181] Step S121: According to the type and requirements of the application system, the preset configuration parameters of the corresponding device are called from the template file;
[0182] Step S122, customizing input configuration parameters according to the type and requirements of the application system;
[0183] Step S123: Verify all configuration parameters.
[0184] The following describes each step in detail.
[0185] Step S121: According to the type and requirements of the application system, the preset configuration parameters of the corresponding device are called from the template file.
[0186] Some application system configuration parameters may be preset, such as device attributes, control parameters, and operating parameters. Preset values are often options or fixed values that require user review and modification. For example, the sensor address requires user input and cannot be preset. Because each project's specific circumstances vary, preset values are provided as a guide only. For example, the domestic hot water supply range is preset to 46-60°C, and configuration personnel are required to modify this range based on their needs.
[0187] After opening the template file, you can first call the configuration parameters preset in the template file. The 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 they need to be customized and adjusted. If confirmed, they can be directly called when the application system is running.
[0188] Step S122: Customize input configuration parameters according to the type and requirements of the application system.
[0189] Other parameters of the application system require customized input configuration parameters, such as control parameters, operating parameters, and demand parameters, based on the characteristics of the application system's on-site operation and user requirements. 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 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 entered by the user. Application configuration personnel can conveniently verify or modify the preset parameters and enter the necessary customized parameters under the graphical prompts and guidance of the parameter configuration interface.
[0190] FIG7 shows a parameter configuration interface of a specific embodiment of the present invention. Figure 7a Display the parameter configuration interface of the air source heat pump, Figure 7b The parameter configuration interface of the water tank is displayed.
[0191] As shown in FIG7 , in an exemplary implementation method of a domestic hot water application system, the template parser 2 parses and generates preset parameters related to the domestic hot water application system and customized parameters that require user input based on the called domestic hot water application system template file, including parameters of two operating devices, the air source heat pump and the water tank. Among them, some parameters are system preset parameters, such as the heating capacity of the heat source, the rated power of the heat source, the flow rate of a single water pump, etc. Some parameters are customized input configuration parameters by the application configuration personnel based on the characteristics of the on-site operation of the domestic hot water application system and user requirements, such as the number of heat sources, the ambient temperature of the heat source, the number of air source circulation pumps, the type of water tank, etc. In FIG7 , the user fills in the blank column according to the actual situation based on the content on the left and the units on the right, or selects according to the options.
[0192] Step S123: Verify all configuration parameters.
[0193] Preferably, after the parameter configuration is completed, the template parser 2 will verify all configuration parameters, for example, whether all configuration parameters have been set, whether each configuration parameter is within a preset reasonable threshold range, etc. If a configuration parameter is not assigned a value, or the assigned value exceeds the preset threshold range, the system will give a reminder and warning to facilitate further verification and modification by the application configuration personnel.
[0194] Step S13: Generate a parameter file based on the called template file and the set configuration parameters.
[0195] The template parser 2 generates a parameter file based on the called template file and the set configuration parameters, and sends it to the system generator 3. Here, the parameter file is a file that records the configuration parameters required to configure the template file.
[0196] Figure 8 A schematic diagram of a process for generating a parameter file according to a preferred embodiment of the present invention is shown.
[0197] like Figure 8 As shown, step S13 of generating the parameter file includes the following steps:
[0198] Step S131: Acquire the associated template entity based on the template file.
[0199] Step S132: Create a corresponding configuration entity for each template entity.
[0200] Step S133: Perform attribute configuration on each configuration entity.
[0201] 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 are processed.
[0202] Step S135, repeat steps S132-S134 until all template entities are processed.
[0203] Step S136: forming a tree-structured configuration entity set and generating a parameter file.
[0204] The following describes in detail the various sub-steps of step S13.
[0205] Step S131: Acquire the associated template entity based on the template file.
[0206] The template file contains information about multiple template entities. In this step, the template file is first deserialized into a template file object, all template entities contained in the template file object are obtained, and subsequent operations are performed on each template entity in turn, that is, the template entities of the template file object are traversed as the current template entity.
[0207] Step S132: Create a corresponding configuration entity for each template entity.
[0208] Each template entity contains an entity unique identifier and an entity quantity expression. The entity quantity expression can be used to obtain the number of configuration entities created. The entity quantity expression can be a fixed constant or calculated from a variable (i.e., data that can be dynamically entered by the user). Therefore, the configuration entities created in this way enable each template entity to be associated with one or more created configuration entities through a unique identifier. In addition, if the template entity has a parent node, the created configuration entity is set as a child configuration entity of the configuration entity corresponding to the parent node.
[0209] Figure 9 An exemplary schematic diagram of a template entity with a parent node is shown.
[0210] See the figure below, which shows a tree-structured template entity for water demand: "Water demand - Building type - Number of buildings (multiple / single) - Water demand for a single building - Public bathrooms / washrooms in dormitories." This tree structure analyzes water demand, with each upper-level entity being the parent node of the next level. Analysis and matching are performed downwards step by step until a clear water demand is determined.
[0211] Step S133: Perform attribute configuration on each configuration entity.
[0212] Traverse and configure all created configuration entities. The configuration process is as follows:
[0213] Step S1331: Obtain configuration attributes of the template entity corresponding to the current configuration entity.
[0214] As mentioned above, 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. Furthermore, the configuration attributes in the corresponding template entity can be retrieved. Configuration attributes include the attribute identifier (the attribute unique identifier, typically a unique reference string), attribute type, and attribute value (including the attribute value data type and attribute value text).
[0215] Step S1332: Obtain the key and value of the configuration attribute, and create a configuration attribute table using the key-value pair.
[0216] Traverse the contents of all configuration properties of the current configuration entity, use the unique identifier of the configuration property (unique reference string) as the configuration property key, then dynamically calculate the configuration property value based on the property type and property value text, save it in the form of a hash table structure of key-value pairs and create a configuration property table.
[0217] In this step, configuration attributes are classified into three types: static attributes, user attributes, and expression attributes. The calculation method for configuration attribute values varies depending on the three attribute types. Specifically, static attribute values are obtained by parsing the value text based on the attribute value data type.
[0218] The user attribute values are then displayed in 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 enter values. The pop-up window progresses from the template file's parent entity to its child entity, then to the next parent entity, and finally to its child entity. After all entities are configured, the template file displays a message indicating that the configuration is complete, and the user clicks Confirm.
[0219] The value text of an expression attribute is a formula that complies with 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 attributes must be attributes for which the results have been calculated.
[0220] 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 are processed.
[0221] In this step, all template sub-entities of the current template entity are obtained, and the operation process of steps S132-S133 is repeated through all template sub-entities until all template sub-entities of the current template entity are processed.
[0222] Step S135, repeat steps S132-S134 until all template entities are processed.
[0223] The template file contains information of multiple template entities. Through this step, all template entities are traversed and steps S132-S134 are repeatedly executed until all template entities contained in the template file are processed, that is, the attributes of each template entity and its template sub-entities are configured to create a corresponding attribute configuration table.
[0224] Step S136: forming a tree-structured configuration entity set and generating a parameter file.
[0225] This step includes the following steps: Step S1361: The entity nodes corresponding to the template entity and the template sub-entities are associated through ownership relationships to form a tree structure with a hierarchical relationship. Further, in step S1362, all configuration entities with tree structures and / or single structures (or without tree structures) are formed into a configuration entity set (including configuration entities with tree structures and single structures). 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.
[0226] Figure 10 An exemplary configuration entity set formed by all entities is shown.
[0227] like Figure 10 As shown in the following figure, in the Air Source Heat Pump configuration entity set, the "Number of Heat Sources" attribute has a keyword, which is the property key. The default value is 1 and can be changed by the user. The total number of solenoid valve temperature sensors below refers to the number of heat sources. For example, if there are five heat sources, the "Solenoid Valve Temperature Sensor" entity will appear five times, allowing the user to enter parameters for each solenoid valve temperature sensor.
[0228] Optionally, after the template parser generates the parameter file, the following steps may also be included:
[0229] Step S137: Save the parameter file, or generate an application system file based on the template file and the generated parameter file.
[0230] After the parameter file is generated, you can choose to save the parameter file to the local file system and call it later when you need to generate the application system file. Optionally, you can submit the generated parameter file and the corresponding template file to the system generator 3, and call the system generator 3 to generate the application system file. In this step, it is preferably set to pop up a result display interface, in which the user is prompted to select the processing method of the parameter file, so that the user can choose to save the parameter file or choose to directly generate the application system file.
[0231] The following describes step S2, which generates an application system file based on the template file and the parameter file, and generates an application system according to the application system file.
[0232] Step S2 is mainly executed in the system generator 3. The system generator 3 receives the template file called and the generated parameter file from the template parser 2, automatically generates the application system file based on the parameter file and the template file, and then generates and exports the application system.
[0233] Figure 11 A schematic diagram of a process for generating an application system according to an embodiment of the present invention is shown.
[0234] like Figure 11 As shown, step S2 of generating the application system specifically includes the following steps:
[0235] Step S21, loading the template file and parameter file.
[0236] Step S22: verify the template file and parameter file.
[0237] Step S23: Generate an application system file based on the template file and the parameter file.
[0238] Step S24: Generate an application system based on the application system file.
[0239] The following describes each of the above steps separately.
[0240] Step S21, loading the template file and parameter file.
[0241] This step includes two situations, which are described as follows:
[0242] Step S211: Receive and load the parsed template file and the corresponding parameter file.
[0243] System Builder 3 can receive and load the template file and parameter file submitted by Template Parser 2. Specifically, in the aforementioned steps, Template Parser 2 has already called, verified, and parsed the customized or general template file, and generated the parameter file based on the called template file and the set configuration parameters. Therefore, the template file and parameter file received by System Builder 3 from Template Parser 2 are generally template files that match the project requirements. The parameter file here is parsed and generated by Template Parser 2 based on the called template file, and therefore corresponds to the called template file.
[0244] Step S212: Load the local template file and the corresponding local parameter file selected by the user.
[0245] In another optional embodiment, the system builder 3 may receive template files and parameter files selected and input by the user. Specifically, the system builder 3 generates and outputs a calling interface, which facilitates the user to select and load a template file stored in the local file system or the system template library 4, and to select and load a parameter file stored in the local file system (see step S137).
[0246] Step S22: Verify the template file and the parameter file. This step is mainly used to verify whether the parameter file is consistent with or matches the template file. If the two match, it can be considered to match the project.
[0247] Figure 12 A schematic diagram of a process for verifying template files and parameter files according to an embodiment of the present invention is shown.
[0248] As shown in FIG. 22 , step S22 specifically includes the following steps.
[0249] Step S221, respectively obtaining the template entity associated with the template file and the configuration entity associated with the parameter file;
[0250] Step S222, verifying whether the template entity corresponding to each configuration entity exists;
[0251] Step S223, verifying the tree structure of the template file and the parameter file;
[0252] Step S224: Verify whether the unique identifiers of all configuration attributes of each configuration entity match.
[0253] The following describes each of the above steps separately.
[0254] Step S221, respectively obtain the template entity associated with the template file and the configuration entity associated with the parameter file. After the template file and the parameter file are loaded successfully, the following processing steps are included:
[0255] Step S2211: deserialize the template file into a template file object.
[0256] The system generator 3 deserializes the template file into a template file object. As mentioned above, the template file object generated by deserializing the template file contains multiple template entities, each of which includes multiple template attributes, multiple template logic blocks, multiple template associaters and multiple template sub-entities.
[0257] Step S2212: deserialize the parameter file into a configuration file object.
[0258] Deserialize the parameter file into a configuration file object. The configuration file object generated by deserializing the parameter file contains multiple configuration entities, each of which contains one or more configuration attributes. These multiple configuration attributes form a configuration attribute table. Furthermore, each template entity is associated with multiple configuration entities through a unique identifier.
[0259] Step S222: Verify whether the template entity corresponding to each configuration entity exists.
[0260] 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 based on the unique identifier of each configuration entity to see if it exists. If so, the process proceeds to step S223. Otherwise, the verification fails. At this point, the process can return to step S21 and reload the correct template file and parameter file. Alternatively, the process can return to step S13 and regenerate the correct parameter file.
[0261] Step S223: Verify the tree structure of the template file and the parameter file.
[0262] The verification process is as follows:
[0263] Verify whether the template file unique identifier saved in the parameter file is consistent with the unique identifier of the template file. If not, the verification fails.
[0264] Traverse all objects in the parameter files, verify the unique identifier of the object, remove the index, and check whether it exists in the template file. If not, the verification fails.
[0265] Verify whether the attribute unique identifier of the object exists in the corresponding template entity after removing the object index. If not, the verification fails.
[0266] If all of the above are passed, the verification is successful. If the verification fails, an error message will be prompted and the execution will be exited.
[0267] In this step, it is necessary to verify whether the tree structures of the template file and the parameter file are consistent. If the verification is consistent, the next step S224 is entered. Otherwise, a prompt prompts that the verification has failed. Here, you can return to step S21 and reload the correct template file and parameter file. Alternatively, return to step S13 and regenerate the correct parameter file.
[0268] As mentioned above, both template files and parameter files can be infinitely nested tree-structured files. The parent-child relationship of nodes in the tree structure can reflect the hierarchical relationship between systems and subsystems or between the overall and local components in the project, and can be flexibly abstracted and subdivided according to project characteristics.
[0269] Since the parameter file is generated based on the template file, the tree structure of the correctly loaded parameter file should be consistent with the tree structure of the corresponding template file. Conversely, if the tree structures of the two are inconsistent, it means that the loaded parameter file is incorrect or does not match the template file. Therefore, you need to go back and reload the matching parameter file or regenerate the correct parameter file.
[0270] Step S224: Verify whether the unique identifiers of all configuration attributes of each configuration entity match.
[0271] As mentioned above, the configuration file object generated by deserializing the parameter file contains multiple configuration entities, each configuration entity contains multiple configuration attributes, and multiple configuration attributes form a configuration attribute table. The configuration attribute table is set to a hash table structure of key-value pairs, where the key is the unique identifier of the corresponding template attribute (hash reference string), and the value is the attribute value of the configuration attribute corresponding to the configuration entity.
[0272] 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 find out whether the corresponding template attribute exists and verify that it belongs to the same type of attribute. If so, the unique identifier of the configuration attribute is marked as a match, and the process goes to the next step S23 to generate the application system file. Otherwise, if the unique identifier of a configuration attribute of a configuration entity is verified to be inconsistent with the template attribute of the corresponding template entity, a prompt indicating that the verification failed. Here, you can return to step S21 and reload the correct template file and parameter file. Alternatively, return to step S13 and regenerate the correct parameter file.
[0273] Step S23: Generate an application system file based on the template file and the parameter file.
[0274] The system generator 3 calls the template file and parameter file from the template parser 2 to generate a series of application system files.
[0275] Optionally, the application system file includes three parts: a logic file, a driver file, and a navigation file. The logic file is generated based on the template file and parameter file; the driver file is a collection of driver programs required to run the logic file and is loaded based on the needs of the logic file; and the navigation file is created based on each configuration entity in the parameter file to establish an association between the template file, parameter file, logic file, and driver file, so that the system can automatically call these various files.
[0276] Preferably, the logic file and the navigation file are in XML text format and can be deserialized into logic source files and navigation nodes. The driver file is preferably a binary file and is stored in the driver library of the system.
[0277] Figure 13 A schematic diagram of a process for generating application system files according to an embodiment of the present invention is shown.
[0278] like Figure 13 As shown, step S23 of generating the application system file includes the following steps:
[0279] Step S231: Generate a logic file based on the template file and the parameter file.
[0280] Step S232: Load the driver file required by the logic file.
[0281] Step S233: Create a navigation file based on each configuration entity in the parameter file.
[0282] Step S234: Generate application system files based on the navigation files.
[0283] The following describes each of these steps separately:
[0284] Step S231: Generate a logic file based on the template file and the parameter file.
[0285] Figure 14 A schematic diagram of a process for generating a logic file in an embodiment of the present invention is shown.
[0286] like Figure 14 As shown, in this step, you need to create a logic file corresponding to the configuration entity, which specifically includes the following steps:
[0287] Step S2311: Create a corresponding logic source file based on the configuration entity.
[0288] First, obtain the corresponding configuration entity based on the parameter file and create the logic source file corresponding to the configuration entity.
[0289] Logic files are generated through logic blocks and associators. Specifically, multiple logic blocks and multiple associators are combined and linked to create a fully functional logic file. Logic files are program files edited graphically and consist of multiple logic microblocks and connection microblocks (specifically, data connections).
[0290] The executable logic file is generated by compiling the logic source file through a compiler. The file can be run in the target computer to perform functions such as data processing or device operation.
[0291] Perform the following operations on the template entity corresponding to the configuration entity:
[0292] Step S2312: configure all template attributes of the template entity.
[0293] Traverse all template attributes of the template entity. If the current template attribute indicates that a logic micro-block needs to be generated, add a corresponding data input micro-block to the logic source file. In this invention, attributes can be connected to or not connected to a logic micro-block. 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.
[0294] Step S2313: configure all template logic blocks of the template entity.
[0295] Traverse 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 block.
[0296] Step S2314: configure all template associators of the template entity.
[0297] All template associators of the template entity are traversed, and the microblocks in the logic source files corresponding to both sides of the template associator are connected by adding connection microblocks.
[0298] Step S2315: Generate a logic file based on the logic source file and save it to the corresponding navigation file. In this step, first determine whether the number of microblocks in the logic source file is zero. If the number of microblocks in the logic source file is not zero, the logic source file is serialized into a logic file, and the resulting logic file is saved to the corresponding navigation file. Conversely, if the number of microblocks is zero, the entity has no logic functionality and no logic file needs to be generated.
[0299] Step S232: Load the driver file required by the logic file.
[0300] In this step, the driver file required by the logic file needs to be loaded. Specifically, according to the type of the microblock in the logic file, the driver file required by the microblock is loaded into the currently generated application system file.
[0301] It should be noted that the order of generating the logic file and the driver file in the present invention can be swapped, and both files only need to exist before the application system is run.
[0302] In one embodiment, step S2321 may query and load the driver file required by the microblock from the driver file library based on the type of the microblock. Specifically, during the aforementioned logic file generation process, when creating each microblock, the system searches the driver file library for the driver file required by the microblock based on the microblock type. If the corresponding driver file is found, the corresponding driver file is automatically loaded into the currently generated application system file.
[0303] In another optional embodiment, step S2322 can select and load a driver file pre-stored in the local application system file. Specifically, if a corresponding driver file already exists in the application system file to be generated, the driver file already stored locally can be directly called.
[0304] Step S233: Create a navigation file based on each configuration entity in the parameter file.
[0305] Figure 15 A schematic diagram of the process of creating a navigation file according to an embodiment of the present invention is shown.
[0306] like Figure 15 As shown, in a preferred embodiment of the present invention, the step of creating a navigation file includes the following steps.
[0307] Step S2331: Create a corresponding navigation node for each configuration entity.
[0308] In this step, first, based on each configuration entity corresponding to the parameter file, a navigation node corresponding to each configuration entity is created.
[0309] Step S2332: Create a navigation file directory corresponding to the configuration entity based on all navigation nodes.
[0310] Traverse the navigation nodes corresponding to each configuration entity in the configuration entity set, and create a navigation file directory containing the parent-child relationship of all configuration entities based on the tree structure relationship of the configuration entity set. Each configuration entity corresponds to the corresponding navigation node one-to-one, and the relationship between each configuration entity and its parent and child entities corresponds to the upper and lower levels of the navigation directory of the corresponding navigation node one-to-one.
[0311] Step S2333: Establish associations between all configuration entities and the generated logic files and driver files in each navigation node.
[0312] In this step, all navigation nodes in the generated navigation file directory are traversed, and the association relationship between the configuration entity corresponding to each navigation node and the generated logic file and driver file is established and saved.
[0313] Step S2334: Generate a navigation file based on the navigation node and the navigation file directory.
[0314] The navigation nodes and navigation file directories are serialized into files of a specific format to generate a navigation file. As previously mentioned, the logic file is generated based on the template file and parameter file, and the driver file is loaded. The navigation file generated in this step establishes the association between the template file, parameter file, logic file, and driver file. Therefore, based on the navigation file generated in this step, the system can automatically call the various files mentioned above and then automatically generate application system files.
[0315] Next, step S24 is described, in which an application system is generated according to the application system file.
[0316] As mentioned above, the generated application system files include logic files, driver files, navigation files, and preferably, view files and data files. The view files store the interface used by the system runtime logic and data; the logic files store the written logic and run it on the router; the data files store data; and the navigation files store the locations and connections of the various logic files and driver files, allowing for accurate call and display during system runtime.
[0317] Based on the generated application system file, the system generator 3 generates and exports an executable application system under the guidance of the navigation file.
[0318] As described above, before step S1, an industry expert may pre-edit a customized template file based on the project's characteristics and requirements to form a customized template file. Alternatively, after step S1, if the template parser 2 does not receive a customized template file, or the called customized template file or general template file does not meet the project requirements, the template editor 1 will be notified to edit the template file.
[0319] Therefore, optionally, before or after step S1, step S3 is further included to edit the template file.
[0320] Figure 16 A schematic diagram of the process of editing a template file according to an embodiment of the present invention is shown.
[0321] like Figure 16 As shown, the steps for editing the template file are as follows:
[0322] Step S31: Create a new template file according to the type and requirements of the application system.
[0323] The template editor 1 calls the pre-stored logic micro-block and the editor to edit according to the type and requirements of the application system to generate a new template file.
[0324] Optionally, a custom logic micro-block and an editor may be generated based on input instructions or parameters entered by the user to edit the micro-block and generate a new template file.
[0325] Step S32: Revise the specified template file according to user requirements.
[0326] The template editor 1 receives the template file compilation instruction sent by the template parser 2, and revise and edit the specified customized template file or general template file according to the instruction requirements, and generates a new template file after the editing is completed.
[0327] Step S33: Generate a new template file and export or store it.
[0328] After creating, editing or revising a template file, the template editor 1 generates a new template file, exports it and sends it to the template parser 2, or stores it in a template file library.
[0329] In summary, in the application system implementation method of the present invention, a graphical programming tool is used to divide the application system development into two steps, the first step is the application system template development, and the second step is to use the template configuration to generate the application system. In this way, the control engineer only needs to develop a template file customized for the project, without the need to comprehensively develop the entire application system, without the need to perform complex programming and system debugging, and without the need to spend energy to familiarize himself with the professional knowledge and equipment characteristics of the industry to which the project belongs. On the other hand, professional operation and maintenance personnel do not need to have complex programming and system development skills. They can directly use the already developed template files, parse and generate parameter configuration human-computer interaction interfaces through the template parser in the system of the present invention, generate parameter files after inputting the corresponding configuration data according to the actual project information, and finally import the template files and parameter files through the system generator to generate application system files, and finally export the application system, and the entire operation process ends.
[0330] This significantly reduces the professional skill requirements and workload for both industry experts and application debuggers, decoupling their work and allowing them to focus on their respective areas of expertise. This not only improves the professionalism and quality of application systems, but also lowers the barrier to entry for application debuggers.
[0331] Figure 17 A logical structure diagram of a template file according to a preferred embodiment of the present invention is shown.
[0332] In the system of the present invention, the template file of the generation system is edited by the template editor 1. The template file is preferably formed as a text file based on the XML syntax structure. All elements in the template file can be assigned a globally unique identification string. The identification string can identify a certain element and can also represent the superior and subordinate relationships of the element. In this way, each element has a globally unique identification string, which can be conveniently used for legitimacy verification and is also convenient for other elements to reference and associate with each other.
[0333] like Figure 17 As shown, the textual logical structure of a template file generated by the system of the present invention includes one or more entities. Each entity in the template file defines an object. For example, an entity is defined to describe a class of things in the structure of a real-world application system, which can represent a certain type of system, a type of area, a type of building, a type of equipment, or a type of sensor. Each entity defines the quantity, attributes, and functions of a certain object. Once the attribute values and functions of the entity are determined, they need to be stored in a data structure. The data structure that stores the values is the template file object.
[0334] Each entity has zero or more child entities, each child entity has zero or more grandchild entities, and each corresponding template file object also 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 corresponding objects can also form an object tree with multiple root nodes.
[0335] For example, a domestic hot water intelligent control system template file contains a "domestic heat 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 contains a "boost circulation pump" sub-entity, an "electric control valve" sub-entity, etc.
[0336] For example, a template file for a hot water circulation control system includes multiple entities, such as the heat source, user-side booster pump, and water replenishment, each describing the system's various subsystems. The heat source entity includes multiple attributes, such as energy efficiency, power, water supply temperature, and variable frequency, to describe the subsystem's various performance parameters. It also includes multiple logic blocks, such as the efficiency calculation logic block and the frequency control logic block, to implement the subsystem's various functions. It also includes multiple associators, such as the variable frequency and frequency control associator and the power and efficiency calculation associator, to associate the attribute parameter values with the subsystem's logic blocks implementing different functions. It also includes multiple sub-entities, such as the circulation pump and air source heat pump.
[0337] Each entity of the template file includes the following sets: an attribute group 10 , a logic group 11 , an associator group 12 , and a sub-entity group 13 .
[0338] The attribute group 10 includes one or more attributes, such as Figure 17 Attribute 1, Attribute 2, Attribute 3, and so on, each describes a static characteristic of the entity. For example, for a building entity, its static characteristics, or attributes, include building area, number of floors, and the building's latitude and longitude. Specifically, an attribute is a parameter of the object described by the entity, consisting of the parameter name and the calculation method for the parameter value. Attributes support a variety of data types, such as integers, floating-point numbers, and Booleans.
[0339] Attribute types include static attributes, user attributes, and expression attributes. Static attributes are fixed attribute values stored in a template file and are obtained by parsing the template file based on the attribute value data type. During template editing, the fixed values specified in the template file remain unchanged in subsequent processes after the template editing is completed. Preferably, static attribute values do not change from project to project within the current template file. Therefore, these static attribute values, such as the specific heat value of water, gravity coefficient, and heating zone temperature, need to be called multiple times when displayed in the system or used in other logic or formulas.
[0340] User attributes are used to reflect the characteristics of the application system and user needs. They are used to generate the corresponding attribute value input interface when the template file is parsed. The application configuration personnel then enter the user attribute value in the configuration attribute interface. In other words, the user specifies the user attribute value when the template is parsed. Generally speaking, the value of the user attribute value will change depending on the project in which the current template file is applied. However, once the user attribute value is determined through user-specified input, the value remains unchanged in subsequent processes after the template is parsed. Therefore, user attribute values are also attributes that are displayed in the system or repeatedly used in other logic or formulas, such as the rated power of equipment and the air-conditioned area of a building.
[0341] The expression attribute is formed as an expression bound in the template file. It is a value obtained by performing a secondary calculation based on the previously obtained attribute value when the template is parsed, such as a polynomial string with a parameter name. The assignment of the expression attribute is calculated based on the bound calculation formula and its associated other attribute values before the template parser generates the parameter file. That is, the value is obtained by performing a secondary calculation based on the attributes that have been assigned before the current process when the template is parsed. Once the expression attribute value is calculated, its value remains unchanged in subsequent processes after the template parsing is completed. Therefore, the expression attribute value is usually a value obtained by calculating the formula based on the values specified by different users in the project. The expression attribute value is the attribute value displayed in the system or repeatedly used in other logic or formulas, such as the overall rated total power of the system.
[0342] FIG. 18 exemplarily shows an embodiment of the template file entity attributes of the present invention.
[0343] In a preferred embodiment of the present invention, each attribute of the attribute group is connected to the corresponding entity through an attribute expression. Figure 18a As shown, the entity is an air source heat pump, and the attribute is the heat source type. When the heat source type (rytype) is 1, the entity air source heat pump will pop up the heat source type attribute configuration window to facilitate 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. The default configuration is air source heat pump 1.
[0344] The logical group 11 includes one or more logical blocks, such as Figure 17 Logic blocks 1, 2, and 3 are represented in the example. A logic block describes the functionality of an entity, such as a logical processing function, which is specifically a logical process that performs a series of arithmetic or logical operations on input data and outputs result data. A logic block can be associated with other attributes of the entity or 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.
[0345] Each logic block is composed of one or more logic microblocks. A logic microblock is the smallest unit with a single data processing function. Logic microblocks include connection microblocks and algorithm microblocks. Algorithm microblocks include addition, subtraction, multiplication, and division, checksums, address read / write microblocks, and complex calculations, implementing various algorithms. Connection microblocks can connect to any other logic microblocks.
[0346] Each logic microblock consists of 0 or more input pins, 0 or more output pins, and an algorithm module. Here, the input and output pins are preferably virtual data transmission pins. If there are 0 pins, it means that the function of the microblock does not require other microblocks to provide data to independently complete its function. The data connection is used to connect the input pins and the output pins. Specifically, each input pin can be connected to an output pin of the same dimension of another logic microblock through a data connection. Each output pin can be connected to the input pins of the same dimension of 0 or more other microblocks through a connecting microblock. The data of the input and output pins can be 0-dimensional, 1-dimensional, or multi-dimensional data. Among them, 0-dimensional is a constant (such as the rated power of a single device), 1-dimensional array (such as the rated power of a group of devices), 2-dimensional is a matrix (such as the rated power of multiple groups of different devices), and multi-dimensional is a tensor (such as the rated power, rated voltage, rated current, etc. of multiple groups of different devices).
[0347] The data processing process of the logic microblock is: obtaining input data through the input pin, processing the data and obtaining the result data, and outputting the result data to the output pin.
[0348] FIG19 exemplarily shows an example of application of logic blocks in a template file entity of the present invention.
[0349] See also Figure 19a Below the location entity, there are two attributes, City and District, a logic block, WZ, and two connectors, City Connector and District Connector. These elements are identified by their unique identifiers, and the connectors transfer the user-entered values to the logic blocks.
[0350] See also Figure 19bIn the generated parameter file, the data of the city logic microblock has been updated to the user input value 10103.0.
[0351] In an embodiment of the present invention, the logic block preferably includes a series of logic micro-blocks that represent the atomic data (indivisible atomic-level data) processing process. The data processing method described by the logic micro-block can be a variety of algorithms such as mathematical operations, control algorithms, edge computing, and extended support calls. Specifically, mathematical operations include digital operations, logical operations, bit operations, data type conversion, and mathematical function operations; control algorithms include input and output, network protocol integration, logical algorithms, branch control operations, gate circuit logic, and proportional integral differential regulation; edge computing includes aggregation operations, matrix operations, SQL operations, neural networks, and database support; and extended support calls include Python calls, EnergyPlus calls, Excel calls, and Matlab calls.
[0352] Optionally, digital operations can include the four arithmetic operations of addition, subtraction, multiplication, and division. Aggregation operations can include array average, minimum, maximum, and grouping; matrix operations can include matrix addition, subtraction, multiplication, and division; SQL operations can include querying and grouping multidimensional tensor data; bitwise operations can include AND, OR, and NOT; and branch control operations can include if, switch, for, and goto.
[0353] The present invention innovatively designs a logic block and logic microblock structure, achieving a unified interface between the algorithm model and application logic through this innovative design. In the application system automatically generated by the present invention, the algorithm model is integrated into the algorithm module within the logic block or logic microblock. That is, the algorithm model also uses the microblock structure interface, i.e., an interface consisting of input pins, output pins, and the algorithm model. Therefore, an algorithm model can be regarded as an advanced logic microblock. In this way, when the system is running, the logic microblock of the algorithm model is regarded as a special logic file, and the interface used is also a logic file interface. Therefore, the controller that can run the logic microblock and the simulation software can also run the algorithm model, allowing the algorithm model to run normally and conveniently and without distortion in various types of application systems.
[0354] As mentioned above, the logic block is composed of a free combination of logic micro-blocks. The template editor uses graphical operations to combine logic micro-blocks into different logic blocks in the manner of building blocks 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 multiple micro-blocks such as micro-blocks related to data acquisition, micro-blocks related to four arithmetic operations, micro-blocks related to logic judgment, and micro-blocks related to data storage.
[0355] Figure 20A schematic diagram of the extended structure of the template editor in a preferred embodiment of the present invention is shown.
[0356] like Figure 20 As shown, in the system of the present invention, the template editor can preferably provide a logic micro-block library 5, which pre-packages a large number of general-purpose logic micro-blocks or specialized logic micro-blocks suitable for various industries. The logic micro-block library 5 includes four sub-libraries based on data processing type: mathematical operations, logical control algorithms, edge computing, and extended support. These sub-libraries support various types and levels of logical functions. For example, the mathematical operations sub-library 51 includes logic micro-blocks for processing digital operations, logical operations, bit operations, data type conversion, and mathematical function operations; the control algorithm sub-library 52 includes logic micro-blocks for processing input and output, network protocol integration, logical algorithms, branch control operations, gate circuit logic, and proportional-integral-derivative regulation; the edge computing sub-library 53 includes logic micro-blocks for processing aggregation operations, matrix operations, SQL operations, neural networks, and database support; and the extended support sub-library 54 is used to extend support for third-party platform integration, including logic micro-blocks for calling Python, EnergyPlus, Excel, and Matlab. The template editor can call these pre-stored logic micro-blocks according to project needs, automatically generate template files, or edit and generate template files according to professional input instructions or parameters.
[0357] like Figure 20 As shown, the template editor of the present invention preferably also provides a logic microblock extension interface 6. This extension interface 6 is used for secondary development and encapsulation of customized functions to generate customized logic microblocks. This facilitates the template editor to generate new logic blocks or logic microblocks, optimize existing logic blocks or logic microblocks, or customize logic blocks or logic microblocks for specific functions. All built-in logic microblocks and customized logic microblocks follow the same functional interface. Both can be equally integrated into the system, with the same functions and status. Logic files generated by these customized logic microblocks can be simulated and run in the editor or directly on a field controller. Secondary developers can easily expand and encapsulate customized functions to form customized logic microblocks.
[0358] The application system implementation method of the present invention further includes step S4, customizing the logic micro-block. The details are as follows:
[0359] Step S41: Acquire a logic micro-block extension interface.
[0360] Exemplarily, the user downloads the logic micro-block extension interface SDK package through the system platform.
[0361] Create custom logic microblocks based on the logic microblock extension interface. Specifically, users call the SDK package's API interface to develop their own custom logic microblocks.
[0362] Step S42: Generate a logic micro-block definition file.
[0363] Specifically, users package their custom logic micro-block programs through the SDK and generate logic micro-block definition files. For example, using JAVA programming tools to develop and package can provide specific user-defined functions and a high degree of freedom of expansion.
[0364] Step S43: Generate a logic file of the custom logic micro-block.
[0365] Specifically, the logic micro-block definition file is loaded through the logic programming tool provided by the system to generate a new logic file.
[0366] As described above, the logic micro-block library provided by the present invention covers the basic functions and advanced functions involved in most application systems. The template editor can call each logic micro-block arbitrarily and implement various functional combinations of the application system in a simple and efficient "building blocks" manner.
[0367] The Correlator Group 12 includes one or more Correlators, such as Figure 17 Associator 1, Associator 2, and Associator 3 are used to describe the data connection between logical blocks or between logical blocks and attributes. An Associator consists of two parts: a source and a destination. When the two parts are connected, data is generated from the source and then input to the destination.
[0368] Preferably, the two parties associated by the associator are the input pin of a 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, the association between the input data of a certain logic block of the attribute and the output data of a certain attribute of the entity or other logic blocks can be realized.
[0369] Exemplary implementations of the associator include using a data link to connect an input pin of a logic microblock of the entity's logic block to an output pin of a data-producing microblock generated by the entity's attributes, or using a logic link microblock to connect the input and output pins of subordinate logic microblocks of two different logic blocks of the entity. Preferably, the connected pins are an output pin and an input pin, respectively, and the data dimensions of the two pins are the same.
[0370] After the association is achieved through the associator, the data storage addresses of the two pins of the associated parties in the generated application system are the same. In this way, in the actual running application system, the data storage addresses used by the two pins of the associated parties are also the same, the output pin is the value writer, and the input pin is the value reader.
[0371] Figure 21 The application examples of the correlator group of the present invention are exemplarily shown.
[0372] like Figure 21 As shown, a "Number of Air Source Heat Pumps" associator is displayed. This associator connects the number of heat sources to the heat supply logic. In other words, the number of air source heat pumps directly determines the amount of heat supplied.
[0373] In particular, the association between the expression attribute in the entity attribute and other attributes is preferably achieved through a unique reference string representing the corresponding element in its calculation formula. The expression attribute is usually used to associate attributes and is not associated with the input or output of the logic block. The calculation process of the expression attribute is carried out by parsing the template file through the template parser and generating the parameter file. The input data and output data processing process associated by the associator is performed after the application system has been generated and deployed, and the result calculation is performed during the system operation.
[0374] Expression attribute calculations and logic block data processing are performed according to the order in which they appear in the template file, known as sort order. Elements sorted earlier cannot reference elements sorted later to avoid logical loops that could cause calculation failures.
[0375] In the above template file, each entity also includes a sub-entity group 13, which contains one or more sub-entities, such as Figure 17 Subentity 1, subentity 2, and subentity 3 in the entity. The subentity describes the component with the same type of characteristics in the entity, that is, the subentity also describes a class of objects of the same type, and the structural composition of the subentity is the same as that of the entity.
[0376] Through the implementation method and implementation system of the application system of the present invention, the application system of a project can be quickly built, which significantly shortens the development cycle. A mature solution can be deployed in as little as one hour, while the development cycle of traditional applications usually takes weeks or even months.
[0377] Figure 22 shows an example of a traditional application system development model.
[0378] For example, in the traditional application system development model, professional computer programmers are required to work with project maintainers to extensively collect and sort out the specific characteristics and requirements of the project. This requires a lot of time and effort to carry out customized development of software and hardware. For example, Figure 22 shows a schematic diagram of the logic writing page under the traditional development model.
[0379] The traditional development process requires on-site research, with automation engineers writing complex software and hardware logic tailored to the site's conditions. Each set of control logic requires custom programming, on-site debugging, and deployment. For example, under the traditional development model, a minimum development cycle of 10 people and 60 days is required, with a labor cost of 2,000 yuan per person per day. This results in a long development cycle and high costs.
[0380] FIG23 shows an application example of the application system development model of the present invention.
[0381] As shown in Figure 23, in an exemplary application system development model of the present invention, ordinary on-site operation and maintenance personnel can directly choose to call project-related template files based on the implementation method and implementation system of the application system of the present invention, select or input project-related parameters based on the graphical interface, automatically generate parameter files, and then automatically generate application systems.
[0382] It can be seen that under the implementation method of the application system and the working mode of the implementation system based on the present invention, when deploying the application system at the project site, there is no need for automatic control engineers to write complex software and hardware logic according to the on-site conditions. Only ordinary on-site operation and maintenance personnel (who do not need to master computer programming skills) need to make graphical navigation selections to quickly, efficiently and accurately generate an application system that matches the project.
[0383] The development cycle of the entire project application system only requires 3 people and 7 days, with a labor cost of 2,000 yuan / person / day. The development cycle is significantly shortened, the cost of funds is greatly reduced, and no high-level professional personnel are required to participate. Only staff who understand the on-site conditions, can use computers and perform simple operations are required.
[0384] The present invention aims to protect an implementation method and implementation system of an application system. Through the method and system of the present invention, the development and deployment of the application system are separated, 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.
[0385] Furthermore, the present invention innovatively designs logic blocks and logic microblocks, integrating algorithm models into the algorithm modules within the logic blocks or logic microblocks. These modules can be treated as directly callable and executable logic files. Consequently, controllers and simulation software capable of running logic microblocks can also run algorithm models, enabling convenient and undistorted operation across a wide range of application systems.
[0386] Thanks to the uniformity of the logic microblock interface, the logic microblocks developed or integrated with algorithm models through this system can be directly simulated and run, which enhances the practicality of the model.
[0387] The present invention also provides a rich template file library and logic micro-block library, which promotes the rapid development and wide promotion of high-quality application systems.
[0388] The system of the present invention significantly lowers the threshold for model use and application development, while also improving the quality of applications. For example, it enables ordinary property management personnel to use this system to develop a hot water control system and effectively apply predictive control algorithms to the system.
[0389] The present invention is described with reference to flowcharts and / or block diagrams of methods, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts 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, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0390] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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.
[0391] It should be understood that the above-described specific embodiments of the present invention are merely illustrative or illustrative of the principles of the present invention and do not constitute limitations of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included within the scope of protection of the present invention. In addition, the appended claims are intended to cover all variations and modifications that fall within the scope and metes and bounds of the appended claims, or equivalents thereof.
Claims
1. A method for implementing an application system, characterized in that: include: 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; The parameter file is a file that records configuration parameters required to configure the template file, and the configuration parameters include device parameters, control parameters, operating parameters, and demand parameters.
2. The method according to claim 1, wherein The template file is a template file that matches the application system, and includes one or more entities, each entity including at least an attribute group, a logic group, and an associator group for realizing association between the attribute groups and / or logic groups.
3. 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 configuration entity set in a tree structure; 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 entity of the template file is associated with the configuration entity corresponding to the parameter file through the corresponding globally unique identifier.
4. The method according to claim 1, wherein The application system files include: A logic file is generated based on the template file and the parameter file; The driver file is a set of driver programs required to run the logic file and is loaded based on the needs of the logic file; The navigation file is created based on each configuration entity in the parameter file and is used to establish the association relationship between the template file, parameter file, logic file and driver file so that the system can automatically call the above various files.
5. The method according to any one of claims 1 to 4, wherein The step S1 includes the following steps: Step S11, calling the corresponding template file according to the type and requirements of the application system; Step S12, setting the configuration parameters required by the template file; Step S13: Generate a parameter file based on the called template file and the set configuration parameters.
6. The method according to claim 5, wherein: The step S11 further includes: Step S111, select and call a customized template file; Step S112: Select and call a general template file.
7. The method according to claim 6, wherein: The step S111 includes: Check whether the customized template file is received; If received, determine whether it meets the application system type and requirements; If it meets the requirements, the customized template file is selected for calling; If not received or not compliant, proceed to the next step S112.
8. The method according to claim 6, wherein: The step S112 includes: Query the general template file corresponding to the application system; If found, determine whether it meets the application system type and requirements; If it is consistent, the general template file is selected and called, and the process goes to step S12; If the search fails or the result does not match, the general template file will be determined not to be used, and a notification of creating or revising a template file will be issued.
9. The method according to claim 5, wherein: The step S12 further comprises: Step S121: According to the type and requirements of the application system, the preset configuration parameters of the corresponding device are called from the template file; Step S122: Customize input configuration parameters according to the type and requirements of the application system.
10. The method according to claim 9, wherein: The step S121 further includes: Verify whether the preset configuration parameters meet the requirements of the application system; If it meets the requirements, it will be called directly; If not, go to next step S122.
11. The method according to claim 9, wherein The step S122 further includes: Confirm and display the configuration parameters that need to be customized; Customize input configuration parameters according to the type and requirements of the application system.
12. The method according to any one of claims 9 to 11, wherein: The process further includes step S123, verifying all configuration parameters, including: Verify that all configuration parameters have been set; Verify that all configuration parameters are within the preset thresholds.
13. The method according to any one of claims 5 to 12, wherein step S13 further comprises: Step S131, obtaining the associated template entity based on the template file; Step S132, creating a corresponding configuration entity for each template entity; Step S133, performing attribute configuration on 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 are processed; Step S135, repeating steps S132-S134 until all template entities are processed; Step S136: forming a tree-structured configuration entity set and generating a parameter file.
14. The method according to claim 13, further comprising step S137, Save the parameter file; and / or Generate application system files based on template files and generated parameter files.
15. The method according to any one of claims 13-14, wherein in step S132, Each template entity includes an entity unique identifier and an entity quantity expression. The number of created configuration entities is obtained through the entity quantity expression, and the unique identifier of each template entity is associated with one or more created configuration entities.
16. The method according to any one of claims 13 to 15, wherein if the template entity has a parent node, the created configuration entity is set as a child configuration entity of the configuration entity corresponding to the parent node.
17. The method according to any one of claims 13 to 16, wherein step S133 further comprises the following steps: Step S1331, obtaining the configuration attributes of the template entity corresponding to the current configuration entity, where: The configuration attributes include attribute identifier, attribute type and attribute value; Step S1332: Obtain the key and value of the configuration attribute, and create a configuration attribute table using the key-value pair, wherein the attribute identifier of the configuration attribute is used as the key of the configuration attribute, and 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 pair.
18. The method according to any one of claims 13 to 16, wherein step S136 further comprises: Step S1361: Associating entity nodes corresponding to the template entity and template sub-entities through ownership relationships to form a tree structure with a hierarchical relationship; Step S1362: All configuration entities having a tree structure and / or a single structure are combined to form a configuration entity set; Step S1363: Generate the configuration entity set into a text file, which is a parameter file.
19. The method according to any one of claims 1 to 18, wherein The step S2 comprises the following steps: Step S21, loading template file and parameter file; Step S22, verifying the template file and parameter file; Step S23, generating an application system file based on the template file and the parameter file; Step S24: Generate an application system based on the application system file.
20. The method according to claim 19, wherein step S21 further comprises: Step S211, receiving and loading the parsed template file and the corresponding parameter file; Step S212: Load the local template file and the corresponding local parameter file selected by the user.
21. The method according to claim 19 or 20, wherein step S22 further comprises: Step S221, respectively obtaining the template entity associated with the template file and the configuration entity associated with the parameter file; Step S222: Verify whether the template entity corresponding to each configuration entity exists. If so, proceed to step S223. Step S223, verify whether the tree structures of the template file and the parameter file are 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 so, proceed to the next step S23 to generate an application system file.
22. The method according to claim 21, step S221, further comprising: Step S2211: deserialize the template file into a template file object, where the template file object contains multiple template entities, each template entity includes multiple template attributes, multiple template logic blocks, multiple template associators, and multiple template sub-entities; Step S2212: deserialize the parameter file into a configuration file object, where the configuration file object contains multiple configuration entities, and each configuration entity contains one or more configuration attributes; Each template entity is associated with multiple configuration entities through a unique identifier.
23. The method according to claim 21, wherein In the step S222, if it is verified that the template entity corresponding to each configuration entity does not exist; or In the step S223, if the tree structures of the verification template file and the parameter file are inconsistent; or In step S224, if the unique identifier of a configuration attribute of a configuration entity is verified to be inconsistent with the template attribute of the corresponding template entity, one or more of the following steps are performed: Prompt that verification failed; or Return to step S21 and reload the correct template file and parameter file; or Return to step S13 to regenerate the correct parameter file.
24. The method according to any one of claims 19 to 23, wherein step S23 further comprises: Step S231, generating a logic file based on the template file and the parameter file; Step S232, loading the driver file required by the logic file; Step S233, creating a navigation file based on each configuration entity in the parameter file; Step S234: Generate application system files based on the navigation files.
25. The method according to claim 24, wherein step S231 further comprises: Step S2311, creating a corresponding logic source file based on the configuration entity; Step S2312, configuring all template attributes of the template entity; Step S2313: configure all template logic blocks of the template entity, and add all corresponding micro-blocks to the logic source file according to the content of the logic block; Step S2314: configure all template associators of the template entity, and connect the logic micro-blocks in the logic source files corresponding to both sides of the template associator by adding connection micro-blocks; Step S2315: Generate a logic file based on the logic source file and save it into the corresponding navigation file.
26. The method according to claim 24, wherein in step S232, based on the type of the microblock in the logic file, the driver file required by the microblock is loaded into the currently generated application system file, comprising: Step S2321: query and load the driver file required by the microblock in the driver file library according to the type of the microblock; or Step S2322: Select and load the driver file pre-stored in the local application system file.
27. The method according to claim 24, 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: establishing associations between all configuration entities and the generated logic files and driver files in each navigation node; Step S2334: Generate a navigation file based on the navigation node and the navigation file directory.
28. The method according to any one of claims 1 to 27, further comprising, before or after step S1, step S3, editing the template file, which comprises: Step S31, creating a new template file according to the type and requirements of the application system; Step S32, revising the specified template file according to user requirements; Step S33: Generate a new template file and export or store it.
29. The method according to any one of claims 1 to 27, further comprising step S4 of customizing a logic micro-block, which comprises: Step S41, obtaining a logic microblock extension interface; Step S42, generating a logic micro-block definition file through the logic micro-block extension interface and the customized logic micro-block program; Step S43: Generate a logic file of the custom logic micro-block.
30. The method of claim 2, wherein: The attribute group includes 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.
31. The method according to claim 30, wherein the attribute type of the attribute configuration comprises: Static attributes, fixed attribute values saved in the template file, are obtained by parsing the template file according to the attribute value data type; User attributes reflect the characteristics of the application system and user needs. They are attribute values obtained based on user input. The expression attribute is formed as an expression in the template file. It is the value obtained by secondary calculation based on the previously obtained attribute value during template parsing. After the template parsing is completed, the value remains unchanged in the subsequent process.
32. The method according to claim 2, wherein The logic group includes one or more logic blocks, each logic block is used to describe a function of the entity to which it belongs, and each logic block is associated with other attributes or other logic blocks of the entity to which it belongs through an associator.
33. The method according to claim 32, wherein Each of the logic blocks includes one or more logic microblocks, which include connection microblocks for realizing data connection and algorithm microblocks with a single data processing function. Each logic microblock includes 0 or more input pins, 0 or more output pins, and an algorithm module.
34. The method according to claim 33, 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.
35. The method according to claim 33, wherein the data processing method of the logic micro-block comprises: Mathematical operations, including digital operations, logical operations, bit operations, data type conversion, and mathematical function operations; Control algorithms, including input and output, network protocol integration, logic algorithms, branch control operations, gate circuit logic, and proportional-integral-differential regulation; Edge computing, including aggregation operations, matrix operations, SQL operations, neural networks, and database support; Extended support for calls, including Python calls, EnergyPlus calls, Excel calls, and Matlab calls.
36. The method of claim 2, wherein: The associator group includes one or more associators, each of which is used to associate a certain logic block with other attributes of the entity or other logic blocks to which it belongs, so that the data storage addresses of the associated parties in the generated application system are the same.
37. The method of claim 31, wherein The expression attribute in the entity attribute is associated with other attributes through the globally unique identifier that identifies the corresponding element in its expression.
38. The method of claim 31, wherein The calculation of the expression attributes is performed according to the sorting order of the expression attributes in the template file during the process of parsing the template file and generating the parameter file.
39. The method according to claim 36, wherein The processing of the input data and output data associated by the associator is performed after the application system has been generated and deployed and during the system operation.
40. The method of claim 2, wherein: In the template file, each entity further includes a sub-entity group, which includes one or more sub-entities, and each sub-entity describes a component with the same type of characteristics in the entity.
41. An implementation system of an application system, characterized in that: include: Template editor (1), used to edit and generate template files required by application systems or users; A template parser (2) generates a parameter file based on the received or called template file and the input configuration parameters; A system generator (3) generates application system files and application systems based on received or called parameter files and template files; The parameter file is a file that records configuration parameters required to configure the template file, and the configuration parameters include device parameters, control parameters, operating parameters, and demand parameters.
42. The system of claim 41, wherein: The template file is a template file that matches the application system, and includes one or more entities, each entity including at least an attribute group, a logic group, and an associator group for realizing association between the attribute groups and / or logic groups.
43. The system of claim 41, 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 configuration entity set in a tree structure; 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 entity of the template file is associated with the configuration entity corresponding to the parameter file through the corresponding globally unique identifier.
44. The system of claim 41, wherein: The application system files include: A logic file is generated based on the template file and the parameter file; The driver file is a set of driver programs required to run the logic file and is loaded based on the needs of the logic file; The navigation file is created based on each configuration entity in the parameter file and is used to establish the association relationship between the template file, parameter file, logic file and driver file so that the system can automatically call the above various files.
45. The system according to any one of claims 41 to 44, further comprising: The system template library (4) includes pre-compiled general template files or customized template files revised by users, and is used for users to import general template files and / or customized template files to generate application systems.
46. The system according to any one of claims 41 to 45, wherein: The template editor (1) creates a new template file 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 to the template parser (2) and the system generator (3) for use, or store it in the system template library (4) for the template parser (2) and the system generator (3) to call when needed.
47. The system according to any one of claims 41 to 45, wherein: The template parser (2) comprises: A template reader (21) is used to read a template file from a file system into a memory and obtain an associated template entity based on the template file; An 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 configuration entity set; A parameter configurator (23) is used to call various parameters required for the operation of the application system and / or configure parameters according to user input values of the application system; The parameter file generator (24) is used to create a parameter file, deserialize the generated configuration entity set and save it to the parameter file, and / or save the attribute values to the parameter file in real time when the attribute configurator (22) traverses it, and save the file to the file system after the traversal is completed and send it to the system generator (3).
48. The system of claim 47, wherein: The attribute configurator (22) performs attribute configuration in the following manner: Obtaining configuration attributes of the template entity corresponding to the current configuration entity, wherein the configuration attributes include attribute identifier, attribute type, and attribute value; Obtain the key and value of the configuration attribute, and create a configuration attribute table with the key-value pair, 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 pair.
49. The system according to claim 47, wherein the attribute configurator (22) Each template entity includes an entity unique identifier and an entity quantity expression. The number of created configuration entities is obtained through the entity quantity expression, and the unique identifier of each template entity is associated with one or more created configuration entities.
50. The system of claim 47, wherein: The attribute configurator (22) further associates the entity nodes corresponding to the template entity and the template sub-entity through the ownership relationship to form a tree structure with a superior-subordinate relationship, and combines all configuration entities with the tree structure and / or single structure into a configuration entity set.
51. The system according to any one of claims 41 to 45, wherein: In the template file and the parameter file generated by it, all attributes, connectors, and logic appearing in the template file are set with their own independent global 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 global unique identifier.
52. The system according to any one of claims 41 to 45, wherein: The system generator (3) comprises: A 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; A logic builder (32) generates a corresponding logic file for each configuration entity based on the template file and the parameter file, and loads the driver file required by the logic file; A navigation builder (33) creates a corresponding navigation file based on each configuration entity in the parameter file and its corresponding logic file; A system file generator (34) generates an application system file based on the navigation file.
53. The system of claim 52, wherein: The file loader (31) verifies the template file and the parameter file in the following manner: Get the template entity associated with the template file and the configuration entity associated with the parameter file respectively; Verify whether the template entity corresponding to each configuration entity exists. If so, proceed to the next step; Verify whether the tree structures of the template file and the parameter file are consistent. If they are consistent, proceed to the next step; Verify whether the unique identifiers of all configuration attributes of each configuration entity match. If so, generate the application system file accordingly.
54. The system of claim 52, wherein: In the file loader (31), If the template entity corresponding to each configuration entity does not exist; or If the tree structures of the verification template file and the parameter file are 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, Prompt that verification failed; or Reload the correct template file and parameter file; or Regenerate the correct parameter file.
55. The system of claim 52, wherein: The navigation builder (33) generates a navigation file by the following operations: Traverse the configuration entity collection and create a corresponding navigation node for each configuration entity; Check whether each configuration entity has hidden attributes. If not, create a navigation file directory corresponding to the configuration entity based on all navigation nodes; Establish associations between all configuration entities and generated logic files and driver files in each navigation node; Generates navigation files based on navigation nodes and navigation file directories.
56. The system of claim 52, wherein: The logic builder (32) generates the logic file in the following manner: Traverse the configuration entity collection in the parameter file and check whether each configuration entity has attributes, logic blocks or associators; If yes, create corresponding logic source files based on each configuration entity; Configure all properties of each configuration entity in the logic source file; Configure all logic blocks of each configuration entity in the logic source file, and add all corresponding micro blocks in the logic source file according to the content of the logic block; Configure all associators of each configuration entity in the logic source file, and connect the logic micro-blocks in the logic source files corresponding to the template associators by adding connection micro-blocks; Generate logic files based on logic source files and save them in corresponding navigation files.
57. The system of claim 52, wherein: The logic builder (32) loads the driver files required by the logic file in the following manner: Querying and loading the driver file required by the microblock in the driver file library according to the type of the microblock; or Select and load the driver file pre-stored in the local application system file.
58. The system according to any one of claims 41 to 45, wherein the template editor (1) further comprises: The logic microblock library (5) pre-encapsulates universal logic microblocks and / or specialized logic microblocks applicable to various industries. The template editor (1) calls these logic microblocks according to the needs of various industry projects and automatically generates template files or generates template files according to the input instructions or parameters of professionals.
59. The system of claim 58, wherein: The logic microblock library (5) includes the following logic microblock sub-libraries according to the data processing type: Mathematical operation sub-library (51), including logic micro-blocks for processing digital operations, logical operations, bit operations, data type conversion, and mathematical function operations; A control algorithm sub-library (52), including logic micro-blocks for processing input and output, network protocol integration, logic algorithms, branch control operations, gate circuit logic, and proportional integral differential regulation; Edge computing sub-library (53), including logic micro-blocks for processing aggregation operations, matrix operations, SQL operations, neural networks, and database support; Extended support sub-library (54), including logic micro-blocks for calling Python, EnergyPlus, Excel, and Matlab.
60. The system according to claim 58 or 59, wherein the template editor (1) further comprises: The logic microblock extension interface (6) is used by the template editor (1) to generate a new logic block or logic microblock, or to edit an existing logic block or logic microblock, or to customize a logic block or logic microblock with a specific function to generate a custom logic microblock.
61. The system of claim 45, wherein: The system template library (4) includes at least one of the following: Heating template files for domestic hot water systems, air source solar hybrid heating template files, and electric boiler heating template files; Template files for ground source heat pump air conditioning systems, multi-split air conditioning systems, and lithium bromide unit systems used in HVAC control systems; Architectural lighting system template files, urban street lighting system template files, and factory lighting system template files for intelligent lighting systems.
62. The system of any one of claims 41-61, wherein: The attribute group includes 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.
63. The system of claim 62, wherein: The attribute types of the attribute configuration include: Static attributes, fixed attribute values saved in the template file, are obtained by parsing the template file according to the attribute value data type; User attributes reflect the characteristics of the application system and user needs. They are attribute values obtained based on user input. The expression attribute is formed as an expression in the template file. It is the value obtained by secondary calculation based on the previously obtained attribute value during template parsing. After the template parsing is completed, the value remains unchanged in the subsequent process.
64. The system of any one of claims 41-61, wherein: The logic group includes one or more logic blocks, each logic block is used to describe a function of the entity to which it belongs, and each logic block is associated with other attributes or other logic blocks of the entity to which it belongs through an associator.
65. The system of claim 64, wherein: Each of the logic blocks includes one or more logic microblocks, which include connection microblocks for realizing data connection and algorithm microblocks with a single data processing function. Each logic microblock includes 0 or more input pins, 0 or more output pins, and an algorithm module.
66. The system of claim 64, wherein: The data types of the input pins 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.
67. The system of any one of claims 41-61, wherein: The associator group includes one or more associators, each of which is used to associate a certain logic block with other attributes of the entity or other logic blocks to which it belongs, so that the data storage addresses of the associated parties in the generated application system are the same.
68. The system of claim 63, wherein: The expression attribute in the entity attribute is associated with other attributes through the globally unique identifier that identifies the corresponding element in its expression.
69. The system of claim 63, wherein: The calculation of the expression attributes is performed according to the sorting order of the expression attributes in the template file during the process of parsing the template file and generating the parameter file.
70. The system of claim 67, wherein: The processing of the input data and output data associated by the associator is performed after the application system has been generated and deployed and during the system operation.
71. The method according to any one of claims 41 to 61, wherein In the template file, each entity further includes a sub-entity group, which includes one or more sub-entities, and each sub-entity describes a component with the same type of characteristics in the entity.
Citation Information
Patent Citations
Automated design method and platform oriented to intelligent hardware system development
CN105608254A
Generation method and device of application system and electronic equipment
CN114721627A
Electric power business expandable development framework based on low code and visual dragging
CN115826936A
Continuous integration and delivery method, device and system of heterogeneous system
CN116185359A
Micro-service configuration file management method and device, equipment and storage medium
CN117008957A
