Secure communication authentication method of alternating current charging pile, electronic equipment and storage medium
By verifying the timestamps and key signature information of the charging piles and the charging platform, the problem of insufficient communication security of the charging piles is solved, and higher data communication security and identity verification are achieved to prevent unauthorized devices from accessing the network.
Patent Information
- Application Number
- CN202411298253.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, the communication security between charging piles and charging platforms is insufficient, making them vulnerable to attacks from unauthorized devices and data leaks, leading to financial losses and security risks.
By parsing the WebSocket handshake request sent by the AC charging pile, reading the timestamp and key signature information, and performing time synchronization verification and identity verification, the accuracy of communication time and the legitimacy of identity are ensured. The key signature mechanism and timestamp verification mechanism are used to improve security.
It improves the communication security between charging piles and charging platforms, reduces the possibility of data tampering and replay, prevents unauthorized device access, and enhances data communication security in the network environment.
Smart Images

Figure CN118921231A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of charging pile communication technology, and in particular to a secure communication authentication method, electronic equipment and storage medium for an AC charging pile. Background Art
[0002] With the widespread popularity of new energy vehicles, charging piles have been widely used as infrastructure. In new energy vehicle charging stations, charging piles and the background management platform usually implement charging pile management and control in the form of data interaction, so as to effectively charge new energy vehicles. In this process, communication security has become a key issue. At present, unauthorized external organizations or devices may access the charging station network by forging identity information or man-in-the-middle attacks, thereby obtaining sensitive data of the charging piles, causing financial losses or user data leakage, and even forging charging records, resulting in security risks such as replay attacks. Summary of the invention
[0003] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, the present invention proposes a secure communication authentication method, electronic device and storage medium for an AC charging pile, which can improve the communication security between the charging pile and the charging platform.
[0004] In a first aspect, an embodiment of the present invention provides a secure communication authentication method for an AC charging pile, which is applied to a server, and the method includes:
[0005] When receiving a WebSocket handshake request sent by the AC charging pile and directed to the charging platform, parsing information of the WebSocket handshake request;
[0006] When the timestamp information and the first key signature information are read from the WebSocket handshake request, the timestamp information is subjected to time synchronization verification to obtain a first verification result, wherein the timestamp information and the first key signature information are configured by the AC charging pile in the WebSocket handshake request, the timestamp information represents the current timestamp corresponding to the AC charging pile, and the first key signature information represents the identity information of the AC charging pile;
[0007] When the first verification result indicates that the timestamp information has passed the time synchronization verification, identity authentication is performed on the first key signature information to obtain a second verification result;
[0008] When the second verification result indicates that the first key signature information has passed identity authentication, a communication connection is established between the AC charging pile and the charging platform.
[0009] Optionally, in one embodiment of the present invention, performing time synchronization verification on the timestamp information to obtain a first verification result includes:
[0010] Verifying the format of the current timestamp corresponding to the AC charging pile according to the timestamp information;
[0011] When it is determined through verification that the format of the current timestamp corresponding to the AC charging pile is a correct format, obtaining a time difference result between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server;
[0012] A first verification result is generated according to the time difference result.
[0013] Optionally, in an embodiment of the present invention, generating a first verification result according to the time difference result includes:
[0014] When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is within a preset time difference threshold range, a first verification result indicating that the timestamp information has passed the time synchronization verification is generated according to the time difference result;
[0015] or,
[0016] When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is outside the preset time difference threshold range, a first verification result indicating that the timestamp information has failed the time synchronization verification is generated according to the time difference result.
[0017] Optionally, in an embodiment of the present invention, before the identity authentication of the first key signature information is performed, the method further includes:
[0018] Sending key request information to the AC charging pile;
[0019] Receive key information corresponding to the AC charging pile sent by the AC charging pile according to the key request information.
[0020] Optionally, in one embodiment of the present invention, the performing identity authentication on the first key signature information to obtain a second verification result includes:
[0021] Sign the timestamp information according to the key information to obtain second key signature information;
[0022] Determine the consistency between the first key signature information and the second key signature information to obtain a determination result;
[0023] A second verification result is generated according to the judgment result.
[0024] Optionally, in an embodiment of the present invention, generating a second verification result according to the judgment result includes:
[0025] When the judgment result indicates that the first key signature information and the second key signature information are consistent, generating a second verification result indicating that the first key signature information has passed identity authentication according to the judgment result;
[0026] or,
[0027] When the judgment result indicates that the first key signature information and the second key signature information are inconsistent, a second verification result indicating that the first key signature information has not passed identity authentication is generated according to the judgment result.
[0028] Optionally, in one embodiment of the present invention, the method further includes:
[0029] When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is outside the preset time difference threshold range, a time adjustment instruction carrying the time difference and the preset time difference threshold range is sent to the AC charging pile, so that the AC charging pile corrects the current timestamp corresponding to the AC charging pile according to the time adjustment instruction.
[0030] Optionally, in one embodiment of the present invention, the method further includes:
[0031] When it is determined that any one of the communication rejection conditions is met, the communication connection between the AC charging pile and the charging platform is rejected, wherein the communication rejection condition includes:
[0032] The timestamp information and the first key signature information are not read from the WebSocket handshake request;
[0033] The first verification result indicates that the timestamp information fails the time synchronization verification;
[0034] The second verification result indicates that the first key signature information has not passed identity authentication.
[0035] In a second aspect, an embodiment of the present invention provides an electronic device, including:
[0036] at least one processor;
[0037] at least one memory for storing at least one program;
[0038] When at least one of the programs is executed by at least one of the processors, the secure communication authentication method for the AC charging pile as described in the first aspect is implemented.
[0039] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a program executable by a processor, and when the program executable by the processor is executed by the processor, it is used to implement the secure communication authentication method of the AC charging pile as described in the first aspect.
[0040] The secure communication authentication method, electronic device and storage medium of the AC charging pile proposed in the present invention parse the WebSocket handshake request sent by the AC charging pile to the charging platform through the server, so that when the timestamp information and the first key signature information are read, the timestamp information is firstly verified for time synchronization to ensure the accuracy of the communication time between the AC charging pile and the charging platform, reduce the possibility of tampering and replay of the charging data, and improve the overall data communication security, and then authenticate the first key signature information to achieve the identity authentication of the AC charging pile and the charging platform during the communication process, and avoid unauthorized device access caused by forged identity information, man-in-the-middle attacks, etc. Therefore, based on the key signature mechanism and the timestamp verification mechanism, the communication security between the charging pile and the charging platform can be improved, and the risk of illegal device access to the charging platform can be avoided. It can be widely applied to charging pile management and control in various complex network environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a schematic diagram of a network architecture associated with a secure communication authentication method for an AC charging pile provided by an embodiment of the present invention;
[0042] Figure 2 is a schematic diagram of a network architecture associated with a secure communication authentication method for an AC charging pile provided by another embodiment of the present invention;
[0043] Figure 3 is a flow chart of a secure communication authentication method for an AC charging pile provided by an embodiment of the present invention;
[0044] Figure 4 yes Figure 3 Flowchart of step S2000 in FIG.
[0045] Figure 5 yes Figure 3 The flowchart before step S3000 in FIG.
[0046] Figure 6 yes Figure 3 Flowchart of step S3000 in FIG.
[0047] Figure 7It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0049] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0050] Figure 1 A schematic diagram of a network architecture associated with a secure communication authentication method for an AC charging pile provided in one embodiment of the present invention, Figure 2 A schematic diagram of a network architecture associated with a secure communication authentication method for an AC charging pile provided in another embodiment of the present invention.
[0051] The network architecture includes but is not limited to: an AC charging pile 100, a server 200 and a charging platform 300, wherein the AC charging pile 100 is used to connect to the server 200, and the server 200 is also used to connect to the charging platform 300. The server 200 can be set outside the charging platform 300 or inside the charging platform 300. For example, Figure 2 The server 200 may be an internal server 200 provided inside the charging platform 300. The internal server 200 may be used to communicate with the internal charging platform 300 and may also be used to communicate with the external AC charging pile 100. Alternatively, Figure 1 The server 200 may be an external server 200 that is externally set or connected, and the external server 200 may be associated with or applied to an external network; but no matter which one, the server 200 is used to execute the secure communication authentication method for the AC charging pile provided in an embodiment of the present invention.
[0052] In one embodiment, there may be multiple AC charging piles 100 in the charging station, and the secure communication authentication method provided in the embodiment of the present invention is applicable to any one of the AC charging piles 100; the charging platform 300 may be, but is not limited to, an application or network platform for providing charging services and connecting charging facilities with users, and may provide users with convenient charging solutions by integrating charging station resources, for example, providing users with charging services such as finding the nearest charging station, consulting charging fees, and making appointments for charging times. The charging platform 300 in this embodiment may be, but is not limited to, various charging operation platforms commonly used on the market, and may also be configured by technicians in this field according to specific application scenarios, which is not limited here.
[0053] It should be noted that the network architecture in the embodiments of the present invention can be applied to but is not limited to various communication systems, such as: wideband code division multiple access mobile communication system (WCDMA), evolved universal terrestrial radio access network (E-UTRAN) system, next generation radio access network (NG-RAN) system, long term evolution (LTE) system, worldwide interoperability for microwave access (WiMAX) communication system and fifth generation (5G) system, such as new generation radio access technology (NR), and future communication systems, such as 6G systems.
[0054] The network architecture and application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will know that with the evolution of the network architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0055] It can be understood by those skilled in the art that Figure 1 and Figure 2 The network architecture shown in the figure does not constitute a limitation on the embodiments of the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0056] based on Figure 1 and Figure 2 The structure of the network architecture shown in the figure proposes various embodiments of the secure communication authentication method for an AC charging pile of the present invention.
[0057] Figure 3 This is a flow chart of a secure communication authentication method for an AC charging pile provided by an embodiment of the present invention. Figure 3 As shown, the secure communication authentication method can be applied to, but is not limited to, Figure 1 or Figure 2 The server in the network architecture shown includes but is not limited to steps S1000 to S4000.
[0058] Step S1000: When receiving a WebSocket handshake request sent by the AC charging pile and directed to the charging platform, perform information parsing on the WebSocket handshake request;
[0059] Step S2000: When the timestamp information and the first key signature information are read from the WebSocket handshake request, time synchronization verification is performed on the timestamp information to obtain a first verification result, wherein the timestamp information and the first key signature information are configured in the WebSocket handshake request by the AC charging pile, the timestamp information represents the current timestamp corresponding to the AC charging pile, and the first key signature information represents the identity information of the AC charging pile;
[0060] Step S3000: When the first verification result indicates that the timestamp information has passed the time synchronization verification, the first key signature information is authenticated to obtain a second verification result;
[0061] Step S4000: When the second verification result indicates that the first key signature information has passed identity authentication, a communication connection is established between the AC charging pile and the charging platform.
[0062] In this step, the server parses the WebSocket handshake request sent by the AC charging pile to the charging platform, so that when the timestamp information and the first key signature information are read, the timestamp information is first verified for time synchronization to ensure the accuracy of the communication time between the AC charging pile and the charging platform, reduce the possibility of tampering and replay of charging data, and improve the overall data communication security. The first key signature information is then authenticated to achieve identity authentication between the AC charging pile and the charging platform during the communication process, and avoid unauthorized device access caused by forged identity information, man-in-the-middle attacks, etc. Therefore, the key signature mechanism and timestamp verification mechanism can improve the communication security between the charging pile and the charging platform, avoid the risk of illegal devices accessing the charging platform, and can be widely used in charging pile management and control in various complex network environments.
[0063] In one embodiment, the AC charging pile can, but is not limited to, choose to use WebSocket (WS) or secure WebSocket (WSS) for communication through the Webserver configuration interface; when choosing to use the WSS protocol, the RSA algorithm or the HmacSHA1 algorithm can be used for data encryption, that is, the AC charging pile uses the key information configured by itself to perform RSA encryption on the current timestamp corresponding to the AC charging pile, thereby obtaining the first key signature information to be configured, wherein the RSA algorithm is an asymmetric encryption algorithm, and the HmacSHA1 algorithm is a key-based message authentication code algorithm, both of which have high security and can effectively prevent data leakage and tampering during the communication process.
[0064] In one embodiment, the Webserver configuration interface also allows the user to set the IP address, port number, and subnet address of the AC charging pile, wherein the subnet address includes a unique serial number (SN) of the AC charging pile, so as to distinguish and identify different charging pile devices in the network; the AC charging pile will generate a unique key information when it leaves the factory. There are many ways for the AC charging pile to configure its own key information, which are not restricted here. For example, during the production process of the AC charging pile, a unique SN is requested from the charging platform through the production tool, and a label with an SN and a QR code is generated. The label is attached to the AC charging pile, and then the SN is scanned using the production tool to obtain the corresponding key. Finally, the SN and key are written into the hardware configuration of the AC charging pile. The hardware configuration cannot be reset by restoring the factory settings.
[0065] In one embodiment, there are multiple ways for the AC charging pile to upload a WebSocket handshake request, which are not limited here. For example, an encrypted signature information is generated based on the current timestamp and key information, and the signature information is configured in the WebSocket handshake request to be uploaded, and then transmitted to the server through the Header field of the WebSocket protocol.
[0066] In one embodiment, there may be multiple ways to parse information in a WebSocket handshake request, which are not limited here. For example, all information carried in the WebSocket handshake request is scanned. If the scan obtains timestamp information and first key signature information, it can be considered that the timestamp information and first key signature information are read from the WebSocket handshake request. Otherwise, it is confirmed that the timestamp information and first key signature information are not read from the WebSocket handshake request.
[0067] In one embodiment, a communication connection between the AC charging pile and the charging platform is established only when the second verification result indicates that the first key signed information has passed the identity authentication. That is to say, only the AC charging pile that has passed the double verification can conduct normal data interaction with the charging platform, which greatly improves the legitimacy of the AC charging pile. Among them, establishing a communication connection between the AC charging pile and the charging platform can be a direct communication connection between the AC charging pile and the charging platform, or an indirect communication connection between the AC charging pile and the charging platform through a server as an intermediary, etc., which is not limited here.
[0068] In one embodiment, if it is determined that any one of the communication rejection conditions is met, the communication connection between the AC charging pile and the charging platform is rejected, wherein the communication rejection conditions include: the timestamp information and the first key signature information are not read from the WebSocket handshake request, the first verification result indicates that the timestamp information has not passed the time synchronization verification, and the second verification result indicates that the first key signature information has not passed the identity authentication. In other words, as long as any link in the verification process fails, it means that the security of the AC charging pile in the current situation has not yet met the target requirements. At this time, the communication connection between the AC charging pile and the charging platform is rejected.
[0069] One embodiment of the present invention, as Figure 4 As shown, step S2000 may include but is not limited to steps S2100 to S2300.
[0070] Step S2100: verifying the format of the current timestamp corresponding to the AC charging pile according to the timestamp information;
[0071] Step S2200: When it is determined through verification that the format of the current timestamp corresponding to the AC charging pile is the correct format, a time difference result between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is obtained;
[0072] Step S2300: Generate a first verification result according to the time difference result.
[0073] In this step, only when it is verified that the format of the current timestamp corresponding to the AC charging pile is the correct format, the time difference result between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server will be obtained. That is to say, if it is verified that the format of the current timestamp corresponding to the AC charging pile is the wrong format, there is no need to perform timestamp comparison, and the communication connection between the AC charging pile and the charging platform can be directly refused.
[0074] In one embodiment, the format of the timestamp can be customized in advance, and there is no limitation here. After the customization is completed, the format of the current timestamp corresponding to the AC charging pile is judged. If it does not conform to the customized timestamp format, it is judged to be in an incorrect format, otherwise it is in a correct format. For example, the preset timestamp format is a local time format in milliseconds, that is, a local response format set to milliseconds. If the format of the current timestamp corresponding to the AC charging pile is not in milliseconds or is not in a local time format, it is judged to be in an incorrect format, otherwise it is in a correct format.
[0075] In one embodiment of the present invention, step S2300 may include but is not limited to step S2310 or S2320.
[0076] Step S2310: When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is within a preset time difference threshold range, a first verification result indicating that the timestamp information has passed the time synchronization verification is generated according to the time difference result;
[0077] or,
[0078] Step S2320: When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is outside the preset time difference threshold range, a first verification result indicating that the timestamp information has not passed the time synchronization verification is generated according to the time difference result.
[0079] In this step, if the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is within the preset time difference threshold range, it means that the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server are not much different and can be ignored. Therefore, a first verification result is generated, indicating that the timestamp information has passed the time synchronization verification. Otherwise, it means that the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server are relatively different. At this time, the current timestamp corresponding to the AC charging pile does not meet the target requirements. Therefore, a first verification result is generated, indicating that the timestamp information has not passed the time synchronization verification.
[0080] In one embodiment, the preset time difference threshold range can be set accordingly according to different actual application scenarios, and is not limited here.
[0081] One embodiment of the present invention, as Figure 5 As shown, before step S3000, steps S5000 to S6000 may also be included but not limited to.
[0082] Step S5000: Send key request information to the AC charging pile;
[0083] Step S6000: receiving key information corresponding to the AC charging pile sent by the AC charging pile according to the key request information.
[0084] In this step, when the first verification result indicates that the timestamp information has passed the time synchronization verification, it means that the first key signature information can be authenticated at this time. In order to authenticate the first key signature information, a key request message is sent to the AC charging pile to inform the AC charging pile of the request for the key, so that the AC charging pile sends the key information corresponding to the AC charging pile to the server according to the key request message, so that the server can further authenticate the first key signature information according to the key information.
[0085] One embodiment of the present invention, as Figure 6 As shown, step S3000 may include but is not limited to steps S3100 to S3300.
[0086] Step S3100: Sign the timestamp information according to the key information to obtain second key signature information;
[0087] Step S3200: judging the consistency between the first key signature information and the second key signature information to obtain a judgment result;
[0088] Step S3300: Generate a second verification result according to the judgment result.
[0089] In this step, when the key information is obtained, the timestamp information is signed according to the key information, thereby obtaining the second key signature information when the server signs, and then the consistency of the first key signature information and the second key signature information is judged, that is, whether the first key signature information and the second key signature information are the same, thereby obtaining the corresponding judgment result, and generating the second verification result based on the judgment result.
[0090] In one embodiment, the basic principle of signing the timestamp information according to the key information in step S3100 is similar to the basic principle of signing the current timestamp by the AC charging pile. Since the specific method of signing the current timestamp by the AC charging pile has been described in detail in the previous embodiment, the specific method of step S3100 will not be repeated here.
[0091] In one embodiment of the present invention, step S3300 may include but is not limited to step S3310 or S3320.
[0092] Step S3310: When the judgment result indicates that the first key signature information and the second key signature information are consistent, a second verification result indicating that the first key signature information has passed identity authentication is generated according to the judgment result;
[0093] or,
[0094] Step S3320: When the judgment result indicates that the first key signature information and the second key signature information are inconsistent, a second verification result indicating that the first key signature information has not passed identity authentication is generated according to the judgment result.
[0095] In this step, if the judgment result indicates that the first key signature information and the second key signature information are consistent, it means that the identity of the AC charging pile corresponding to the first key signature information has passed the consistency verification of the second key signature information, and the legality of the identity of the AC charging pile is determined, thereby generating a second verification result indicating that the first key signature information has passed the identity authentication; otherwise, it means that the identity of the AC charging pile corresponding to the first key signature information has not passed the consistency verification of the second key signature information, and it is determined that the identity of the AC charging pile is illegal, thereby generating a second verification result indicating that the first key signature information has not passed the identity authentication.
[0096] In one embodiment of the present invention, the secure communication authentication method may also include but is not limited to step S7000.
[0097] Step S7000: When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is outside the preset time difference threshold range, a time adjustment instruction carrying the time difference and the preset time difference threshold range is sent to the AC charging pile, so that the AC charging pile corrects the current timestamp corresponding to the AC charging pile according to the time adjustment instruction.
[0098] In this step, if the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is outside the preset time difference threshold range, it means that the current timestamp corresponding to the AC charging pile does not meet the target requirements and needs to be adjusted to a certain extent. Therefore, the server sends a time adjustment instruction carrying the time difference and the preset time difference threshold range to the AC charging pile, so that the AC charging pile can read the corresponding time difference and the preset time difference threshold range from the time adjustment instruction, and make corresponding corrections to the current timestamp based on the read data, so that the corrected current timestamp can meet the target requirements.
[0099] In order to better illustrate the working principles of the above embodiments, a specific example is given below for description.
[0100] First, when the AC charging pile and the charging platform perform a WebSocket handshake, the AC charging pile adds an additional Time field (i.e., timestamp information) and Auth field (i.e., first key signature information) and transmits them through the Header field of WebSocket;
[0101] Then, when processing the WebSocket handshake request, the server attempts to read the Time field and the Auth field. If successful, it proceeds to the next step. Otherwise, it returns a 401 status code, indicating that the communication connection between the AC charging pile and the charging platform is refused.
[0102] Then, the server compares the timestamp in the Time field. If the timestamp format is incorrect, it returns a 401 status code, otherwise it proceeds to the next step;
[0103] Then, the server compares the timestamp of the Time field with its own timestamp. If the time difference between the two exceeds 100 milliseconds, it returns a 401 status code, otherwise it proceeds to the next step;
[0104] Then, the server signs the Time field with HmacSHA1 based on the key information corresponding to the AC charging pile, and compares the signing result with the received Auth field. If the comparison results are inconsistent, a 401 status code is returned, otherwise the AC charging pile verification is confirmed to be successful;
[0105] After the AC charging pile is verified, a communication connection is established between the AC charging pile and the charging platform;
[0106] It can be seen that when the timestamp information and the first key signature information are read, the timestamp information is first verified for time synchronization to ensure the accuracy of the communication time between the AC charging pile and the charging platform, reduce the possibility of charging data being tampered with and replayed, and improve the overall data communication security. Then, the first key signature information is authenticated to achieve identity authentication between the AC charging pile and the charging platform during the communication process, and avoid unauthorized device access caused by forged identity information, man-in-the-middle attacks, etc. Therefore, the key signature mechanism and timestamp verification mechanism can improve the communication security between the charging pile and the charging platform, avoid the risk of illegal devices accessing the charging platform, and can be widely used in charging pile management and control in various complex network environments.
[0107] Figure 7 FIG. 1 is a schematic diagram of the structure of an electronic device 1000 provided by an embodiment of the present invention. Figure 7 As shown, the electronic device 1000 includes a memory 1100 and a processor 1200. The number of the memory 1100 and the processor 1200 may be one or more. Figure 7 In the embodiment, a memory 1100 and a processor 1200 are taken as an example; the memory 1100 and the processor 1200 in the device may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0108] The memory 1100 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the safety communication authentication method for an AC charging pile provided in any embodiment of the present invention. The processor 1200 implements the safety communication authentication method for the AC charging pile by running the software programs, instructions and modules stored in the memory 1100.
[0109] The memory 1100 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function. In addition, the memory 1100 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 1100 may further include a memory remotely arranged relative to the processor 1200, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the secure communication authentication method for an AC charging pile provided in any embodiment of the present invention.
[0111] An embodiment of the present invention also provides a computer program product, including a computer program or computer instructions, wherein the computer program or computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the secure communication authentication method for an AC charging pile provided in any embodiment of the present invention.
[0112] The electronic devices and application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of electronic devices and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.
[0113] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0114] In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0115] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process or an execution thread, and a component may be located on a computer or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may communicate, for example, through local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems through signals).
Claims
1. A secure communication authentication method for an AC charging pile, characterized in that: Applied to a server, the method includes: Upon receiving a WebSocket handshake request directed to the charging platform sent by the AC charging pile, performing information parsing on the WebSocket handshake request; When the timestamp information and the first key signature information are read from the WebSocket handshake request, time synchronization verification is performed on the timestamp information to obtain a first verification result, wherein the timestamp information and the first key signature information are configured by the AC charging pile in the WebSocket handshake request, the timestamp information represents the current timestamp corresponding to the AC charging pile, and the first key signature information represents the identity information of the AC charging pile; When the first verification result indicates that the timestamp information has passed the time synchronization verification, identity authentication is performed on the first key signature information to obtain a second verification result; When the second verification result indicates that the first key signature information has passed identity authentication, a communication connection is established between the AC charging pile and the charging platform.
2. The secure communication authentication method for an AC charging pile according to claim 1, characterized in that: The performing time synchronization verification on the timestamp information to obtain a first verification result includes: Verifying the format of the current timestamp corresponding to the AC charging pile according to the timestamp information; When it is determined through verification that the format of the current timestamp corresponding to the AC charging pile is correct, obtaining a time difference result between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server; A first verification result is generated according to the time difference result.
3. The secure communication authentication method for an AC charging pile according to claim 2, characterized in that: Generating a first verification result according to the time difference result includes: When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is within a preset time difference threshold range, generating a first verification result indicating that the timestamp information has passed the time synchronization verification according to the time difference result; or, When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is outside the preset time difference threshold range, a first verification result indicating that the timestamp information fails the time synchronization verification is generated according to the time difference result.
4. The secure communication authentication method for an AC charging pile according to claim 1, characterized in that: Before performing identity authentication on the first key signature information, the method further includes: Sending a key request message to the AC charging pile; Receive key information corresponding to the AC charging pile sent by the AC charging pile according to the key request information.
5. The secure communication authentication method for an AC charging pile according to claim 4, characterized in that: The performing identity authentication on the first key signature information to obtain a second verification result includes: Sign the timestamp information according to the key information to obtain second key signature information; Determining consistency between the first key signature information and the second key signature information to obtain a determination result; A second verification result is generated according to the judgment result.
6. The secure communication authentication method for an AC charging pile according to claim 5, characterized in that: Generating a second verification result according to the judgment result includes: When the judgment result indicates that the first key signature information and the second key signature information are consistent, generating a second verification result according to the judgment result indicating that the first key signature information has passed identity authentication; or, When the judgment result indicates that the first key signature information and the second key signature information are inconsistent, a second verification result indicating that the first key signature information has failed identity authentication is generated according to the judgment result.
7. The secure communication authentication method for an AC charging pile according to claim 2, characterized in that: The method further comprises: When the time difference result indicates that the time difference between the current timestamp corresponding to the AC charging pile and the current timestamp corresponding to the server is outside the preset time difference threshold range, a time adjustment instruction carrying the time difference and the preset time difference threshold range is sent to the AC charging pile, so that the AC charging pile corrects the current timestamp corresponding to the AC charging pile according to the time adjustment instruction.
8. The secure communication authentication method for an AC charging pile according to any one of claims 1 to 7, characterized in that: The method further comprises: When it is determined that any one of the communication rejection conditions is met, the communication connection between the AC charging pile and the charging platform is rejected, wherein the communication rejection condition includes: The timestamp information and the first key signature information are not read from the WebSocket handshake request; The first verification result indicates that the timestamp information fails the time synchronization verification; The second verification result indicates that the first key signature information has failed identity authentication.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the secure communication authentication method for an AC charging pile according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that A processor-executable program is stored therein, and when the processor-executable program is executed by the processor, it is used to implement the secure communication authentication method for an AC charging pile as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Authentication method, authentication system, computing device and storage medium
CN113806810A
