Charging pile log management system and method

CN120804040APending Publication Date: 2025-10-17SHENZHEN SINEXCEL ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510878451.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

The existing charging pile log management system has problems such as serious log loss, low export efficiency, unreliable upload, inconsistent format and lack of contextual association, which affects operation and maintenance efficiency and fault diagnosis capabilities.

Method used

The log management system uses charging orders as units. It communicates with the upper computer through the charging pile lower computer, writes key log categories into the buffer queue, and encapsulates them into log data packets when the charging order is completed and sends them to the upper computer. The latter creates an independent log file and compresses it and uploads it to the server, establishes a mapping relationship between asset code, terminal number, and order serial number, and provides retrieval and analysis services for users.

Benefits of technology

It achieves automatic, real-time and reliable uploading of logs, avoids overwriting and loss, simplifies data analysis, and improves operation and maintenance efficiency and fault diagnosis capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804040A_ABST
    Figure CN120804040A_ABST
Patent Text Reader

Abstract

The invention discloses a charging pile log management system and method, and belongs to the technical field of electric vehicle charging. In the scheme, a charging pile lower computer writes key logs in the charging process of a charging order into buffer queues in a classified mode, and when the charging order is finished, the key logs in the buffer queues are sequentially packaged into log data packets to be sent to a charging pile upper computer; and the charging pile upper computer receives the log data packet, writes the log content in the log data packet into a corresponding log file according to the log type, packages and compresses all the log files corresponding to each charging order, generates a charging order log compressed file, and uploads the charging order log compressed file to the server side. According to the scheme, association between the charging order and the log is established, automatic, real-time and reliable uploading of the log is realized, the problems of log coverage and loss are avoided, log classified storage is beneficial to subsequent analysis and analysis, and the operation and maintenance efficiency and the fault diagnosis capability of a charging pile system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electric vehicle charging, and in particular to a charging pile log management system and method. BACKGROUND

[0002] In the existing charging pile control system, the controller usually adopts the method of recording logs to store and manage various types of key information in the running process, so as to facilitate subsequent fault diagnosis, system maintenance and performance analysis. The current common log processing mechanism mainly includes three main links of log writing, log export and log uploading.

[0003] 1. Log writing mechanism:

[0004] The controller generates various types of log data in real time during operation. These logs are usually written into non-volatile memory such as Flash and managed in a cyclic overwrite manner. When the storage space is full, the new log will overwrite the original old log. Although this mechanism can effectively utilize limited storage space, it has the risk of losing historical logs.

[0005] 2. Log export method:

[0006] When the running state or abnormal situation of the device needs to be investigated, the maintenance personnel can export the logs in the following ways:

[0007] Connect the charging pile controller through a special PC terminal diagnosis tool to read and export complete log files;

[0008] Copy the log files to external storage devices using USB interfaces or SD card slots;

[0009] A small number of devices support remote export of logs to servers through 4G wireless communication. However, the above methods are generally complex, inefficient, and rely on manual intervention. Remote export is also limited by network environment, making it difficult to meet the high real-time and high-reliability operation and maintenance requirements.

[0010] 3. Log uploading mechanism:

[0011] Some charging piles support uploading log files to remote servers actively, usually using FTP protocol for transmission. However, due to the large size of log files and unstable network bandwidth, the actual upload success rate is low, affecting the availability and integrity of log data.

[0012] The existing technical solutions have exposed the following main problems in actual application:

[0013] Log loss is serious, affecting problem tracing: due to the use of circular coverage storage strategy, historical logs are easily overwritten by new logs, resulting in missing of key event information, which is not conducive to long-term problem tracking and analysis.

[0014] Low efficiency of log export, lack of remote capability: the current log export method generally relies on on-site operation and cannot realize automation and remote, affecting the response speed of operation and maintenance.

[0015] Unreliable log upload, poor stability: limited by network conditions and file size, the log upload process is time-consuming and has a high failure rate, making it difficult to ensure timely acquisition of log data.

[0016] Non-uniform log format, difficult to analyze: different types of log formats are different, lack of standardized structure, and log content is mixed, increasing the complexity of data analysis and analysis in the later stage.

[0017] Log and charging process are disconnected, lack of context association: the existing log recording method fails to bind log information with specific charging events, resulting in that log entries cannot be accurately corresponded to a charging process, affecting the accuracy and effectiveness of data analysis.

