An algorithm integration system and an algorithm calling method based on algorithm integration

By providing an algorithm integration system containing multiple units, the algorithm integration problem of different languages ​​in the prior art is solved, standardized and fast integration and visual configuration of algorithms are realized, development efficiency and scalability are improved, and the function of running calls according to the configuration sequence is supported.

CN119225719BActive Publication Date: 2025-03-04SUPCON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411745032.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-04
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The existing technology is difficult to directly integrate algorithms developed in different languages ​​in the software, resulting in strong code coupling and large custom development volume, which cannot meet the diversity and scalability needs of advanced control software, cannot visualize and quickly integrate, the degree of reusability of code, and the inability to run calls according to the configuration order.

Method used

An algorithm integration system is provided, including an algorithm dll generation unit, an interface packaging unit, a parameter information conversion unit, a function block library configuration unit and a graphical integration unit. Through these units, it realizes standardized and fast integration and visual configuration of algorithms, supports algorithm calls in multiple development languages, and runs the call methods according to the specified order of the configuration.

Benefits of technology

It improves the efficiency of developers' integrated algorithms and the scalability of the algorithm integration process, realizes high repeatability and flexibility of code, and can perform algorithm operation and call calls according to the specified order of configuration, improving the mutual fusion and control effect between multiple algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225719B_ABST
    Figure CN119225719B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of algorithm integration, and in particular to an algorithm integration system and an algorithm calling method based on algorithm integration, comprising: an algorithm dll generation unit, which generates a corresponding algorithm dll according to an algorithm to be integrated and an algorithm interface specification; an interface packaging unit, which is used to package the accessed parameter information into an identifiable object of a parameter information conversion unit; a parameter information conversion unit, which is used to convert the packaged parameter information into an identifiable object of a function block library configuration unit; a function block library configuration unit, which is used to configure a function block library according to the converted parameter information and the function block interface; and a graphical integration unit, which performs visual processing on the function block according to the parameter information of the algorithm to be integrated mapped by the function block. The function block library based on the visual processing can be used to configure the control logic of the controller. Its beneficial effect is that while supporting multiple development language algorithms, the efficiency of the integrated algorithm and the scalability of the algorithm integration process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of algorithm integration, and in particular to an algorithm integration system and an algorithm calling method based on algorithm integration. Background Art

[0002] With the development of advanced process control software (APC) technology, the requirements for algorithm performance and functions are increasing day by day, and there are more and more algorithm dll generation units. In order to display the algorithm more intuitively, a visual algorithm integration platform needs to be implemented. In order to achieve the building block configuration and high scalability of the visual algorithm integration platform, to meet the needs of expanding algorithms for the visual algorithm integration platform, and to reduce repeated development costs, it is necessary to implement standardized and rapid integration of algorithm dll generation units. In order to meet the algorithm fusion, a controller calls multiple algorithms according to the order specified by the user, and it is necessary to implement the algorithm operation call according to the order specified during configuration.

[0003] Integrating algorithms through basic DLL integration technology requires custom development of DLL calling code at the bottom layer. Every time a DLL is added, custom development of the call to the DLL is required. The stability of the algorithm integration platform cannot be guaranteed, multiple algorithms cannot be integrated uniformly, cannot be quickly integrated in a configuration manner, cannot decouple algorithms, and cannot visualize the configuration and display of the algorithm dll generation unit content.

[0004] Therefore, there is an urgent need for an algorithm integration system that can support multiple development language algorithms while improving the efficiency of developers in integrating algorithms and the scalability of the algorithm integration process. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides an algorithm integration system and an algorithm calling method based on algorithm integration, which solve the technical problems of directly integrating algorithms developed in different languages ​​in software, strong code coupling, large amount of customized development, inability to meet the requirements of advanced control software integration diversity and scalability, inability to visualize and quickly integrate, low degree of code reusability, and inability to run calls according to the configuration sequence.

[0007] (II) Technical solution

[0008] In order to achieve the above object, the main technical solutions adopted by the present invention include:

[0009] In a first aspect, an embodiment of the present invention provides an algorithm integration system, including: an algorithm dll generation unit, an interface packaging unit, a parameter information conversion unit, a function block library configuration unit and a graphical integration unit;

