Charging pile communication standard adaptation system and method based on protocol conversion
By establishing a virtual communication link through a protocol conversion device, the problem of incompatibility between the communication protocols of charging piles and vehicles is solved, achieving efficient and flexible charging pile communication adaptation, reducing costs and improving user experience.
Patent Information
- Application Number
- CN202512039118.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, interoperability barriers caused by incompatible communication protocols between charging piles and vehicles result in costly and inflexible solutions that increase hardware complexity and software maintenance costs.
A virtual communication link is established through a protocol conversion device to perform protocol conversion and data remapping, diagnose equipment anomalies in real time, and build a safe recovery mechanism to achieve state synchronization between charging piles and vehicles and structured log recording.
It reduces the transformation costs and deployment difficulties for operators, improves user experience and efficient use of infrastructure, and achieves flexibility and convenience in charging pile communication adaptation.
Smart Images

Figure CN121509539A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of charging pile communication adaptation, in particular to a charging pile communication standard adaptation system and method based on protocol conversion. BACKGROUND
[0002] Protocol conversion refers to the process of converting the data format, control commands and interaction flow of one communication protocol into another communication protocol in real time and accurately between different communication systems or devices. The core is to establish the mapping relationship of the syntax (frame structure, encoding method), semantics (command meaning, parameter definition) and timing (interaction sequence, state machine) of the two protocols. In the charging pile communication scenario, protocol conversion is equivalent to a "real-time translator", which enables two devices following different standards to understand each other and work together.
[0003] Charging pile communication standard adaptation refers to the problem that the communication protocols used between the charging pile and the vehicle during the charging process of the electric vehicle do not match. Through a combination of software and hardware solutions, one party can be compatible with the communication standard of the other party. The essence of adaptation is to solve the interoperability barrier between infrastructure and vehicles caused by inconsistent standards.
[0004] In the existing scheme, to solve the communication adaptation of the charging pile, the method includes replacing the on-board charging control unit of the export vehicle with one that conforms to the target market standard, or replacing the communication module of the charging pile. This method is costly, time-consuming and not flexible; at the same time, it includes implementing two complete communication protocol stacks in the device. This increases the hardware complexity, software maintenance cost and certification difficulty. Through protocol conversion, the charging pile communication adaptation is realized, which reduces the operator's conversion cost and deployment difficulty, improves user experience and convenience, and promotes the efficient use of infrastructure, so a charging pile communication standard adaptation system and method based on protocol conversion are proposed. SUMMARY
[0005] The present application overcomes the shortcomings of the prior art and provides a charging pile communication standard adaptation system and method based on protocol conversion.
[0006] To achieve the above purpose, the technical solution adopted by the present application is as follows: The present application provides a charging pile communication standard adaptation method based on protocol conversion, comprising the following steps: Hardware connection is performed between the charging pile and the vehicle to be charged, and communication parameters are configured after hardware connection to realize communication initialization; Through the protocol conversion device, the protocol conversion and data remapping processing are performed in combination with the target virtual communication link to obtain preprocessed key extraction information; The protocol conversion device is combined in the target charging pile and the vehicle to be charged, the instruction scheduling execution of the preprocessing key extraction information is performed, and the states of the target charging pile and the vehicle to be charged are controlled to be synchronized. During the instruction scheduling execution processing, the abnormal conditions of the device are detected in real time, and a safety recovery mechanism is constructed to ensure that the instruction scheduling execution processing is stably operated. During the instruction scheduling execution processing, the protocol conversion and the structured log record of charging are performed in real time.
[0007] Further, in a preferred embodiment of the present application, the charging pile and the vehicle to be charged are connected by hardware, and after the hardware connection, the communication parameters are configured to realize communication initialization, specifically: The charging pile which needs to realize protocol conversion to adapt to the communication standard is marked as a target charging pile, and a vehicle to be charged is obtained, wherein the vehicle to be charged is a vehicle that does not match the preset charging protocol of the target charging pile, and the vehicle to be charged is an experimental product; The protocol conversion device is obtained, the CAN bus in the controller of the protocol conversion device is connected with the target charging pile and the vehicle to be charged respectively, and during the connection process, it is confirmed that the electrical characteristics of all interfaces meet the standard value; The communication baud rate of the CAN bus is fixedly set, and the CAN frame format of the CAN bus is configured as an extended frame; The protocol conversion device is powered on, and a self-checking program is executed in the protocol conversion device, wherein the purpose of the self-checking program is to make the protocol conversion device meet the program integrity before the protocol conversion device enters the standby listening mode; In the protocol conversion device, the CAN bus is listened to in real time, when the handshake message is received in the CAN bus, the handshake message source address in the CAN bus is detected and obtained through the protocol conversion device; The handshake message source address includes the target charging pile and the vehicle to be charged, the protocol conversion device is controlled to respond to all handshake messages, and a virtual communication link table is generated, wherein the virtual communication link table records the handshake message source address currently connected by the protocol conversion device and the source file of the handshake message; The handshake message source address corresponding to the virtual communication link table is tested and sent through the protocol conversion device, if the test frame exists timeout or the error rate is greater than the preset value, the hardware connection and initialization processing of the protocol conversion device and the handshake message source address are re-performed, and the target virtual communication link is obtained according to the virtual communication link table; The target virtual communication link is the link that the protocol conversion device is connected with the target charging pile and the vehicle to be charged by hardware.
[0008] Further, in a preferred embodiment of the present application, the protocol conversion device is used to perform protocol conversion and data remapping processing in combination with the target virtual communication link to obtain preprocessed key extraction information, specifically: Through the target virtual communication link, data frames of the target charging pile and the vehicle to be charged are captured respectively and are labeled as target charging pile data frames and vehicle to be charged data frames; A preset CAN-ID rule definition table is used to extract key fields in the target charging pile data frames and the vehicle to be charged data frames, wherein the key fields are communication direction information and command information of the target charging pile and the vehicle to be charged, and are labeled as key extraction information; The key extraction information is remapped and reconstructed by a bidirectional command mapping table built in the protocol conversion device, wherein the remapping and reconstruction processing includes semantic mapping, format conversion, unit conversion, and structure reorganization processing; The remapped and reconstructed key extraction information is labeled as preprocessed key extraction information.
[0009] Further, in a preferred embodiment of the present application, the protocol conversion device is used to perform protocol conversion and data remapping processing in combination with the target virtual communication link to obtain preprocessed key extraction information, specifically: In the protocol conversion device, the preprocessed key extraction information is classified by type, wherein the preprocessed key extraction information includes safety class instructions, control class instructions, state query instructions, and maintenance class instructions, and the emergency levels of different types of preprocessed key extraction information are different; According to the emergency level, a multi-priority instruction queue is constructed for the preprocessed key extraction information, and a scheduling algorithm for the preprocessed key extraction information is preset; The new scheduling algorithm for the preprocessed key extraction information is a preemptive scheduling algorithm, which gives priority to preprocessed key extraction information with a high emergency level when different preprocessed key extraction information is executed in the multi-priority instruction queue, and when preprocessed key extraction information with a relatively low emergency level is being executed, if preprocessed key extraction information with a relatively high emergency level is generated, the preprocessed key extraction information with the relatively high emergency level is preferentially scheduled; In the scheduling process, the preprocessed key extraction information is subjected to real-time bidirectional state comparison, and the target charging pile and the vehicle to be charged are controlled to be in a synchronous state in combination with the comparison result.
[0010] Further, in a preferred embodiment of the present application, the protocol conversion device is used to perform protocol conversion and data remapping processing in combination with the target virtual communication link to obtain preprocessed key extraction information, specifically: During the scheduling process, the key extracted information from the preprocessing is compared in real time in two directions. That is, the target charging pile and the vehicle to be charged are analyzed in real time to determine whether the state of the target charging pile and the vehicle to be charged are the same. The real-time synchronous analysis method involves converting preprocessed key extracted information into a normalized state model, establishing a state consistency rule base, and performing state consistency comparison on the normalized state model. When the state of the target charging pile is inconsistent with that of the vehicle to be charged, the state deviation value is calculated. If the state deviation value is within the acceptable range, the key information extracted by preprocessing is continuously scheduled. If the state deviation value is not within the acceptable range, the state deviation value is smoothed by applying a proportional-integral control algorithm in the protocol conversion device until the state deviation value is within the acceptable range.
[0011] Furthermore, in a preferred embodiment of the present invention, the step of real-time detection and diagnosis of device anomalies during instruction scheduling and execution processing, and the construction of a safe recovery mechanism to ensure stable operation of instruction scheduling and execution processing, specifically includes: During the instruction scheduling and execution process for preprocessing key extracted information, the error frames of the CAN bus are monitored and counted in real time through the target virtual communication link. The error frames of the CAN bus include format errors, bit errors, and stuffing errors. If the number of error frames exceeds the predetermined value within the scheduled error frame monitoring and counting analysis time, it is determined that there is physical link degradation in the CAN bus. Within the protocol conversion device, and during the scheduling process, a continuous logic analysis is performed on the preprocessed key extracted information. The continuous logic analysis involves analyzing whether there is sequence repetition or sequence jump in the preprocessed key extracted information. If so, it is determined that the protocol conversion device has a protocol logic disorder. If there is physical link degradation on the CAN bus, or logical protocol errors in the protocol conversion device, a security recovery mechanism is constructed to ensure stable operation of instruction scheduling and execution.
[0012] Furthermore, in a preferred embodiment of the present invention, if there is physical link degradation in the CAN bus or logical protocol errors in the protocol conversion device, a security recovery mechanism is constructed to ensure stable operation of instruction scheduling and execution processing, specifically as follows: For anomalies detected and diagnosed in real time in different devices during instruction scheduling and execution, a fault tolerance assessment is performed for the corresponding devices. The fault tolerance assessment involves retransmitting key extracted information through a protocol conversion device to determine whether there is still physical link degradation of the CAN bus or logical protocol disorder of the protocol conversion device within a specified number of retransmissions. If not, then the corresponding equipment is judged to have a high fault tolerance rate and is considered to be in a minor abnormality. If so, the corresponding device is judged to have a low fault tolerance rate, which is considered a serious anomaly. For devices with minor anomalies, maintain the physical connection of the device and clear the target virtual communication link with other connected devices, while resetting the target virtual communication link. For devices with severe malfunctions, the control protocol conversion device sends an emergency stop command to the target charging pile or the vehicle waiting to be charged, and stops the protocol conversion process.
[0013] Furthermore, in a preferred embodiment of the present invention, the real-time protocol conversion and structured log recording of charging during instruction scheduling and execution specifically include: When the protocol conversion device sends instructions to the target charging pile and the vehicle to be charged, and controls the target charging pile to supply power to the vehicle to be charged, all events between the protocol conversion device, the target charging pile and the vehicle to be charged are recorded in real time. During the recording of all events, the events are represented and encapsulated, and storage memory is introduced to store and process the encapsulated events; Based on the stored encapsulated events, the data is output in real-time log format to the control panels of the target charging pile and the vehicle to be charged, and then displayed on the control panel. S102: Connect the charging pile to the vehicle to be charged using hardware, and configure communication parameters to initialize communication after the hardware connection is established. S104: Through the protocol conversion device, combined with the target virtual communication link, protocol conversion and data remapping processing are performed to obtain preprocessed key extraction information; S106: Combine protocol conversion equipment in the target charging pile and the vehicle to be charged to perform instruction scheduling and execution for preprocessing key extracted information, and at the same time control the synchronization of the status of the target charging pile and the vehicle to be charged. S108: Real-time detection and diagnosis of equipment anomalies during instruction scheduling and execution, and the establishment of a safe recovery mechanism to ensure stable operation of instruction scheduling and execution; S110: During instruction scheduling and execution, perform real-time protocol conversion and structured log recording of charging.
[0014] This invention addresses the technical deficiencies in the background technology and offers the following advantages: After establishing the hardware connection between the charging pile, the vehicle to be charged, and the protocol conversion device, protocol conversion is achieved by constructing a target virtual communication link, and instruction scheduling is performed on the associated information during the protocol conversion. Simultaneously, during instruction scheduling and execution, abnormal conditions of different devices are diagnosed in real time, and structured logs are recorded. This invention achieves charging pile communication adaptation, reduces operator transformation costs and deployment difficulty, improves user experience and convenience, and further promotes the efficient utilization of infrastructure. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained from these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating a method for adapting charging pile communication standards based on protocol conversion is shown. Figure 2 A flowchart illustrating the method for scheduling and executing instructions to perform preprocessing and key extracted information is shown. Figure 3 A program view of a charging pile communication standard adaptation system based on protocol conversion is shown. Detailed Implementation
[0017] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0018] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0019] Figure 1 A flowchart illustrating a charging pile communication standard adaptation method based on protocol conversion is shown, including the following steps: S102: Connect the charging pile to the vehicle to be charged using hardware, and configure communication parameters to initialize communication after the hardware connection is established. S104: Through the protocol conversion device, combined with the target virtual communication link, protocol conversion and data remapping processing are performed to obtain preprocessed key extraction information; S106: Combine protocol conversion equipment in the target charging pile and the vehicle to be charged to perform instruction scheduling and execution for preprocessing key extracted information, and at the same time control the synchronization of the status of the target charging pile and the vehicle to be charged. S108: Real-time detection and diagnosis of equipment anomalies during instruction scheduling and execution, and the establishment of a safe recovery mechanism to ensure stable operation of instruction scheduling and execution; S110: During instruction scheduling and execution, perform real-time protocol conversion and structured log recording of charging.
[0020] Furthermore, in a preferred embodiment of the present invention, the step of establishing a hardware connection between the charging pile and the vehicle to be charged, and configuring communication parameters to achieve communication initialization after the hardware connection, specifically involves: The charging pile that needs to be converted to achieve communication standard adaptation is identified as the target charging pile, and the vehicle to be charged is obtained. The vehicle to be charged is a vehicle that does not match the preset charging protocol of the target charging pile, and the vehicle to be charged is an experimental product. Obtain a protocol conversion device, connect the protocol conversion device to the CAN bus in the controller of the target charging pile and the vehicle to be charged respectively, and confirm that the electrical characteristics of all interfaces meet the standard values during the connection process; Set the communication baud rate of the CAN bus to a fixed value and configure the CAN frame format of the CAN bus to extended frames; The protocol conversion device is powered on, and a self-test program is executed in the protocol conversion device. The purpose of executing the self-test program is to ensure that the protocol conversion device meets the program integrity requirements before it enters the standby monitoring mode. In the protocol conversion device, the CAN bus is monitored in real time. When a handshake message is received on the CAN bus, the source address of the handshake message on the CAN bus is obtained through the protocol conversion device. The handshake message source address includes the target charging pile and the vehicle to be charged. The control protocol conversion device responds to all handshake messages and generates a virtual communication link table. The virtual communication link table records the handshake message source address currently connected to the protocol conversion device and the source file of the handshake message. The protocol conversion device sends test frames to the corresponding handshake message source address in the virtual communication link table. If the test frame times out or the error rate is greater than the preset value, the hardware connection and initialization of the protocol conversion device and the handshake message source address are re-performed, and the target virtual communication link is obtained according to the virtual communication link table. The target virtual communication link is a link through which the protocol conversion device establishes a hardware connection between the target charging pile and the vehicle to be charged.
[0021] It should be noted that, firstly, a physical connection needs to be established between the charging pile and the vehicle, forming a communication link via the CAN bus. During the connection process, it is confirmed that the electrical characteristics of all interfaces meet standard values, including voltage levels, terminating resistances, and grounding reliability. The CAN communication baud rate is fixed at 250kbps, and the CAN bus frame format is configured as extended frames to support the definition of the CAN-ID structure. A fixed baud rate avoids negotiation complexity and improves communication determinism; extended frames support richer addressing and command spaces. After power-on self-test, the system enters standby listening mode to receive handshake messages (command codes) from the CAN bus, which are the commands to be sent. The source address of the handshake message in the CAN bus is detected and obtained through a protocol conversion device. Virtual communication links are formed between different source addresses, and the bidirectional communication between the charging pile and the vehicle needs to be tested. Therefore, measurements are taken using test frames to achieve initialization. The protocol conversion device is an external device, connected to the CAN bus of the charging pile and the vehicle via the CAN_H and CAN_L pins, respectively.
[0022] Furthermore, in a preferred embodiment of the present invention, the step of using a protocol conversion device, in conjunction with the target virtual communication link, to perform protocol conversion and data remapping processing to obtain preprocessed key extraction information specifically involves: Data frames of the target charging pile and the vehicle to be charged are captured through the target virtual communication link and labeled as target charging pile data frames and vehicle to be charged data frames, respectively. A preset CAN-ID rule definition table is used to extract key fields from the target charging pile data frame and the vehicle to be charged data frame. The key fields are the communication direction information and command information of the target charging pile and the vehicle to be charged, which are marked as key extraction information. The key extracted information is remapped and reconstructed using the bidirectional command mapping table built into the protocol conversion device. The remapped and reconstructed processing includes semantic mapping, format conversion, unit conversion, and structural reorganization. The key extracted information after remapping and reconstruction is labeled as preprocessed key extracted information.
[0023] It should be noted that, through the target virtual communication link, data frames from the target charging pile and the vehicle to be charged are captured separately. Command codes, including but not limited to charging and power-off operations, are extracted from different identifiers within the data frames using a CAN-ID rule definition table; these are the key extracted information. Simultaneously, the key extracted information is remapped and reconstructed based on a built-in bidirectional command mapping table. Semantic mapping maps fields with the same or similar meanings but different names; format conversion handles data encoding differences, such as byte order (big-endian / little-endian) conversion, numerical resolution conversion, and unit conversion (automatically performing SI conversion); structural reorganization involves recombining multiple scattered fields within a data frame from the source protocol into a new data payload according to the message structure requirements of the target protocol.
[0024] Furthermore, in a preferred embodiment of the present invention, the step of real-time detection and diagnosis of device anomalies during instruction scheduling and execution processing, and the construction of a safe recovery mechanism to ensure stable operation of instruction scheduling and execution processing, specifically includes: During the instruction scheduling and execution process for preprocessing key extracted information, the error frames of the CAN bus are monitored and counted in real time through the target virtual communication link. The error frames of the CAN bus include format errors, bit errors, and stuffing errors. If the number of error frames exceeds the predetermined value within the scheduled error frame monitoring and counting analysis time, it is determined that there is physical link degradation in the CAN bus. Within the protocol conversion device, and during the scheduling process, a continuous logic analysis is performed on the preprocessed key extracted information. The continuous logic analysis involves analyzing whether there is sequence repetition or sequence jump in the preprocessed key extracted information. If so, it is determined that the protocol conversion device has a protocol logic disorder. If there is physical link degradation on the CAN bus, or logical protocol errors in the protocol conversion device, a security recovery mechanism is constructed to ensure stable operation of instruction scheduling and execution.
[0025] It should be noted that the CAN bus error frame monitoring count includes format errors, bit errors, and stuffing errors. When the error frame rate exceeds a threshold (e.g., more than 10 times per second) within a unit of time, it is determined to be a physical link degradation. Simultaneously, within the protocol conversion device, the continuity of the command sequence needs to be checked on the received data. For example, in the charging process, the "parameter configuration" command must appear only after receiving the "handshake confirmation." If sequence jumps or repetitions occur, it is determined to be a protocol logic disorder. The purpose is to perform multi-level anomaly detection and classification in the charging process.
[0026] Furthermore, in a preferred embodiment of the present invention, if there is physical link degradation in the CAN bus or logical protocol errors in the protocol conversion device, a security recovery mechanism is constructed to ensure stable operation of instruction scheduling and execution processing, specifically as follows: For anomalies detected and diagnosed in real time in different devices during instruction scheduling and execution, a fault tolerance assessment is performed for the corresponding devices. The fault tolerance assessment involves retransmitting key extracted information through a protocol conversion device to determine whether there is still physical link degradation of the CAN bus or logical protocol disorder of the protocol conversion device within a specified number of retransmissions. If not, then the corresponding equipment is judged to have a high fault tolerance rate and is considered to be in a minor abnormality. If so, the corresponding device is judged to have a low fault tolerance rate, which is considered a serious anomaly. For devices with minor anomalies, maintain the physical connection of the device and clear the target virtual communication link with other connected devices, while resetting the target virtual communication link. For devices with severe malfunctions, the control protocol conversion device sends an emergency stop command to the target charging pile or the vehicle waiting to be charged, and stops the protocol conversion process.
[0027] It's important to note that fault tolerance assessments are necessary for different devices. Specifically, if there's physical link degradation on the CAN bus or logical protocol errors in the protocol conversion device, the impact on system functionality needs to be determined. Whether physical link degradation on the CAN bus or logical protocol errors in the protocol conversion device persists within a specified number of retransmissions allows for assessment of the severity of the anomaly. For minor anomalies, the physical connection is maintained, but the internal session state machine and command queue are cleared, and the logical connection is re-established starting from the protocol handshake. For severe anomalies, the following steps are required: reverting charging power, voltage, and other parameters to safe default values, re-initiating the parameter configuration process, and stopping all protocol conversion and control activities.
[0028] Furthermore, in a preferred embodiment of the present invention, the real-time protocol conversion and structured log recording of charging during instruction scheduling and execution specifically include: When the protocol conversion device sends instructions to the target charging pile and the vehicle to be charged, and controls the target charging pile to supply power to the vehicle to be charged, all events between the protocol conversion device, the target charging pile and the vehicle to be charged are recorded in real time. During the recording of all events, the events are represented and encapsulated, and storage memory is introduced to store and process the encapsulated events; Based on the stored encapsulated events, the data is output in real-time log format to the control panels of the target charging pile and the vehicle to be charged, and then displayed on the control panel.
[0029] It's important to note that the purpose of real-time protocol conversion and structured logging of charging is to accurately reproduce the system state before, during, and after the problem occurs when communication or control anomalies arise, allowing for rapid root cause identification. Recording key parameters and results for each charging cycle meets the requirements of operational, billing, and compliance audits. Finally, analyzing conversion logs from numerous real-world scenarios reveals deficiencies in protocol mapping rules, enabling optimization of conversion strategies.
[0030] Figure 2 The flowchart illustrates a method for scheduling and executing instructions to perform preprocessing of key extracted information, including the following steps: S202: Combine protocol conversion equipment in the target charging pile and the vehicle to be charged to perform instruction scheduling and execution for preprocessing key extracted information, and at the same time control the synchronization of the status of the target charging pile and the vehicle to be charged. S204: During the scheduling process, real-time bidirectional status comparison is performed on the preprocessed key extracted information, and the status of the target charging pile and the vehicle to be charged is synchronized based on the comparison results.
[0031] Furthermore, in a preferred embodiment of the present invention, the step of combining protocol conversion equipment in the target charging pile and the vehicle to be charged to perform instruction scheduling and execution for preprocessing key extracted information, while simultaneously controlling the synchronization of the states of the target charging pile and the vehicle to be charged, specifically includes: In the protocol conversion device, the preprocessed key extracted information is classified by type. The preprocessed key extracted information includes security instructions, control instructions, status query instructions and maintenance instructions, and the urgency of different types of preprocessed key extracted information varies. Based on the urgency level, a multi-priority instruction queue is constructed for the preprocessing key extracted information, and a scheduling algorithm for the preprocessing key extracted information is preset. The new scheduling algorithm for preprocessing key extraction is a preemptive scheduling algorithm. When different preprocessing key extraction information is executed in a multi-priority instruction queue, the preprocessing key extraction information with higher urgency is executed first. And when the preprocessing key extraction information with relatively low urgency is being executed, if preprocessing key extraction information with relatively high urgency is generated, the preprocessing key extraction information with relatively high urgency is scheduled first. During the scheduling process, the key preprocessed information is compared in real time in both directions, and the comparison results are used to control the synchronization of the target charging pile and the vehicle to be charged.
[0032] It should be noted that the types of key information extracted during preprocessing differ. These key information includes security instructions, control instructions, status query instructions, and maintenance instructions, with their priority decreasing in the order mentioned above. Instructions with higher priority must be executed first, and a preemptive scheduling algorithm is used for instruction scheduling. That is, security instructions can immediately preempt any ordinary instructions being sent; control instructions are sent after security instructions; and status query instructions are polled at fixed intervals.
[0033] Furthermore, in a preferred embodiment of the present invention, the step of performing real-time bidirectional state comparison of preprocessed key extracted information during the scheduling process, and controlling the synchronization of the target charging pile and the vehicle to be charged based on the comparison results, specifically includes: During the scheduling process, the key extracted information from the preprocessing is compared in real time in two directions. That is, the target charging pile and the vehicle to be charged are analyzed in real time to determine whether the state of the target charging pile and the vehicle to be charged are the same. The real-time synchronous analysis method involves converting preprocessed key extracted information into a normalized state model, establishing a state consistency rule base, and performing state consistency comparison on the normalized state model. When the state of the target charging pile is inconsistent with that of the vehicle to be charged, the state deviation value is calculated. If the state deviation value is within the acceptable range, the key information extracted by preprocessing is continuously scheduled. If the state deviation value is not within the acceptable range, the state deviation value is smoothed by applying a proportional-integral control algorithm in the protocol conversion device until the state deviation value is within the acceptable range.
[0034] It should be noted that during the scheduling process, real-time bidirectional state comparison is performed on the preprocessed key extracted information. This involves comparing whether the charging pile and the vehicle to be charged are currently in the same charging state. If not, smoothing control of state deviation is required. A state consistency rule base is established, within which state information of the same dimension can be compared, including but not limited to: if the current state is connected, the charging gun detection must also be true, and the charging state must be synchronized. If there is a slight inconsistency in the state, the process can continue; severe inconsistencies require correction.
[0035] like Figure 3 As shown, a charging pile communication standard adaptation system based on protocol conversion is proposed. The charging pile communication standard adaptation system includes different management storage modules. When the different management storage modules are executed by the system processor, the following steps are implemented: Communication module: Configures the communication parameters between the charging pile and the vehicle to achieve communication initialization; Protocol conversion module: performs protocol conversion and data remapping processing; Instruction scheduling module: Schedules and executes instructions for preprocessing and extracting key information; Anomaly diagnosis module: Detects and diagnoses equipment anomalies in real time during instruction scheduling and execution. Structured logging module: Real-time protocol conversion and charging structured logging.
[0036] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for adapting charging pile communication standards based on protocol conversion, characterized in that, Includes the following steps: The charging pile and the vehicle to be charged are connected in hardware, and communication parameters are configured after the hardware connection is established to achieve communication initialization. By using a protocol conversion device and combining it with the target virtual communication link, protocol conversion and data remapping are performed to obtain preprocessed key extracted information. Integrating protocol conversion equipment in the target charging pile and the vehicle to be charged, instructions for preprocessing key extracted information are scheduled and executed, while simultaneously controlling the synchronization of the status of the target charging pile and the vehicle to be charged. During instruction scheduling and execution, abnormal conditions of the equipment are detected and diagnosed in real time, and a safe recovery mechanism is built to ensure the stable operation of instruction scheduling and execution. During instruction scheduling and execution, real-time protocol conversion and structured logging of charging are performed.
2. The charging pile communication standard adaptation method based on protocol conversion as described in claim 1, characterized in that, The process of establishing a hardware connection between the charging pile and the vehicle to be charged, and configuring communication parameters after the hardware connection to achieve communication initialization, specifically involves: The charging pile that needs to be converted to achieve communication standard adaptation is identified as the target charging pile, and the vehicle to be charged is obtained. The vehicle to be charged is a vehicle that does not match the preset charging protocol of the target charging pile, and the vehicle to be charged is an experimental product. Obtain a protocol conversion device, connect the protocol conversion device to the CAN bus in the controller of the target charging pile and the vehicle to be charged respectively, and confirm that the electrical characteristics of all interfaces meet the standard values during the connection process; Set the communication baud rate of the CAN bus to a fixed value and configure the CAN frame format of the CAN bus to extended frames; The protocol conversion device is powered on, and a self-test program is executed in the protocol conversion device. The purpose of executing the self-test program is to ensure that the protocol conversion device meets the program integrity requirements before it enters the standby monitoring mode. In the protocol conversion device, the CAN bus is monitored in real time. When a handshake message is received on the CAN bus, the source address of the handshake message on the CAN bus is obtained through the protocol conversion device. The handshake message source address includes the target charging pile and the vehicle to be charged. The control protocol conversion device responds to all handshake messages and generates a virtual communication link table. The virtual communication link table records the handshake message source address currently connected to the protocol conversion device and the source file of the handshake message. The protocol conversion device sends test frames to the corresponding handshake message source address in the virtual communication link table. If the test frame times out or the error rate is greater than the preset value, the hardware connection and initialization of the protocol conversion device and the handshake message source address are re-performed, and the target virtual communication link is obtained according to the virtual communication link table. The target virtual communication link is a link through which the protocol conversion device establishes a hardware connection between the target charging pile and the vehicle to be charged.
3. The charging pile communication standard adaptation method based on protocol conversion as described in claim 1, characterized in that, The process involves using a protocol conversion device, combined with the target virtual communication link, to perform protocol conversion and data remapping to obtain preprocessed key extraction information. Specifically: Data frames of the target charging pile and the vehicle to be charged are captured through the target virtual communication link and labeled as target charging pile data frames and vehicle to be charged data frames, respectively. A preset CAN-ID rule definition table is used to extract key fields from the target charging pile data frame and the vehicle to be charged data frame. The key fields are the communication direction information and command information of the target charging pile and the vehicle to be charged, which are marked as key extraction information. The key extracted information is remapped and reconstructed using the bidirectional command mapping table built into the protocol conversion device. The remapped and reconstructed processing includes semantic mapping, format conversion, unit conversion, and structural reorganization. The key extracted information after remapping and reconstruction is labeled as preprocessed key extracted information.
4. The charging pile communication standard adaptation method based on protocol conversion as described in claim 1, characterized in that, The process of combining protocol conversion equipment in the target charging pile and the vehicle to be charged to perform instruction scheduling and execution for preprocessing key extracted information, while simultaneously controlling the synchronization of the states of the target charging pile and the vehicle to be charged, specifically involves: In the protocol conversion device, the preprocessed key extracted information is classified by type. The preprocessed key extracted information includes security instructions, control instructions, status query instructions and maintenance instructions, and the urgency of different types of preprocessed key extracted information varies. Based on the urgency level, a multi-priority instruction queue is constructed for the preprocessing key extracted information, and a scheduling algorithm for the preprocessing key extracted information is preset. The new scheduling algorithm for preprocessing key extraction is a preemptive scheduling algorithm. When different preprocessing key extraction information is executed in a multi-priority instruction queue, the preprocessing key extraction information with higher urgency is executed first. And when the preprocessing key extraction information with relatively low urgency is being executed, if preprocessing key extraction information with relatively high urgency is generated, the preprocessing key extraction information with relatively high urgency is scheduled first. During the scheduling process, the key preprocessed information is compared in real time in both directions, and the comparison results are used to control the synchronization of the target charging pile and the vehicle to be charged.
5. The charging pile communication standard adaptation method based on protocol conversion according to claim 4, characterized in that, The process of performing real-time bidirectional status comparison on preprocessed key extracted information during scheduling, and controlling the synchronization of the status of the target charging pile and the vehicle to be charged based on the comparison results, specifically includes: During the scheduling process, the key extracted information from the preprocessing is compared in real time in two directions. That is, the target charging pile and the vehicle to be charged are analyzed in real time to determine whether the state of the target charging pile and the vehicle to be charged are the same. The real-time synchronous analysis method involves converting preprocessed key extracted information into a normalized state model, establishing a state consistency rule base, and performing state consistency comparison on the normalized state model. When the state of the target charging pile is inconsistent with that of the vehicle to be charged, the state deviation value is calculated. If the state deviation value is within the acceptable range, the key information extracted by preprocessing is continuously scheduled. If the state deviation value is not within the acceptable range, the state deviation value is smoothed by applying a proportional-integral control algorithm in the protocol conversion device until the state deviation value is within the acceptable range.
6. The charging pile communication standard adaptation method based on protocol conversion as described in claim 1, characterized in that, The process of real-time detection and diagnosis of device anomalies during instruction scheduling and execution, and the establishment of a secure recovery mechanism to ensure stable operation of instruction scheduling and execution, specifically includes: During the instruction scheduling and execution process for preprocessing key extracted information, the error frames of the CAN bus are monitored and counted in real time through the target virtual communication link. The error frames of the CAN bus include format errors, bit errors, and stuffing errors. If the number of error frames exceeds the predetermined value within the scheduled error frame monitoring and counting analysis time, it is determined that there is physical link degradation in the CAN bus. Within the protocol conversion device, and during the scheduling process, a continuous logic analysis is performed on the preprocessed key extracted information. The continuous logic analysis involves analyzing whether there is sequence repetition or sequence jump in the preprocessed key extracted information. If so, it is determined that the protocol conversion device has a protocol logic disorder. If there is physical link degradation on the CAN bus, or logical protocol errors in the protocol conversion device, a security recovery mechanism is constructed to ensure stable operation of instruction scheduling and execution.
7. The charging pile communication standard adaptation method based on protocol conversion as described in claim 6, characterized in that, If the CAN bus experiences physical link degradation or the protocol conversion device experiences logical protocol errors, a security recovery mechanism is constructed to ensure stable operation of instruction scheduling and execution. Specifically: For anomalies detected and diagnosed in real time in different devices during instruction scheduling and execution, a fault tolerance assessment is performed for the corresponding devices. The fault tolerance assessment involves retransmitting key extracted information through a protocol conversion device to determine whether there is still physical link degradation of the CAN bus or logical protocol disorder of the protocol conversion device within a specified number of retransmissions. If not, then the corresponding equipment is judged to have a high fault tolerance rate and is considered to be in a minor abnormality. If so, the corresponding device is judged to have a low fault tolerance rate, which is considered a serious anomaly. For devices with minor anomalies, maintain the physical connection of the device and clear the target virtual communication link with other connected devices, while resetting the target virtual communication link. For devices with severe malfunctions, the control protocol conversion device sends an emergency stop command to the target charging pile or the vehicle waiting to be charged, and stops the protocol conversion process.
8. The charging pile communication standard adaptation method based on protocol conversion as described in claim 1, characterized in that, During the instruction scheduling and execution process, the real-time protocol conversion and structured log recording for charging are specifically as follows: When the protocol conversion device sends instructions to the target charging pile and the vehicle to be charged, and controls the target charging pile to supply power to the vehicle to be charged, all events between the protocol conversion device, the target charging pile and the vehicle to be charged are recorded in real time. During the recording of all events, the events are represented and encapsulated, and storage memory is introduced to store and process the encapsulated events; Based on the stored encapsulated events, the data is output in real-time log format to the control panels of the target charging pile and the vehicle to be charged, and then displayed on the control panel.
9. A charging pile communication standard adaptation system based on protocol conversion, characterized in that, The charging pile communication standard adaptation system includes different management and storage modules. When the different management and storage modules are executed by the system processor, the charging pile communication standard adaptation steps as described in any one of claims 1-8 are implemented.