Embedded plug-in management method and device

By adopting management methods with the same status as all plug-ins in embedded devices, the independent parallel startup and operation of plug-ins is achieved, and the problems of slow startup speed and plug-in abnormalities in the prior art are solved, and the startup speed and fault tolerance of the device are improved.

CN119759440APending Publication Date: 2025-04-04NR ELECTRIC CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411803414.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the existing master-slave plug-in management technology, as the number of device plug-ins increases, the startup speed becomes slower, and the slave plug-in cannot run normally when the master plug-in is abnormal, and there is a lack of effective plug-in management in the operation stage.

Method used

All plug-ins are used to have the same status, without the main plug-in, each plug-in is started and run independently, and after initialization, it will send a transmission message regularly through the internal data bus. The modules in the plug-in determine whether it is running based on logic, and support hot plug-in and exception recovery.

Benefits of technology

It improves the startup speed of embedded plug-ins, reduces the device startup time, and enhances fault tolerance. It can recover without disturbance after plug-ins abnormally, and does not affect the normal operation of other plug-ins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759440A_ABST
    Figure CN119759440A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded plug-in management method and device, the management method is applied to an embedded device, and the management method comprises the following steps: in an initialization stage, all plug-ins are equal in status, are independently started in parallel, and run in parallel after being started respectively; in the pre-operation stage, each module in the plug-in judges whether to operate or not according to logic; in the operation stage, after any plug-in is reset or hot-plugged, the plug-in can be independently started again and normally operate, the starting process is undisturbed, and operation of other plug-ins is not affected. The device provided by the invention is relatively high in starting stage speed and is irrelevant to the number of the plug-ins; when part of the plug-ins are started abnormally, other plug-in modules which do not depend on the abnormal plug-ins can still run normally; in the operation stage, undisturbed reset and hot plug of any plug-in are supported, it is ensured that abnormity of a single plug-in does not affect the overall situation, and an advanced plug-in management solution is provided for the field of embedded technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of embedded technology, and in particular to an embedded plug-in management method and an embedded device. Background Art

[0002] Embedded devices are key equipment for the safe and stable operation of the energy industry, especially in power systems, industrial control and other fields. Embedded devices generally contain multiple plug-ins, which work together to achieve the functions to be achieved by the embedded device. The multiple plug-ins of an embedded device generally include a master plug-in and other slave plug-ins. The master plug-in completes the collaborative management function of each plug-in of the device, and other slave plug-ins complete other sub-functions of the device.

[0003] In the existing master-slave plug-in management technology, during the startup phase, the startup of the slave plug-in needs to rely on the master plug-in, and frequently interacts with the master plug-in during the startup process. The more slave plug-ins there are in the device, the slower the device startup speed. In addition, if any plug-in fails to start, the entire device fails to start and cannot run normally. During the operation phase, the abnormal recovery of the slave plug-in depends on the management of the master plug-in. If the master plug-in is abnormal at the same time, the slave plug-in cannot be recovered; in addition, if the master plug-in is abnormal, all slave plug-ins will be reset, causing the entire device to be abnormal, and the device will lose all normal functions in a short time.

[0004] Existing patent document 1 (CN104731028A) proposes a method for automatic signal exchange between embedded multi-CPU boards based on signal names. It is necessary to set up a main board and a slave board. During the power-on process of the device, the slave board transmits the registered variable information to the main board, which is summarized and distributed by the main board and then sent to the slave board. The patent proposes a master-slave architecture mode, which requires a large amount of data interaction and takes a long time to initialize.

[0005] Existing patent document 2 (CN105224327A) proposes an offline allocation method for variable exchange transmission addresses of embedded devices. The variable transmission address information is formed in the offline stage, so that the respective configuration texts are read from the board, and there is no need to transmit the registration variable information to the main board, which reduces the amount of data interaction and speeds up the device startup time. The patent proposes a configuration method and does not involve the startup process. Existing patent document 3 (CN110659077A) proposes a method for fast startup of an embedded multi-plug-in device. The configuration method of this patent is similar to patent document 2, and a startup process is added on its basis. That is, after the device is powered on, each plug-in parses its own configuration file to obtain the device initialization allocation information, reducing the amount of information interacting with the management plug-in. After any plug-in or process completes its own initialization, it actively notifies the management CPU plug-in to request initialization interaction, and changes the initialization process from serial to parallel processing, which greatly improves the startup speed of the device.

