Communication method and system, electronic equipment and readable storage medium

By regularly generating and using client keys on the server side for data decryption, the problem of high communication delay under the traditional TLS protocol is solved, achieving the effect of reducing delay while ensuring communication security.

CN118741502APending Publication Date: 2024-10-01TIANYI TRANSPORTATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310323601.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the field of autonomous driving based on vehicle-road collaboration, the traditional use of Transport Layer Security (TLS) in the data transmission process causes the communicating parties to exchange secret keys every time they communicate, resulting in high communication delays.

Method used

The client secret key is regularly generated on the server side, including the first secret key and the second secret key, and the data service obtains these secret keys from the secret key service, and selects the appropriate secret key to decrypt the data packet based on the information in the data packet. , reducing the frequency of key exchange during each communication.

Benefits of technology

It reduces the vehicle-to-road communication delay while ensuring communication security. By regularly generating and using secret keys, the communication delay between the server and the client is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741502A_ABST
    Figure CN118741502A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and particularly discloses a communication method and system, electronic equipment and a readable storage medium, the method is applied to a client and a server, the server provides a secret key service and a data service, and the method comprises the following steps executed at the server: the secret key service periodically generates a client secret key, the secret key comprises a first secret key and a second secret key; the data service acquires a client secret key from the secret key service regularly; the data service receives a data packet sent by the client, and selects a first secret key or a second secret key from the acquired client secret keys based on information contained in the data packet; and decrypting the data packet based on the selected secret key. Through the scheme of the invention, the communication time delay between the client and the server is reduced, and the communication security is ensured on the premise of reducing the time delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a communication method, system, electronic device and readable storage medium. Background Art

[0002] In the field of unmanned driving based on vehicle-road collaboration, vehicles need to frequently send their own BSM (Basic Safety Message) to the roadside, and at the same time need to continuously receive SSM (Sensor Sharing Message) from the roadside.

[0003] Since the above-mentioned data transmission process adopts 5G Internet of Things, PC5 protocol, etc., in order to ensure data security, the transmitted data needs to be encrypted. The data encryption method used in the traditional data transmission process is the secure transport layer protocol (TLS for short), which ensures the confidentiality and data integrity between two communication applications. However, in the data transmission process using the secure transport layer protocol, the communicating parties need to exchange secret keys each time they communicate, which results in a higher communication delay. Under this premise, the present invention proposes a communication method. Summary of the invention

[0004] The present invention proposes a communication method, system, electronic device and readable storage medium, which reduce the vehicle-road communication delay and ensure communication security while reducing the delay.

[0005] Based on the above purpose, an embodiment of the present invention provides a communication method, which is applied to a client and a server, wherein the server provides a key service and a data service, and the method includes executing the following steps on the server:

[0006] The key service periodically generates client keys, the keys comprising a first key and a second key;

[0007] The data service periodically obtains the client key from the key service;

[0008] The data service receives a data packet sent by the client, and selects a first key or a second key from the acquired client key based on information contained in the data packet;

[0009] The data packet is decrypted based on the selected key.

[0010] Through the above solution, the vehicle-road communication delay is reduced, and communication security is guaranteed while reducing the delay.

[0011] In some implementations, the method further includes executing the following steps on the client:

[0012] Obtain a client key from the key service;

[0013] Encrypting data based on the client key and packaging the encrypted data into a data packet;

[0014] The data packet is sent to the data service.

[0015] In some implementations, the first key and the second key are keys in adjacent time periods.

[0016] In some implementations, encrypting data based on the client key and packaging the encrypted data into a data packet includes:

[0017] The data containing the vehicle characteristics is encrypted and signed based on the client secret key, and the encrypted and signed data is packaged into a data packet.

[0018] In some embodiments, the method further comprises:

[0019] The data not containing vehicle features is signed based on the signature algorithm, and the signed data is packaged into a data packet.

[0020] In some implementations, sending the data packet to the data service includes:

[0021] The data packet is timestamped and the timestamped data packet is sent to a data service.

[0022] In some implementations, selecting the first key or the second key from the acquired client key based on information included in the data packet includes:

[0023] A first key or a second key is selected from the acquired client keys based on the timestamp information included in the data packet.

[0024] Another aspect of the embodiment of the present invention further provides a communication system, including:

[0025] A key service, wherein the key service is configured to periodically generate client keys, the keys comprising a first key and a second key;

[0026] a data service, the data service being configured to periodically obtain a client key from the key service;

[0027] The data service is further configured to receive a data packet sent by a client, select a first key or a second key from the acquired client key based on information contained in the data packet, and decrypt the data packet based on the selected key.

[0028] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: at least one processor; and a memory, wherein the memory stores a computer program executable on the processor, and the computer program implements the steps of the above method when executed by the processor.

[0029] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program that implements the above method steps when executed by a processor.