[0010] The algorithm dll generating unit is used to generate an algorithm dll corresponding to each algorithm to be integrated according to the received at least one algorithm to be integrated and the preset algorithm interface IAPCWRAPPER, each algorithm dll has a corresponding algorithm dll name, and each algorithm dll has a corresponding algorithm interface; each algorithm dll includes parameter information corresponding to the algorithm to be integrated;

[0011] The interface packaging unit is used to package the parameter information corresponding to each algorithm dll accessing the interface packaging unit into an identifiable object of the parameter information conversion unit according to a preset first algorithm packaging rule;

[0012] A parameter information conversion unit, which converts the parameter information after each algorithm dll is packaged into an identifiable object of the function block library configuration unit according to the parameter information after all algorithm dlls are packaged and a preset second algorithm conversion rule;

[0013] The function block library configuration unit is used to configure the function block library according to the parameter information converted by each algorithm dll and at least one predefined function block interface; the function block library includes at least one configured function block, each function block has a corresponding function block name, and each function block maps a corresponding algorithm to be integrated;

[0014] The graphical integration unit is used to perform visualization processing on all functional blocks according to the parameter information of the algorithm to be integrated mapped by each functional block.

[0015] Optionally, the system comprises at least one interface packaging unit;

[0016] The algorithm dll generating unit is further used to connect each algorithm dll to the corresponding interface packaging unit through the algorithm interface of the algorithm dll according to the development language type preset for each algorithm to be integrated.

[0017] Optionally, the interface packaging unit is further used to obtain parameter information of each algorithm dll connected to the interface packaging unit according to a preset GetVarsInfo interface;

[0018] The parameter information conversion unit is also used to obtain the parameter information of each algorithm dll packaged according to a preset GetList interface.

[0019] Optionally, the algorithm dll generating unit is further used to name the algorithm dll corresponding to each algorithm to be integrated based on parameter information of each algorithm to be integrated and a preset first naming rule;

[0020] The function block library configuration unit is further used to name each function block based on parameter information of all algorithms to be integrated mapped by each function block and a preset second naming rule.

[0021] Optionally, the parameter information includes parameter type and parameter attribute;

[0022] The parameter attributes include ID, INDEX, value, value type, Chinese name and English name;

[0023] The parameter types include configuration parameters, input parameters, output parameters and custom configuration parameters;

[0024] The first algorithm packaging rule is a rule for packaging parameter information corresponding to the algorithm dll into a recognizable object of a parameter information conversion unit; the recognizable object of the parameter information conversion unit includes a BaseParam parameter object or a ParamInfo parameter object;

[0025] The second algorithm conversion rule is a rule for converting the parameter information packaged by the algorithm dll into a ParamInfo parameter object;

[0026] The graphical integration unit is used to perform visualization processing on all functional blocks according to the parameter information of the algorithm to be integrated mapped by each functional block, including:

[0027] According to the parameter information of the algorithm to be integrated mapped by each functional block, the corresponding functional block is visualized in the form of a single graphic element;

[0028] The graphic element corresponding to each visualized function block displays the corresponding algorithm name, algorithm type, input pin and output pin.

[0029] Optionally, the function block library configuration unit configures the function block library according to the parameter information converted by each algorithm dll and at least one predefined function block interface, including:

[0030] Input the converted parameter information of all algorithm dlls and at least one predefined function block interface into a pre-set function block library configuration tool, read the converted parameter information of the received algorithm dll that meets the corresponding function block interface by dynamic reflection, establish a mapping relationship between each function block interface and the algorithm dll corresponding to the function block, and generate the corresponding function block according to the mapping relationship between each function block interface and the algorithm dll corresponding to the function block, that is, configure the function block library;

[0031] Each of the functional blocks maps at least one algorithm dll.

[0032] In a second aspect, an embodiment of the present invention provides an algorithm calling method based on algorithm integration, the method is implemented based on a function block library constructed by the above algorithm integration system, and the method includes:

[0033] S10, configuring the controller logic according to the received configuration information and the function block names corresponding to all the function blocks in the function block library; the configuration information includes the specified function block name, the pin information of all the specified function blocks and the execution order between all the specified function blocks, and the operation parameters corresponding to each specified function block;

