Charging pile communication protocol multi-version analysis adaptation method
By using the version adapter, command parsing engine and command encapsulation engine in the charging pile operation management platform to perform multi-version parsing and adaptation of the charging pile communication protocol, the problems of heavy technical workload and high development cost when charging pile equipment is connected are solved. Improved development efficiency and business processing efficiency.
Patent Information
- Application Number
- CN202411056651.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-15
AI Technical Summary
The charging pile operation management platform requires multi-version hybrid adaptation of different versions of charging pile communication protocols, resulting in high development costs, low efficiency, and heavy technical workload for both parties when charging pile equipment is connected.
The core process and key parameters of the charging business are extracted based on the national standard communication protocol, and the command message is sent to the operation management platform server through the TCP/IP protocol. The version adapter, command parsing engine and command encapsulation engine are used to identify, parse and encapsulate the protocol version. , to achieve adaptation and data processing of different protocol versions.
It reduces the technical workload of the charging pile operation system when connecting to the charging pile equipment, reduces development costs, improves development efficiency, promotes the maximum efficiency of business processing, and facilitates resource expansion and business expansion.
Smart Images

Figure CN118784682A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method for parsing and adapting multiple versions of a charging pile communication protocol. Background Art
[0002] The charging pile communication protocol defines the network communication protocol between the charging pile equipment and the charging pile operation and management platform. The charging pile equipment interacts with the platform in the data format specified by the communication protocol, and can report data to the platform through a wired network or a wireless network. The charging pile communication protocol data specifies the data items that must be included in the uplink and downlink message content of the charging pile device, such as the communication protocol identification number, protocol version number, message instruction identification number, message length, and transmission type.
[0003] The charging pile communication protocol supports charging pile equipment generated by different manufacturers. The charging pile operation and management platform supports the access of charging pile equipment produced by multiple manufacturers. During use, the charging pile communication protocol will continuously upgrade the protocol content as the business needs of the charging pile operation platform and the technical updates of the charging pile equipment adapt to technological changes. During the operation of the charging pile equipment, the charging pile equipment function does not support the upgrade of the charging pile communication protocol. The charging pile communication protocol used by the charging pile equipment produced by the charging pile manufacturers will use different versions over time.
[0004] In summary, the charging pile operation and management platform must perform mixed adaptation of multiple versions of the charging pile communication protocol. Therefore, it is necessary to provide a charging pile communication protocol multi-version parsing and adaptation method to solve the above technical problems. Summary of the invention
[0005] The purpose of the present invention is to provide a multi-version parsing and adaptation method for a charging pile communication protocol, aiming to reduce the technical workload of both parties when a charging pile operation system is connected to a charging pile device, reduce development costs, and improve development efficiency.
[0006] To achieve the above object, the present invention provides a charging pile communication protocol multi-version parsing and adaptation method, comprising the following steps:
[0007] Extract the core process and key parameters of the charging business based on the national standard communication protocol, and send the command message to the charging pile operation management platform server through the TCP / IP protocol;
[0008] The version adapter is used to identify the version of the protocol instruction content, and to make unified judgments and allocations, and then the business processes and data of different protocol contents are partitioned and triggered;
[0009] Parsing the data items in the protocol instruction content through an instruction parsing engine and mapping them into business objects;
[0010] The business processing service module performs business processing based on the data item parameters identified in the version adapter and the instruction parsing engine, and encapsulates the business object into the corresponding version of the communication protocol through the instruction encapsulation engine and sends it to the version adapter to be transmitted back to the charging pile device.
[0011] Among them, the charging pile communication protocol adopts byte mode for data exchange.
[0012] The charging pile communication protocol includes a protocol header and a protocol body.
[0013] The protocol header includes a major version number, a minor version number and an instruction number.
[0014] Wherein, the charging pile communication protocol is defined by a JAVA customized annotation method.
[0015] The charging pile operation management platform server includes a version adapter, an instruction parsing engine, an instruction packaging engine and a business processing service module;
[0016] The version adapter is used to identify the communication protocol instruction content version, and perform unified judgment and allocation processing, and after processing, partition and process trigger the business processes and data of different protocol contents;
[0017] The instruction parsing engine is used to parse and map the data items in the protocol instruction content into business objects and provide data parameters for instruction processing;
[0018] The instruction packaging engine is used to package the business object into corresponding protocol content according to the communication protocol version and send it to the charging pile device;
[0019] The business processing service module performs business processing based on the version adapter and the data item parameters identified in the instruction parsing engine. After the business processing is completed, the business object is encapsulated into a corresponding version of the communication protocol through the instruction encapsulation engine and sent to the charging pile device.
[0020] The present invention discloses a multi-version parsing and adaptation method for a charging pile communication protocol. The method extracts the core process and key parameters of the charging business based on the national standard communication protocol, and sends the instruction message to the charging pile operation management platform server through the TCP / IP protocol; identifies the protocol instruction content version through a version adapter, and performs unified judgment and allocation processing, and partitions and triggers the business processes and data of different protocol contents; parses the data items in the protocol instruction content through an instruction parsing engine, and maps them to business objects; a business processing service module performs business processing based on the data item parameters identified in the version adapter and the instruction parsing engine, and encapsulates the business object into the corresponding version of the communication protocol through an instruction encapsulation engine and sends it to the version adapter to transmit it back to the charging pile device. The multi-version parsing and adaptation method reduces the technical workload of both parties when the charging pile operation system is connected to the charging pile device, reduces development costs, improves development efficiency, is conducive to maximizing the efficiency of business processing, and facilitates resource expansion and business expansion of the charging pile. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 It is a flow chart of a charging pile communication protocol multi-version parsing and adaptation method provided by the present invention.
[0023] Figure 2 It is a schematic diagram of the communication between the charging pile and the charging pile operation management platform server provided by the present invention.
[0024] Figure 3 It is a flow chart of an embodiment of the present invention.
[0025] In the figure: 1-version adapter, 2-instruction parsing engine, 3-instruction packaging engine, 4-business processing service module. DETAILED DESCRIPTION
[0026] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0027] See also Figures 1 to 3 The present invention provides a charging pile communication protocol multi-version parsing and adaptation method, comprising the following steps:
[0028] S1 extracts the core process and key parameters of the charging business based on the national standard communication protocol, and sends the command message to the charging pile operation management platform server through the TCP / IP protocol;
[0029] Specifically, the charging pile operation management platform establishes a business service platform for receiving and sending charging pile communication protocols based on J2EE;
[0030] The charging pile equipment uses the national standard communication protocol as a benchmark, extracts the core processes and key parameters of the charging business, and sends the command message to the charging pile operation and management platform server through the TCP / IP protocol.
[0031] S2 identifies the protocol instruction content version through version adapter 1, and makes unified judgment and allocation processing, and then partitions and triggers the business processes and data of different protocol contents;
[0032] Specifically, the version adapter 1 is used to identify the communication protocol instruction content version, and perform unified judgment and allocation processing, and after processing, the business processes and data of different protocol contents are partitioned and triggered; the instruction parsing engine 2 is used to parse and map the data items in the protocol instruction content into business objects, and provide data parameters for instruction processing;
[0033] The charging pile communication protocol is defined, and the protocol includes a protocol header and a protocol body. The protocol uses bytes for data interaction. The protocol header must contain a major version number, a minor version number, and an instruction number. The version adapter 1 needs to be adapted and parsed through the version number and the instruction number. The charging pile protocol processing service object is loaded through the annotation and dependency injection mechanism of SpringBoot, and the protocol loading and parsing is achieved through the corresponding matching of the protocol version number object body and the business processing service module 4; the protocol rules are defined through JAVA customized annotation methods to determine the protocol version number identifier and data mapping object of the business processing service module 4.
[0034] S3 parses the data items in the protocol instruction content through the instruction parsing engine 2 and maps them into business objects;
[0035] Specifically, the instruction encapsulation engine 3 is used to encapsulate the business object into corresponding protocol content according to the communication protocol version, and send it to the charging pile device.
[0036] The S4 business processing service module 4 performs business processing based on the data item parameters identified in the version adapter 1 and the instruction parsing engine 2, and encapsulates the business object into the corresponding version of the communication protocol through the instruction encapsulation engine 3 and sends it to the version adapter 1 to be transmitted back to the charging pile device.
[0037] In order to better understand the present technical solution, the following embodiments are provided for further explanation:
[0038] Example
[0039] Register the business processing service module 4, register the instruction processing service to the Spring container through SpringBoot, and register it to the instruction receiver at the same time;
[0040] Iterate the instruction receiver, pre-process the instruction processing service, and determine whether the processor is in a normal processing state;
[0041] Obtain the protocol version number and instruction identifier through the protocol message content, and determine the instruction processing service according to the instruction identifier;
[0042] Determine the mapping object type based on the protocol version number and instruction identifier, and determine whether it complies with the version number defined by the annotation in the mapping object;
[0043] Create a data mapping object to map the protocol message data content to a JAVA object;
[0044] Parse the protocol message data content according to the JAVA data type and fill it into the object attributes;
[0045] Call the instruction processing service, and encapsulate the protocol identifier, protocol message original text, and protocol content mapping object and pass them into the instruction processing service as parameters;
[0046] Perform corresponding business data processing according to the parameter content within the instruction processing service;
[0047] Create a downlink mapping object, and encapsulate the mapping object into a protocol message through the instruction encapsulation engine 3;
[0048] The protocol message is encapsulated according to the upstream version and instruction through the protocol version adapter 1.
[0049] The above disclosure is only a preferred embodiment of a charging pile communication protocol multi-version parsing adaptation method of the present invention. Of course, this cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments are implemented, and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A charging pile communication protocol multi-version parsing and adaptation method, characterized in that: The following steps are involved: Extract the core process and key parameters of the charging business based on the national standard communication protocol, and send the command message to the charging pile operation management platform server through the TCP / IP protocol; The version adapter is used to identify the version of the protocol instruction content, and to make unified judgments and allocations, and then the business processes and data of different protocol contents are partitioned and triggered; Parsing the data items in the protocol instruction content through an instruction parsing engine and mapping them into business objects; The business processing service module performs business processing based on the data item parameters identified in the version adapter and the instruction parsing engine, and encapsulates the business object into a corresponding version of the communication protocol through the instruction encapsulation engine and sends it to the version adapter to be transmitted back to the charging pile device.
2. A charging pile communication protocol multi-version parsing and adaptation method as claimed in claim 1, characterized in that: The charging pile communication protocol uses a byte method for data exchange.
3. A charging pile communication protocol multi-version parsing and adaptation method as claimed in claim 1, characterized in that: The charging pile communication protocol includes a protocol header and a protocol body.
4. A charging pile communication protocol multi-version parsing and adaptation method as claimed in claim 3, characterized in that: The protocol header includes a major version number, a minor version number and an instruction number.
5. A charging pile communication protocol multi-version parsing and adaptation method as claimed in claim 1, characterized in that: The charging pile communication protocol is defined by a JAVA customized annotation method.
6. A charging pile communication protocol multi-version parsing and adaptation method as claimed in claim 1, characterized in that: The charging pile operation management platform server includes a version adapter, an instruction parsing engine, an instruction packaging engine and a business processing service module; The version adapter is used to identify the communication protocol instruction content version, and perform unified judgment and allocation processing, and after processing, partition and trigger the business processes and data of different protocol contents; The instruction parsing engine is used to parse and map the data items in the protocol instruction content into business objects and provide data parameters for instruction processing; The instruction packaging engine is used to package the business object into corresponding protocol content according to the communication protocol version and send it to the charging pile device; The business processing service module performs business processing based on the version adapter and the data item parameters identified in the instruction parsing engine. After the business processing is completed, the business object is encapsulated into a corresponding version of the communication protocol through the instruction encapsulation engine and sent to the charging pile device.
Citation Information
Cited By
Charging pile operation management method and system based on data analysis
CN119228087A
A feature matching-based charging pile protocol automatic identification system
CN123035222A
