Lightweight power distribution terminal software framework implementation method and system

By reconstructing the data table and establishing a chain functional interface, the problem of complex and inability to reuse the software functional modules of the power distribution terminal equipment is solved, and a lightweight software framework is realized, adapted to a variety of products and engineering applications, reducing the complexity and workload of software.

CN119597257AActive Publication Date: 2025-03-11BEIJING SIFANG JIBAO ENG TECH +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411821091.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-11
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Due to the low CPU performance and small memory, the power distribution terminal equipment software cannot use the database, resulting in complex software functional modules and ineffective reuse, which increases memory overhead and affects the system operation efficiency.

Method used

By reconstructing the data table, establishing a chain functional interface for each data table, registering the software functional module interface, and using a chain scheduling engine to schedule according to product and engineering needs, realizing the organic combination of functional modules and product applications.

Benefits of technology

It realizes a lightweight distribution terminal software framework, with a small size and no functional module code branches, flexibly adapts to a variety of products and engineering applications, reducing the complexity of software and the workload of development, testing and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597257A_ABST
    Figure CN119597257A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight power distribution terminal software framework implementation method and system. The method comprises the following steps: classifying and reconstructing data of a power distribution terminal to form a plurality of data tables of power distribution terminal software; uniformly setting an interface function in a predefined form for each software function module, and constructing a chained function interface of each data table; initializing a software framework, registering an interface function of the public module to the chain type function interface, and registering an interface function of the product application module to the chain type function interface; when a customization demand exists in the engineering application, registering an interface function of an application software module for realizing the customization demand to a chained function interface; during operation, scheduling is performed through a chained scheduling engine according to the chained function interface and the cycle parameter of each data table, a power distribution terminal software framework is formed, and an application software module is loaded as required to realize different product functions. According to the scheme, the volume is small, functional module code branches are not generated, and the method is flexibly suitable for various products and engineering applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer performance improvement, and in particular relates to a method and system for realizing a lightweight power distribution terminal software framework. Background Art

[0002] The distribution terminal is a general term for various remote monitoring and control units installed in the distribution network, which complete functions such as data measurement, protection, control and communication. It mainly includes feeder terminals, station terminals, distribution transformer terminals, etc. The application environment of distribution terminal equipment is complex. Different application scenarios require different software functions to adapt. The same software functions, such as human-machine interface functions, communication functions and other modules, also vary due to different product function combinations and environments. At the same time, compared with the protection and control equipment of the power grid, the CPU performance and memory of the distribution terminal equipment software are low, and the database cannot be used. The application requirements of different engineering environments vary greatly, and the different software functions integrated in the CPU chip become more complex. The software function modules of different products cannot be effectively reused. Some designs increase data attributes or software configuration parameters for compatibility processing, which increases memory overhead and affects system operation efficiency.

[0003] The software modules of power distribution terminal products can be divided into common software modules common to all products, such as common data acquisition modules, remote control function modules, local display modules, communication function modules, and application function modules developed for different products, such as single-interval recording modules, interlocking logic modules, power distribution protection modules, and electric energy metering modules. Among them, the common software modules also need to modify the code to meet the corresponding usage requirements for product application functions, and the application modules need to be developed and assembled according to the needs of different product application scenarios. Because there are many power distribution terminal products, the usage scenarios are complex, and the service objects and application scenarios of each product are different, the software branches and functional combinations are complex, resulting in a huge workload for development, testing and maintenance.

[0004] Due to the large number of power distribution terminal products and complex usage scenarios, the service objects and application scenarios of each product are different, resulting in complex software branches and functional combinations. Product developers and engineers are required to carefully develop, debug and maintain functional branches according to needs, resulting in a contradiction between the maturity of software functional modules and flexible engineering applications, and the stability of product functions is challenged. Summary of the invention

[0005] In order to address the deficiencies in the prior art, the present invention provides a lightweight distribution terminal software framework implementation method and system, which reconstructs data tables, establishes chain function interfaces for each data table, registers software function module interfaces, and uses a chain scheduling engine to schedule according to product and engineering requirements, thereby realizing an organic combination of function modules and product applications.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions.