[0034] S20, running the controller based on the controller logic after configuration is completed;

[0035] During this period, based on the pin information of all designated function blocks and the execution order between all designated function blocks, as well as the operating parameters corresponding to each designated function block, the function blocks in the control logic are executed one by one, and when each function block in the control logic is running, the algorithm for mapping the function block is automatically run.

[0036] Optionally, all function blocks in the function block library are displayed in the form of graphic elements, and each graphic element includes an algorithm name, an algorithm type, an input pin, and an output pin;

[0037] The S10 includes:

[0038] S10-1. According to the function block names specified in the received configuration information, all function blocks corresponding to the specified function block names are called one by one from the first preset area, and placed in the second preset area; the first preset area is the function block library area, and the second preset area is the controller logic configuration area;

[0039] S10-2, configuring the input pins and output pins of all the function blocks in the second preset area according to the pin information of all the specified function blocks in the configuration information;

[0040] S10-3. Based on the operating parameters corresponding to each designated functional block in the configuration information, configure the operating parameters of all functional blocks in the second preset area.

[0041] Optionally, the S20 includes:

[0042] Run the controller based on the configured controller logic;

[0043] During this period, all designated function blocks in the second preset area are executed one by one according to the execution order among all designated function blocks in the second preset area;

[0044] When all designated function blocks in any second preset area start to run, actual input parameters of the function blocks are obtained based on a preset GetVarsData interface; the actual input parameters are implemented in the form of a structure;

[0045] Based on the received parameter value of the actual input parameter of the function block, the actual input parameter is set, and the parameter value of the input parameter is passed to the algorithm mapped by the function block through the preset SetVarsData interface;

[0046] The algorithm mapped by the function block is called through the preset Execute interface to run;

[0047] Finally, the results of the algorithm operation are fed back to the corresponding function block through the GetVarsData interface.

[0048] Optionally, the S20 further includes:

[0049] When the controller is running based on the controller logic after configuration, the information transmission between all specified function blocks is in the form of pins, and the output of the previous function block is passed to the input of the next function block.

[0050] (III) Beneficial effects

[0051] The beneficial effects of the present invention are as follows: an algorithm integration system and an algorithm calling method based on algorithm integration of the present invention, due to direct integration of algorithms and use of universal standardized interfaces, have high code repeatability and strong scalability compared to the prior art, allowing developers to complete the integrated development of algorithm dll generation units more quickly, greatly improving flexibility and development efficiency, while being able to perform algorithm operation calls according to the specified order of configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a schematic diagram of the structure of an algorithm integration system according to Embodiment 1 of the present invention;

[0053] Figure 2 This is a flow chart of an algorithm calling method based on algorithm integration according to Embodiment 2 of the present invention;

[0054] Figure 3 An algorithm DLL integration platform and operation scheduling method according to Embodiment 3 of the present invention;

[0055] Figure 4 This is a framework diagram of the algorithm DLL integration platform and operation scheduling method according to Example 3 of the present invention. DETAILED DESCRIPTION

[0056] In order to better explain the present invention and facilitate understanding, some words are explained below.

[0057] APC: Advanced process control software, widely used in process industry. Advanced control is based on process computer system (DCS\PLC\FCS) and host computer as implementation platform, based on conventional control, with the entire production device or key unit as control object, to achieve high-performance control of large, complex, multi-variable and constrained processes. It is a type of optimization control strategy, such as model predictive control and intelligent control.

[0058] ARC: Agile control software is an intelligent control platform software that includes a graphical designer. It uses a variety of built-in function blocks in the function block library to reasonably configure different on-site needs, and ultimately helps users to quickly build a control model that meets actual needs and achieve all-round monitoring and control.

[0059] dll: DLL (Dynamic Link Library) files are dynamic link library files, also known as "application extensions", and are software file types. In Windows, many applications are not complete executable files, they are divided into some relatively independent dynamic link libraries, namely DLL files, and placed in the system.