[0018] In summary, the existing log management system of charging pile still has obvious deficiencies in data integrity, real-time performance, reliability and analyzability, and an improved log storage and management scheme is needed to realize efficient saving, reliable uploading, structured organization of log data and accurate association with charging events, so as to improve the operation and maintenance efficiency and fault diagnosis capability of charging pile system. SUMMARY

[0019] The technical problem to be solved by the present application is to provide a charging pile log management system and method in view of the above-mentioned defects of the prior art.

[0020] To achieve the above-mentioned purpose, the present application provides a charging pile log management system, which comprises a charging pile lower computer, a charging pile upper computer and a server end.

[0021] The charging pile lower computer is in communication connection with the vehicle end and the charging pile upper computer; the charging pile lower computer is used for negotiating charging parameters with the vehicle end; the key logs in the charging process are classified and written into buffer queue in units of charging orders, and each buffer queue writes key logs of one category, the category of the key logs including communication logs with the vehicle end, charging key event print logs and voltage logs of charging connection confirmation signals; then the contents of the key logs in each buffer queue are encapsulated into log data packets and sent to the charging pile upper computer in sequence when the charging order ends.

[0022] The charging pile upper computer is in communication connection with the charging pile lower computer and the server end; the charging pile upper computer is used for receiving the log data packet sent by the charging pile lower computer, creating an independent log file for each log type of each charging order, writing the log content in the log data packet into the corresponding log file according to the log type, and packaging and compressing all the log files corresponding to each charging order, uploading the charging order log compressed file to the server end after the charging order log compressed file is generated; the name of the charging order log compressed file includes the asset code of the charging pile, the terminal number and the order serial number.

[0023] The server end establishes the mapping relationship between the asset code, the terminal number and the order serial number of the charging pile and the charging order log compressed file, and provides log retrieval and analysis services for users.

[0024] In the charging pile log management system, the charging pile lower computer is further used for: cyclically writing all log information in the charging process into a non-volatile memory.

[0025] The application further provides a charging pile log management method applied to the charging pile log management system, and the charging pile log management method comprises the following steps:

[0026] Step S1: after the charging pile lower computer receives a user code scanning order instruction, a plurality of buffer queue are applied in the memory for the current charging order, and the key logs in the charging process are classified and written into the buffer queue; one category of key logs is written into each buffer queue, and the categories of the key logs include: communication logs with the vehicle end, charging key event printing logs and voltage logs of charging connection confirmation signals.

[0027] Step S2: the charging pile lower computer sequentially encapsulates the key log content in each buffer queue into a log data packet and sends the log data packet to the charging pile upper computer when the charging order ends.

[0028] Step S3: the charging pile upper computer receives the log data packet sent by the charging pile lower computer, creates an independent log file for each log type of each charging order, writes the log content in the log data packet into the corresponding log file according to the log type, and packages and compresses all the log files corresponding to each charging order, uploads the charging order log compressed file to the server end after the charging order log compressed file is generated; the name of the charging order log compressed file includes the asset code of the charging pile, the terminal number and the order serial number.

[0029] Step S4: the server end establishes the mapping relationship between the asset code, the terminal number and the order serial number of the charging pile and the charging order log compressed file, and provides log retrieval and analysis services for users.

[0030] The charging pile log management method of the application, in the step S2, the method for packaging the key log into a log data packet and sending to the charging pile host computer is:

[0031] In step S21, the content of each type of key log is packaged into one or more TCP data packets, each data packet includes a message header and a message data, the message header includes a terminal number and a charging pile gun number, and the message data includes the following fields: an order serial number, a log type, a total packet number, a packet sequence number, and a data field, wherein the key log content is contained in the data field;

[0032] In step S22, the charging pile lower computer sends the TCP data packet packaged in step S21 to the charging pile host computer in sequence, and after sending each TCP data packet, the charging pile lower computer continues to send the next TCP data packet after receiving the response message indicating successful reception from the charging pile host computer; if the response message from the charging pile host computer indicates a failure, the charging pile lower computer repeatedly sends the current TCP data packet, and stops sending after the maximum number of retries is exceeded.

[0033] In the charging pile log management method of the application, the response message in step S22 includes the following fields: an order serial number, a log type, a total packet number, a packet sequence number, and a processing result.

[0034] In the charging pile log management method of the application, the method further includes: the charging pile lower computer cyclically writes all log information during the charging process into a non-volatile memory.