[0030] The present invention has at least the following beneficial technical effects: through the scheme of the present invention, the communication delay between the client and the server is reduced, and the communication security is guaranteed under the premise of reducing the delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A flow chart of an embodiment of a communication method provided by the present invention;

[0033] Figure 2 A flow chart of another embodiment of the communication method provided by the present invention;

[0034] Figure 3 A flow chart of another embodiment of the communication method provided by the present invention;

[0035] Figure 4 A flow chart of another embodiment of the vehicle-road communication method provided by the present invention;

[0036] Figure 5 A schematic diagram of an embodiment of a communication system provided by the present invention;

[0037] Figure 6 A schematic structural diagram of an embodiment of an electronic device provided by the present invention;

[0038] Figure 7 A schematic diagram of the structure of an embodiment of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0040] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.

[0041] The concept of the present invention is described below in conjunction with two specific calculation processes. It should be understood that the embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0042] Based on the above purpose, the first aspect of the embodiment of the present invention provides an embodiment of a communication method, which is applied to a client and a server, and the server provides a key service and a data service. Figure 1 As shown, the method includes executing the following steps at the server:

[0043] S10, the key service periodically generates client keys, which include a first key and a second key;

[0044] S20, the data service periodically obtains the client key from the key service;

[0045] S30. The data service receives a data packet sent by the client, selects a first key or a second key from the acquired client key based on information contained in the data packet, and decrypts the data packet based on the selected key.

[0046] Those skilled in the art will appreciate that the order of steps in the methods described above and below is not limited to the order listed, and may be adjusted as needed in practical applications, and certain steps may be combined or omitted without departing from the scope of protection of the present invention.

[0047] Specifically, in step S10, the functions of the key service may include authentication, key exchange, key update, and key management. Authentication, that is, determining whether the vehicle has the authority to log in. If it has the authority, check the scope of authority, for example, whether it can obtain perception data, whether it can obtain traffic light data, whether it can obtain traffic data, etc. Key exchange, that is, if the user (referring to the client) has the authority, the ECDHE algorithm (a key negotiation algorithm) and the client negotiation algorithm are used to encrypt and decrypt algorithm parameters, and then confirm the keys of both parties. Key update, that is, the keys obtained in the key exchange part have a certain timeliness, so it is necessary to renegotiate the keys for the next stage with the key service regularly. Key management, that is, after the key service and the client have negotiated the keys, they are recorded in the cache. The data service can synchronize all the keys related to the vehicle that interacts with the data service from the key service.

[0048] More specifically, the key service stores and manages keys, including the public key of each client, the public / private key of the server, and shared keys. The key service generates client keys regularly, and can use a key exchange algorithm, such as the ECDHE algorithm, to regularly generate client keys. The update cycle can be freely set based on the application scenario. By regularly generating client keys instead of generating keys every time they communicate, the communication delay between the server and the client is reduced. The generated client keys include two at a time, and the two client keys are based on different time periods, such as the 1 o'clock key and the 2 o'clock key, so as to ensure smooth switching of keys in different time periods.

[0049] In step S20, the data service also needs to periodically access the key service to update the client's key stored in itself, so as to decrypt the data packets sent by the client.

[0050] In step S30, after receiving the data packet sent by the client, the data service selects the first key or the second key from the acquired client key based on the information contained in the data packet, so as to decrypt the data packet based on the selected key.

[0051] Through the above solution, the communication delay between the server and the client is reduced, and the communication security is guaranteed while reducing the delay.

[0052] In some embodiments, Figure 2 As shown, the method also includes executing the following steps on the client:

[0053] S200, obtaining a client key from a key service;

[0054] S210, encrypting data based on the client secret key, and packaging the encrypted data into a data packet;

[0055] S220: Send the data packet to the data service.

[0056] Each client periodically obtains its own key from the key service to encrypt the data to be sent. By periodically obtaining the client key instead of obtaining the key once every time communication occurs, the communication delay between the server and the client is reduced.

[0057] In addition, two client keys are obtained at one time, one is the client key for the current time period, and the other is the client key for the next time period, so as to ensure smooth switching of keys in different time periods.

[0058] Through the above solution, the communication delay between the client and the server is reduced, and the communication security is guaranteed while reducing the delay.

[0059] In some embodiments, Figure 3As shown, the method also includes executing the following steps on the client:

[0060] S300, obtaining a client key from a key service;

[0061] S310, encrypting and signing the data containing the vehicle characteristics based on the client secret key, and packaging the encrypted and signed data into a data packet;

[0062] S320: Sign the data that does not contain vehicle features based on the signature algorithm, and pack the signed data into a data packet.

[0063] S330: Send the data packet to the data service.

[0064] In the above scheme, when the client encrypts data, it only encrypts important data and does not encrypt non-important data, which further reduces the communication delay. The signature algorithm can use the MD5 signature algorithm with a faster signature speed to ensure low delay.

[0065] Furthermore, in order to improve the security of the signature algorithm, salt timestamps and random numbers can be added after the signature is generated.