[0060] Algorithm interface IAPCWRAPPER: Algorithm interface IAPCWRAPPER is a convention for encapsulating algorithm platform components. It is used to define the interface and interaction specifications of algorithm modules to achieve cross-language integration and calling of algorithms, and promote interoperability between different algorithms.

[0061] The present invention will be described in detail below through specific implementation modes in conjunction with the accompanying drawings.

[0062] An algorithm integration system and an algorithm calling method based on algorithm integration proposed in an embodiment of the present invention have high code repeatability and strong scalability compared with the prior art due to direct algorithm integration and use of universal standardized interfaces, allowing developers to complete the integrated development of algorithm dll generation units more quickly, greatly improving flexibility and development efficiency, and at the same time, the algorithm can be run and called according to the specified order of the configuration.

[0063] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0064] Example 1

[0065] This embodiment provides an algorithm integration system, whose structure is as follows: Figure 1 As shown, it includes: an algorithm dll generation unit, an interface packaging unit, a parameter information conversion unit, a function block library configuration unit and a graphical integration unit;

[0066] The algorithm dll generation unit is used to generate an algorithm dll corresponding to each algorithm to be integrated according to at least one algorithm to be integrated received and a preset algorithm interface IAPCWRAPPER, wherein each algorithm dll has a corresponding algorithm dll name, and each algorithm dll has a corresponding algorithm interface; each algorithm dll includes parameter information corresponding to the algorithm to be integrated; usually the parameter information includes parameter type and parameter attributes; the parameter attributes include ID, INDEX, value, numerical type, Chinese name and English name; the parameter type includes configuration parameters, input parameters, output parameters and custom configuration parameters.

[0067] The interface packaging unit is used to obtain the parameter information of each algorithm dll of the access interface packaging unit according to a preset GetVarsInfo interface, and to package the parameter information corresponding to the algorithm dll of each access interface packaging unit into a recognizable object of the parameter information conversion unit according to a preset first algorithm packaging rule; the first algorithm packaging rule is a rule for packaging the parameter information corresponding to the algorithm dll into a recognizable object of the parameter information conversion unit; the recognizable object of the parameter information conversion unit includes a BaseParam parameter object or a ParamInfo parameter object.

[0068] The parameter information conversion unit obtains the parameter information packaged by each algorithm dll according to a preset GetList interface, and converts the parameter information packaged by each algorithm dll into a recognizable object of the function block library configuration unit according to the parameter information packaged by all algorithm dlls and a preset second algorithm conversion rule; the second algorithm conversion rule is a rule for converting the parameter information packaged by the algorithm dll into a ParamInfo parameter object.

[0069] Input the converted parameter information of all algorithm dlls and at least one predefined function block interface into the pre-set function block library configuration tool, read the converted parameter information of the algorithm dll received that meets the corresponding function block interface by dynamic reflection, establish the mapping relationship between each function block interface and the algorithm dll corresponding to the function block, and generate the corresponding function block according to the mapping relationship between each function block interface and the algorithm dll corresponding to the function block, that is, configure the function block library; each of the function blocks maps at least one algorithm dll, that is, according to the complexity of the algorithm, a function block can map multiple algorithms. Generally, when a function block maps multiple algorithms, the complexity of these algorithms is low. For example, if function block A maps three algorithms, algorithm B, algorithm C and algorithm D, the function blocks A corresponding to the three algorithms, algorithm B, algorithm C and algorithm D, have the same external structure, but the algorithm information and function block names therein are different.

[0070] The function block library includes at least one configured function block, each function block has a corresponding function block name, and each function block maps a corresponding algorithm to be integrated;

[0071] A graphical integration unit visualizes the corresponding function blocks in the form of a single graphic element according to the parameter information of the algorithm to be integrated mapped to each function block;

[0072] The graphic element corresponding to each visualized function block displays the corresponding algorithm name, algorithm type, input pin and output pin.

[0073] Generally, there are two or more interface packaging units, and the algorithm dll generation unit is also used to connect each algorithm dll to the corresponding interface packaging unit through the algorithm interface of the algorithm dll according to the pre-set development language type of each algorithm to be integrated.