[0035] In the charging pile log management method of the application, in step S3, the generation of the charging order log compressed file and the uploading to the server end include:

[0036] The charging pile host computer creates an independent uploading task to upload the charging order log compressed file;

[0037] Before uploading the charging order log compressed file each time, the charging pile host computer checks whether there is a packaged charging order log compressed file that has not been uploaded in the local, if there is, the charging pile host computer preferentially uploads these files;

[0038] After successful uploading, the charging pile host computer deletes the corresponding original log file and the charging order log compressed file in the local to release the storage space, and if the uploading fails, the charging pile host computer retains the original log file and the charging order log compressed file and waits for the next retry.

[0039] The application has the following beneficial effects: in the scheme of the application, after the charging pile lower computer receives the user's order placing instruction by scanning the code, multiple buffer queue is applied for the current charging order in the memory, the key logs in the charging process are classified and written into the buffer queue, one category of key logs is written into each buffer queue, at the end of the charging order, the key logs in each buffer queue are encapsulated into log data packets in turn and sent to the charging pile upper computer; the charging pile upper computer receives the log data packets sent by the charging pile lower computer, creates independent log files for each log type of each charging order, writes the log content in the log data packets into the corresponding log file according to the log type, packs and compresses all log files corresponding to each charging order, generates a charging order log compressed file, and uploads the charging order log compressed file to the server end, and the server end receives the charging order log compressed file and provides log retrieval and analysis services for the user. The scheme of the application establishes the association between the charging order and the log, realizes the automatic real-time reliable uploading of the log, avoids the problems of log covering and loss, does not need to manually export the log, and the classified storage of the log is beneficial to subsequent analysis and analysis, and the operation and maintenance efficiency and fault diagnosis capability of the charging pile system are improved. BRIEF DESCRIPTION OF DRAWINGS

[0040] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application, and do not limit the application in any way. In the drawings:

[0041] Figure 1 A flowchart of the charging pile log recording method of the prior art.

[0042] Figure 2 A block diagram of the charging pile log management system provided by the embodiment of the application.

[0043] Figure 3 A flowchart of the charging pile log management method provided by the embodiment of the application.

[0044] Figure 4 A flowchart of the charging pile log management method provided by the embodiment of the application. DETAILED DESCRIPTION

[0045] To make the objects, technical solutions and advantages of the embodiments of the application clearer, the technical solutions in the embodiments of the application will be described below in conjunction with the drawings of the embodiments of the application. Obviously, the described embodiments are some but not all of the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the application.

[0046] The embodiments of the present application will be further described below in conjunction with the accompanying drawings. It should be understood that the embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.

[0047] The present application is suitable for log management of charging piles, and relates to log generation, uploading, retrieval and analysis processes.

[0048] As shown in Figure 2 The present application provides a charging pile log management system, which comprises a charging pile lower computer, a charging pile upper computer and a server end.

[0049] The charging pile lower computer is in communication connection with a vehicle end and the charging pile upper computer; the charging pile lower computer is used for negotiating charging parameters with the vehicle end; charging process key logs are classified and written into buffer area queues in units of charging orders, one category of key logs is written into each buffer area queue, and the categories of the key logs include communication logs with the vehicle end, charging key event printing logs and voltage logs of charging connection confirmation signals; then, at the end of a charging order, the contents of the key logs in each buffer area queue are encapsulated into log data packets and sent to the charging pile upper computer in sequence.

[0050] In the prior art, all logs of all charging orders are written into the same log file of the Flash, and after the log file is full, the previous log file is overwritten when writing next time. The size of the log file is usually several tens of megabytes, which is inconvenient for transmission and quick positioning of problems of a single charging order. In the embodiments of the present application, the charging orders are associated with the logs in units of charging orders, each category of log file of each charging order is stored separately in the charging pile lower computer, the log contents of the current order are packaged and sent to the charging pile upper computer through TCP after the order is ended, and real-time and reliable export of the logs is realized. Since only the log contents of a single charging order are sent each time, the data volume is small, the transmission time is short, the data packets are transmitted through TCP, and the success rate is high. After the log contents are sent, the charging pile lower computer can clear the log contents in the local buffer area queue, and the storage space is released in time, which is very beneficial to the charging pile lower computer with small storage space.