[0007] The present invention first discloses a method for implementing a lightweight power distribution terminal software framework, which comprises the following steps:

[0008] Step 1: Classify and reconstruct the data of the power distribution terminal to form multiple data tables of the power distribution terminal software, and allocate corresponding storage space according to the amount of product data;

[0009] Step 2: Define the function interface rules of the software functions, uniformly set the predefined interface functions for each software function module, and define the chain function interface rules to construct the chain function interface of each data table;

[0010] Step 3: Initialize the software framework, register the interface function of the public module to the chain function interface of the corresponding data table to form the bottom of the chain function interface, and register the interface function of the product application module to the chain function interface of the corresponding data table; when there is a customization requirement in the engineering application, register the interface function of the application software module that implements the customization requirement to the chain function interface of the corresponding data table;

[0011] Step 4: When the software is running, each data table is scheduled through the chain scheduling engine according to the chain function interface of each data table and its set periodic parameters to form a distribution terminal software framework, load application software modules on demand, and realize different product functions.

[0012] The present invention further includes the following preferred embodiments:

[0013] The multiple data tables include a sampling value table, a measurement table, a state table, a control table, and a parameter table.

[0014] The interface function is defined as:

[0015] typedef int(*tFunc_interface)(void*pTable,BOOL bLock,uint32 ms);

[0016] Among them, tFunc_interface is the function interface definition; pTable is the storage space address of the data table; bLock is used to set whether to use resource locks; ms is the number of milliseconds for periodic scheduling. When ms is 0, periodic scheduling is not performed.

[0017] When the return value of the interface function is 0, it indicates that the process has not been processed; when it is 1, it indicates that the process has been processed; and when it is 2, it indicates that the process has been processed and no subsequent scheduling is required.

[0018] The chain function interface for constructing each data table further includes:

[0019] Form the content of the tFuncList data structure and construct the initial chain function interface from bottom to top;

[0020] typedef struct_tag_funcList_

[0021] {

[0022] struct_tag_funcList_*pPrev;

[0023] tFunc_interface pFunc;

[0024] }tFuncList;

[0025] When the first function interface function is added to the chain function interface, pFunc is the interface function, and pPrev = NULL; then when a new function interface function is added to the chain function interface, its pPrev points to the top of the original chain function interface; the chain function interface of each data table points to the last added data structure content, that is, the top of the chain function interface.

[0026] The scheduling of each data table further includes:

[0027] Scheduling starts from the top of the chained function interface of each data table, managing data read and write operations based on whether resource locks are required, and then deciding the next step of scheduling based on the return value.

[0028] If the current scheduling return value is 0 or 1, and if its pPrev is not NULL, the corresponding interface of pPrev is scheduled. If pPrev is NULL, no subsequent operations are performed.

[0029] If the current scheduling return value is 2, no subsequent operations on this data table will be performed regardless of whether pPrev is NULL.

[0030] The present invention also discloses a lightweight power distribution terminal software framework implementation system using the aforementioned lightweight power distribution terminal software framework implementation method, comprising:

[0031] A data table reconstruction module is used to classify and reconstruct the data of the power distribution terminal to form multiple data tables of the power distribution terminal software, and allocate corresponding storage space according to the amount of product data;

[0032] Chain function interface construction module, used to define the function interface rules of software functions, uniformly set predefined interface functions for each software function module, define chain function interface rules, and construct chain function interfaces for each data table;

[0033] The interface function registration module is used to initialize the software framework, register the interface function of the public module to the chain function interface of the corresponding data table to form the bottom of the chain function interface, and register the interface function of the product application module to the chain function interface of the corresponding data table; when there is a customization requirement in the engineering application, the interface function of the application software module that realizes the customization requirement is registered to the chain function interface of the corresponding data table;

[0034] The chain scheduling module is used to schedule each data table through the chain scheduling engine according to the chain function interface of each data table and its set periodic parameters when the software is running, forming a distribution terminal software framework, loading application software modules on demand, and realizing different product functions.

[0035] Accordingly, the present application also discloses a terminal, including a processor and a storage medium;

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

