Integration method, system and electronic equipment for BMS application
By building and integrating multiple functional modules in the application layer of BMS applications, generating and compiling embedded code, the problems of low flexibility and long compilation time in the integration process of BMS applications in the prior art are solved, and higher flexibility and faster compilation time are achieved.
Patent Information
- Application Number
- CN202211736947.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The prior art has problems of low flexibility and long compilation time in the integration process of BMS applications.
By building multiple BMS function modules in the application layer, obtaining and building a data dictionary, using signal lists and functional interface functions to generate embedded code, and sending it to the underlying environment where the construction has been completed for integration and compilation.
It improves the flexibility of BMS applications in the application layer development process, saves application layer compilation time, and reduces integration problems caused by different development progress.
Smart Images

Figure CN115951899B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery management system integrated compilation, and in particular to an integrated method, system and electronic equipment for BMS application. Background Art
[0002] With the development of electric vehicles, the requirements for battery management systems (BMS) are becoming higher and higher, the control is becoming more and more complex, and the amount of development code is increasing. In the prior art, in the process of implementing BMS application development based on MATLAB / Simulink models, embedded code is generated after integration is completed at the application layer, and then integrated with the bottom layer. In this process, the integration flexibility of the application layer is low, and the compilation time when generating embedded code is long.
[0003] In summary, the existing technology still has problems of low flexibility and long compilation time in the integration process of BMS applications. Summary of the invention
[0004] In view of this, the object of the present invention is to provide an integration method, system and electronic device for BMS applications. The method develops the BMS functional modules in the application layer separately to generate their own embedded codes, and finally sends them to the completed underlying environment for integration and compilation, thereby improving the flexibility of BMS applications in the application layer development process, saving application layer compilation time, and reducing integration problems caused by different development progress between BMS functional modules.
[0005] In a first aspect, an embodiment of the present invention provides a method for integrating BMS applications, the method comprising:
[0006] Constructing a development environment for the application layer, and constructing multiple BMS functional modules in the development environment for the application layer; wherein the BMS functional modules at least include: a signal list and a functional interface function;
[0007] Obtain the data dictionary corresponding to the BMS function module, and construct the variable name, variable type and variable storage location corresponding to the BMS function module in the data dictionary;
[0008] Generate embedded code of BMS functional module using signal list and functional interface function; and declare variables of embedded code to corresponding variable storage locations in data dictionary;
[0009] The embedded codes corresponding to all BMS functional modules in the application layer are sent to the built underlying environment, and the embedded codes are integrated and compiled using the data dictionary to generate BMS applications.
[0010] In one embodiment, the step of obtaining a data dictionary corresponding to the BMS functional module and constructing a variable name, a variable type, and a variable storage location corresponding to the BMS functional module in the data dictionary includes:
[0011] Determine whether the BMS function module contains the corresponding data dictionary;
[0012] If yes, get the naming rules corresponding to the data dictionary;
[0013] According to the naming rules, the variable name, variable type, variable initial value and variable storage location corresponding to the BMS functional module are saved in the data dictionary.
[0014] In one embodiment, the step of obtaining a data dictionary corresponding to a BMS functional module and constructing variables, variable storage locations, and variable declaration locations corresponding to the BMS functional module in the data dictionary includes:
[0015] Determine whether the BMS function module contains the corresponding data dictionary;
[0016] If not, the data dictionary and its naming rules are constructed using the variables in the BMS function module;
[0017] According to the naming rules, the variables, variable storage locations and variable declaration locations corresponding to the BMS functional modules are saved in the data dictionary.
[0018] In one embodiment, after the step of obtaining a data dictionary corresponding to the BMS functional module and constructing a variable name, a variable type, and a variable storage location corresponding to the BMS functional module in the data dictionary, the method further includes:
[0019] Save the data dictionary to the initialized table file;
[0020] Load the table file into the development environment of the application layer through the script tool.
[0021] In one embodiment, the steps of generating embedded code of a BMS functional module using a signal list and a functional interface function; and declaring variables of the embedded code to variable storage locations corresponding to those in a data dictionary include:
[0022] Use signal lists and functional interface functions to obtain the embedded code of the developed BMS functional modules;
[0023] Obtain input variables and output variables in the embedded code, and determine observations using the input variables and output variables;
[0024] Update the observations into the data dictionary and declare the embedded code in the variable declaration location using the updated data dictionary.
[0025] In one embodiment, the step of obtaining input variables and output variables in the embedded code and determining the observed quantity using the input variables and the output variables includes:
[0026] Get the hierarchical relationship between input variables and output variables in the embedded code;
[0027] The input variables and output variables whose hierarchical relationships meet the preset threshold relationship are determined as observations.
[0028] In one embodiment, the embedded codes corresponding to all BMS functional modules in the application layer are sent to the built underlying environment, and the embedded codes are integrated and compiled using the data dictionary to generate the BMS application, including:
[0029] Obtain the variable acquisition strategy corresponding to the BMS function module; wherein the variable acquisition strategy is used to determine the variables required for compiling the BMS function module without redefining the variables;
[0030] Use variable acquisition strategy to obtain the embedded code and variable storage location corresponding to the BMS functional module;
[0031] The embedded code and variable storage location are sent to the built underlying environment for integrated compilation to generate the BMS application.
[0032] In one embodiment, when the BMS functional module is a DCM fast charging module, the data dictionary includes at least: input variables, output variables, observed quantities, and calibrated quantities;
[0033] The steps of sending the embedded codes corresponding to all BMS functional modules in the application layer to the built underlying environment and integrating and compiling the embedded codes using the data dictionary to generate the BMS application include:
[0034] Get the variable acquisition strategy corresponding to the BMS functional module;
[0035] Use the variable acquisition strategy to obtain the output variables, observations and calibrations corresponding to the BMS functional module, and obtain the embedded code and variable storage location corresponding to the output variables, observations and calibrations;
[0036] The embedded code and variable storage location are sent to the built underlying environment for integrated compilation to generate the BMS application.
[0037] In a second aspect, an embodiment of the present invention further provides an integrated system for BMS applications, the system comprising:
[0038] The function module interface definition module is used to build a development environment for the application layer, and to build multiple BMS function modules in the development environment for the application layer; wherein the BMS function module at least includes: a signal list and a function interface function;
[0039] A data dictionary construction module is used to obtain a data dictionary corresponding to a BMS functional module, and to construct a variable name, variable type and variable storage location corresponding to the BMS functional module in the data dictionary;
[0040] An embedded code generation module is used to generate embedded codes of BMS functional modules using signal lists and functional interface functions; and declare variables of the embedded code to variable storage locations corresponding to those in the data dictionary;
[0041] The integrated compilation module is used to send the embedded codes corresponding to all BMS functional modules in the application layer to the built underlying environment, and use the data dictionary to integrate and compile the embedded codes to generate BMS applications.
[0042] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the BMS application integration method provided in the first aspect.
[0043] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the BMS application integration method provided in the first aspect.
[0044] An integrated method, system and electronic device for BMS application provided by an embodiment of the present invention, in the process of compiling and generating BMS application, constructs a development environment of application layer, and constructs multiple BMS function modules in the development environment of application layer; wherein, BMS function module at least includes: signal list and function interface function; then obtains data dictionary corresponding to BMS function module, and constructs variable name, variable type and variable storage location corresponding to BMS function module in the data dictionary; then uses signal list and function interface function to generate embedded code of BMS function module; and declares variables of embedded code to variable storage location corresponding to data dictionary; finally, sends embedded code corresponding to all BMS function modules in application layer to the underlying environment that has been constructed, and integrates and compiles embedded code to generate BMS application using data dictionary. The method develops BMS function modules in application layer respectively to generate their own embedded code, and finally sends them to the underlying environment that has been constructed for integration and compilation, which improves the flexibility of BMS application in the development process of application layer, saves application layer compilation time, and reduces integration problems caused by different development progress between BMS function modules.
[0045] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A flowchart of a BMS application integration method provided by an embodiment of the present invention;
[0049] Figure 2 A flowchart of step S102 in a BMS application integration method provided in an embodiment of the present invention;
[0050] Figure 3A flowchart of step S102 in another BMS application integration method provided in an embodiment of the present invention;
[0051] Figure 4 A flowchart after the step of obtaining a data dictionary corresponding to a BMS functional module and constructing a variable name, a variable type and a variable storage location corresponding to the BMS functional module in the data dictionary in a BMS application integration method provided in an embodiment of the present invention;
[0052] Figure 5 In a BMS application integration method provided by an embodiment of the present invention, an embedded code of a BMS function module is generated by using a signal list and a function interface function; and variables of the embedded code are declared to a flow chart in a variable storage location corresponding to a data dictionary;
[0053] Figure 6 In a BMS application integration method provided in an embodiment of the present invention, an input variable and an output variable in an embedded code are obtained, and a flow chart of determining the input variable and the output variable as an observation quantity is provided;
[0054] Figure 7 In a BMS application integration method provided in an embodiment of the present invention, the embedded codes corresponding to all BMS functional modules in the application layer are sent to the built underlying environment, and the embedded codes are integrated and compiled using a data dictionary to generate a flowchart of the BMS application;
[0055] Figure 8 In another BMS application integration method provided by an embodiment of the present invention, the embedded codes corresponding to all BMS functional modules in the application layer are sent to the built underlying environment, and the embedded codes are integrated and compiled using a data dictionary to generate a flow chart of the BMS application;
[0056] Fig. 9 A flowchart of another BMS application integration method provided by an embodiment of the present invention;
[0057] Fig.10 A schematic diagram of a data dictionary corresponding to a fast charging module in a BMS application integration method provided in an embodiment of the present invention;
[0058] Fig.11 A schematic diagram of the structure of an integrated system for BMS applications provided by an embodiment of the present invention;
[0059] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0060] icon:
[0061] 1110 - functional module interface definition module; 1120 - data dictionary construction module; 1130 - embedded code generation module; 1140 - integrated compilation module;
[0062] 101 - processor; 102 - memory; 103 - bus; 104 - communication interface. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] With the development of electric vehicles, the requirements for battery management systems (BMS) are becoming higher and higher, the control is becoming more and more complex, and the amount of development code is increasing. In the prior art, in the process of implementing BMS application development based on MATLAB / Simulink models, embedded code is generated after integration is completed at the application layer, and then integrated with the bottom layer. In this process, the integration flexibility of the application layer is low, and the compilation time when generating embedded code is long.
[0065] In summary, the prior art still has the problems of low flexibility and long compilation time in the integration process of BMS applications. Based on this, the present invention implements a method, system and electronic device for integrating BMS applications. The method develops the BMS functional modules in the application layer separately to generate their own embedded codes, and finally sends them to the completed underlying environment for integration and compilation, which improves the flexibility of BMS applications in the application layer development process, saves the application layer compilation time, and reduces the integration problems caused by different development progress between the functional modules of BMS.
[0066] To facilitate understanding of this embodiment, a BMS application integration method disclosed in an embodiment of the present invention is first introduced in detail. Figure 1 As shown, the integration method of the BMS application includes:
[0067] Step S101, constructing a development environment of the application layer, and constructing a plurality of BMS functional modules in the development environment of the application layer; wherein the BMS functional module at least includes: a signal list and a functional interface function.
[0068] The development and integration process of BMS applications mainly involves two levels, namely the application layer and the bottom layer. Build the development environment of the application layer, and build multiple BMS functional modules in the development environment of the application layer; clarify the interface definition of each module, including the signal list and functional interface function. The application layer contains various BMS functional modules. Information is transmitted between various functional modules through interface signals or interface functions. The signal list and interface function of each module must be clarified during the development process. Development and testing of different functions are achieved through these functional modules. When developing and testing the functional modules, it is necessary to use their built-in signal lists and functional interface functions. Therefore, in the process of defining the relevant interfaces of the BMS functional modules, the signal list and functional interface functions need to be defined.
[0069] Step S102, obtaining a data dictionary corresponding to the BMS functional module, and constructing a variable name, variable type and variable storage location corresponding to the BMS functional module in the data dictionary.
[0070] The data dictionary can be understood as a form of data storage. The data dictionary stores the variables and their attribute data in the BMS function module in a fixed data format. The variables in the data dictionary correspond to the variables in the BMS function module, and the attribute data of the variable, such as the variable storage location and variable declaration location, all correspond to this variable. For example, the data dictionary can be stored in a table file, in which each row represents the various attributes corresponding to a variable, and each column represents the attribute data of the variable.
[0071] Step S103, using the signal list and the functional interface function to generate the embedded code of the BMS functional module; and declaring the variables of the embedded code to the variable storage location corresponding to the data dictionary.
[0072] After the development of each module is completed, the embedded code is generated through the application layer development environment. Each module can declare the module output variables and the module internal observations, calibration quantities and other module input variables to the storage file specified in the data dictionary by managing the data dictionary and the outermost interface signal. The generated embedded code will declare the variables as global variables in the corresponding variable declaration position in the data dictionary and save them, so that they can be called directly.
[0073] Step S104, the embedded codes corresponding to all BMS functional modules in the application layer are sent to the constructed underlying environment, and the embedded codes are integrated and compiled using the data dictionary to generate a BMS application.
[0074] After the embedded code is generated, all embedded codes and variable positions corresponding to the BMS functional modules in the application layer are sent to the underlying environment for integrated compilation. During the compilation process, global variables need to be constrained and processed accordingly to prevent variable redefinition. The embedded codes generated by each BMS functional module (including the functional module program code file and the variable declaration code file containing the module output variables and the module internal observation and calibration quantities) are integrated and compiled in the constructed underlying environment to generate an executable file in S19 or Hex format that can be burned into the MCU.
[0075] From the BMS application integration method mentioned in the above embodiment, it can be seen that this method develops the BMS functional modules in the application layer separately to generate their own embedded codes, and finally sends them to the completed underlying environment for integration and compilation, thereby improving the flexibility of the BMS application in the application layer development process, saving application layer compilation time, and reducing the integration problems caused by different development progress between the BMS functional modules.
[0076] In one embodiment, a data dictionary corresponding to the BMS functional module is obtained, and a variable name, variable type, and variable storage location corresponding to the BMS functional module are constructed in the data dictionary. Figure 2 As shown, including:
[0077] Step S201, determining whether the BMS function module contains a corresponding data dictionary;
[0078] Step S202, if yes, then obtain the naming rule corresponding to the data dictionary;
[0079] Step S203, saving the variable name, variable type, variable initial value and variable storage location corresponding to the BMS functional module into the data dictionary according to the naming rules.
[0080] In actual scenarios, it is not guaranteed that the BMS function module contains the corresponding data dictionary, so it is necessary to determine whether the data dictionary exists. The determination process can be achieved by traversing the files in the BMS function module and then querying whether the data dictionary file is included.
[0081] If a data dictionary is included, it means that the BMS function module is in the development process or has been completed, so the corresponding naming rules in the data dictionary can be directly obtained. In layman's terms, the naming rules determine the form of data storage in the data dictionary. If the data field is table data, then the naming rules determine the title row of the table data. Therefore, all variables and their attribute data corresponding to the BMS function module can be determined through the naming rules. Therefore, the variables corresponding to the BMS function module (including variable name, variable type, variable initial value, variable storage location, etc.) can be saved to the data dictionary according to the naming rules.
[0082] In one embodiment, a data dictionary corresponding to the BMS functional module is obtained, and a variable, a variable storage location, and a variable declaration location corresponding to the BMS functional module are constructed in the data dictionary. Figure 3 As shown, including:
[0083] Step S301, determining whether the BMS function module contains a corresponding data dictionary;
[0084] Step S302, if not, construct a data dictionary and its naming rules using the variables in the BMS function module;
[0085] Step S303 , saving the variables, variable storage locations and variable declaration locations corresponding to the BMS functional modules into the data dictionary according to the naming rules.
[0086] If the data dictionary is not included, it means that the BMS function module is in an undeveloped state. Therefore, it is necessary to use the variables in the BMS function module to first construct the data dictionary and determine its naming rules. The naming rules also determine the form of data storage in the data dictionary. If the data field is tabular data, the naming rules determine the header row of the tabular data. Therefore, all variables and their attribute data corresponding to the BMS function module can be determined through the naming rules, and the variables corresponding to the BMS function module can be constructed in the data dictionary, which may include: variable name, variable type, variable initial value, variable storage location, etc.
[0087] After the data dictionary is built, it needs to be loaded and can be used as a global variable. In one embodiment, after obtaining the data dictionary corresponding to the BMS function module and building the variable name, variable type and variable storage location corresponding to the BMS function module in the data dictionary, as shown in the figure, Figure 4 As shown, the method also includes:
[0088] Step S401, saving the data dictionary to the initialized table file;
[0089] Step S402: Load the table file into the development environment of the application layer through a script tool.
[0090] The data dictionary corresponding to each BMS functional module is stored in the form of a table file, and the generated table file is loaded into the development environment of the application layer through the relevant script tool. In the specific scenario, the data dictionary is saved in an Excel table file, and the data in the Excel table file is loaded into the Matlab workspace through the .m script used in the Matlab development environment.
[0091] In one embodiment, the embedded code of the BMS functional module is generated using the signal list and the functional interface function; and the variables of the embedded code are declared to the variable storage location corresponding to the data dictionary in step S103, such as Figure 5 As shown, including:
[0092] Step S501, using the signal list and the functional interface function to obtain the embedded code of the developed BMS functional module;
[0093] Step S502, obtaining input variables and output variables in the embedded code, and determining observation quantities using the input variables and output variables;
[0094] Step S503, updating the observation value into the data dictionary, and using the updated data dictionary to declare the embedded code in the variable declaration position.
[0095] After the development of each module is completed, the embedded code is generated through the application layer development environment. Each module can declare the module output variables and the module internal observations, calibration quantities and other module input variables to the storage file specified in the data dictionary by managing the data dictionary and the outermost interface signal. Specifically, the data dictionary of other BMS functional modules that have been developed or are being developed can be obtained first to clarify their output interfaces; then, in order to use the embedded code generated by each module to realize the matching of interface signals or interface functions at the bottom layer, the outermost input and output variables of the module are defined as observations. Finally, the corresponding interface signals are defined in the data dictionary, and the variable storage locations are distinguished.
[0096] The input variables and output variables are determined as observed quantities according to the hierarchical relationship of the variables. In one embodiment, the step S502 of obtaining the input variables and output variables in the embedded code and determining the input variables and output variables as observed quantities is as follows: Figure 6 As shown, including:
[0097] Step S601, obtaining the hierarchical relationship between input variables and output variables in the embedded code;
[0098] Step S602: Determine the input variables and output variables whose hierarchical relationships satisfy a preset threshold relationship as observations.
[0099] The hierarchical relationship is determined by the position of the variable in the function, object, or module. In actual scenarios, the outermost input variables and output variables in the embedded code can be defined as observations, which can then be used in subsequent steps.
[0100] In one embodiment, the embedded codes corresponding to all BMS functional modules in the application layer are sent to the built underlying environment, and the embedded codes are integrated and compiled using the data dictionary to generate the BMS application step S104, such as Figure 7 As shown, including:
[0101] Step S701, obtaining a variable acquisition strategy corresponding to a BMS functional module; wherein the variable acquisition strategy is used to determine the variables required for compiling the BMS functional module without redefining the variables;
[0102] Step S702, using the variable acquisition strategy to acquire the embedded code and variable declaration position corresponding to the BMS function module;
[0103] Step S703: Send the embedded code and variable declaration location to the completed underlying environment for compilation to generate a BMS application.
[0104] In the above process, the variable acquisition strategy is used to obtain the storage location of the variables required for the integration and compilation of the BMS functional modules; then the embedded code generated by each BMS functional module (including the functional module program code file and the variable declaration code file containing the module output variables and the module internal observation and calibration) is integrated and compiled in the built underlying environment to generate an executable file in S19 or Hex format that can be burned into the MCU. Specifically, during the integration process, the variables corresponding to each BMS functional module need to be deduplicated, otherwise an error will be reported during the underlying compilation due to variable redefinition. The process of deduplication of variables is implemented through the variable acquisition strategy: each module specifies the source file or header file (.c, .h file) of the variable declaration by managing the storage location of the variables in the data dictionary, and each module declares the module output variables and the module internal observation and internal calibration to the source file or header file (.c, .h file) named after the module, and declares the output variables of other modules called to the corresponding source files or header files (.c, .h files) named after other modules. During the low-level integration and compilation process, only the module's program code and the source files or header files (.c, .h files) that declare the module's output variables and the module's internal observations and internal calibration quantities are sent to the low-level compilation to avoid redefinition.
[0105] In one embodiment, when the BMS functional module is a DCM fast charging module, the data dictionary includes at least: input variables, output variables, observations, and calibrations; at this time, the embedded codes corresponding to all BMS functional modules in the application layer are sent to the completed underlying environment, and the embedded codes are integrated and compiled using the data dictionary to generate step S104 of the BMS application, such as Figure 8 As shown, including:
[0106] Step S801, obtaining a variable acquisition strategy corresponding to a BMS functional module;
[0107] Step S802, using the variable acquisition strategy to acquire the output variables, observations and calibrations corresponding to the BMS functional module, and acquiring the embedded codes and variable declaration positions corresponding to the output variables, observations and calibrations;
[0108] Step S803: Send the embedded code and variable declaration location to the completed underlying environment for compilation to generate a BMS application.
[0109] In specific scenarios, the data dictionary corresponding to the DCM fast charging module contains input variables, output variables, observations and calibration quantities. During the underlying integration of the DCM fast charging module, only the relevant files and parameters corresponding to the output variables, observations and calibration quantities can be integrated to prevent variable redefinition errors during the underlying compilation process.
[0110] like Fig. 9 As shown in the flow chart of another BMS application integration method, the compilation generation method of the BMS application first defines the module interface, including a signal list and an interface function; then each module is developed and tested, and the corresponding embedded code is generated; finally, the embedded code is integrated and compiled through the bottom layer to obtain the corresponding BMS application.
[0111] In specific scenarios, Matlab cscdesigner can be used to customize the common custom storage class of each BMS module. Each BMS functional module defines and manages its corresponding signal list and interface function. In the data dictionary of each BMS functional module, the variable attributes (including variable name, variable type, variable initial value, variable storage location, etc.) of input variables, output variables, observed variables and calibrated variables need to be filled in the specified columns of the specified area of Excel. Fig.10 As shown in the diagram of the data dictionary corresponding to the fast charging module, the data dictionary in the fast charging module DCM contains input variables prefixed with VSOC_ and VSOH_, output variables prefixed with VDCM_, observations prefixed with VDCM_, and calibrations prefixed with KDCM_. The names, storage locations, and notes of these variables are all stored in Fig.10The digital dictionary table file shown includes the locations of two declarations in each table, namely: the input variables with the prefix VSOC are declared in SOC.C / SOC.h, indicating that the output of the SOC module is used as the input of the DCM module; the input variables with the prefix VSOH are declared in SOH.c / SOH.h, indicating that the output of the SOH module is used as the input of the DCM module; the output variables with the prefix VDCM are declared in DCM.c / SOH.h; the observed quantities with the prefix VDCM are declared in DCM.c / DCM.h; the calibrated quantities with the prefix VDCM are declared in DCM.c / DCM.h.
[0112] During the development of each BMS functional module, the outermost input variables and output variables are defined as observations. The generated embedded code will declare the variables as global variables in the storage location specified in the data dictionary (SOC.c / SOC.h, SOH.c / SOH.h, DCM.c / DCM.h, etc.), and the global variables can be directly called for calculations.
[0113] Integrate and compile the embedded code generated by each functional module of the BMS (including the functional module program code file and the variable declaration code file containing the module output variables and the module internal observation and calibration quantities) in the built underlying environment to generate an executable file in S19 or Hex format that can be burned into the MCU. Taking the DCM fast charging module as an example, when the fast charging module is integrated at the bottom layer, only the files containing the DCM output variables, DCM observation quantities, and DCM calibration quantities can be integrated to prevent variable redefinition that occurs in the bottom layer compilation.
[0114] In summary, from the BMS application integration method mentioned in the above embodiment, it can be seen that the method develops the BMS functional modules in the application layer separately to generate their own embedded codes, and finally sends them to the completed underlying environment for integration and compilation, which improves the flexibility of the BMS application in the application layer development process, saves the application layer compilation time, and reduces the integration problems caused by different development progress between the BMS functional modules.
[0115] For the BMS application integration method provided in the above embodiment, the embodiment of the present invention provides a BMS application integration system, such as Fig.11 As shown, the integrated system of the BMS application includes:
[0116] The function module interface definition module 1110 is used to construct a development environment of the application layer, and to construct multiple BMS function modules in the development environment of the application layer; wherein the BMS function module at least includes: a signal list and a function interface function;
[0117] The data dictionary construction module 1120 is used to obtain the data dictionary corresponding to the BMS functional module, and construct the variable name, variable type and variable storage location corresponding to the BMS functional module in the data dictionary;
[0118] The embedded code generation module 1130 is used to generate the embedded code of the BMS functional module by using the signal list and the functional interface function; and declare the variables of the embedded code to the variable storage location corresponding to the data dictionary;
[0119] The integrated compilation module 1140 is used to send the embedded codes corresponding to all BMS functional modules in the application layer to the built underlying environment, and use the data dictionary to integrate and compile the embedded codes to generate BMS applications.
[0120] In one embodiment, the data dictionary construction module 1120 is used to: determine whether the BMS function module contains a corresponding data dictionary; if so, obtain the naming rules corresponding to the data dictionary; and save the variable name, variable type, variable initial value and variable storage location corresponding to the BMS function module into the data dictionary according to the naming rules.
[0121] In one embodiment, the data dictionary construction module 1120 is used to: determine whether the BMS function module contains a corresponding data dictionary; if not, use the variables in the BMS function module to construct the data dictionary and its naming rules; save the variables, variable storage locations and variable declaration locations corresponding to the BMS function module into the data dictionary according to the naming rules.
[0122] In one embodiment, the compilation generation system of the BMS application further includes: a loading module; the loading module is used to: save the data dictionary to an initialized table file; and load the table file into the development environment of the application layer through a script tool.
[0123] In one embodiment, the embedded code generation module 1130 is used to: obtain the embedded code of the developed BMS functional module using a signal list and a functional interface function; obtain the input variables and output variables in the embedded code, and determine the observed value using the input variables and the output variables; update the observed value into the data dictionary, and use the updated data dictionary to declare the embedded code in the variable declaration position.
[0124] In one embodiment, the embedded code generation module 1130, in the process of obtaining input variables and output variables in the embedded code and determining observation quantities using the input variables and output variables, is also used to: obtain the hierarchical relationship of the input variables and output variables in the embedded code; and determine the input variables and output variables whose hierarchical relationships satisfy a preset threshold relationship as observation quantities.
[0125] In one embodiment, the integrated compilation module 1140 is used to: obtain a variable acquisition strategy corresponding to a BMS functional module; wherein the variable acquisition strategy is used to determine the variables required for compiling the BMS functional module without redefining the variables; obtain the embedded code and variable storage location corresponding to the BMS functional module using the variable acquisition strategy; and generate a BMS application after sending the embedded code and variable storage location to a completed underlying environment for integrated compilation.
[0126] In one embodiment, when the BMS functional module is a DCM fast charging module, the data dictionary includes at least: input variables, output variables, observation quantities and calibration quantities; the integrated compilation module 1140 at this time is used to: obtain the variable acquisition strategy corresponding to the BMS functional module; use the variable acquisition strategy to obtain the output variables, observation quantities and calibration quantities corresponding to the BMS functional module, and obtain the embedded code and variable storage location corresponding to the output variables, observation quantities and calibration quantities; send the embedded code and variable storage location to the completed underlying environment for integrated compilation, and generate a BMS application.
[0127] The embodiment of the present invention provides an integrated system for BMS applications. The system develops BMS functional modules in the application layer separately to generate respective embedded codes, and finally sends the codes to the completed underlying environment for integration and compilation. This improves the flexibility of BMS applications in the application layer development process, saves application layer compilation time, and reduces integration problems caused by different development progress between BMS functional modules.
[0128] The integrated system of BMS applications provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the embodiment of the integrated method of BMS applications described above. For the sake of brief description, for matters not mentioned in the embodiment, reference may be made to the corresponding contents in the above embodiment.
[0129] This embodiment also provides an electronic device. The structural diagram of the electronic device is as follows: Fig.12 As shown, the server includes a processor 101 and a memory 102; wherein the memory 102 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the above-mentioned BMS application integration method.
[0130] Fig.12 The electronic device shown also includes a bus 103 and a communication interface 104 , and the processor 101 , the communication interface 104 and the memory 102 are connected via the bus 103 .
[0131] The memory 102 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The bus 103 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0132] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 message or IPv4 message to the user terminal through the network interface.
[0133] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102 and completes the steps of the method of the above embodiment in combination with its hardware.
[0134] An embodiment of the present invention further provides a storage medium, on which a computer-readable computer program is stored. When the computer program is executed by a processor, the steps of the method of the above embodiment are executed.
[0135] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, 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 communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0138] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the 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 several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0139] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An integration method for BMS applications, It is characterized in that The method comprises: Constructing a development environment of an application layer, and constructing a plurality of BMS functional modules in the development environment of the application layer; wherein the BMS functional modules at least include: a signal list and a functional interface function; Obtaining a data dictionary corresponding to the BMS functional module, and constructing a variable name, variable type, and variable storage location corresponding to the BMS functional module in the data dictionary; Generate the embedded code of the BMS functional module using the signal list and the functional interface function; and declare the variables of the embedded code to the variable storage location corresponding to the data dictionary; Sending the embedded codes corresponding to all the BMS functional modules in the application layer to the constructed underlying environment, and integrating and compiling the embedded codes using the data dictionary to generate a BMS application; The step of generating the embedded code of the BMS functional module by using the signal list and the functional interface function; and declaring the variables of the embedded code to the variable storage location corresponding to the data dictionary includes: Using the signal list and the functional interface function, the embedded code of the BMS functional module that has been developed is obtained; Obtaining input variables and output variables in the embedded code, and determining observation quantities using the input variables and the output variables; updating the observable into the data dictionary, and declaring the embedded code in the variable storage location using the updated data dictionary; The step of obtaining the input variables and the output variables in the embedded code and determining the observed quantity using the input variables and the output variables comprises: Acquire the hierarchical relationship between the input variable and the output variable in the embedded code; The input variables and the output variables whose hierarchical relationships satisfy a preset threshold relationship are determined as the observed values.
2. The method for integrating BMS applications according to claim 1, It is characterized in that The step of obtaining a data dictionary corresponding to the BMS functional module and constructing a variable name, a variable type and a variable storage location corresponding to the BMS functional module in the data dictionary includes: Determining whether the BMS function module contains the corresponding data dictionary; If yes, then obtain the naming rule corresponding to the data dictionary; The variable name, variable type, variable initial value and variable storage location corresponding to the BMS functional module are saved in the data dictionary according to the naming rule.
3. The method for integrating BMS applications according to claim 1, It is characterized in that After the step of obtaining the data dictionary corresponding to the BMS functional module and constructing the variable name, variable type and variable storage location corresponding to the BMS functional module in the data dictionary, the method further includes: Saving the data dictionary to an initialized table file; The table file is loaded into the development environment of the application layer through a script tool.
4. The method for integrating BMS applications according to claim 1, It is characterized in that The step of sending the embedded codes corresponding to all the BMS functional modules in the application layer to the constructed underlying environment, and integrating and compiling the embedded codes using the data dictionary to generate a BMS application includes: Obtaining a variable acquisition strategy corresponding to the BMS functional module; wherein the variable acquisition strategy is used to determine the variables required for compiling the BMS functional module under the premise that the variables are not redefined; Acquire the embedded code and the variable storage location corresponding to the BMS functional module using the variable acquisition strategy; The embedded code and the variable storage location are sent to the built underlying environment for integrated compilation to generate the BMS application.
5. The method for integrating BMS applications according to claim 4, It is characterized in that When the BMS functional module is a DCM fast charging module, the data dictionary includes at least: input variables, output variables, observed quantities and calibrated quantities; The step of sending the embedded codes corresponding to all the BMS functional modules in the application layer to the constructed underlying environment, and integrating and compiling the embedded codes using the data dictionary to generate a BMS application includes: Obtaining the variable acquisition strategy corresponding to the BMS functional module; Acquire the output variable, the observation amount and the calibration amount corresponding to the BMS functional module by using the variable acquisition strategy, and acquire the embedded code and the variable storage location corresponding to the output variable, the observation amount and the calibration amount; The embedded code and the variable storage location are sent to the built underlying environment for integrated compilation to generate the BMS application.
6. An integrated system for BMS applications, It is characterized in that The system comprises: A function module interface definition module, used to construct a development environment for an application layer, and to construct a plurality of BMS function modules in the development environment for the application layer; wherein the BMS function module at least includes: a signal list and a function interface function; A data dictionary construction module, used to obtain a data dictionary corresponding to the BMS functional module, and construct a variable name, variable type and variable storage location corresponding to the BMS functional module in the data dictionary; An embedded code generation module, used to generate embedded code of the BMS functional module using the signal list and the functional interface function; and declare variables of the embedded code to the variable storage location corresponding to the data dictionary; An integrated compilation module, used for sending the embedded codes corresponding to all the BMS functional modules in the application layer to the constructed underlying environment, and integrating and compiling the embedded codes using the data dictionary to generate a BMS application; The embedded code generation module is further used to: obtain the embedded code of the BMS functional module that has been developed by using the signal list and the functional interface function; obtain the input variables and output variables in the embedded code, and determine the observed value by using the input variables and the output variables; update the observed value to the data dictionary, and declare the embedded code in the variable storage location by using the updated data dictionary; The embedded code generation module, in the process of obtaining the input variables and output variables in the embedded code and determining the observation quantity using the input variables and the output variables, is also used to: obtain the hierarchical relationship between the input variables and the output variables in the embedded code; and determine the input variables and the output variables whose hierarchical relationship satisfies a preset threshold relationship as the observation quantity.
7. An electronic device, It is characterized in that include: A processor and a storage device; a computer program is stored on the storage device, and when the computer program is executed by the processor, the steps of the BMS application integration method as described in any one of claims 1 to 5 above are implemented.
Citation Information
Patent Citations
Battery management system module development software integration method
CN111273895A
Battery safety management system
US11398736B1