[0051] In the embodiments of the present application, in addition to storing the log according to the charging order, the log of each charging order is further classified by log type. In some embodiments of the present application, the log type is classified into the following three types: communication log with the vehicle end, charging key event print log, and voltage log of the charging connection confirmation signal. After receiving the user's order command by scanning the code, the charging pile lower machine applies three buffer queue spaces in the memory for the current charging order, which are used to store the log contents of the above three types of logs. With the progress of the charging process, the charging pile lower machine writes the log contents into the three buffer queue spaces intermittently in the form of byte stream. The formats of the above three types of logs are quite different, and independent storage avoids the mixing of multiple types of logs, reducing the complexity of subsequent data analysis and analysis. The classification of the log in the present application is not limited, and in actual application, it can also be flexibly adjusted according to specific needs. In some embodiments of the present application, the memory is an on-chip RAM of the charging pile lower machine controller chip, and the buffer is a FIFO ring buffer. The on-chip RAM can also be replaced by an off-chip RAM, and the buffer can also be in other forms, which are not limited in the present application.

[0052] The communication log with the vehicle end includes the message content of the communication between the charging pile lower machine and the vehicle end BMS (Battery Management System). For example, if the charging pile upper machine communicates with the vehicle end BMS through CAN message, the content of the CAN message is stored in the communication log with the vehicle end. In actual application, all the message content of the charging pile lower machine and the vehicle end BMS can be stored as needed, or part of the key message content can be selectively stored.

[0053] The charging key event print log includes the key information recorded by the control system of the charging pile lower machine during operation, such as key action information such as contactor closing and opening, key state transformation information such as charging state conversion of the charging gun, and abnormal information such as voltage abnormality. These information are usually output by the control system of the charging pile lower machine through printing, and each information in the log usually includes the specific time of recording and the specific content of the information, which can be used to analyze the abnormal problems and charging performance indicators in the charging process.

[0054] The voltage log of the charging connection confirmation signal includes the voltage of the CC1 signal terminal in the charging gun terminal collected in real time. The charging pile judges whether the charging gun is completely inserted into the vehicle socket by monitoring the CC1 voltage change. When the gun head is not inserted, the CC1 voltage is usually 12V; during the insertion process, the voltage is reduced to 6V due to the voltage division effect of the resistor; after complete connection, the voltage is further reduced to 4V, at which time the charging pile confirms the successful connection and starts the subsequent process. In the embodiments of the present application, the voltage value of the CC1 signal terminal is collected and recorded every 1ms or so.

[0055] The charging pile upper computer is in communication connection with the charging pile lower computer and the server end; the charging pile upper computer is used for receiving the log data packet sent by the charging pile lower computer, creating an independent log file for each log type of each charging order, writing the log content in the log data packet into the corresponding log file according to the log type, and packing and compressing all the log files corresponding to each charging order to generate a charging order log compressed file, and uploading the charging order log compressed file to the server end after generation; the name of the charging order log compressed file includes the asset code of the charging pile, the terminal number, and the order serial number.

[0056] After the charging pile upper computer receives the log data packet, the log content in the log data packet is written into a log file, and the log file name can include the order serial number, the terminal number, the gun number, the log type, the current date and time, the order serial number is the order number of the operator, the terminal number represents the pile number of the charging pile, and the gun number represents the number of the charging gun. For example, in the name of the log file "bms_3-1_1009993041_24-12-09_13-07-12.log", "bms" represents that the log type is the communication log with the vehicle end, "3-1" represents the A gun of the 3rd charging pile, "1009993041" represents the order serial number, and "24-12-09_13-07-12" represents the current date and time. Each type of log of each charging order independently generates a file, and then all the log files corresponding to the charging order are compressed into a compressed file and uploaded to the server end through FTP. The name of the compressed file includes the asset code of the charging pile, the terminal number, and the order serial number, wherein the asset code of the charging pile is the unique number of the charging pile, and the terminal number is the number of the charging pile. In some embodiments of the application, the compressed file is a.tar.gz file, and the naming rule of the compressed file is <asset code of the charging pile>_<terminal number>_<order serial number>.tar.gz. The name of the compressed file is the interface parameter of the charging pile and the server end, and the server end matches the log according to the name of the compressed file.

[0057] The server end establishes the mapping relationship between the asset code of the charging pile, the terminal number, and the order serial number and the charging order log compressed file, and provides log retrieval and analysis services for users. The server end provides a front-end page to provide log retrieval, download, and analysis services for users.