[0006] Compared with the solution proposed in Patent Document 1, the existing Patent Documents 2 and 3 have improved the device startup speed, but still have the following technical defects: there is still a master plug-in and management process, and the essence is still a master-slave architecture. After each plug-in is initialized, it still needs to interact with the management process, request a response, and continue to run according to the response result. The present invention goes a step further on the above basis, and proposes a method that all plug-ins have the same status, there is no master plug-in, and each plug-in is initialized and started completely in parallel, and then interacts with related information after startup, which can further improve the device startup speed.

[0007] In addition, the present invention proposes the concept of modular components within the plug-in, each module is relatively independent, and an abnormality in one module does not affect the operation of other modules.

[0008] In addition, the solutions of the existing patent documents 1, 2, and 3 only involve optimizing the initialization time and lack plug-in management during the operation phase. Summary of the invention

[0009] In order to solve the deficiencies in the prior art, the present invention provides an embedded plug-in management method and device, which can solve the technical problems in the existing master-slave plug-in management method that the startup speed slows down as the number of devices increases and the master plug-in is abnormal, causing the slave plug-in to be unusable.

[0010] The present invention adopts the following technical solution.

[0011] An embedded plug-in management method, comprising:

[0012] Initialization phase: All plug-ins are started independently and in parallel, and run in parallel after each startup;

[0013] Pre-operation stage: Each module in the plug-in determines whether to run based on logic;

[0014] Running phase: After any plug-in is reset or hot-swapped, it can be restarted independently and run normally. The startup process is disturbance-free and does not affect the operation of other plug-ins.

[0015] Preferably, the plug-ins are all intelligent plug-ins, executable programs and configurations are run on the plug-ins, the configuration on each plug-in is completed offline in advance, and the configurations of the plug-ins match each other; each plug-in includes one or more modules.

[0016] Preferably, all the plug-ins, including at least two plug-ins, communicate with each other via an internal data bus.

[0017] Preferably, the plug-ins are started independently and in parallel, comprising the following steps:

[0018] After each plug-in is powered on, the program identifies the hardware ID, performs hardware initialization, then detects the configuration, and performs software initialization according to the configuration content;

[0019] After each plug-in is initialized, it sends communication messages regularly through the internal data bus. Communication messages are divided into normal communication messages and abnormal communication messages.

[0020] If the plug-in is initialized successfully, a normal communication message is sent regularly; if the plug-in is initialized unsuccessfully, an abnormal communication message is sent regularly.

[0021] Preferably, the normal communication message content includes the initialization success result and the configuration verification code;

[0022] The abnormal communication message content includes the initialization failure result and the failure reason.

[0023] Preferably, each module in the plug-in determines whether to run according to logic, including:

[0024] (1) After each plug-in sends a communication message during the initialization phase, it enters the pre-operation phase, and each module in the plug-in determines whether to run based on logic;

[0025] (2) If the initialization of this plug-in fails, all modules in the plug-in will not run;

[0026] (3) If the plug-in is initialized successfully and some of its modules have no data dependency with other plug-ins, then these modules will run normally;

[0027] (4) If the plug-in is initialized successfully, and some of its modules depend on data input from other plug-ins, the content of the received communication message is detected. If a normal communication message from the corresponding plug-in is received, and the configuration verification codes of the plug-in and the corresponding plug-in are compared and found to be consistent, then the module of this plug-in starts to run normally. Otherwise, the module does not run.

[0028] Preferably, after any plug-in is reset or hot-swapped, it can be independently restarted and run normally, and the startup process is disturbance-free and does not affect the operation of other plug-ins, specifically including:

[0029] (1) After the plug-in is reset or hot-swapped, it starts and runs without disturbance: including successful initialization, parallel startup, and sending normal communication messages; in the pre-operation stage, it receives communication messages from other plug-ins, determines the dependency relationship between the modules in the plug-in and other plug-ins, and then starts parallel operation;