[0074] Furthermore, in order to enhance the readability, maintainability and organizeability of the algorithm dll and function blocks, the algorithm dll and function blocks can be named, and the algorithm dll generation unit is also used to name the algorithm dll corresponding to each algorithm to be integrated based on the parameter information of each algorithm to be integrated and a pre-set first naming rule; specifically, the first naming rule starts with I and ends with Wrapper, that is, I******Wrapper.dll.

[0075] The function block library configuration unit is also used to name each function block based on the parameter information of all algorithms to be integrated mapped by each function block and a preset second naming rule. Specifically, the second naming rule ends with Block, that is, ******Block.dll.

[0076] An algorithm integration system proposed in an embodiment of the present invention has high code repeatability and strong scalability compared to the prior art due to direct algorithm integration and use of universal standardized interfaces, allowing developers to complete the integrated development of algorithm dll generation units more quickly, greatly improving flexibility and development efficiency.

[0077] Example 2

[0078] An algorithm calling method based on algorithm integration, the method is implemented based on the function block library constructed in Example 1, the method is as follows Figure 2 As shown, including:

[0079] S10, configuring the controller logic according to the received configuration information and the function block names corresponding to all the function blocks in the function block library; the configuration information includes the specified function block name, the pin information of all the specified function blocks and the execution order between all the specified function blocks, and the operation parameters corresponding to each specified function block;

[0080] Specifically, according to the function block name specified in the received configuration information, all function blocks corresponding to the specified function block names are called one by one from the first preset area and placed in the second preset area; the first preset area is the function block library area, and the second preset area is the controller logic configuration area;

[0081] According to the pin information of all specified function blocks in the configuration information, the input pins and output pins of all function blocks in the second preset area are configured;

[0082] Based on the operating parameters corresponding to each designated functional block in the configuration information, the operating parameters of all functional blocks in the second preset area are configured.

[0083] S20, running the controller based on the controller logic after configuration is completed;

[0084] During this period, based on the pin information of all designated function blocks and the execution order between all designated function blocks, as well as the operating parameters corresponding to each designated function block, the function blocks in the control logic are executed one by one, and when each function block in the control logic is running, the algorithm for mapping the function block is automatically run.

[0085] Specifically, according to the execution order among all the specified function blocks in the second preset area, all the specified function blocks in the second preset area are executed one by one;

[0086] When all designated function blocks in any second preset area start to run, actual input parameters of the function blocks are obtained based on a preset GetVarsData interface; the actual input parameters are implemented in the form of a structure;

[0087] Based on the received parameter value of the actual input parameter of the function block, the actual input parameter is set, and the parameter value of the input parameter is passed to the algorithm mapped by the function block through the preset SetVarsData interface;

[0088] The algorithm mapped by the function block is called through the preset Execute interface to run;

[0089] Finally, the results of the algorithm operation are fed back to the corresponding function block through the GetVarsData interface.

[0090] When the controller is run based on the controller logic after configuration, the information between all specified function blocks is transmitted in the form of pins, and the output of the previous function block is transmitted to the input of the next function block.

[0091] The algorithm calling method based on algorithm integration provided in this embodiment provides a fast, convenient, efficient, visual, highly stable and highly scalable algorithm integration strategy, as well as an operation calling strategy for calling algorithms in a user-specified order. It makes algorithm integration faster and more stable, breaks the barriers of algorithm development languages, supports algorithms in multiple development languages, and visually displays algorithm dll generation units in the form of graphics primitives on the canvas interface. Through the visual configuration tool, it is simpler, faster and more stable to add algorithm function blocks to the algorithm integration platform. It greatly improves the work efficiency of developers in integrating algorithms and the scalability of the algorithm integration platform. It improves the mutual integration and control effects between multiple algorithms.

[0092] Example 3

[0093] This embodiment provides an algorithm DLL integration platform and operation scheduling method, and its specific process is as follows: Figure 3 As shown, it is specifically applied to advanced control / agile control software, mainly including three parts: visual algorithm integration, graphical configuration and operation scheduling.

[0094] Its structure Figure 4 As shown, specifically including:

[0095] The algorithm dll generation unit (algorithm interface layer) completes the algorithm module development of the algorithm to be integrated according to the pre-agreed algorithm interface IAPCWRAPPER. It can integrate algorithms developed in various syntaxes such as C\C++ and generate corresponding algorithm dlls. The naming rule of each algorithm dll starts with I and ends with Wrapper, that is, I******Wrapper.dll.