[0058] In some embodiments of the application, the charging pile lower computer is further used for: cyclically writing all log information in the charging process into the non-volatile memory. Figure 4As shown, the charging pile lower computer writes the log content to the buffer zone, and still cyclically writes the log in the Flash as in the prior art. There is only one log file in the Flash, and there is no distinction between charging orders, and no log classification. The content written in the Flash can be compatible with the old analysis method, and can also be used as a backup of the log content in the buffer zone.

[0059] As shown in the Figure 3 The embodiment of the present application also provides a charging pile log management method, which is applied to the charging pile log management system as described above, and comprises the following steps:

[0060] Step S1, after the charging pile lower computer receives the user's order instruction by scanning the code, a plurality of buffer zone queues are applied for the current charging order in the memory, and the key logs in the charging process are classified and written into the buffer zone queues, one type of key log is written into each buffer zone queue, and the types of the key logs include the communication log with the vehicle end, the charging key event printing log, and the voltage log of the charging connection confirmation signal.

[0061] Step S2, the charging pile lower computer encapsulates the key log content in each buffer zone queue into a log data packet and sends it to the charging pile upper computer in sequence when the charging order ends.

[0062] In some embodiments of the present application, the communication log with the vehicle end is sent first, then the charging key event printing log is sent, and finally the voltage log of the charging connection confirmation signal is sent. The present application does not make specific limitations on the specific order of log sending.

[0063] In the embodiment of the present application, the method for encapsulating the key log content into a log data packet and sending it to the charging pile upper computer in step S2 is as follows:

[0064] Step S21, the key log content of each type is encapsulated into one or more TCP data packets, each data packet includes a message header and a message data, the message header includes a terminal number and a charging pile gun number, the message data includes the following fields: an order serial number, a log type, a total packet number, a packet sequence number, and a data field, wherein the key log content is contained in the data field.

[0065] In actual application, whether the key log content needs to be split into multiple TCP data packets for sending is determined according to the size of the key log content. If the key log content needs to be split into multiple TCP data packets, the multiple TCP data packets are sent in sequence. The terminal number and the charging pile gun number in the message header of the data packet and the order serial number and the log type in the message data are used to construct the log file name for the charging pile upper computer subsequently.

[0066] Step S22, the charging pile lower computer sends the TCP data packet packaged in step S21 to the charging pile upper computer in order, and after sending each TCP data packet, the charging pile lower computer continues to send the next TCP data packet after receiving the response message indicating successful reception from the charging pile upper computer; if the response message from the charging pile upper computer indicates that the reception fails, the charging pile lower computer repeatedly sends the current TCP data packet, and stops sending after the maximum number of retries is exceeded.

[0067] In the embodiment of the application, the charging pile upper computer receives the log data packet sent by the charging pile lower computer, and the same type of log of the same charging order can be divided into several log data packets, and the charging pile upper computer needs to check the log data packet sent by the charging pile lower computer and return an answer signal. In the embodiment of the application, a response mechanism is established between the charging pile lower computer and the charging pile upper computer to ensure reliable transmission of the log data packet. In step S22, the response message includes the following fields: order serial number, log type, total packet number, packet sequence number, and processing result. The order serial number, log type, total packet number, and packet sequence number are the same as the corresponding fields in the TCP data packet sent by the charging pile lower computer, and the processing result indicates whether the reception is successful or not. In some embodiments of the application, if the charging pile upper computer finds that the packet number is incomplete or not received within 10 seconds during the process of receiving the log, it is considered that the sending is timed out, and the reception is stopped.

[0068] Step S3, the charging pile upper computer receives the log data packet sent by the charging pile lower computer, creates an independent log file for each log type of each charging order, writes the log content in the log data packet into the corresponding log file according to the log type, and packs and compresses all log files corresponding to each charging order to generate a charging order log compressed file, and then uploads the charging order log compressed file to the server end; the name of the charging order log compressed file includes the asset code of the charging pile, the terminal number, and the order serial number.

