Method and apparatus for configuring link library file of new energy controller on different platforms, and device
By extracting the function symbol table of the new energy controller, identifying the link library type, and configuring the different platform call interface code, the limitations of the maintenance and use of link library of different real-time simulation platforms are solved, and the call and update of the different platform link library files are realized, and the operation experience is improved.
Patent Information
- Application Number
- PCT/CN2024/116756
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-16
- Filing Date
- 2024-09-04
- Publication Date
- 2025-05-22
AI Technical Summary
The existing technology has limitations on the maintenance and use of link libraries of different real-time simulation platforms, resulting in poor operator experience.
By extracting the function symbol table from the current static link library file of the new energy controller, determining the link library type, and configuring the different platform to call the interface code based on this type, packaging it into the static link library file, and generating and updating the static link library file.
It realizes the call of the link library files of the different platform, reduces the workload of platform maintenance, improves the user's experience, and can run on the ADPSS and RTLAB platforms at the same time.
Smart Images

Figure CN2024116756_22052025_PF_FP_ABST
Abstract
Description
Method, device and equipment for configuring link library files of new energy controllers on different platforms
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 16, 2023, with application number 202311534873.6 and invention name “Method, device and equipment for configuring link library files of new energy controllers on different platforms”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of link library technology, and in particular to a method, device, and equipment for configuring link library files for new energy controllers on different platforms. Background Art
[0003] Currently, there are many mainstream real-time simulators for new energy simulation, including RTDS, RTLAB, HyperSim and ADPSS. Mainstream real-time simulators are often used to simulate new energy grid primary equipment in power grid systems. New energy manufacturers develop digital packaging models for specific real-time simulators to simulate new energy controllers in real time. The current mainstream new energy link library platforms are mainly RTLAB and ADPSS.
[0004] However, new energy manufacturers need to provide link libraries for both the RTLAB and ADPSS real-time simulation platforms, which creates a significant maintenance workload. Furthermore, users typically only have one or both platforms, rarely both. This means users with RTLAB platforms cannot use the link library files for the ADPSS platform, and vice versa. Consequently, the maintenance and user experience of existing real-time simulation platform link libraries remains poor, failing to meet application requirements.
[0005] Summary of the Invention
[0006] This application provides a method, device and equipment for configuring link library files of new energy controllers on different platforms, which is used to solve the technical problem that the existing technology has limitations on the maintenance and use of link libraries of different real-time simulation platforms, resulting in a poor operator experience.
[0007] In view of this, the first aspect of the present application provides a method for configuring a link library file of a new energy controller on a different platform, including:
[0008] Extracting a function symbol table from a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters;
[0009] Determine the link library type of the new energy controller according to the function symbol table, where the link library type includes an RTLAB link library and an ADPSS link library;
[0010] Based on the link library type, configuring different platform call interface codes for different types of link libraries;
[0011] The cross-platform call interface code is packaged into the current static link library file through a function compilation operation to generate an updated static link library file.
[0012] Preferably, the link library type of the new energy controller is determined according to the function symbol table, and the link library type includes an RTLAB link library and an ADPSS link library, including:
[0013] The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes RTLA B link library and ADPSS link library.
[0014] Preferably, configuring different platform call interface codes for different types of link libraries based on the link library type includes:
[0015] If the link library type is an RTLAB link library, configuring an ADPSS platform call interface code for the RTLAB link library;
[0016] If the link library type is an ADPSS link library, configuring an RTLAB platform call interface code for the ADPSS link library;
[0017] The different platform calling interface code includes the ADPSS platform calling interface code and the RTLAB platform calling interface code.
[0018] Preferably, the step of packaging the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file includes:
[0019] Compile the different platform call interface code into a target compiled file through a first compilation instruction;
[0020] The target compiled file is packaged into the current static link library file through a second compilation instruction to generate an updated static link library file.
[0021] Preferably, the process of packaging the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file further includes:
[0022] The updated static link library file is run on different real-time simulation platforms to implement the calling of link library files on different platforms.
[0023] The second aspect of the present application provides a device for configuring a link library file for a new energy controller on a different platform, comprising:
[0024] A symbol extraction unit is used to extract a function symbol table from a current static link library file of the new energy controller through a preset call instruction, wherein the function symbol table includes a plurality of function characters;
[0025] A type identification unit, configured to determine a link library type of the new energy controller according to the function symbol table, wherein the link library type includes an RTLAB link library and an ADPSS link library;
[0026] An interface configuration unit, configured to configure different-platform call interface codes for different types of link libraries based on the link library type;
[0027] The file generating unit is used to package the different platform calling interface code into the current static link library file through a function compiling operation, and generate an updated static link library file.
[0028] Preferably, the type identification unit is specifically used to:
[0029] The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes RTLA B link library and ADPSS link library.
[0030] Preferably, the interface configuration unit is specifically used to:
[0031] If the link library type is an RTLAB link library, configuring an ADPSS platform call interface code for the RTLAB link library;
[0032] If the link library type is an ADPSS link library, configuring an RTLAB platform call interface code for the ADPSS link library;
[0033] The different platform calling interface code includes the ADPSS platform calling interface code and the RTLAB platform calling interface code.
[0034] Preferably, the file generating unit is specifically used to:
[0035] Compile the different platform call interface code into a target compiled file through a first compilation instruction;
[0036] The target compiled file is packaged into the current static link library file through a second compilation instruction to generate an updated static link library file.
[0037] A third aspect of the present application provides a device for configuring a link library file of a new energy controller on a different platform, characterized in that the device includes a processor and a memory;
[0038] The memory is used to store program code and transmit the program code to the processor;
[0039] The processor is used to execute the cross-platform new energy controller link library file configuration method according to any one of claims 1-5 according to the instructions in the program code.
[0040] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0041] In this application, a method for configuring a link library file of a new energy controller on a different platform is provided, including: extracting a function symbol table in the current static link library file of the new energy controller through a preset call instruction, the function symbol table including multiple function characters; determining the link library type of the new energy controller according to the function symbol table, the link library type including the RTLAB link library and the ADPSS link library; configuring a different platform call interface code for different categories of link libraries based on the link library type; packaging the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file.
[0042] The cross-platform new energy controller link library file configuration method provided by this application accurately identifies the link library type of the new energy controller, then configures the corresponding cross-platform call interface code based on different types of link libraries and writes it into the current static link library file. For platform maintenance, the manufacturer only needs to maintain the link library of one platform. For users, they can call the link library of different platforms based on the cross-platform call interface code in the updated static link library file. Therefore, this application can solve the technical problem that the existing technology has limitations on the maintenance and use of link libraries of different real-time simulation platforms, resulting in a poor operator experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] FIG1 is a flow chart of a method for configuring a link library file for a new energy controller on a different platform according to an embodiment of the present application;
[0044] FIG2 is a schematic structural diagram of a device for configuring a link library file for a new energy controller on a different platform provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0046] For ease of understanding, please refer to FIG1 , which shows an embodiment of a method for configuring a link library file for a new energy controller on a different platform provided by this application, including:
[0047] Step 101: extract a function symbol table from the current static link library file of the new energy controller through a preset call instruction, where the function symbol table includes a plurality of function characters.
[0048] It should be noted that this embodiment can be executed in a Linux system. The preset call instruction can be the command objdump-txxxx.a in the Linux system, where xxxx.a is the current static link library file of the new energy controller to be called. The preset call instruction can extract function symbols by calling and running the current static link library file to generate a function symbol table. In essence, the preset call instruction prints the function symbols of the static link library. The format of the function symbol table can be expressed as Xxx.a(xxxx.o):file format elf64-x86-64; a specific example is expressed as:
[0049] SYMBOL TABLE:
[0050] 00000000 l F.text 000021f0_ZL18mdlInitializeSizesP13SimStruct_tag
[0051] 0000224e l F.text 00000035_ZL24mdlInitializeSampleTimesP13SimStruct_tag
[0052] 00002283 l F.text 0000004c_ZL8mdlStartP13SimStruct_tag
[0053] 000022cf l F.text 00000021_ZL23mdlSetInputPortDataTypeP13SimStruct_tagii
[0054] 000022f0 l F.text 00000021_ZL24mdlSetOutputPortDataTypeP13SimStruct_tagii
[0055] 00002311 l F.text 0000002e_ZL26mdlSetDefaultPortDataTypesP13SimStruct_tag
[0056] 0000233f l F.text 0000102e_ZL10mdlOutputsP13SimStruct_tagi
[0057] 0000336d l F.text 0000002c_ZL12mdlTerminateP13SimStruct_ta
[0058] The format of the function symbol table can also be expressed as xxxxx.o:file format elf64-x86-64; the specific example is expressed as:
[0059] SYMBOL TABLE:
[0060] 00000000 l df*ABS*00000000PLL_interface.cpp
[0061] 00000000 l d.text 00000000.text
[0062] 00000000l d.data 00000000.data
[0063] 00000000 l d.bss 00000000.bss
[0064] 00000000 g F.text 000000e2 InitPLLTEST
[0065] 000000e2 g F.text 000000ae StepPLLTEST
[0066] 00000190 g F.text 00000041 TerminatePLLTEST
[0067] The above format and data examples of the function symbol table are only examples and are not intended to be exclusive limitations. It is sufficient that a function symbol table can be formed.
[0068] Step 102: Determine the link library type of the new energy controller according to the function symbol table. The link library types include RTLAB link library and ADPSS link library.
[0069] Furthermore, step 102 includes:
[0070] Compare and match the function characters in the function symbol table with the preset platform function library, and determine the link library type of the new energy controller. The link library types include RTLAB link library and ADPSS link library.
[0071] The above-mentioned function symbol table contains a variety of function characters, and the link library type of the new energy controller can be identified based on these function characters; in this embodiment, if the function symbol table contains any of the functions mdlInitializeSizes, mdlInitializeSampleTimes, mdlStart, mdlOutputs, mdlTerminate, mdlInitializeConditions, mdlDerivatives, and mdlUpdate, then the link library of the current new energy controller is determined to be a link library under the RTLAB platform, that is, the RTLAB link library.
[0072] If the function symbol table contains the three functions Init$ModelName, Step$ModelName, and Terminate$ModelName, the link library of the current new energy controller is judged to be the link library under the ADPSS real-time simulation platform, that is, the ADPSS link library. The $ModelName of different link libraries may be different. The preset platform function library can be set according to the actual situation. The function characters in the function symbol table are compared and matched with the preset platform function library to determine the link library type.
[0073] Step 103: Based on the link library type, configure different platform call interface codes for different types of link libraries.
[0074] Furthermore, step 103 includes:
[0075] If the link library type is RTLAB link library, configure the ADPSS platform call interface code for the RTLAB link library;
[0076] If the link library type is ADPSS link library, configure the RTLAB platform call interface code for the ADPSS link library;
[0077] The different platform call interface code includes the ADPSS platform call interface code and the RTLAB platform call interface code.
[0078] It should be noted that in order to enable each user to call the link library files of other platforms based on their own platform, this embodiment configures different platform calling interface codes for different types of link libraries, that is, if the link library type is RTLAB link library, the ADPSS platform calling interface code is configured for the RTLAB link library; if the link library type is ADPSS link library, the RTLAB platform calling interface code is configured for the ADPSS link library.
[0079] The specific process is as follows: For the RTLAB link library of the RTLAB platform, configure the C language interface calling code of the ADPSS platform, that is, the ADPSS platform calling interface code. Call the mdlInitializeSizes, mdlInitializeSampleTimes, mdlInitializeConditions and mdlStart functions of the RTLAB platform link library in the interface function Init@ModelName of the ADPSS platform. Call the mdlDerivatives, mdlUpdate and mdlOutputs functions of the RTLAB platform link library in the interface function Step$ModelName of the ADPSS platform. Call the mdlTerminate function of the RTLAB platform link library in the interface function Terminate$ModelName of the ADPSS platform. By calling the interface code of the ADPSS platform, the ADPSS platform can call the static link library file of the RTLAB platform.
[0080] For the ADPSS platform's ADPSS link library, configure the RTLAB platform's C language interface call code, namely the RTLAB platform's call interface code. Call the RTLAB platform's link library's Init@ModelName function within the RTLAB platform's interface function mdlInitializeSizes. □ Call the RTLAB platform's link library's Step$ModelName function within the RTLAB platform's interface function mdlOutputs. Call the RTLAB platform's link library's Terminate$ModelName function within the RTLAB platform's interface function mdlTerminate. By calling the RTLAB platform's call interface code, the RTLAB platform can call the ADPSS platform's static link library files.
[0081] Step 104: Pack the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file.
[0082] Furthermore, step 104 includes:
[0083] Compile the different platform call interface code into a target compilation file through a first compilation instruction;
[0084] The target compiled file is packaged into the current static link library file through the second compilation instruction to generate an updated static link library file.
[0085] Furthermore, step 104 further includes:
[0086] Run and update static link library files on different real-time simulation platforms to realize the calling of link library files on different platforms.
[0087] To facilitate the invocation, operation, and maintenance of new energy controllers, the inter-platform call interface code must be compiled into a file of the appropriate format. The first compile instruction compiles the code into a compiled file, typically in the .o format; the second compile instruction packages the target compiled file into the current static link library file, in the .a format. The resulting updated static link library file can run on both the ADPSS and RTLAB platforms, providing compatibility between the libraries of both platforms. This facilitates library maintenance for manufacturers and enhances the user experience of calling static link library files on different platforms. The operation is simple and easy to execute.
[0088] The embodiment of the present application provides a method for configuring a link library file for a new energy controller on a different platform. This method accurately identifies the link library type of the new energy controller, and then configures the corresponding cross-platform call interface code based on different types of link libraries, and writes it into the current static link library file. For platform maintenance, the manufacturer only needs to maintain the link library of one platform, and for the user, the link library of different platforms can be called based on the cross-platform call interface code in the updated static link library file. Therefore, the embodiment of the present application can solve the technical problem that the existing technology has limitations on the maintenance and use of link libraries for different real-time simulation platforms, resulting in a poor operator experience.
[0089] For ease of understanding, please refer to FIG2 . This application provides an embodiment of a device for configuring a link library file for a new energy controller on a different platform, including:
[0090] A symbol extraction unit 201 is used to extract a function symbol table from a current static link library file of the new energy controller through a preset call instruction, where the function symbol table includes a plurality of function characters;
[0091] A type identification unit 202 is used to determine the link library type of the new energy controller according to the function symbol table, where the link library types include RTLAB link library and ADPSS link library;
[0092] The interface configuration unit 203 is used to configure different platform call interface codes for different types of link libraries based on the link library type;
[0093] The file generating unit 204 is used to package the different platform call interface code into the current static link library file through a function compiling operation, and generate an updated static link library file.
[0094] Furthermore, the type identification unit 202 is specifically configured to:
[0095] Compare and match the function characters in the function symbol table with the preset platform function library, and determine the link library type of the new energy controller. The link library types include RTLAB link library and ADPSS link library.
[0096] Furthermore, the interface configuration unit 203 is specifically configured to:
[0097] If the link library type is RTLAB link library, configure the ADPSS platform call interface code for the RTLAB link library;
[0098] If the link library type is ADPSS link library, configure the RTLAB platform call interface code for the ADPSS link library;
[0099] The different platform call interface code includes the ADPSS platform call interface code and the RTLAB platform call interface code.
[0100] Furthermore, the file generating unit 204 is specifically configured to:
[0101] Compile the different platform call interface code into a target compilation file through a first compilation instruction;
[0102] The target compiled file is packaged into the current static link library file through the second compilation instruction to generate an updated static link library file.
[0103] The present application also provides a device for configuring a link library file of a new energy controller on a different platform, characterized in that the device includes a processor and a memory;
[0104] The memory is used to store program codes and transmit the program codes to the processor;
[0105] The processor is used to execute the cross-platform new energy controller link library file configuration method in the above method embodiment according to the instructions in the program code.
[0106] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0107] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0108] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for executing all or part of the steps of the method described in each embodiment of the present application through a computer device (which can be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), random access memory (English full name: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program code.
[0110] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for configuring a link library file of a new energy controller on a different platform, characterized in that: include: Extracting a function symbol table from a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters; Determine the link library type of the new energy controller according to the function symbol table, the link library type includes an RTLAB link library and an ADPSS link library; Based on the link library type, configuring different platform call interface codes for link libraries of different categories; The cross-platform call interface code is packaged into the current static link library file through a function compilation operation to generate an updated static link library file.
2. The method for configuring link library files of new energy controllers of different platforms according to claim 1, characterized in that: Determining the link library type of the new energy controller according to the function symbol table, wherein the link library type includes an RTLAB link library and an ADPSS link library, includes: The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes the RTLA B link library and the ADPSS link library.
3. The method for configuring link library files of new energy controllers of different platforms according to claim 1, characterized in that: The configuring different-platform call interface codes for different types of link libraries based on the link library type includes: If the link library type is an RTLAB link library, then configuring an ADPSS platform call interface code for the RTLAB link library; If the link library type is an ADPSS link library, configuring an RTLAB platform call interface code for the ADPSS link library; The different platform calling interface code includes the ADPSS platform calling interface code and the RTLAB platform calling interface code.
4. The method for configuring link library files of new energy controllers of different platforms according to claim 1, characterized in that: The step of packaging the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file includes: Compile the different platform call interface code into a target compiled file through a first compile instruction; The target compiled file is packaged into the current static link library file through the second compilation instruction. In the file, generate and update the static link library file.
5. The method for configuring link library files of new energy controllers of different platforms according to claim 1, characterized in that: The function compiling operation is used to package the different platform call interface code into the current static link library file to generate an updated static link library file, and then the following steps are further included: The updated static link library file is run on different real-time simulation platforms to implement the calling of link library files on different platforms.
6. A device for configuring link library files of new energy controllers on different platforms, characterized in that: include: A symbol extraction unit, used for extracting a function symbol table in a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters; A type identification unit, used for determining the link library type of the new energy controller according to the function symbol table, wherein the link library type includes an RTLAB link library and an ADPSS link library; An interface configuration unit, used for configuring different platform call interface codes for different types of link libraries based on the link library type; The file generation unit is used to package the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file.
7. The device for configuring link library files of new energy controllers of different platforms according to claim 6, characterized in that: The type identification unit is specifically used for: The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes the RTLA B link library and the ADPSS link library.
8. The device for configuring link library files of new energy controllers of different platforms according to claim 6, characterized in that: The interface configuration unit is specifically used for: If the link library type is an RTLAB link library, then configuring an ADPSS platform call interface code for the RTLAB link library; If the link library type is an ADPSS link library, configuring an RTLAB platform call interface code for the ADPSS link library; The different platform calling interface code includes the ADPSS platform calling interface code and the RTLAB platform calling interface code.
9. The device for configuring link library files of new energy controllers of different platforms according to claim 6, characterized in that: The file generating unit is specifically used for: Compile the different platform call interface code into a target compiled file through a first compile instruction; The target compiled file is packaged into the current static link library file through a second compilation instruction to generate an updated static link library file.
10. A device for configuring link library files of new energy controllers on different platforms, characterized in that: The device comprises a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the cross-platform new energy controller link library file configuration method described in any one of claims 1-5 according to the instructions in the program code.
Citation Information
Patent Citations
Dynamic link library file generation method, application verification method, device and equipment
CN113127055A
Dynamic link library loading method and device
CN113204377A
Method and device for acquiring compatibility of operating system and application program
CN115167882A
Universal system of link library and control method and device of universal system of link library
CN116756945A
Different-platform new energy controller link library file configuration method, device and equipment
CN117573193A