[0096] Parameter information is used as the data interaction object, and parameter information includes parameter attributes and parameter types. Parameter attributes include but are not limited to ID, INDEX, value, numeric type, Chinese name, English name, etc. Parameter types are divided into configuration parameters, input parameters, output parameters, custom configuration parameters, etc.

[0097] Configuration parameters are initialization parameters. Input and output parameters will be displayed on the function block primitives, and custom configuration parameters will be displayed on the configuration parameter interface. Custom configuration parameters are divided into three types: common parameters, bit number strategy parameters, and enumeration parameters, which are displayed in different display modes. The value types are divided into scalar, vector, and matrix.

[0098] The interface packaging unit (interface packaging layer) plays a connecting role, accessing the algorithm module developed by the language, and is used to connect the algorithm interface provided by the algorithm interface layer, identify the objects in the algorithm DLL for conversion and packaging, and provide a standardized interface that can be recognized by the function block library. In general, the interface packaging unit (interface packaging layer) is divided into the CLI interface packaging layer and the .Net interface packaging layer.

[0099] Taking the Kalman filter and gasifier modules as examples, the implementation of the CLI interface packaging layer and the .NET interface packaging layer is explained:

[0100] Taking the Kalman filter algorithm as an example, the algorithm is developed in C++. The interface wrapper layer developed by the CLI obtains the parameter list defined in the algorithm module through the GetVarsInfo interface, converts the obtained parameters into a BaseParam parameter object (CLI) recognizable by the algorithm integration platform, and passes the attribute values ​​of the parameters in the algorithm module into the BaseParam parameter object.

[0101] If it is a gasifier algorithm module, and the algorithm is developed by Fortran, the parameter list in the algorithm module is directly converted into the ParamInfo parameter object (.NET) in the algorithm integration platform.

[0102] Similarly, the properties of the algorithm module are obtained through the GetModuleInfo interface, and the remaining interfaces are implemented according to the specification.

[0103] The parameter information conversion unit and the function block library configuration unit connect to the interface provided by the interface packaging unit to obtain the parameter information and module information in the algorithm module. At the same time, based on the function block interface defined in the algorithm integration platform, the parameter information of the algorithm module is repackaged to generate the ParamInfo parameter object (.Net), which is converted into the module information, pin information, etc. displayed in the algorithm integration platform. Example:

[0104] Taking the Kalman filter algorithm as an example, the parameter list of BaseParam type is obtained through the GetList interface. According to the parameter type, the input parameter list, output parameter list and configuration parameter list of ParamInfo type will be generated.

[0105] The gasifier algorithm module can directly obtain the ParamInfo parameter list generated by the interface packaging layer, which is also divided into input parameter list, output parameter list and configuration parameter list.

[0106] The name of the function block must end with Block, i.e., ******Block.dll. Function blocks are usually displayed in the canvas of the algorithm integration platform in the form of graphics to visualize the module information and pin information contained in the corresponding algorithm module and realize the function of calling the algorithm module. Therefore, visualization processing is required.

[0107] When configuring function blocks, the configuration tool responsible for managing the configuration of the function block library (the configuration tool for integrating the algorithm dll into the function block library of the software) is used instead of the manual configuration method. All function blocks and algorithm modules that meet the interface in the directory are read through reflection, and the function block information is managed through the visualization tool. The configuration operations such as adding, modifying, and deleting function blocks are implemented more intuitively and reliably. The configured function blocks are added to the function block library of the algorithm integration platform.

[0108] The graphical integration unit (graphical integration platform) performs visualization processing on all function blocks in the function block library according to the parameter information of the algorithm to be integrated mapped by each function block.

[0109] The configuration process of the algorithm integration platform is usually presented in a graphical form. Each controller corresponds to a canvas. Function blocks are dragged from the function block library to the canvas, and the controller logic is configured in a building block manner. Each function block is displayed as a single graphic element, showing the algorithm name, algorithm type, input and output pins (i.e., the input and output parameters of the algorithm module). Data transfer between function blocks is completed in the form of pin connections. The algorithm module is displayed visually, and the execution order of the algorithm module is agreed upon during configuration.