[0069] In the embodiment of the application, the log file name can include an order serial number, a terminal number, a gun number, a log type, a current date and time, the order serial number is an order number of an operator, the terminal number represents a pile number of a charging pile, and the gun number represents a number of a charging gun. For example, in the name of the log file "bms_3-1_1009993041_24-12-09_13-07-12.log", "bms" represents that the log type is a communication log with a vehicle end, "3-1" represents A gun of the 3rd charging pile, "1009993041" represents the order serial number, and "24-12-09_13-07-12" represents the current date and time. Each kind of log of each charging order is independently generated as a file, then all the log files corresponding to the charging order are compressed into a compressed file, and the compressed file is uploaded to the server end through FTP. The name of the compressed file includes an asset code of the charging pile, a terminal number and an order serial number, wherein the asset code of the charging pile is a unique number of the charging pile, and the terminal number is a number of the charging pile. In some embodiments of the application, the compressed file is a.tar.gz file, and the naming rule of the compressed file is <asset code of the charging pile>_<terminal number>_<order serial number>.tar.gz. The name of the compressed file is an interface of the charging pile and the server end, and the server end matches the logs according to the name of the compressed file. The application does not have special restrictions on the type and naming rule of the compressed file, and the principle is to save space as much as possible and to convey necessary key information related to the charging order through the name of the compressed file.

[0070] By packing and compressing multiple log files, all logs of one charging event can be integrated together, the number of files is reduced, network traffic and storage space are saved, and the uploading success rate is improved. As shown in FIG. 8, in some embodiments of the application, the host computer of the charging pile uploads the charging order log compressed file to the cloud server through FTP. Figure 4

[0071] The host computer of the charging pile creates an independent uploading task for uploading the charging order log compressed file, so that the log data packet receiving and the uploading of the charging order log compressed file can be performed in parallel, the log processing efficiency is improved, and the influence of the uploading task on the log data packet receiving is reduced.

[0072] In the embodiment of the application, before uploading the charging order log compressed file each time, the host computer of the charging pile first checks whether there is a charging order log compressed file that has been packed but not uploaded in the local terminal, if there is, the file is preferentially uploaded. After the uploading is successful, the corresponding original log file and the charging order log compressed file in the local terminal are deleted to release the storage space, and if the uploading fails, the original log file and the charging order log compressed file are retained to wait for the next retry. Through the uploading strategy, the charging order log compressed file can be timely and reliably uploaded to the server end, and the local storage is not occupied for a long time.​

[0073] Step S4, the server end establishes the mapping relationship of the asset code of the charging pile, the terminal number, the order serial number and the charging order log compressed file, and provides log retrieval and analysis services for users.

[0074] In the embodiment of the application, the server end provides a front-end page to provide log retrieval, download and analysis services for users. The server end matches the corresponding charging order log compressed file based on the search conditions input by the user, and provides log download and online analysis services for the user.

[0075] In the embodiment of the application, the method further comprises: the charging pile lower computer cyclically writes all log information in the charging process to the non-volatile memory. Figure 4 As shown in the figure, the charging pile lower computer writes the log content to the buffer area, and also cyclically writes the log to the Flash as in the prior art. There is only one log file in the Flash, and there is no distinction between charging orders, nor log classification. The content written in the Flash can be compatible with the old analysis method, or can be used as a backup of the log content in the buffer area.

[0076] In the embodiment of the application, after the user scans the code, the charging pile lower computer independently stores various types of logs, and immediately sends the log content to the charging pile upper computer through a TCP connection after the charging is completed, avoiding log loss due to overwriting. The reliability of log content transmission is ensured through mechanisms such as acknowledgement, timeout retransmission, etc. The charging pile upper computer independently writes each type of log content to a log file, and performs automatic compression, packaging and uploading, and then deletes the local original log file, thereby saving traffic and storage space, and ensuring timely uploading and uploading success rate of the log. The log is automatically uploaded to the server end after the charging is completed, and the corresponding log compressed file of the current charging order can be downloaded through the server end immediately, and targeted analysis can be performed on a single charging order, thereby significantly improving the fault response speed.

[0077] In summary, the scheme of the application realizes complete retention and efficient management of charging logs in the case of limited resources of embedded devices through the organic combination of various optimization mechanisms such as independent storage of logs, association of logs by order, automatic packaging and uploading, reliable transmission confirmation, asynchronous uploading strategy and data compression, which can significantly improve the operation and maintenance and fault diagnosis efficiency of charging equipment, and has a wide application prospect.

[0078] The above is merely a specific implementation of the application, and cannot be used to limit the scope of the application. Equivalent changes made by a person skilled in the art based on the present application, and changes well known to those skilled in the art, should still fall within the scope of the application.