[0037] The processor is used to operate according to the instructions to execute the steps of the method implemented according to the aforementioned lightweight power distribution terminal software framework.

[0038] Correspondingly, the present application also discloses a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the aforementioned lightweight power distribution terminal software framework implementation method are implemented.

[0039] The beneficial effect of the present invention is that, compared with the prior art, the present invention provides a method and system for implementing a lightweight distribution terminal software framework. The implemented lightweight distribution terminal software framework is small in size, does not generate functional module code branches, and is flexibly adaptable to a variety of products and engineering applications. It defines the function interface rules of software functions, and each software function module is provided with an interface function in a unified form. In the form of a chain function interface, the public modules and application modules are flexibly linked to realize the personalized functions of the product; when there are customized engineering requirements, they are scheduled according to product and engineering requirements to achieve an organic combination of functional modules and product applications; corresponding customized functional modules are registered to adapt to different service objects and application scenarios of the product without modifying the original public programs and product function programs; application software modules are loaded on demand to avoid the contradiction between the maturity of software function modules and flexible engineering applications due to the large number of distribution terminal products, complex usage scenarios, different service objects and application scenarios of each product, complex software branches and function combinations, and complex engineering applications. With lightweight data organization forms such as data tables, chain function interfaces and chain scheduling engines, it is suitable for distribution terminals with low CPU performance and small memory, and realizes stable common modules and high reuse of application modules, reduces software complexity, and reduces the workload of development, testing and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a diagram of the lightweight power distribution terminal software framework implementation in the present invention.

[0041] Figure 2 It is a flow chart of the processing method in the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention more clear, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0043] The embodiments described in this application are only some embodiments of the present invention, not all embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the protection scope of the present invention.

[0044] In view of the deficiencies of the prior art, the present invention proposes a lightweight distribution terminal software framework implementation method and system, reconstructs various data tables, defines function entry rules, establishes chain function interfaces for various data tables, registers common function modules as the bottom of the chain function interface, then registers product-specific function modules, and finally registers engineered custom modules to form the top of the chain function interface. The functions developed later are considered to be compatible with the original modules or directly replace the original modules; therefore, the chain scheduling engine is used to schedule in reverse order of chain function interface registration, and the design determines whether to continue scheduling in the next order according to the return value, so as to realize the organic combination of software function modules and product applications.

[0045] like Figure 1 and Figure 2 As shown, a lightweight power distribution terminal software framework implementation method proposed in the present invention includes the following steps:

[0046] Step 1: Classify and reconstruct the data of the distribution terminal to form multiple data tables of the distribution terminal software, and allocate corresponding storage space according to the amount of product data.

[0047] The data tables of the power distribution terminal software include: sampling value table, measurement table, state table, control table, parameter table, etc.