[0110] When running the scheduling (implemented by the scheduling engine), the function blocks are executed one by one according to the running order of the function blocks specified during configuration, and the output parameters of the previous function block are passed to the input parameters of the next function block through pin connection to realize data transfer. When the function block is executed, the algorithm module contained in the function block is automatically run to realize the sequential operation and data transfer of multiple algorithm modules.

[0111] When any function block starts running, that is, when data interaction begins (when the function block is actually called), the structure object of the input parameter is first obtained through the GetVarsData interface. After setting the value, the parameter value is passed to the algorithm module through the SetVarsData interface, and then the algorithm module is called to run through the Execute interface. Finally, the result of the algorithm operation is returned to the function block through the GetVarsData interface again and finally displayed in the graphical interface of the algorithm integration platform.

[0112] This embodiment uses reflection to quickly integrate algorithm modules in the interface of the configuration management tool, with a universal standardized interface, high code reusability, and strong scalability, allowing developers to complete the integrated development of algorithm modules more quickly, greatly improving flexibility and development efficiency. The algorithm can be run and called according to the specified order of the configuration.

[0113] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0114] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0115] In the present invention, unless otherwise clearly specified and limited, when a first feature is “on” or “below” a second feature, it may be that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Moreover, when a first feature is “above”, “above” or “above” a second feature, it may be that the first feature is directly above or obliquely above the second feature, or it may simply mean that the first feature is higher in level than the second feature. When a first feature is “below”, “below” or “below” a second feature, it may be that the first feature is directly below or obliquely below the second feature, or it may simply mean that the first feature is lower in level than the second feature.

[0116] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0117] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may alter, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. An algorithm integration system, characterized in that: include: Algorithm dll generation unit, interface packaging unit, parameter information conversion unit, function block library configuration unit and graphical integration unit; The algorithm dll generating unit is used to generate an algorithm dll corresponding to each algorithm to be integrated according to the received at least one algorithm to be integrated and the preset algorithm interface IAPCWRAPPER, each algorithm dll has a corresponding algorithm dll name, and each algorithm dll has a corresponding algorithm interface; each algorithm dll includes parameter information corresponding to the algorithm to be integrated; The interface packaging unit is used to package the parameter information corresponding to the algorithm dll of each access interface packaging unit into an identifiable object of the parameter information conversion unit according to a preset first algorithm packaging rule; the first algorithm packaging rule is a rule for packaging the parameter information corresponding to the algorithm dll into an identifiable object of the parameter information conversion unit; A parameter information conversion unit, used to convert the parameter information after each algorithm dll is packaged into an identifiable object of the function block library configuration unit according to the parameter information after all algorithm dlls are packaged and a preset second algorithm conversion rule; the second algorithm conversion rule is a rule for converting the parameter information after the algorithm dll is packaged into a ParamInfo parameter object; The function block library configuration unit is used to configure the function block library according to the parameter information converted by each algorithm dll and at least one predefined function block interface; the function block library includes at least one configured function block, each function block has a corresponding function block name, and each function block maps a corresponding algorithm to be integrated; The graphical integration unit is used to perform visualization processing on all the function blocks in the function block library according to the parameter information of the algorithm to be integrated mapped by each function block.

2. The algorithm integration system according to claim 1, characterized in that: The system includes at least one interface packaging unit; The algorithm dll generating unit is further used to connect each algorithm dll to the corresponding interface packaging unit through the algorithm interface of the algorithm dll according to the development language type preset for each algorithm to be integrated.

3. The algorithm integration system according to claim 1, characterized in that: The interface packaging unit is also used to obtain parameter information of each algorithm dll connected to the interface packaging unit according to a preset GetVarsInfo interface; The parameter information conversion unit is also used to obtain the parameter information of each algorithm dll packaged according to a preset GetList interface.

4. The algorithm integration system according to claim 1, characterized in that: The algorithm dll generation unit is further used to name the algorithm dll corresponding to each algorithm to be integrated based on the parameter information of each algorithm to be integrated and a preset first naming rule; The function block library configuration unit is further used to name each function block based on parameter information of all algorithms to be integrated mapped by each function block and a preset second naming rule.