Claims

1. A charging pile log management system, characterized in that: The system includes a charging pile lower computer, a charging pile upper computer, and a server end; The charging pile lower computer is in communication with the vehicle end and the charging pile upper computer; the charging pile lower computer is used to: negotiate charging parameters with the vehicle end; Based on charging orders, key logs from the charging process are categorized and written into buffer queues. Each buffer queue contains a key log of a specific category, including: communication logs with the vehicle, key charging event print logs, and voltage logs of charging connection confirmation signals. At the end of a charging order, the contents of each key log in the buffer queue are sequentially encapsulated into log data packets and sent to the charging pile host computer. The charging pile host computer is communicatively connected to the charging pile slave computer and the server end; the charging pile host computer is used to receive the log data packet sent by the charging pile slave computer, create an independent log file for each log type of each charging order, write the log content in the log data packet to the corresponding log file according to the log type, and package and compress all log files corresponding to each charging order, generate a charging order log compressed file, and upload it to the server end; the name of the charging order log compressed file includes the asset code of the charging pile, the terminal number, and the order serial number; The server establishes a mapping relationship between the asset code, terminal number, order serial number of the charging pile and the compressed file of the charging order log, and provides log retrieval and analysis services for users.

2. The charging pile log management system according to claim 1, characterized in that: The charging pile lower computer is further used to cyclically write all log information during the charging process into a non-volatile memory.

3. A charging pile log management method, applied to the charging pile log management system according to any one of claims 1 to 2, characterized in that: The charging pile log management method comprises the following steps: Step S1: After the charging pile lower computer receives the user's scan code order instruction, it applies for multiple buffer queues in the memory for the current charging order, and writes the key logs of the charging process into the buffer queues by category. Each buffer queue writes a key log of a category. The categories of the key logs include: communication logs with the vehicle end, charging key event print logs, and voltage logs of charging connection confirmation signals; Step S2: When the charging order is completed, the charging pile lower computer sequentially encapsulates the key log contents in each buffer queue into log data packets and sends them to the charging pile upper computer; Step S3, the charging pile host computer receives the log data packet sent by the charging pile slave computer, creates an independent log file for each log type of each charging order, writes the log content in the log data packet to the corresponding log file according to the log type, and packages and compresses all log files corresponding to each charging order, generates a charging order log compressed file, and uploads it to the server; the name of the charging order log compressed file includes the asset code of the charging pile, the terminal number, and the order serial number; In step S4, the server establishes a mapping relationship between the asset code, terminal number, order serial number of the charging pile and the compressed file of the charging order log, and provides log retrieval and analysis services for users.

4. The charging pile log management method according to claim 3, characterized in that: In step S2, the method of packaging the key log into a log data packet and sending it to the charging pile host computer is: Step S21: Encapsulate each type of key log content into one or more TCP data packets. Each data packet includes a message header and message data. The message header includes the terminal number and charging pile gun number. The message data includes the following fields: order serial number, log type, total number of packets, packet sequence number, and data field. The key log content is included in the data field. In step S22, the charging pile lower computer sends the TCP data packets encapsulated in step S21 to the charging pile upper computer in sequence. After sending each TCP data packet, it continues to send the next TCP data packet only after receiving the response message from the charging pile upper computer indicating successful reception. If the response message from the charging pile upper computer indicates that the reception failed, the charging pile lower computer repeats sending the current TCP data packet and retries up to 3 times. If the number of retries is exceeded, the sending will be stopped.

5. The charging pile log management method according to claim 4, characterized in that: In step S22, the response message includes the following fields: order serial number, log type, total package quantity, package sequence number, and processing result.

6. The charging pile log management method according to claim 3, characterized in that: The method further includes: the charging pile lower computer cyclically writing all log information during the charging process into a non-volatile memory.

7. The charging pile log management method according to claim 3, characterized in that: In step S3, generating a compressed file of the charging order log and uploading it to the server includes: The charging pile host computer creates an independent upload task to upload the compressed file of the charging order log; Before uploading the compressed file of the charging order log, the charging pile host computer first checks whether there are compressed files of the charging order log that have been packaged but not uploaded locally. If there are any, upload these files first. After the upload is successful, delete the local original log file and the compressed charging order log file to free up storage space. If the upload fails, keep the original log file and the compressed charging order log file and wait for the next retry.