[0030] (2) Plugin operation phase: Regularly detect the communication messages of other plugins with data dependencies. If no communication messages are received within a timeout period, it is considered that the other plugins are abnormally reset or unplugged, and the abnormal flag of other plugins is set. The plugin and its dependent modules maintain the old value data or stop running, and the modules without dependencies run normally.

[0031] (3) Plug-in operation phase: Regularly check the communication messages of other plug-ins with data dependencies. If a communication message of an abnormal plug-in is received again, it is considered that the abnormal plug-in has begun to recover or the plug-in that was unplugged has been reinserted. Then the communication message of the abnormal plug-in is re-evaluated. If it is a normal communication message and is consistent with the verification code configured with this plug-in, it is considered that the abnormal plug-in has recovered successfully. This plug-in and its dependent modules update data and run. Otherwise, it is considered that the plug-in continues to be abnormal. This plug-in and its dependent modules maintain the old value data or stop running.

[0032] Preferably, if a certain plug-in fails to initialize parallel startup, other plug-in modules that depend on the plug-in stop running; if the plug-in exception disappears and normal startup is restored, normal communication messages are sent regularly through the internal data bus. After receiving the message, other plug-ins that depend on the plug-in determine the communication message of the abnormal plug-in. If it is a normal communication message and is consistent with the verification code configured with this plug-in, it is considered that the abnormal plug-in has recovered successfully, and this plug-in and its dependent modules begin to operate normally.

[0033] The present invention also proposes an embedded plug-in device for implementing the embedded plug-in management method, comprising:

[0034] (1) Parallel startup unit, used for hardware initialization and software initialization of each plug-in;

[0035] (2) Notification transmission unit, which is used to send communication messages regularly through the internal data bus after each plug-in is initialized;

[0036] (3) a judgment unit, which is used for each plug-in to judge the content of the communication message after receiving the communication message, and determine the operation logic of each module of the plug-in according to the judgment result;

[0037] (4) Parallel operation unit, used for the operation logic of each module of each plug-in.

[0038] The present invention also provides a terminal, comprising a processor and a storage medium;

[0039] The storage medium is used to store instructions;

[0040] The processor is used to operate according to the instructions to execute the steps of the embedded plug-in management method.

[0041] The present invention also proposes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the embedded plug-in management method are implemented.

[0042] The beneficial effect of the present invention is that, compared with the prior art, the embedded plug-in management method proposed by the present invention can improve the startup speed of the embedded plug-in and is not affected by the number of plug-ins. After the plug-in is abnormal, it can be restored without disturbance, without affecting the normal operation of other plug-ins, reducing the device startup time and improving the device fault tolerance. The present invention also optimizes the plug-in operation stage. After any plug-in is reset or hot-plugged, it can be restarted independently and run normally. The startup process is non-disturbing and does not affect the operation of other plug-ins. . BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the startup process of the embedded plug-in management method of the present invention;

[0044] Figure 2 It is a schematic diagram of the configuration and dependency relationship of each module in the embedded device plug-in of the present invention;

[0045] Figure 3 It is a schematic diagram of the logic judgment flow of module operation in the plug-in management method of the present invention;

[0046] Figure 4 This is a schematic diagram of the logic judgment process of the module operation in the plug-in management method of the present invention. Figure 2 ;

[0047] Figure 5 It is a schematic diagram of each unit of the embedded device of the present invention;

[0048] Figure 6 It is a schematic diagram of the structure of the embedded device of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.

[0050] like Figure 1 As shown, the present invention proposes an embedded plug-in management method, the method comprising:

[0051] Step 1, the initialization phase, all plug-ins are equal in status and are started independently and in parallel, and run in parallel after each startup;

[0052] like Figure 6 As shown, all plug-ins are intelligent plug-ins, executable programs and configurations are run on the plug-ins, the configuration on each plug-in is completed offline in advance, and the configurations of the plug-ins match each other; each plug-in includes one or more modules.

[0053] Furthermore, at least two plug-ins are included, and the multiple plug-ins communicate with each other through an internal data bus.

[0054] The independent parallel startup of the plug-in includes the following steps:

[0055] (1) After each plug-in is powered on, the program identifies the hardware ID, performs hardware initialization, then detects the configuration and performs software initialization according to the configuration content;

[0056] (2) After each plug-in is initialized, it sends communication messages regularly through the internal data bus; the communication messages are divided into normal communication messages and abnormal communication messages;

[0057] The normal communication message content includes the initialization success result and the configuration verification code; the abnormal communication message content includes the initialization failure result and the failure reason.

[0058] (3) If the plug-in is initialized successfully, a normal communication message is sent regularly; if the plug-in is initialized unsuccessfully, an abnormal communication message is sent regularly.

[0059] Step 2: After each plug-in sends a communication message during the initialization phase, it enters the pre-operation phase. Each module in the plug-in determines whether to run based on logic, including:

[0060] (1) If the initialization of this plug-in fails, all modules in the plug-in will not run;

[0061] (2) If the plugin is initialized successfully and some of its modules have no data dependencies with other plugins, then these modules will operate normally;

[0062] (3) If the initialization of this plug-in is successful, and some of its modules depend on data input from other plug-ins, then the content of the received communication message is detected, and it is determined that the normal communication message of the corresponding plug-in is received, and the configuration verification codes of this plug-in and the corresponding plug-in are compared and found to be consistent. Only then will these modules of this plug-in start to run normally, otherwise these modules will not run.

[0063] Furthermore, if a plug-in fails to initialize and start in parallel, other plug-in modules that depend on the plug-in stop running; if the plug-in's anomaly disappears and normal startup is restored, normal communication messages are sent regularly through the internal data bus. After receiving the message, other plug-ins that depend on the plug-in determine the communication message of the abnormal plug-in. If it is a normal communication message and is consistent with the verification code configured with this plug-in, it is considered that the abnormal plug-in has recovered successfully, and this plug-in and its dependent modules begin to operate normally.

[0064] like Figure 2 As shown, the configuration and dependency relationships of each module in an embedded device plug-in are as follows:

[0065] (1) Both plug-in 2 and plug-in 3 are modularly designed and are configured with two modules;

[0066] (2) Plugin 2 includes modules C and D. Module C is independent, while module D depends on the input of module A of plugin 3.

[0067] (3) Plugin 3 includes module A and module B. Module A is independent, while module B depends on the input of module C of plugin 2.

[0068] like Figure 3 As shown, after a plug-in is started, the logic judgment process of each module is as follows:

[0069] Plug-in 3 can be powered on for the first time or reset after an abnormality. After successful initialization, it enters the pre-operation stage and determines whether to run based on logic:

[0070] (1) Module A in plug-in 3 is independent and runs normally directly;

[0071] (2) Module B in plugin 3 depends on plugin 2;

[0072] (3) If plugin 3 fails to receive the communication message from plugin 2 within the time limit, plugin 2 is considered abnormal and module B in plugin 3 does not run.

[0073] (4) If plugin 3 receives a normal communication message from plugin 2 after a timeout and the configurations are consistent, module B in plugin 3 will run.

[0074] Step 3, during the operation phase, after any plug-in is reset or hot-swapped, it can be restarted independently and run normally. The startup process is disturbance-free and does not affect the operation of other plug-ins.

[0075] The operation phase specifically includes:

[0076] (1) After the plug-in is reset or hot-swapped, it starts to start and run without disturbance. If the initial parallel startup is successful, it sends a normal communication message; at the same time, it receives communication messages from other plug-ins and starts to determine the dependency relationship between the modules in the plug-in and other plug-ins;

[0077] (2) During the plug-in operation phase, the plug-in periodically detects the communication messages of other plug-ins with data dependencies. If no communication messages are received within a timeout period, it is considered that the other plug-in is abnormally reset or unplugged, and the abnormal flag of the other plug-in is set. The plug-in and its dependent modules maintain the old value data or stop running, and the modules without dependencies run normally;

[0078] (3) During the plug-in operation phase, the plug-in periodically checks the communication messages of other plug-ins with data dependencies. If a communication message of an abnormal plug-in is received again, it is considered that the abnormal plug-in has begun to recover or the plug-in that was unplugged has been reinserted. The abnormal plug-in communication message is then re-evaluated. If it is a normal communication message and is consistent with the checksum configured with this plug-in, it is considered that the abnormal plug-in has recovered successfully. This plug-in and its dependent modules update their data and run. Otherwise, it is considered that the plug-in continues to be abnormal. This plug-in and its dependent modules maintain the old data value or stop running.

