A Dynamic Deployment Method, Terminal and Storage Medium for an Edge Controller
By building a communication protocol interface model and execution task model in the development environment of the IEC61499 standard, and generating a collection of management commands, the dynamic deployment of edge controllers is achieved, solving the problem that edge controllers cannot dynamically connect to non-pre-deployed communication protocols in the prior art, and improving work efficiency.
Patent Information
- Application Number
- CN202211032412.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-08-26
AI Technical Summary
Existing edge controllers cannot dynamically connect to industrial edge nodes that use non-pre-deployed communication protocols, resulting in frequent shutdowns on edge controllers for function updates, affecting work efficiency.
By building and adding communication protocol interface models and execution task models in the development environment of the extended IEC61499 standard, and generating a collection of management commands based on these models, downloading them to the operating environment of the edge controller, dynamic deployment of communication protocols and execution task models is achieved.
The edge controller dynamically deploys non-pre-deployed communication protocols and task models without frequent downtime, improving the efficiency of edge computing.
Smart Images

Figure CN115576663B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge computing technology, and in particular to a dynamic deployment method, terminal and storage medium of an edge controller. Background Art
[0002] Industrial edge computing converts the physical quantities of control in the OT field into data supported by communication protocols and development languages in the IT field at the edge of the device, pre-processes and pre-analyzes massive data for cloud computing tasks, and improves the timeliness and efficiency of decision optimization. Based on this, edge controllers using high-performance embedded hardware platforms and real-time general operating systems have emerged. The edge controller is a physical interface between IT and OT, which can simultaneously complete real-time process control and non-real-time edge computing communication functions, and locally uses the real-time domain information of the control object as the basis for the computing process in the non-real-time domain for online and instant processing, thereby improving optimization efficiency.
[0003] Existing edge controllers need to deploy industrial real-time Ethernet communication protocols for control tasks, and also need to integrate non-real-time communication protocols for tasks such as data collection and interconnection. In order to meet the needs of multi-source heterogeneous data collection in industrial environments, current edge controllers often pre-set a large number of real-time and non-real-time communication protocols during the product delivery phase to meet the multi-source heterogeneous data in industrial environments as much as possible. In other words, current edge controllers cannot dynamically connect to industrial edge nodes that use non-pre-deployed communication protocols, resulting in the edge controllers needing to shut down frequently for functional updates, affecting work efficiency. Summary of the invention
[0004] The main purpose of the present invention is to provide a dynamic deployment method, terminal and storage medium of an edge controller, aiming to solve the problem in the prior art that the edge controller cannot dynamically connect to industrial edge nodes that use non-pre-deployed communication protocols, resulting in the edge controller needing to be frequently shut down for functional updates, affecting work efficiency.
[0005] To achieve the above object, an embodiment of the present invention provides a method for dynamically deploying an edge controller, the method comprising:
[0006] A development environment for edge controllers built on the expanded IEC61499 standard, adding a pre-built communication protocol interface component library and a function block component library;
[0007] The development environment generates corresponding execution task models and communication protocol interface models based on the function block component library and the communication protocol interface component library;
[0008] The development environment converts the execution task model, communication protocol interface model, and their corresponding parameter configuration information into management commands of the extended IEC61499 standard to form a set of management commands, and downloads the set of management commands to the operating environment of an edge controller built based on the extended IEC61499 standard;
[0009] Based on the communication protocol interface model in the set of management commands, the operating environment creates commands and creates a target communication protocol corresponding to the operating environment according to the industrial edge node corresponding to the operating environment;
[0010] Based on the execution task model in the set of management commands, the operating environment creates commands and creates a target execution task model corresponding to the operating environment according to the industrial edge node corresponding to the operating environment;
[0011] The operating environment completes dynamic deployment based on the target execution task model and the target communication protocol.
[0012] Optionally, the operating environment generates a corresponding execution task model based on the function block component library, specifically including:
[0013] The development environment constructs a corresponding function block network according to each function block in the function block component library;
[0014] The development environment generates a number of execution task models according to the topological structure information of the function block network.
[0015] Optionally, the model types of the execution task model at least include: one-time execution type, periodic type, and sporadic type; the method further includes:
[0016] When the model type of the execution task model is the periodic type or the sporadic type, the development environment determines the shared function blocks of each execution task model;
[0017] The development environment constructs a synchronous read-write lock model according to the shared function blocks and stores it in the development environment.
[0018] Optionally, the method further includes:
[0019] Adding the communication protocol interface model to the device model of the IEC61499 standard;
[0020] Adding the execution task model and the synchronous read-write lock model between the resource model and the function block model of the IEC61499 standard.
[0021] Optionally, the method further includes:
[0022] The development environment determines the initial worst-case response time of each execution task model according to the worst-case execution time, execution task priority, and cycle parameters of the function block instances of each execution task model;
[0023] In the case where the initial worst-case response time is greater than the running deadline of the execution task model, adjust the cycle parameters of the execution task model, and determine the new worst-case response time based on the adjusted cycle parameters until the adjusted worst-case response time is less than or equal to the running deadline;
[0024] Determine the schedulability of the execution task model according to the worst-case response time and the running deadline.
[0025] Optionally, the running environment creates commands based on the communication protocol interface model in the management command set, and creates the target communication protocol corresponding to the running environment according to the industrial edge node corresponding to the running environment, specifically including:
[0026] The running environment creates commands according to the communication protocol interface model, and obtains the communication protocol component directory of the communication protocol interface model;
[0027] Determine the target communication protocol type corresponding to the running environment according to the industrial edge node corresponding to the running environment;
[0028] Create the target communication protocol corresponding to the running environment according to the communication protocol component directory and the configuration parameter list in the management command set.
[0029] Optionally, the creating of the target communication protocol of the running environment according to the communication protocol component directory and the configuration parameter list in the management command set specifically includes:
[0030] According to the communication protocol component directory, call the source code or dynamic link library of the target communication protocol and deploy it to the running environment to obtain the target communication protocol;
[0031] According to the configuration parameter list in the management command set, perform parameter configuration on the target communication protocol to complete the creation of the target communication protocol in the running environment.
[0032] Optionally, the running environment creates commands based on the execution task model in the management command set, and creates the target task model corresponding to the running environment according to the industrial edge node corresponding to the running environment, specifically including:
[0033] The operating environment creates a target function block network corresponding to the operating environment based on the function block network management command in the management command set and according to the industrial edge node corresponding to the operating environment.
[0034] The operating environment determines pointers of each target function block instance in the target function block network according to the function block list in the execution task model creation command.
[0035] Based on the target function block network, a corresponding target execution task model is generated, and pointers of each target function block instance are added to the execution function block queue.
[0036] Optionally, the method further includes:
[0037] The operating environment determines a shared target function block in the target execution task model as a synchronization read-write lock object according to the synchronization read-write lock object creation command in the management command set.
[0038] The operating environment obtains a pointer of the shared target function block according to the function block name of the shared target function block.
[0039] The operating environment assigns the pointer corresponding to the pointer of the shared target function block as the address of the synchronization read-write lock object.
[0040] Optionally, the operating environment completes dynamic deployment based on the target execution task model and the target communication protocol, which specifically includes:
[0041] The operating environment activates all target execution task models in the operating environment according to the start command of the resource model oriented to the IEC61499 standard; the target execution task model corresponds to a real-time thread or a non-real-time thread.
[0042] The operating environment calls the target execution task model according to the preset priority and running period of the target execution task model.
[0043] Optionally, the operating environment calls the target execution task model according to the preset priority and running period of the target execution task model, which specifically includes:
[0044] The operating environment schedules and executes function block instances in the ready state inside the target execution task model to complete the call of the target execution task model.
[0045] The scheduling of the function block instance includes: an asynchronous scheduling mode based on an event buffer queue and a synchronous scheduling mode based on a sequential function block queue.
[0046] To achieve the above object, an embodiment of the present invention further provides a terminal, which includes: a processor and a memory; a computer-readable program executable by the processor is stored on the memory; when the processor executes the computer-readable program, the steps in the dynamic deployment method of the edge controller described in any one of the above are implemented.
[0047] To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the dynamic deployment method of the edge controller described in any one of the above.
[0048] An embodiment of the present invention provides a dynamic deployment method, a terminal and a storage medium for an edge controller. By constructing and adding a communication protocol interface model and an execution task model in a development environment constructed by an extended IEC61499 standard, and further extending the original management commands according to the extended communication protocol interface model and execution task model, a management command set is obtained and sent to the corresponding operating environment, so as to realize the dynamic deployment of the communication protocol in the operating environment, and realize the dynamic deployment of the non-pre-deployed communication protocol adopted by the corresponding industrial edge nodes in the edge controller. The edge controller does not need to frequently stop for function updates, further improving the working efficiency of edge computing. Description of the Drawings
[0049] Figure 1 is a flowchart of the dynamic deployment method of the edge controller provided by an embodiment of the present invention;
[0050] Figure 2 is a flowchart of constructing a communication protocol interface provided by an embodiment of the present invention;
[0051] Figure 3 is an example diagram of defining a communication protocol interface component library and configuring multiple different communication protocols for communication function blocks in a development environment provided by an embodiment of the present invention;
[0052] Figure 4 is an example diagram of generating an execution task model and a synchronous read-write lock model from a function block network provided by an embodiment of the present invention;
[0053] Figure 5 is a system block diagram of the edge controller provided by an embodiment of the present invention;
[0054] Figure 6 is an example diagram of the dynamic deployment method of the edge controller provided by an embodiment of the present invention;
[0055] Figure 7 is a structural schematic diagram of the terminal provided by an embodiment of the present invention. Detailed implementation manners
[0056] To make the objectives, technical solutions and advantages of the present invention clearer and more definite, the following further describes the present invention in detail with reference to the accompanying drawings and by way of examples. It should be understood that the specific examples described herein are only used to explain the present invention, and are not used to limit the present invention.
[0057] Industrial edge computing preprocesses and analyzes massive data for cloud computing tasks by converting the control physical quantities in the OT field into data supported by the communication protocols and development languages in the IT field at the edge side of the device, improving the timeliness and efficiency of decision optimization. Currently, industrial edge computing is implemented by setting a Programmable Logic Controller (PLC) at the edge side of the device. However, the PLC relies on a dedicated embedded chip with limited storage and computing capabilities, and the real-time operating system it runs is highly closed and cannot be compatible with most non-real-time software in the IT field. Therefore, in order to simultaneously complete real-time control and the analysis and processing of massive data, in the prior art, a hardware configuration of an edge gateway is externally connected to the PLC, the task of data analysis and processing is deployed in the gateway which is essentially an industrial computer, and the data acquisition function is developed for the communication interfaces and communication protocols used by different PLCs to provide data for the edge computing applications in the gateway.
[0058] With the development of technology, edge controllers using high-performance embedded hardware platforms and real-time general operating systems have emerged with the improvement of the performance of embedded processors such as ARM / RISC-V and the maturity of real-time extension technologies for general operating systems. The edge controller can simultaneously complete real-time process control and non-real-time edge computing communication functions, and instantaneously process online the real-time domain information of the control object as the basis for the intelligent computing process in the non-real-time domain, improving the optimization efficiency. The edge controller has a higher integration level and can reduce the difficulty of system development and integration.
[0059] Since the current industrial edge controllers need to deploy both industrial real-time Ethernet communication protocols for control tasks and non-real-time communication protocols for tasks such as data acquisition and interconnection and interoperability. The adaptation of a wide variety of industrial network protocols and the conversion of data transmission formats have greatly increased the complexity of the development work of industrial edge control software functions. Therefore, in order to meet the processing of multi-source heterogeneous data in the industrial environment, the currently existing edge controllers usually adopt the form of pre-setting a large number of real-time and non-real-time communication protocol component libraries and function block component libraries at the product delivery stage. Under this static edge control software architecture, for industrial edge nodes that do not pre-deploy communication protocols or function block components, the edge controller needs to frequently stop for function updates to be able to be used, affecting work efficiency.
[0060] Figure 1 The dynamic deployment method of the edge controller provided by the embodiment of the present invention is as follows Figure 1 As shown, the dynamic deployment method of the edge controller provided by the embodiment of the present invention can be implemented at least through the following steps:
[0061] S101. Expand the conceptual definition of the IEC61499 standard for the edge controller.
[0062] In the embodiment of the present invention, in order to achieve the dynamic deployment of the edge controller, it is first necessary to expand the conceptual definition of the IEC61499 standard.
[0063] Specifically, the configuration definitions corresponding to the device model and resource model of the IEC61499 standard are expanded through the Backus-Naur paradigm grammar description form adopted in Appendix B of Part 1 of the IEC61499 standard. A communication protocol interface configuration is added and expanded in the device model of the IEC61499 standard to support dynamic deployment. An execution task model configuration and a synchronous read-write lock model configuration are expanded in the resource model of the IEC61499 standard. Then, the management command set of the IEC61499 standard is expanded through the document type definition (DTD) file form adopted in Part 4 of the IEC61499 standard, and the execution task model, synchronous read-write lock model, and communication protocol interface model are used as the Request action objects of the management commands.
[0064] Among them, the configuration definition stipulates the specific elements that the target objects of the IEC61499 standard (the target objects include: resource model, device model, function block model, management model, etc.) can contain.
[0065] S102. Add a pre-built communication protocol interface component library and a function block component library to the development environment of the edge controller built based on the expanded IEC61499 standard.
[0066] The above-mentioned pre-built communication protocol interface component library consists of multiple pre-built communication protocol interfaces, and the above-mentioned pre-built function block component library consists of multiple pre-built function blocks.
[0067] As Figure 2 shown, in the embodiment of the present invention, the construction of the communication protocol interface can be achieved through the following steps:
[0068] S201. Build a corresponding communication protocol interface based on the industrial Internet and industrial fieldbus corresponding to the edge controller.
[0069] S202. Declare the protocol type, communication protocol component directory, communication protocol configurable parameter list, and communication protocol function call interface list of the communication protocol corresponding to each communication protocol interface according to the attributes of each communication protocol interface.
[0070] S203. Determine the directory location of the source code or dynamic link library of each communication protocol interface.
[0071] Through the above steps S201 - S203, the construction of the communication protocol interface can be completed, and a pre - constructed communication protocol interface can be obtained.
[0072] In the embodiment of the present invention, the communication protocol interface can be saved in the form of a text in Extensible Markup Language (XML) format.
[0073] During the system development process, the communication protocol interface selected from the communication protocol interface component library is instantiated, and the parameters of the communication protocol interface are configured, as Figure 3 shown. The development environment of the edge controller can configure different unique identifiers for the communication protocol interfaces in the communication protocol interface component library and the instantiated and configured communication protocol interface components. In the embodiment of the present invention, a 128 - bit Globally Unique Identifier (GUID) can be used for identification.
[0074] In some embodiments of the present invention, corresponding function blocks can be constructed according to the industrial Internet faced by the edge controller. The function blocks can include communication function blocks, computing function blocks, control function blocks, etc.
[0075] In the embodiment of the present invention, communication function blocks based on the publish / subscribe mode and communication function blocks based on the client / server mode can be established respectively according to the standard specifications of the IEC61499 standard. The main function of this communication function block is to define the interaction logic between the external interface and the internal service. According to the behavior mechanisms defined by different communication protocols, appropriate communication function blocks can be selected from the function block component library to be associated with the communication protocol interfaces in the communication protocol interface component library.
[0076] For example, for the MQTT protocol interface, according to the message subscription communication behavior mechanism it adopts, it is encapsulated into a client / server type communication function block; for the OPC UA protocol interface that includes two communication protocols, it is simultaneously encapsulated into two types of communication function blocks: publish / subscribe and client / server. In the embodiments of the present invention, the encapsulation method can select specific functions according to the function call interface list of the communication protocol interface to achieve the specific logic of the unified call interface inside the communication function block, which is used to trigger services such as connection creation / closing, data sending / receiving, etc. The source code obtained after encapsulation or the dynamic link library obtained after compilation is saved in the directory specified by the corresponding communication protocol interface.
[0077] S103. The development environment generates corresponding execution task models and communication protocol interface models based on the function block component library and the communication protocol interface component library respectively, and adds them to the development environment of the edge controller.
[0078] In some embodiments of the present invention, the development environment can construct a corresponding function block network according to each function block in the function block component library; then the development environment generates several execution task models according to the topological structure information of the function block network, so as to realize that the development environment generates corresponding execution task models according to the function block component library.
[0079] Specifically, in the development environment, by selecting the required function blocks from the function block component library and connecting the event and data ports between the function blocks, a function block network including communication, computing, and control function blocks is generated. Among them, for the configuration of the communication function block, it is necessary to configure the external input data port named ID and specify the value of this port as the globally unique identifier of the communication protocol interface instantiated in the device model.
[0080] Furthermore, for the constructed function block network, the development environment determines the service interface function block in this function block network. And further determines that this service interface function block is a service response interface function block or a service call interface function block. In the case where this service interface function block is a service response interface function block, the development environment creates a corresponding execution task model τ i , and along all the event connections of this function block network, maps the involved function blocks to the function block list parameter of the execution task model. The obtained execution task set is defined as ν = {τ 1 , K, τ n}, where i represents the priority, and the smaller the value, the higher the priority. According to the monotonic rate scheduling strategy, the shorter the period T of the execution task, the higher its priority. The execution task model τ i contains multiple function block instances, defined as F(τ i) = {f i,0 Kf i,j}. The execution task model τ i and τ j The set of shared function blocks between them is defined as: f k ∈F(τ i ) ∩ F(τ j ).
[0081] In the embodiments of the present invention, after generating the execution task model, the model type of each execution task model is determined. Among them, the model type of the execution task model may include: one-time execution type (usually used for initializing function blocks), periodic type, and sporadic type.
[0082] In some embodiments of the present invention, when the model type of the execution task model is periodic type or sporadic type, the development environment determines the shared function blocks of each execution task model; then constructs a synchronous read-write lock model according to the shared function blocks and stores it in the development environment.
[0083] That is to say, for the execution task models of periodic type and sporadic type, the development environment determines the shared function block instances by traversing each function block instance in the execution task model, and then constructs a synchronous read-write lock model according to the shared function block instances, as Figure 4 shown.
[0084] In the embodiments of the present invention, considering the topological structure in which multiple execution task models share the same function block instance. This topological structure will cause the problem of inconsistent internal states of function block instances caused by concurrent execution during operation. In the embodiments of the present invention, by constructing a synchronous read-write lock model, both the execution efficiency and the accuracy of concurrent execution are taken into account.
[0085] As Figure 5 , 6 shown, in some embodiments of the present invention, the communication protocol interface model can be added to the device model of the IEC61499 standard; the execution task model and the synchronous read-write lock model are added between the resource model and the function block model of the IEC61499 standard.
[0086] In some embodiments of the present invention, a method for determining the schedulability of each execution task model is further provided. Specifically, the development environment determines the initial worst-case response time of each execution task model according to the worst-case execution time, execution task priority, and period parameter of the function block instances of each execution task model; in the case where the initial worst-case response time is greater than the running deadline of the execution task model, the period parameter of the execution task model is adjusted, and a new worst-case response time is determined based on the adjusted period parameter until the adjusted worst-case response time is less than or equal to the running deadline; then, based on the adjusted worst-case response time and the running deadline, the schedulability of the execution task model is determined.
[0087] In an embodiment of the present invention, the worst-case execution time (WCET) can be configured for each function block corresponding to the task execution model, defined as c i,j . For each execution task model τ i , according to the worst-case execution time, execution task priority, and period parameter of the function block, its worst-case response time R i is calculated. i The worst-case response time R i is compared with the running deadline D
[0088] to determine the schedulability of the execution task module. i The worst-case response time R i of the execution task model τ i includes its own worst-case execution time C i , the blocking time B i caused by waiting for low-priority tasks to run and share function blocks, and the waiting time I i caused by high-priority execution tasks pre-empting and running. In addition, when the execution task model τ
[0089] adopts different function block list execution strategies, the execution time of the event buffer queue or the sequential function block queue will also be introduced, but this factor is a negligible constant after the mapping between the execution task and the function block network topology is completed. i Among them, the worst-case execution time C i of the execution task model τ
[0090]
[0091] is defined as the sum of the worst-case execution times of all function blocks inside the execution task model: i Without considering the dynamic reconfiguration of the function block network structure, the blocking time B iSum of worst - case execution times of shared functional blocks:
[0092]
[0093] Latency I i Is related to the number of times that all execution tasks with priorities higher than i suspend τ i And is calculated as:
[0094]
[0095] Based on this, the worst - case response time of the execution task model τ i Can be obtained by solving the least - fixed point of the following formula:
[0096]
[0097] Rewrite the above formula into the following form:
[0098]
[0099] Through the above formula, the development environment can solve its least - fixed point through an iterative algorithm, Where the iterative termination condition is At this time Is the worst - case response time of the execution task model τ i Then, compare the calculated worst - case response time of the execution task model with the running deadline of the task. If the worst - case response time of the execution task model exceeds the running deadline, it means that the execution task model under this configuration does not meet the schedulability constraint, and parameters such as the period of the execution task model need to be adjusted.
[0100] In the embodiments of the present invention, through schedulability analysis of the execution task model using the worst - case response time, it is possible to verify the real - time task parameter configuration during the development stage. And the worst - case response time of the execution task model is based on the worst - case execution times of the functional - block instances included in the execution task model, thus fully considering two real - time influencing factors: being blocked by low - priority tasks and being suspended by high - priority tasks.
[0101] In some embodiments of the present invention, there are configuration parameter objects for a communication protocol interface model, an execution task model, a synchronization read-write lock model, and a function block instantiation, which are used to initialize the models and perform dynamic configuration and query during runtime. Among them, the parameters of the communication protocol interface model include the communication protocol type, the storage path of the protocol source code or dynamic link library, the configuration parameter list, and the protocol function call interface list. The parameters of the execution task model include: period value, priority, and running deadline. The parameters of the synchronization read-write lock model include: the instance name of the shared function block, and the waiting timeout threshold. The parameters of the function block instance include: the worst-case execution time.
[0102] S104. The development environment converts the execution task model, the communication protocol interface model, and their corresponding parameter configuration information into management commands that conform to the extended IEC61499 standard, forms a management command set, and downloads the management command set to the runtime environment constructed based on the extended IEC61499 standard.
[0103] In the embodiments of the present invention, after the definition of the function block network and the scheduling parameter configuration of the execution task model are completed, the development environment traverses all modeling elements and automatically generates a corresponding management command set of IEC61499. Its format is XML text, which includes creation commands, parameter write commands, and start commands for objects such as the resource-oriented model, communication protocol interface model, function block model, and event / data port connection. The management command set of IEC61499 is sent to the runtime environment through the network for parsing.
[0104] S105. The runtime environment creates the target communication protocol corresponding to the runtime environment based on the creation command of the communication protocol interface model in the management command set.
[0105] Specifically, the runtime environment obtains the communication protocol component directory of the communication protocol interface model according to the creation command of the communication protocol interface model; determines the target communication protocol type corresponding to the runtime environment according to the corresponding runtime environment; and creates the target communication protocol corresponding to the runtime environment according to the communication protocol component directory and the configuration parameter list in the management command set.
[0106] Furthermore, according to the communication protocol component directory, the source code or dynamic link library of the target communication protocol is called and deployed to the runtime environment to obtain the target communication protocol; and according to the configuration parameter list in the management command set, the target communication protocol is parameter-configured to complete the creation of the target communication protocol in the runtime environment.
[0107] In an embodiment of the present invention, the operating environment creates a command according to the communication protocol interface model issued by the development environment. First, according to the document type definition (DTD) file form adopted by the IEC61499 standard, the second parameter in the communication protocol interface model creation command is parsed, that is, the communication protocol component directory in the communication protocol interface model. Among them, the communication protocol component directory in the communication protocol interface model defines the source code or dynamic link library file path for storing the encapsulated specific communication protocol implementation interface to the unified communication function block call in the operating environment.
[0108] After the operating environment parses and obtains the communication protocol component directory, it respectively calls the built-in C language interpreter for interpretation and execution, or obtains function pointers by loading dynamic link libraries through the system call interface. Calling the built-in C language interpreter for interpretation and execution is applicable to lightweight industrial Internet of Things communication protocols without real-time constraints, such as the MQTT protocol; while obtaining function pointers by loading dynamic link libraries through the system call interface is mainly applicable to industrial network communication protocols with complex mechanisms or real-time constraints, such as the OPC UA or EtherCAT protocol.
[0109] Through the above method, the operating environment completes the dynamic deployment and function call of the communication protocol at the code level, and adds this protocol type to the protocol type management class inside it. The type name is given by the first parameter (i.e., the protocol type) of the communication protocol interface model creation command.
[0110] Furthermore, the operating environment parses the third parameter in the communication protocol interface model creation command, that is, the configuration parameter list. The configuration parameter list defines a set of configuration parameters for a specific communication in the form of a key-value pair list, including parameter names and parameter data types. Different configuration parameter objects are separated by special characters. After the operating environment parses and obtains the complete configuration parameter list, each parameter is instantiated in the form of an object, and all objects are saved in an array, which is used to save the configuration parameter values provided during the subsequent initialization of the communication function block and configure the underlying communication protocol interface.
[0111] S106. The operating environment creates a target execution task model corresponding to the operating environment according to the execution task model creation command in the management command set, based on the industrial edge node corresponding to the operating environment.
[0112] Specifically, the operating environment creates a target function block network corresponding to the operating environment based on the function block network management commands in the management command set according to the industrial edge nodes corresponding to the operating environment; the operating environment determines the pointers of each target function block instance in the target function block network according to the function block list in the execution task model creation command; the operating environment generates a corresponding target execution task model based on the target function block network and adds the pointers of each target function block instance to the execution function block queue.
[0113] Further, the operating environment determines the shared target function block in the target execution task model as the synchronization read-write lock object according to the synchronization read-write lock object creation command in the management command set; the operating environment obtains the pointer of the shared target function block according to the function block name of the shared target function block; the operating environment assigns the pointer corresponding to the pointer of the shared target function block as the address of the synchronization read-write lock object.
[0114] Furthermore, the operating environment activates all target execution task models in the operating environment according to the start command of the resource model oriented to the IEC61499 standard; the target execution task model corresponds to a real-time thread or a non-real-time thread; the operating environment calls the target execution task model according to the preset priority and operating cycle of the target execution task model.
[0115] Further, the operating environment schedules and executes the function block instances in the ready state inside the target execution task model to complete the call of the target execution task model; the scheduling of the function block instances includes: an asynchronous scheduling model based on an event buffer queue and a synchronous scheduling mode based on a sequential function block queue.
[0116] In the embodiment of the present invention, the operating environment creates the remaining objects according to the standard specifications, including a resource model, a function block model, and an event / data port connection, to form a conventional function block network. On this basis, an execution task model oriented to the operating system is created, and the system call interfaces under different platforms will be encapsulated in the same operating system abstraction layer, thereby forming a unified execution task model call interface (such as creating / starting / stopping a task, setting a scheduling policy, configuring a period and a priority, etc.). On the basis of successful creation, the operating environment parses the function block list parameters included in the execution task model creation command to obtain the pointers of the corresponding function block instances and adds them to the execution function block queue of the execution task model itself.
[0117] Further, the operating environment parses the command for creating a synchronized read-write lock object, and correspondingly creates a synchronization object for the operating system (such as a semaphore, etc.). The system call interfaces of different platforms will be encapsulated in a unified operating system abstraction layer, thus forming a unified call interface for the synchronization object model (such as creating / deleting synchronization objects, waiting and releasing locks, etc.). For non-shared functional block instances, the synchronization object pointers they contain are null. During the creation of the synchronized read-write lock object, the operating environment obtains the pointer to the corresponding functional block instance according to the functional block name included in the execution task model creation command, and assigns the synchronization object pointer it contains to the address of the newly created synchronized read-write lock object.
[0118] The operating environment parses the write command for the ID parameter of the communication functional block in the execution task model, and extracts the value in the command parameter. This value is set as the globally unique identifier of an instantiated communication protocol interface model in the device model. The operating environment obtains the pointer to the instantiated model by traversing the corresponding component model list, so as to load and configure it and realize the call of specific communication protocol functions.
[0119] The operating environment parses the start command for the resource model and activates all the execution task models included therein. Each execution task model corresponds to a real-time or non-real-time thread of the underlying operating system, and the system schedules the thread set according to the configured priority and running period. Further, when the execution task model runs, it schedules and executes the internal ready state functional block instances. The scheduling methods include an asynchronous scheduling mode based on an event buffer queue and a synchronous scheduling mode based on a sequential functional block queue. Before executing each functional block instance, the execution task module needs to determine whether the pointer to its synchronization protection object is null. If it is not null, it needs to perform an operation to request a synchronization lock, and release the synchronization lock after the functional block instance is executed.
[0120] S107. The operating environment completes dynamic deployment based on the target execution task model and the target communication protocol.
[0121] Through the dynamic deployment method of the edge controller provided by the embodiments of the present invention, aiming at the deficiencies of the dynamic deployment of communication protocols not specified in the IEC61499 standard and the configuration and operation mechanisms of the mixed scheduling of real-time and non-real-time tasks, the conceptual extension definition is carried out on the premise of following the existing standard reference architecture, and the development environment and operation environment of specific edge controllers are implemented under the extended standard guidance. On this basis, in the development environment, edge control application development and task schedulability analysis are carried out based on the combination and configuration of function blocks, and the verified model is deployed to the operation environment through the extended management command set. The operation environment dynamically parses the management commands, instantiates communication protocol interface components, real-time / non-real-time tasks and other objects for configuration, so as to realize the dynamic deployment of multiple communication protocols on the edge controller and the mixed scheduling execution of real-time / non-real-time tasks.
[0122] The dynamic deployment method of the edge controller provided by the embodiments of the present invention divides the dynamic integration process of different communication protocols into two parts: the deployment of specific type communication protocol components and the deployment of general communication function blocks under the IEC61499 standard framework. The former deploys the function call interface of the specific protocol to the operation environment in the form of source code or dynamic link library, and defines a configurable parameter list; the latter establishes a mapping relationship with the model instance of the specific protocol component through the value of the input data port, and realizes the call of the underlying communication protocol component in a protocol-independent manner, so as to improve the generality of the communication protocol deployment mechanism.
[0123] Based on the dynamic deployment method of the edge controller provided by the embodiments of the present invention, the embodiments of the present invention also provide a terminal, such as Figure 7 shown, which includes at least one processor 70; a display screen 71; and a memory 72, and may further include a communication interface 73 and a bus 74. Among them, the processor 70, the display screen 71, the memory 72 and the communication interface 73 can communicate with each other through the bus 74. The display screen 71 is set to display the user guidance interface preset in the initial setting mode. The communication interface 73 can transmit information. The processor 70 can call the logical instructions in the memory 72 to execute the dynamic deployment method of the edge controller in the above embodiments.
[0124] In addition, when the logical instructions in the above-mentioned memory 72 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0125] The memory 72, as a computer-readable storage medium, can be configured to store software programs and computer-executable programs, such as the program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 30 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 72, that is, implements the methods in the above embodiments.
[0126] The memory 72 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory 72 may include high-speed random access memory and may also include non-volatile memory. For example, various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes can also be transient storage media.
[0127] Based on the method for dynamic deployment of an edge controller provided in the embodiments of the present invention, the embodiments of the present invention also provide a computer-readable storage medium, and the one or more programs can be executed by one or more processors to implement the steps in the method for dynamic deployment of the edge controller described in the above embodiments.
[0128] In addition, the specific processes of loading and executing multiple instructions by the instruction processor in the above storage medium and terminal have been described in detail in the above method, and will not be repeated here one by one.
[0129] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0130] Of course, those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware (such as processors, controllers, etc.) through a computer program. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disc, etc.
[0131] It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or modifications can be made according to the above description, and all such improvements and modifications shall fall within the protection scope of the appended claims of the present invention.
Claims
1. A dynamic deployment method for an edge controller, characterized in that, the method includes: Extend the IEC61499 standard. The IEC61499 standard adds a device model, a resource model, and a document type definition. For the development environment of the edge controller built based on the extended IEC61499 standard, add a pre-built communication protocol interface component library and a function block component library; Based on the function block component library and the communication protocol interface component library, the development environment respectively generates corresponding execution task models and communication protocol interface models; The development environment converts the execution task models, communication protocol interface models, and their corresponding parameter configuration information into management commands of the extended IEC61499 standard to form a management command set, and downloads the management command set to the operating environment of the edge controller built based on the extended IEC61499 standard; The operating environment creates commands based on the communication protocol interface models in the management command set, and creates the target communication protocol corresponding to the operating environment according to the industrial edge nodes corresponding to the operating environment; The operating environment creates commands based on the execution task models in the management command set, and creates the target execution task model corresponding to the operating environment according to the industrial edge nodes corresponding to the operating environment; The operating environment completes the dynamic deployment based on the target execution task model and the target communication protocol.
2. The method according to claim 1, characterized in that, the operating environment generates a corresponding execution task model based on the function block component library, specifically including: The development environment constructs a corresponding function block network according to each function block in the function block component library; The development environment generates a number of execution task models according to the topological structure information of the function block network.
3. The method according to claim 2, characterized in that, the model types of the execution task models at least include: one-time execution type, periodic type, sporadic type; the method further includes: When the model type of the execution task model is a periodic type or a sporadic type, the development environment determines the shared function blocks of each execution task model; The development environment constructs a synchronization read-write lock model according to the shared function blocks and stores it in the development environment.
4. The method according to claim 3, characterized in that, the method further includes: Adding the communication protocol interface model to the device model of the IEC61499 standard; Adding the execution task model and the synchronization read-write lock model between the resource model and the function block model of the IEC61499 standard.
5. The method according to claim 1, characterized in that, the method further includes: The development environment determines the initial worst-case response time of each execution task model according to the worst-case execution time, execution task priority, and cycle parameters of the function block instances of each execution task model; In the case that the initial worst - case response time is greater than the running deadline of the execution task model, adjust the period parameter of the execution task model, and determine a new worst - case response time based on the adjusted period parameter until the adjusted worst - case response time is less than or equal to the running deadline; Determine the schedulability of the execution task model according to the worst - case response time and the running deadline.
6. The method according to claim 1, wherein, the running environment creates a command based on the communication protocol interface model in the management command set, and creates a target communication protocol corresponding to the running environment according to the industrial edge node corresponding to the running environment, specifically including: the running environment creates a command according to the communication protocol interface model and obtains the communication protocol component directory of the communication protocol interface model; determine the target communication protocol type corresponding to the running environment according to the industrial edge node corresponding to the running environment; create the target communication protocol corresponding to the running environment according to the communication protocol component directory and the configuration parameter list in the management command set.
7. The method according to claim 6, wherein, the creating of the target communication protocol of the running environment according to the communication protocol component directory and the configuration parameter list in the management command set specifically includes: call the source code or dynamic link library of the target communication protocol according to the communication protocol component directory and deploy it to the running environment to obtain the target communication protocol; perform parameter configuration on the target communication protocol according to the configuration parameter list in the management command set to complete the creation of the target communication protocol in the running environment.
8. The method according to claim 1, wherein, the running environment creates a command based on the execution task model in the management command set, and creates a target task model corresponding to the running environment according to the industrial edge node corresponding to the running environment, specifically including: the running environment creates a target function - block network corresponding to the running environment based on the function - block network management command in the management command set according to the industrial edge node corresponding to the running environment; the running environment determines the pointers of each target function - block instance in the target function - block network according to the function - block list in the execution task model creation command; generate a corresponding target execution task model based on the target function - block network, and add the pointers of each target function - block instance to the execution function - block queue.
9. The method according to claim 8, wherein, the method further includes: the running environment determines a shared target function - block in the target execution task model as a synchronization read - write lock object according to the synchronization read - write lock object creation command in the management command set; the running environment obtains the pointer of the shared target function - block according to the function - block name of the shared target function - block; the running environment assigns the pointer corresponding to the pointer of the shared target function - block as the address of the synchronization read - write lock object.
10. The method according to claim 9, wherein, The operating environment completes dynamic deployment based on the target execution task model and the target communication protocol, specifically including: The operating environment activates all target execution task models in the operating environment according to the startup command of the resource model oriented to the IEC61499 standard; the target execution task models correspond to real-time threads or non-real-time threads; The operating environment calls the target execution task models according to the preset priorities and operating cycles of the target execution task models.
11. According to the method described in claim 10, wherein, The operating environment calls the target execution task models according to the preset priorities and operating cycles of the target execution task models, specifically including: The operating environment schedules and executes the function block instances in the ready state inside the target execution task model to complete the call to the target execution task model; The scheduling of the function block instances includes: an asynchronous scheduling mode based on an event buffer queue and a synchronous scheduling mode based on a sequential function block queue.
12. A terminal, wherein, including: a processor and a memory; a computer-readable program executable by the processor is stored on the memory; when the processor executes the computer-readable program, the steps in the dynamic deployment method of the edge controller described in any one of claims 1 to 11 are implemented.
13. A computer-readable storage medium, wherein, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the dynamic deployment method of the edge controller described in any one of claims 1 to 11.
Citation Information
Patent Citations
IM (Intelligent Manufacturing) oriented edge computing controller and work method thereof
CN109709811A
A multi-tenant real-time process controller for edge cloud environments
WO2021118420A1