5. The algorithm integration system according to claim 1, characterized in that: The parameter information includes parameter type and parameter attributes; The parameter attributes include ID, INDEX, value, value type, Chinese name and English name; The parameter types include configuration parameters, input parameters, output parameters and custom configuration parameters; The identifiable objects of the parameter information conversion unit include BaseParam parameter objects or ParamInfo parameter objects; The graphical integration unit is used to perform visualization processing on all functional blocks according to the parameter information of the algorithm to be integrated mapped by each functional block, including: According to the parameter information of the algorithm to be integrated mapped by each functional block, the corresponding functional block is visualized in the form of a single graphic element; The graphic element corresponding to each visualized function block displays the corresponding algorithm name, algorithm type, input pin and output pin.

6. The algorithm integration system according to claim 5, characterized in that: The function block library configuration unit configures the function block library according to the parameter information converted by each algorithm dll and at least one predefined function block interface, including: Input the converted parameter information of all algorithm dlls and at least one predefined function block interface into a pre-set function block library configuration tool, read the converted parameter information of the received algorithm dll that meets the corresponding function block interface by dynamic reflection, establish a mapping relationship between each function block interface and the algorithm dll corresponding to the function block, and generate the corresponding function block according to the mapping relationship between each function block interface and the algorithm dll corresponding to the function block, that is, configure the function block library; Each of the functional blocks maps at least one algorithm dll.

7. An algorithm calling method based on algorithm integration, characterized in that: The method is implemented based on a function block library constructed based on any one of claims 1 to 6, and the method comprises: S10, configuring the controller logic according to the received configuration information and the function block names corresponding to all the function blocks in the function block library; the configuration information includes the specified function block name, the pin information of all the specified function blocks and the execution order between all the specified function blocks, and the operation parameters corresponding to each specified function block; S20, running the controller based on the controller logic after configuration is completed; During this period, based on the pin information of all designated function blocks and the execution order between all designated function blocks, as well as the operating parameters corresponding to each designated function block, the function blocks in the control logic are executed one by one, and when each function block in the control logic is running, the algorithm for mapping the function block is automatically run.

8. The algorithm calling method based on algorithm integration according to claim 7, characterized in that: All function blocks in the function block library are displayed in the form of graphic elements, and each graphic element includes the algorithm name, algorithm type, input pins and output pins; The S10 includes: S10-1. According to the function block names specified in the received configuration information, all function blocks corresponding to the specified function block names are called one by one from the first preset area, and placed in the second preset area; the first preset area is the function block library area, and the second preset area is the controller logic configuration area; S10-2, configuring the input pins and output pins of all the function blocks in the second preset area according to the pin information of all the specified function blocks in the configuration information; S10-3. Based on the operating parameters corresponding to each designated functional block in the configuration information, configure the operating parameters of all functional blocks in the second preset area.

9. The algorithm calling method based on algorithm integration according to claim 8, characterized in that: The S20 includes: Run the controller based on the configured controller logic; During this period, all designated function blocks in the second preset area are executed one by one according to the execution order among all designated function blocks in the second preset area; When all designated function blocks in any second preset area start to run, actual input parameters of the function blocks are obtained based on a preset GetVarsData interface; the actual input parameters are implemented in the form of a structure; Based on the received parameter value of the actual input parameter of the function block, the actual input parameter is set, and the parameter value of the input parameter is passed to the algorithm mapped by the function block through the preset SetVarsData interface; The algorithm mapped by the function block is called through the preset Execute interface to run; Finally, the results of the algorithm operation are fed back to the corresponding function block through the GetVarsData interface.

10. The algorithm calling method based on algorithm integration according to claim 7, characterized in that: The S20 further includes: When the controller is running based on the controller logic after configuration, the information transmission between all specified function blocks is in the form of pins, and the output of the previous function block is passed to the input of the next function block.

Citation Information

Patent Citations

  • Method and system for realizing control logic configuration of control system

    CN114398071A

  • Method for packaging and debugging mature algorithm block on user side

    CN117389547A