[0048] For example, the distribution terminal data table ( Figure 1 In the example, the line ① is as follows:

[0049] tSampleTable table_sample[MAX_CHN_NUMBER]; / / sample value table

[0050] tMeasureTable table_measure[MAX_MEA_NUMBER]; / / Measurement table

[0051] tStatusTable table_status[MAX_STA_NUMBER]; / / status table

[0052] tControlTable table_control[MAX_CTRL_NUMBER]; / / Control table

[0053] tParamsTable table_params[MAX_PARAM_NUMBER]; / / parameter table

[0054] Step 2: Define the function interface rules of the software functions, uniformly set the predefined interface functions for each software function module, and define the chain function interface rules to construct the chain function interface of each data table;

[0055] In the specific example, the function interface is defined as follows:

[0056] typedef int(*tFunc_interface)(void*pTable,BOOL bLock,uint32 ms);

[0057] Among them: tFunc_interface is the function interface definition; pTable is the storage space address of the data table; bLock sets whether to use resource locks; ms is the number of milliseconds for periodic scheduling, and periodic scheduling is not performed when ms is 0. The return value of the function indicates: 0 = unprocessed, 1 = processed, 2 = processed and no subsequent scheduling is required.

[0058] For example, the interface functions of each function are defined as follows:

[0059] int sample_interface(void*pTable,BOOL bLock,uint32 ms); / / Data collection

[0060] int control_interface(void*pTable,BOOL bLock,uint32 ms); / / remote control function

[0061] int display_interface(void*pTable,BOOL bLock,2uint32 ms); / / Human-machine interface

[0062] int commu_interface(void*pTable,BOOL bLock,uint32 ms); / / communication function

[0063] int unitwave_interface(void*pTable,BOOL bLock,uint32 ms); / / Interval recording int interlock_interface(void*pTable,BOOL bLock,uint32 ms); / / Interlocking logic

[0064] int protect_interface(void*pTable,BOOL bLock,uint32 ms); / / power distribution protection

[0065] int elecpower_interface(void*pTable,BOOL bLock,uint32 ms); / / Energy measurement

[0066] The specific construction method of the chain function interface includes forming the content of the tFuncList data structure, and constructing the initial chain function interface from bottom to top; when the first function interface function is added to the chain function interface, pFunc is the interface function, and pPrev = NULL; then when a new function interface function is added to the chain function interface, its pPrev points to the top of the original chain function interface; the chain function interface of each data table points to the last added data structure content, that is, the top of the chain function interface.

[0067] typedef struct_tag_funcList_

[0068] {

[0069] struct_tag_funcList_*pPrev;

[0070] tFunc_interface pFunc; / / Function interface function

[0071] }tFuncList;

[0072] Step 3: Initialize the software framework, register the interface functions of the common modules to the chain function interface of the corresponding data table to form the bottom of the chain function interface, and register the interface functions of the product application modules to the chain function interface of the corresponding data table; when there are customization requirements in the engineering application, register the interface functions of the application software modules that implement the customization requirements to the chain function interface of the corresponding data table.

[0073] Step 4: When the software is running, each data table is scheduled through the chain scheduling engine according to the chain function interface of each data table and its set periodic parameters to form a distribution terminal software framework, load application software modules on demand, and realize different product functions.

[0074] The specific scheduling method is to start scheduling from the top of the chain function interface of each data table, manage data read and write operations based on whether the resource lock is needed, and then decide the next scheduling based on the return value; if the current scheduling returns 0 (unprocessed) or 1 (processed), if its pPrev is not NULL, then schedule the interface corresponding to pPrev, and if pPrev is NULL, no subsequent operations will be performed; if the current scheduling returns 2 (processed and no subsequent scheduling is required), no subsequent operations will be performed on this data table regardless of whether pPrev is NULL.

[0075] The chain function interface of the sample value table is shown in Table 1.

[0076]

[0077] Table 1

[0078] As shown in Table 1, the top of the linked list is the chain function interface-3 (dual-channel exception handling module), and the scheduling cycle is 1 millisecond; in the 1 millisecond task, the chain scheduling engine first schedules and completes the dual-channel exception handling module to realize the engineering customization requirements; because its return value is 1, the single-interval fault recording module continues to be scheduled to realize the product function of this system; at this time, because the return value of the single-interval fault recording module is 2, no subsequent operations of this data table are performed, that is, the full-channel fault recording module is no longer executed. The single-interval fault recording module is an application module. Using this method, there is no need to modify the basic code to delete the full-channel fault recording module, which is a common module, but to realize the specific function of processing only the product through the return value control of the chain scheduling engine.

[0079] For example, the chain function interface of the control scale is shown in Table 2.

[0080]

[0081]

[0082] Table 2

[0083] As shown in Table 2, the top of the linked list is the chain function interface-2 (interval interlocking logic module), the scheduling cycle parameter is 0, and the chain scheduling engine is triggered only when the control command causes the control meter data to be modified. The chain scheduling engine first schedules the interval interlocking logic module, identifies different control points through the customized module code, performs corresponding interlocking processing, and returns 1 (processed) or 2 (processed and no subsequent scheduling is required) according to the interlocking judgment result to decide whether to execute the general remote control function module.

[0084] Through the above steps, by reconstructing the data table, the chain function interface of each data table is established, the public function module is registered as the bottom of the chain function interface, and then the specific function module of the product is registered, and finally the engineered custom module is registered to form the top of the chain function interface. The chain scheduling engine is used in the system operation to schedule the chain function interface of each data table from top to bottom, and decide whether to schedule the next function module based on the return value of each scheduling.

[0085] The beneficial effect of the present invention is that, compared with the prior art, the present invention provides a method and system for implementing a lightweight distribution terminal software framework. The implemented lightweight distribution terminal software framework is small in size, does not generate functional module code branches, and is flexibly adaptable to a variety of products and engineering applications. It defines the function interface rules of software functions, and each software function module is provided with an interface function in a unified form. In the form of a chain function interface, the public modules and application modules are flexibly linked to realize the personalized functions of the product; when there are customized engineering requirements, they are scheduled according to product and engineering requirements to achieve an organic combination of functional modules and product applications; corresponding customized functional modules are registered to adapt to different service objects and application scenarios of the product without modifying the original public programs and product function programs; application software modules are loaded on demand to avoid the contradiction between the maturity of software function modules and flexible engineering applications due to the large number of distribution terminal products, complex usage scenarios, different service objects and application scenarios of each product, complex software branches and function combinations, and complex engineering applications. With lightweight data organization forms such as data tables, chain function interfaces and chain scheduling engines, it is suitable for distribution terminals with low CPU performance and small memory, and realizes stable common modules and high reuse of application modules, reduces software complexity, and reduces the workload of development, testing and maintenance.

[0086] The present invention may be a system, a method and / or a computer program product. The present invention also discloses a lightweight power distribution terminal software framework implementation system based on the aforementioned lightweight power distribution terminal software framework implementation method, comprising:

[0087] A data table reconstruction module is used to classify and reconstruct the data of the power distribution terminal to form multiple data tables of the power distribution terminal software, and allocate corresponding storage space according to the amount of product data;

[0088] Chain function interface construction module, used to define the function interface rules of software functions, uniformly set predefined interface functions for each software function module, define chain function interface rules, and construct chain function interfaces for each data table;

[0089] The interface function registration module is used to initialize the software framework, register the interface function of the public module to the chain function interface of the corresponding data table to form the bottom of the chain function interface, and register the interface function of the product application module to the chain function interface of the corresponding data table; when there is a customization requirement in the engineering application, the interface function of the application software module that realizes the customization requirement is registered to the chain function interface of the corresponding data table;

[0090] The chain scheduling module is used to schedule each data table through the chain scheduling engine according to the chain function interface of each data table and its set periodic parameters when the software is running, forming a distribution terminal software framework, loading application software modules on demand, and realizing different product functions.

[0091] Based on the spirit of the present invention, those skilled in the art can easily think that a computer program product can be obtained based on the aforementioned lightweight distribution terminal software framework implementation method. The computer program product may include a computer-readable storage medium, which carries computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure. That is, the present application also includes a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the aforementioned lightweight distribution terminal software framework implementation method.

[0092] Computer readable storage medium can be a tangible device that can keep and store the instructions used by the instruction execution device. Computer readable storage medium can be, for example, - but not limited to - electrical storage device, magnetic storage device, optical storage device, electromagnetic storage device, semiconductor storage device or any suitable combination of the above. More specific examples (non-exhaustive list) of computer readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, for example, punch card or groove protrusion structure with instructions stored thereon and any suitable combination of the above. Computer readable storage medium used here is not interpreted as instantaneous signal itself, such as radio wave or other free propagating electromagnetic wave, electromagnetic wave propagated by waveguide or other transmission medium (for example, light pulse by optical fiber cable) or electrical signal transmitted by wire.

[0093] 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.

[0094] 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.

[0095] 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. A lightweight power distribution terminal software framework implementation method, characterized in that: The following steps are involved: Step 1: Classify and reconstruct the data of the power distribution terminal to form multiple data tables of the power distribution terminal software, and allocate corresponding storage space according to the amount of product data; Step 2: Define the function interface rules of the software functions, uniformly set the predefined interface functions for each software function module, and define the chain function interface rules to construct the chain function interface of each data table; Step 3: Initialize the software framework, register the interface function of the public module to the chain function interface of the corresponding data table to form the bottom of the chain function interface, and register the interface function of the product application module to the chain function interface of the corresponding data table; when there is a customization requirement in the engineering application, register the interface function of the application software module that implements the customization requirement to the chain function interface of the corresponding data table; Step 4: When the software is running, each data table is scheduled through the chain scheduling engine according to the chain function interface of each data table and its set periodic parameters to form a distribution terminal software framework, load application software modules on demand, and realize different product functions.

2. The method for implementing a lightweight power distribution terminal software framework according to claim 1, characterized in that: The multiple data tables include a sampling value table, a measurement table, a state table, a control table, and a parameter table.

3. The method for implementing a lightweight power distribution terminal software framework according to claim 2, characterized in that: The interface function is defined as: typedef int(*tFunc_interface)(void*pTable,BOOL bLock,uint32 ms); Among them, tFunc_interface is the function interface definition; pTable is the storage space address of the data table; bLock is used to set whether to use resource lock; ms is the number of milliseconds for periodic scheduling. When ms is 0, periodic scheduling is not performed.

4. The method for implementing a lightweight power distribution terminal software framework according to claim 3, characterized in that: When the return value of the interface function is 0, it indicates that the process has not been processed; when it is 1, it indicates that the process has been processed; and when it is 2, it indicates that the process has been processed and no subsequent scheduling is required.

5. The method for implementing a lightweight power distribution terminal software framework according to claim 4, characterized in that: The chain function interface for constructing each data table further includes: Form the content of the tFuncList data structure and construct the initial chain function interface from bottom to top; typedef struct_tag_funcList_ { struct_tag_funcList_*pPrev; tFunc_interface pFunc; }tFuncList; When the first function interface function is added to the chain function interface, pFunc is the interface function, and pPrev = NULL; then when a new function interface function is added to the chain function interface, its pPrev points to the top of the original chain function interface; the chain function interface of each data table points to the last added data structure content, that is, the top of the chain function interface.

6. The lightweight power distribution terminal software framework implementation system according to claim 5, characterized in that: The scheduling of each data table further includes: Scheduling starts from the top of the chained function interface of each data table, managing data read and write operations based on whether resource locks are required, and then deciding the next step of scheduling based on the return value.

7. The lightweight power distribution terminal software framework implementation system according to claim 6 is characterized in that: If the current scheduling return value is 0 or 1, and if its pPrev is not NULL, the corresponding interface of pPrev is scheduled. If pPrev is NULL, no subsequent operations are performed. If the current scheduling return value is 2, no subsequent operations on this data table will be performed regardless of whether pPrev is NULL.

8. A lightweight power distribution terminal software framework implementation system, characterized in that: include: A data table reconstruction module is used to classify and reconstruct the data of the power distribution terminal to form multiple data tables of the power distribution terminal software, and allocate corresponding storage space according to the amount of product data; Chain function interface construction module, used to define the function interface rules of software functions, uniformly set predefined interface functions for each software function module, define chain function interface rules, and construct chain function interfaces for each data table; The interface function registration module is used to initialize the software framework, register the interface function of the public module to the chain function interface of the corresponding data table to form the bottom of the chain function interface, and register the interface function of the product application module to the chain function interface of the corresponding data table; when there is a customization requirement in the engineering application, the interface function of the application software module that realizes the customization requirement is registered to the chain function interface of the corresponding data table; The chain scheduling module is used to schedule each data table through the chain scheduling engine according to the chain function interface of each data table and its set periodic parameters when the software is running, forming a distribution terminal software framework, loading application software modules on demand, and realizing different product functions.

9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method for implementing the lightweight power distribution terminal software framework according to any one of claims 1-7.

10. 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 for implementing a lightweight power distribution terminal software framework described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Firmware library calling method and device, equipment and storage medium

    CN116483481A

  • Low-code development method and system supporting full-link rule chain calling

    CN118331558A

  • Flight simulator simulation framework based on cloud platform

    CN118626205A

  • Rearrangeable add-in-software management system

    JP2000322268A

  • Determining caller of a module in real-time

    US20200387369A1