[0079] The present invention enables the plug-in to support hot plugging and abnormal recovery by starting and running in parallel, thus overcoming the problem that the existing plug-in does not support hot plugging or abnormal recovery.

[0080] Furthermore, parallel operation includes:

[0081] If some modules in this plugin have no data dependency with other plugins, these modules will run normally after this plugin is initialized successfully;

[0082] If some modules in this plug-in depend on data input from other plug-ins, the content of the received communication message will be detected to determine whether the normal communication message of the corresponding plug-in has been received, and the configuration verification codes of this plug-in and the corresponding plug-in are compared to ensure that they are consistent. Only then will these modules of this plug-in start to operate normally, otherwise these modules will not operate.

[0083] like Figure 4 As shown in the figure, in a plug-in running phase, the running logic judgment process of each module is as follows:

[0084] (1) If plug-in 2 fails, plug-in 3 will not receive the communication message from plug-in 2 due to the timeout. The independent module A in it will still run normally, but the module B that depends on plug-in 2 will stop running.

[0085] (2) Plug-in 2 recovers from the fault, starts independently, and sends normal communication messages;

[0086] (3) Plug-in 3 receives the normal communication message from plug-in 2 and verifies that the configuration is consistent, then module B resumes operation;

[0087] (4) If plug-in 3 cannot receive the normal communication message from plug-in 2 or the verification configuration is inconsistent, module B will still stop running.

[0088] like Figure 5 and Figure 6 As shown, the present invention also proposes an embedded device for implementing the above-mentioned embedded plug-in management method, the device comprising:

[0089] (1) Parallel startup unit, used for hardware initialization and software initialization of each plug-in;

[0090] (2) Notification transmission unit, which is used to send communication messages regularly through the internal data bus after each plug-in is initialized;

[0091] (3) a judgment unit, which is used for each plug-in to judge the content of the communication message after receiving the communication message, and determine the operation logic of each module of the plug-in according to the judgment result;

[0092] (4) Parallel operation unit, used for the operation logic of each module of each plug-in.

[0093] Among them, each plug-in is an intelligent plug-in, and each plug-in includes a memory, a processor, a configuration, and an executable program. The memory stores the configuration and the executable program, and the processor implements the above-mentioned embedded plug-in management method when executing the executable program.

[0094] Plug-ins are connected via an internal data bus.

[0095] The beneficial effect of the present invention is that, compared with the prior art, the present invention can improve the startup speed of the embedded plug-in and is not affected by the number of plug-ins. After the plug-in is abnormal, it can be restored without disturbance without affecting the normal operation of other plug-ins, reducing the device startup time and improving the device fault tolerance.

[0096] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0097] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof. The computer-readable storage medium used herein is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by a fiber optic cable), or an electrical signal transmitted by a wire.

[0098] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0099] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages-such as Smalltalk, C++, etc., and conventional procedural programming languages-such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network-including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) may be personalized by utilizing the state information of a computer-readable program instruction, and the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the present disclosure.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. An embedded plug-in management method, characterized in that: include: Initialization phase: All plug-ins are started independently and in parallel, and then run in parallel after they are started; Pre-operation stage: Each module in the plug-in determines whether to run based on logic; Running phase: After any plug-in is reset or hot-swapped, it can be restarted independently and run normally. The startup process is disturbance-free and does not affect the operation of other plug-ins.

2. The embedded plug-in management method according to claim 1, characterized in that: The plug-ins are all intelligent plug-ins, which run executable programs and configurations. The configuration on each plug-in is completed offline in advance, and the configurations of the plug-ins match each other; each plug-in includes one or more modules.

3. The embedded plug-in management method according to claim 1, characterized in that: Wherein all the plug-ins, including at least two plug-ins, communicate with each other through an internal data bus.

