A charging pile function configuration method and system
By creating a file system in the charging pile and unifying the packaging of peripheral drivers, combined with peripheral management and the use of configuration files, the problem of inefficient functional configuration of traditional charging piles is solved, efficient and concise functional configuration and code management are achieved, and the maintenance and scalability of charging piles is improved.
Patent Information
- Application Number
- CN202411702427.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-04
AI Technical Summary
The functional configuration of traditional charging piles is inefficient, and program code needs to be frequently modified and recompiled. It also requires a lot of time and resources to rewrite and test the code when hardware is updated, which reduces the maintainability and scalability of charging piles.
By creating a file system, grouping peripherals based on device type, unifying the driver and setting the call interface, the upper computer creates peripheral management and configuration files, and configures them to the file system through the communication interface. After restarting, the charging pile reads the file and performs function configuration.
It realizes the efficient function configuration of charging piles, without changing and recompiling the source code, simple and easy to understand and maintain source code, centralized management of configuration information, easy to transplant between different systems and platforms, and improves the reusability of code and the maintainability of charging piles.
Smart Images

Figure CN119759437A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of charging pile management, and in particular to a charging pile function configuration method and system. Background Art
[0002] With the rapid development of new energy vehicles, more and more consumers choose to buy energy-saving and environmentally friendly new energy vehicles, and charging pile technology has also developed rapidly. In order to adapt to the rapidly growing charging demand, charging piles are iterating at a high speed. Since the charging methods and protocols of each new energy vehicle are different, it is necessary to launch corresponding charging piles for different models of new energy vehicles to meet the diverse charging needs, resulting in a wide variety of charging piles on the market; at the same time, different charging piles also have different requirements for functions (peripherals). As charging piles are put into use, it is also necessary to update and iterate the existing functions, that is, to configure the functions.
[0003] Traditionally, each function and the corresponding driver are hard-coded in the program of the charging pile, which has the following disadvantages: 1. Any change in the demand for internal functions (functional configuration) requires modifying the program code and recompiling, and then undergoing a series of processes such as regression testing before it can be put on the market, which is inefficient; 2. Since the functions in the program are hard-coded, every time the hardware is updated, the code project needs to be rewritten and tested, which will consume a lot of time and resources; 3. The program layering is not clear enough, and there is a close coupling relationship between the driver and the program. The calling methods for different functions are different. When different functions need to be replaced, everything from the driver to the application layer needs to be rewritten, which not only increases development costs and time, but also reduces the maintainability and scalability of the charging pile.
[0004] Therefore, how to provide a charging pile function configuration method and system to improve the efficiency of charging pile function configuration has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a charging pile function configuration method and system to improve the efficiency of charging pile function configuration.
[0006] In a first aspect, the present invention provides a method for configuring a charging pile function, comprising the following steps:
[0007] Step S1, the charging pile creates a file system, groups the peripherals based on the device type, uniformly packages the drivers of the peripherals in each group, and sets the corresponding calling interface;
[0008] Step S2: The host computer creates a peripheral management file and a peripheral configuration file, and configures the peripheral management file and the peripheral configuration file to the file system through the communication interface;
[0009] Step S3: the charging pile performs a restart operation based on the restart instruction sent by the host computer, and reads the peripheral management file and the peripheral configuration file from the file system after the restart is completed;
[0010] Step S4: the charging pile performs function configuration based on the peripheral management file, the peripheral configuration file and the calling interface;
[0011] Step S5: The charging pile feeds back the function configuration result to the upper computer.
[0012] Furthermore, in step S1, the file system has the functions of power-off preservation, bad block search and wear leveling.
[0013] Furthermore, the step S2 is specifically as follows:
[0014] The host computer creates a peripheral management file in JSON format and a peripheral configuration file in JSON format; the peripheral management file is used to record the corresponding relationship between the charging pile and the function and device resources; the peripheral configuration file is used to record the device resources and device configuration information; the device resources are independent object devices realized by different board-level resources and external communication modules; the device configuration information is the attribute information;
[0015] The host computer configures the peripheral management file and the peripheral configuration file to the file system through the TCP interface, UDP interface, TFTP interface, FTP interface or the communication interface of the serial port.
[0016] Furthermore, the step S3 is specifically as follows:
[0017] The charging pile receives the restart instruction sent by the host computer, verifies the restart instruction and immediately executes the restart operation. After the restart is completed, the peripheral management file and the peripheral configuration file are automatically read from the file system through the BOOT program.
[0018] Furthermore, the step S4 is specifically as follows:
[0019] The charging pile parses the peripheral configuration file to obtain device resources and device configuration information, verifies the device resources, configures the device configuration information to the corresponding peripheral through the calling interface, and then manages the peripheral through the peripheral management file to complete the functional configuration of the charging pile.
[0020] In a second aspect, the present invention provides a charging pile function configuration system, comprising the following modules:
[0021] The initialization module is used to create a file system for the charging pile, group the peripherals based on the device type, uniformly package the drivers of the peripherals in each group, and set the corresponding calling interface;
[0022] A file configuration module, used for the host computer to create a peripheral management file and a peripheral configuration file, and configure the peripheral management file and the peripheral configuration file to the file system through the communication interface;
[0023] A file reading module, used for the charging pile to perform a restart operation based on the restart instruction sent by the host computer, and read the peripheral management file and the peripheral configuration file from the file system after the restart is completed;
[0024] Function configuration module, used for the charging pile to perform function configuration based on the peripheral management file, peripheral configuration file and calling interface;
[0025] The configuration result feedback module is used for the charging pile to feedback the function configuration results to the upper computer.
[0026] Furthermore, in the initialization module, the file system has the functions of power-off preservation, bad block search and wear leveling.
[0027] Furthermore, the file configuration module is specifically used for:
[0028] The host computer creates a peripheral management file in JSON format and a peripheral configuration file in JSON format; the peripheral management file is used to record the corresponding relationship between the charging pile and the function and device resources; the peripheral configuration file is used to record the device resources and device configuration information; the device resources are independent object devices realized by different board-level resources and external communication modules; the device configuration information is the attribute information;
[0029] The host computer configures the peripheral management file and the peripheral configuration file to the file system through the TCP interface, UDP interface, TFTP interface, FTP interface or the communication interface of the serial port.
[0030] Furthermore, the file reading module is specifically used for:
[0031] The charging pile receives the restart instruction sent by the host computer, verifies the restart instruction and immediately executes the restart operation. After the restart is completed, the peripheral management file and the peripheral configuration file are automatically read from the file system through the BOOT program.
[0032] Furthermore, the function configuration module is specifically used for:
[0033] The charging pile parses the peripheral configuration file to obtain device resources and device configuration information, verifies the device resources, configures the device configuration information to the corresponding peripheral through the calling interface, and then manages the peripheral through the peripheral management file to complete the functional configuration of the charging pile.
[0034] The advantages of the present invention are:
[0035] A file system is created through the charging pile, and each peripheral is grouped based on the device type. The drivers of each group of peripherals are uniformly packaged, and the corresponding calling interface is set; then the host computer configures the created peripheral management file and peripheral configuration file to the file system through the communication interface; then the charging pile performs a restart operation based on the restart instruction sent by the host computer, and after the restart is completed, the peripheral management file and the peripheral configuration file are read from the file system, and the function configuration is performed based on the peripheral management file, the peripheral configuration file and the calling interface, and the function configuration result is fed back to the host computer; that is, the function of the charging pile is configured based on the peripheral management file and the peripheral configuration file, and the peripheral management file and the peripheral configuration file can be easily modified without changing and recompiling the source code, which enables the charging pile to use different configurations in different environments and conditions; using the peripheral configuration file can make the source code more concise, easy to understand and maintain, and all configuration information is concentrated in one file for easy management; the peripheral configuration file can be easily ported between different systems and platforms, which improves the reusability of the code; during the development and debugging process, the system behavior can be quickly changed by modifying the peripheral configuration file without modifying the code, and the peripheral switching can be quickly performed by changing the peripheral configuration file, which ultimately greatly improves the efficiency of the charging pile function configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0037] Figure 1 It is a flow chart of a charging pile function configuration method of the present invention.
[0038] Figure 2 It is a structural schematic diagram of a charging pile function configuration system of the present invention. DETAILED DESCRIPTION
[0039] The technical solution in the embodiment of the present application has the following overall idea: the functions of the charging pile are configured based on the peripheral management file and the peripheral configuration file. The peripheral management file and the peripheral configuration file can be easily modified without changing and recompiling the source code, which allows the charging pile to use different configurations in different environments and conditions; the use of the peripheral configuration file can make the source code more concise, easy to understand and maintain, and all configuration information is concentrated in one file for easy management; the peripheral configuration file can be easily ported between different systems and platforms, improving the reusability of the code; during the development and debugging process, the system behavior can be quickly changed by modifying the peripheral configuration file without modifying the code, and the peripheral switching can be quickly performed by changing the peripheral configuration file, which ultimately greatly improves the efficiency of the charging pile function configuration.
[0040] Please refer to Figure 1 to Figure 2As shown, a preferred embodiment of a charging pile function configuration method of the present invention includes the following steps:
[0041] Step S1, the charging pile creates a file system, groups the peripherals based on the device type, uniformly packages the drivers of the peripherals in each group, and sets the corresponding calling interface;
[0042] The present invention manages different device resources of the charging pile in a unified manner at the driver level. For the same type of device resource drivers, unified framework scheduling is implemented from the interface and operation control, and the development and application of other modules are decoupled from the board level. Developers of different motherboard layers only need to be responsible for the motherboard hardware resources they develop and implement the corresponding driver framework. Other peripherals obtain the corresponding driver name according to the peripheral configuration file, and can use the on-board device resources after querying the specific driver object, so that when the motherboard is replaced, the peripheral program and the business program do not need to be changed.
[0043] Step S2: The host computer creates a peripheral management file and a peripheral configuration file, and configures the peripheral management file and the peripheral configuration file to the file system through the communication interface;
[0044] Step S3: the charging pile performs a restart operation based on the restart instruction sent by the host computer, and reads the peripheral management file and the peripheral configuration file from the file system after the restart is completed;
[0045] Step S4, the charging pile performs function configuration based on the peripheral management file, the peripheral configuration file and the calling interface; that is, the charging pile automatically reads the peripheral management file and the peripheral configuration file after powering on again, and then starts and configures each peripheral, and enables the corresponding module protection mechanism; if there is no peripheral configuration file or the peripheral configuration file fails to be parsed, the default configuration is used;
[0046] Step S5: The charging pile feeds back the function configuration result to the upper computer in real time through the communication interface.
[0047] The present invention automatically reads peripheral management files and peripheral configuration files when the charging pile is powered on, so as to set device drivers and module system protections in different states according to the peripheral management files and peripheral configuration files. The host computer can also use different communication interfaces to read and set each peripheral management file and peripheral configuration file.
[0048] In step S1, the file system has the functions of power-off saving, bad block search and wear leveling. The read and write operations of various configuration files can be effectively managed through the file system.
[0049] The step S2 is specifically as follows:
[0050] The host computer creates a peripheral management file in JSON format and a peripheral configuration file in JSON format; the peripheral management file is used to record the corresponding relationship between the charging pile and the function and device resources; the peripheral configuration file is used to record the device resources and device configuration information; the device resources are independent object devices realized by different board-level resources and external communication modules; the device configuration information is the attribute information;
[0051] The host computer configures the peripheral management file and the peripheral configuration file to the file system through the TCP interface, UDP interface, TFTP interface, FTP interface or the communication interface of the serial port.
[0052] The step S3 is specifically as follows:
[0053] The charging pile receives the restart instruction sent by the host computer, verifies the restart instruction and immediately executes the restart operation. After the restart is completed, the peripheral management file and the peripheral configuration file are automatically read from the file system through the BOOT program.
[0054] The step S4 is specifically as follows:
[0055] The charging pile parses the peripheral configuration file to obtain device resources and device configuration information, verifies the device resources, configures the device configuration information to the corresponding peripheral through the calling interface, and then manages the peripheral through the peripheral management file to complete the functional configuration of the charging pile.
[0056] A preferred embodiment of a charging pile function configuration system of the present invention includes the following modules:
[0057] The initialization module is used to create a file system for the charging pile, group the peripherals based on the device type, uniformly package the drivers of the peripherals in each group, and set the corresponding calling interface;
[0058] The present invention manages different device resources of the charging pile in a unified manner at the driver level. For the same type of device resource drivers, unified framework scheduling is implemented from the interface and operation control, and the development and application of other modules are decoupled from the board level. Developers of different motherboard layers only need to be responsible for the motherboard hardware resources they develop and implement the corresponding driver framework. Other peripherals obtain the corresponding driver name according to the peripheral configuration file, and can use the on-board device resources after querying the specific driver object, so that when the motherboard is replaced, the peripheral program and the business program do not need to be changed.
[0059] A file configuration module, used for the host computer to create a peripheral management file and a peripheral configuration file, and configure the peripheral management file and the peripheral configuration file to the file system through the communication interface;
[0060] A file reading module, used for the charging pile to perform a restart operation based on the restart instruction sent by the host computer, and read the peripheral management file and the peripheral configuration file from the file system after the restart is completed;
[0061] Function configuration module, used for the charging pile to perform function configuration based on the peripheral management file, the peripheral configuration file and the calling interface; that is, the charging pile automatically reads the peripheral management file and the peripheral configuration file after powering on again, and then starts and configures each peripheral, and enables the corresponding module protection mechanism; if there is no peripheral configuration file or the peripheral configuration file fails to be parsed, the default configuration is used;
[0062] The configuration result feedback module is used for the charging pile to feed back the function configuration results to the upper computer in real time through the communication interface.
[0063] The present invention automatically reads peripheral management files and peripheral configuration files when the charging pile is powered on, so as to set device drivers and module system protections in different states according to the peripheral management files and peripheral configuration files. The host computer can also use different communication interfaces to read and set each peripheral management file and peripheral configuration file.
[0064] In the initialization module, the file system has the functions of power-off preservation, bad block search and wear leveling. The read and write operations of various configuration files can be effectively managed through the file system.
[0065] The file configuration module is specifically used for:
[0066] The host computer creates a peripheral management file in JSON format and a peripheral configuration file in JSON format; the peripheral management file is used to record the corresponding relationship between the charging pile and the function and device resources; the peripheral configuration file is used to record the device resources and device configuration information; the device resources are independent object devices realized by different board-level resources and external communication modules; the device configuration information is the attribute information;
[0067] The host computer configures the peripheral management file and the peripheral configuration file to the file system through the TCP interface, UDP interface, TFTP interface, FTP interface or the communication interface of the serial port.
[0068] The file reading module is specifically used for:
[0069] The charging pile receives the restart instruction sent by the host computer, verifies the restart instruction and immediately executes the restart operation. After the restart is completed, the peripheral management file and the peripheral configuration file are automatically read from the file system through the BOOT program.
[0070] The function configuration module is specifically used for:
[0071] The charging pile parses the peripheral configuration file to obtain device resources and device configuration information, verifies the device resources, configures the device configuration information to the corresponding peripheral through the calling interface, and then manages the peripheral through the peripheral management file to complete the functional configuration of the charging pile.
[0072] In summary, the advantages of the present invention are:
[0073] A file system is created through the charging pile, and each peripheral is grouped based on the device type. The drivers of each group of peripherals are uniformly packaged, and the corresponding calling interface is set; then the host computer configures the created peripheral management file and peripheral configuration file to the file system through the communication interface; then the charging pile performs a restart operation based on the restart instruction sent by the host computer, and after the restart is completed, the peripheral management file and the peripheral configuration file are read from the file system, and the function configuration is performed based on the peripheral management file, the peripheral configuration file and the calling interface, and the function configuration result is fed back to the host computer; that is, the function of the charging pile is configured based on the peripheral management file and the peripheral configuration file, and the peripheral management file and the peripheral configuration file can be easily modified without changing and recompiling the source code, which enables the charging pile to use different configurations in different environments and conditions; using the peripheral configuration file can make the source code more concise, easy to understand and maintain, and all configuration information is concentrated in one file for easy management; the peripheral configuration file can be easily ported between different systems and platforms, which improves the reusability of the code; during the development and debugging process, the system behavior can be quickly changed by modifying the peripheral configuration file without modifying the code, and the peripheral switching can be quickly performed by changing the peripheral configuration file, which ultimately greatly improves the efficiency of the charging pile function configuration.
[0074] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A charging pile function configuration method, characterized in that: The steps include: Step S1, the charging pile creates a file system, groups the peripherals based on the device type, uniformly packages the drivers of the peripherals in each group, and sets the corresponding calling interface; Step S2: The host computer creates a peripheral management file and a peripheral configuration file, and configures the peripheral management file and the peripheral configuration file to the file system through the communication interface; Step S3: the charging pile performs a restart operation based on the restart instruction sent by the host computer, and reads the peripheral management file and the peripheral configuration file from the file system after the restart is completed; Step S4: the charging pile performs function configuration based on the peripheral management file, the peripheral configuration file and the calling interface; Step S5: The charging pile feeds back the function configuration result to the upper computer.
2. A charging pile function configuration method according to claim 1, characterized in that: In step S1, the file system has the functions of power-off preservation, bad block search and wear leveling.
3. A charging pile function configuration method according to claim 1, characterized in that: The step S2 is specifically as follows: The host computer creates a peripheral management file in JSON format and a peripheral configuration file in JSON format; the peripheral management file is used to record the corresponding relationship between the charging pile and the function and device resources; the peripheral configuration file is used to record the device resources and device configuration information; the device resources are independent object devices realized by different board-level resources and external communication modules; the device configuration information is the attribute information; The host computer configures the peripheral management file and the peripheral configuration file to the file system through the TCP interface, UDP interface, TFTP interface, FTP interface or the communication interface of the serial port.
4. A charging pile function configuration method according to claim 1, characterized in that: The step S3 is specifically as follows: The charging pile receives the restart instruction sent by the host computer, verifies the restart instruction and immediately executes the restart operation. After the restart is completed, the peripheral management file and the peripheral configuration file are automatically read from the file system through the BOOT program.
5. A charging pile function configuration method according to claim 1, characterized in that: The step S4 is specifically as follows: The charging pile parses the peripheral configuration file to obtain device resources and device configuration information, verifies the device resources, configures the device configuration information to the corresponding peripheral through the calling interface, and then manages the peripheral through the peripheral management file to complete the functional configuration of the charging pile.
6. A charging pile function configuration system, characterized in that: Includes the following modules: The initialization module is used to create a file system for the charging pile, group the peripherals based on the device type, uniformly package the drivers of the peripherals in each group, and set the corresponding calling interface; A file configuration module, used for the host computer to create a peripheral management file and a peripheral configuration file, and configure the peripheral management file and the peripheral configuration file to the file system through the communication interface; A file reading module, used for the charging pile to perform a restart operation based on the restart instruction sent by the host computer, and read the peripheral management file and the peripheral configuration file from the file system after the restart is completed; Function configuration module, used for the charging pile to perform function configuration based on the peripheral management file, peripheral configuration file and calling interface; The configuration result feedback module is used for the charging pile to feedback the function configuration results to the upper computer.
7. A charging pile function configuration system as claimed in claim 6, characterized in that: In the initialization module, the file system has the functions of power-off preservation, bad block search and wear leveling.
8. A charging pile function configuration system as claimed in claim 6, characterized in that: The file configuration module is specifically used for: The host computer creates a peripheral management file in JSON format and a peripheral configuration file in JSON format; the peripheral management file is used to record the corresponding relationship between the charging pile and the function and device resources; the peripheral configuration file is used to record the device resources and device configuration information; the device resources are independent object devices realized by different board-level resources and external communication modules; the device configuration information is the attribute information; The host computer configures the peripheral management file and the peripheral configuration file to the file system through the TCP interface, UDP interface, TFTP interface, FTP interface or the communication interface of the serial port.
9. A charging pile function configuration system as claimed in claim 6, characterized in that: The file reading module is specifically used for: The charging pile receives the restart instruction sent by the host computer, verifies the restart instruction and immediately executes the restart operation. After the restart is completed, the peripheral management file and the peripheral configuration file are automatically read from the file system through the BOOT program.
10. A charging pile function configuration system according to claim 6, characterized in that: The function configuration module is specifically used for: The charging pile parses the peripheral configuration file to obtain device resources and device configuration information, verifies the device resources, configures the device configuration information to the corresponding peripheral through the calling interface, and then manages the peripheral through the peripheral management file to complete the functional configuration of the charging pile.