[0066] In some embodiments, before sending the data packet to the data service, the data packet may be timestamped and the timestamped data packet may be sent to the data service, and the timestamp does not need to be encrypted.

[0067] After receiving the data packet, the data service obtains the timestamp information and the corresponding client identifier of the data packet, and determines the required client key based on the client identifier and timestamp information.

[0068] Through the above solution, the communication delay between the client and the server is reduced, and the communication security is guaranteed while reducing the delay.

[0069] In some embodiments, the solution of the present invention can be applied to the field of vehicle-road communication. The vehicle acts as a client, and the roadside equipment is connected to the server as a server. The vehicle and the road test equipment use the solution of the present invention to transmit messages at their own transmission frequency, thereby reducing the delay of vehicle-road communication and ensuring communication security while reducing the delay.

[0070] In some embodiments, Figure 4 As shown, it is a schematic diagram of the vehicle-road communication method, and the specific process is as follows:

[0071] Before the vehicle communicates with the data service, log in to the key service and negotiate with the key service to obtain the key;

[0072] When the vehicle starts to access the data service, it also logs in to the data service first. When the vehicle logs in, the data service updates the vehicle's key on the key service based on the vehicle's ID.

[0073] The vehicle sends the signed and encrypted data packet to the data service;

[0074] After the data service verifies and decrypts the received data packet, it encrypts and signs the returned data and sends it to the vehicle end;

[0075] The vehicle side verifies the signature and decrypts the received return data packet.

[0076] During the communication between the vehicle and the data service, both the vehicle and the data service periodically update the key with the key service.

[0077] Based on the same inventive concept, according to another aspect of the present invention, Figure 5 As shown, an embodiment of the present invention further provides a communication system, including:

[0078] A key service 110, wherein the key service 110 is configured to periodically generate client keys, wherein the keys include a first key and a second key;

[0079] A data service 120, the data service 120 being configured to periodically obtain a client key from the key service;

[0080] The data service 120 is further configured to receive a data packet sent by a client, select a first key or a second key from the acquired client key based on information contained in the data packet, and decrypt the data packet based on the selected key.

[0081] Based on the same inventive concept, according to another aspect of the present invention, Figure 5 As shown, an embodiment of the present invention further provides an electronic device 30, which includes a processor 310 and a memory 320. The memory 320 stores a computer program 321 that can be run on the processor. When the processor 310 executes the program, the steps of the above method are performed.

[0082] Among them, the memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the communication method in the embodiment of the present application. The processor executes various functional applications and data processing of the system by running the non-volatile software programs, instructions and modules stored in the memory, that is, realizing the communication method of the above method embodiment.

[0083] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the system, etc. In addition, the memory 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 embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the local module 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.

[0084] Based on the same inventive concept, according to another aspect of the present invention, Figure 6 As shown, an embodiment of the present invention further provides a computer-readable storage medium 40, which stores a computer program 410 for executing the above method when executed by a processor.

[0085] Finally, it should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding above-mentioned arbitrary method embodiments.

[0086] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0087] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope of the embodiments disclosed in the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. The serial numbers of the embodiments disclosed in the above embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0088] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0089] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A communication method, characterized in that: Applied to a client and a server, the server provides a key service and a data service, and the method includes executing the following steps on the server: The key service periodically generates client keys, the keys comprising a first key and a second key; The data service periodically obtains the client key from the key service; The data service receives a data packet sent by a client, selects a first key or a second key from the acquired client key based on information contained in the data packet, and decrypts the data packet based on the selected key.

2. The method according to claim 1, characterized in that It also includes executing the following steps on the client: Obtain a client key from the key service; Encrypting data based on the client key and packaging the encrypted data into a data packet; The data packet is sent to the data service.

3. The method according to claim 1, characterized in that The first key and the second key are keys in adjacent time periods.

4. The method according to claim 2, characterized in that: Encrypting data based on the client secret key and packaging the encrypted data into a data packet includes: The data containing the vehicle characteristics is encrypted and signed based on the client secret key, and the encrypted and signed data is packaged into a data packet.

5. The method according to claim 2, characterized in that: Also includes: The data not containing vehicle features is signed based on the signature algorithm, and the signed data is packaged into a data packet.

6. The method according to claim 2, characterized in that Sending the data packet to the data service comprises: The data packet is timestamped and the timestamped data packet is sent to a data service.

7. The method according to claim 6, characterized in that Selecting the first key or the second key from the acquired client key based on the information included in the data packet includes: A first key or a second key is selected from the acquired client keys based on the timestamp information included in the data packet.

8. A communication system, characterized in that: include: A key service, wherein the key service is configured to periodically generate client keys, the keys comprising a first key and a second key; a data service, the data service being configured to periodically obtain a client key from the key service; The data service is further configured to receive a data packet sent by a client, select a first key or a second key from the acquired client key based on information contained in the data packet, and decrypt the data packet based on the selected key.

9. An electronic device, comprising: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.