4. The embedded plug-in management method according to claim 1, characterized in that: The plug-ins are started independently and in parallel, including the following steps: After each plug-in is powered on, the program identifies the hardware ID, performs hardware initialization, then detects the configuration, and performs software initialization according to the configuration content; After each plug-in is initialized, it sends communication messages regularly through the internal data bus. Communication messages are divided into normal communication messages and abnormal communication messages. If the plug-in is initialized successfully, a normal communication message is sent regularly; if the plug-in is initialized unsuccessfully, an abnormal communication message is sent regularly.

5. The embedded plug-in management method according to claim 4, characterized in that: The normal communication message content includes the initialization success result and the configuration verification code; The abnormal communication message content includes the initialization failure result and the failure reason.

6. The embedded plug-in management method according to claim 1, characterized in that: Each module in the plug-in determines whether to run according to logic, including: (1) After each plug-in sends a communication message during the initialization phase, it enters the pre-operation phase, and each module in the plug-in determines whether to run based on logic; (2) If the initialization of this plug-in fails, all modules in the plug-in will not run; (3) If the plug-in is initialized successfully and some of its modules have no data dependency with other plug-ins, then these modules will run normally; (4) If the plug-in is initialized successfully, and some of its modules depend on data input from other plug-ins, the content of the received communication message is detected. If a normal communication message from the corresponding plug-in is received, and the configuration verification codes of the plug-in and the corresponding plug-in are compared and found to be consistent, then the module of this plug-in starts to run normally. Otherwise, the module does not run.

7. The embedded plug-in management method according to claim 1, characterized in that: After any plug-in is reset or hot-swapped, it can be restarted independently and run normally, and the startup process is disturbance-free and does not affect the operation of other plug-ins, specifically including: (1) After the plug-in is reset or hot-swapped, it starts and runs without disturbance: including successful initialization, parallel startup, and sending normal communication messages; in the pre-operation stage, it receives communication messages from other plug-ins, determines the dependency relationship between the modules in the plug-in and other plug-ins, and then starts parallel operation; (2) Plugin operation phase: Regularly detect the communication messages of other plugins with data dependencies. If no communication messages are received within a timeout period, it is considered that the other plugins are abnormally reset or unplugged, and the abnormal flag of other plugins is set. The plugin and its dependent modules maintain the old value data or stop running, and the modules without dependencies run normally. (3) Plug-in operation phase: Regularly check the communication messages of other plug-ins with data dependencies. If a communication message of an abnormal plug-in is received again, it is considered that the abnormal plug-in has begun to recover or the plug-in that was unplugged has been reinserted. Then the communication message of the abnormal plug-in is re-evaluated. If it is a normal communication message and is consistent with the verification code configured with this plug-in, it is considered that the abnormal plug-in has recovered successfully. This plug-in and its dependent modules update data and run. Otherwise, it is considered that the plug-in continues to be abnormal. This plug-in and its dependent modules maintain the old value data or stop running.

8. The embedded plug-in management method according to claim 1, characterized in that: If a plug-in fails to initialize and start in parallel, other plug-in modules that depend on the plug-in will stop running; if the plug-in's anomaly disappears and normal startup is restored, normal communication messages will be sent regularly through the internal data bus. After receiving the message, other plug-ins that depend on the plug-in will determine the communication message of the abnormal plug-in. If it is a normal communication message and is consistent with the checksum configured with this plug-in, it is considered that the abnormal plug-in has recovered successfully, and this plug-in and its dependent modules will start to operate normally.

9. An embedded plug-in device, used to implement the embedded plug-in management method according to any one of claims 1 to 8, characterized in that: include: (1) Parallel startup unit, used for hardware initialization and software initialization of each plug-in; (2) Notification transmission unit, which is used to send communication messages regularly through the internal data bus after each plug-in is initialized; (3) a judgment unit, which is used for each plug-in to judge the content of the communication message after receiving the communication message, and determine the operation logic of each module of the plug-in according to the judgment result; (4) Parallel operation unit, used for the operation logic of each module of each plug-in.

10. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Automatic embedded multi-CPU-board signal exchange method based on signal names

    CN104731028A

  • Variable exchange transmission address offline distribution method of embedded device

    CN105224327A

  • Method for quickly starting embedded multi-plug-in device

    CN110659077A