Methods, devices, new energy vehicles, and readable storage media for obtaining vehicle-to-cloud communication security certificates

By listening for startup broadcast messages when the vehicle is powered on to initiate the certificate service, checking and applying for certificates through temporary communication channels, the communication instability caused by certificate abnormalities in vehicle-to-cloud communication is resolved, ensuring that the vehicle can communicate normally every time it starts up.

CN119995915BActive Publication Date: 2025-10-31CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411401901.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-10-31
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

In existing technologies, vehicle-to-cloud communication security certificates are prone to anomalies during vehicle use, leading to unstable communication, lack of automatic recovery mechanisms, and affecting the normal function of vehicle-to-cloud communication.

Method used

When the vehicle is powered on, the system listens for the power-on broadcast message through a pre-registered broadcast receiver, starts the certificate service, checks the certificate status, and if there is an abnormality, uses a temporary certificate file and a temporary private key to build a temporary communication channel to apply for a certificate from the cloud and saves it to the target path to ensure the stability of the communication channel.

Benefits of technology

This system ensures that a usable vehicle-to-cloud communication security certificate exists in the vehicle each time it is powered on, preventing communication from being affected by certificate anomalies and guaranteeing the security and stability of vehicle-to-cloud communication. It also ensures the continuity of communication by temporarily obtaining certificates through temporary channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119995915B_ABST
    Figure CN119995915B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, new energy vehicle, computer-readable storage medium, and computer program product for obtaining a vehicle-to-cloud communication security certificate. The method includes: monitoring a vehicle's power-on broadcast message using a pre-registered broadcast receiver; upon detecting the power-on broadcast message, initiating a pre-configured certificate service based on a rewritten callback method in the broadcast receiver; if the certificate service is initiated, determining the current status of the certificate used for vehicle-to-cloud communication security in the vehicle; if an anomaly is detected in the current certificate status, checking the vehicle's network connection; if the vehicle's network connection is valid, constructing a temporary communication channel for vehicle-to-cloud communication based on a temporary certificate file and a temporary private key; sending a certificate request to the cloud and receiving certificate information returned by the cloud based on the temporary communication channel; and saving the certificate information to a target path for use in vehicle-to-cloud communication. This method helps ensure the security and stability of vehicle-to-cloud communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of vehicle networking and information security technology, and in particular to a method, device, new energy vehicle, and computer-readable storage medium for obtaining a vehicle-to-cloud communication security certificate. Background Technology

[0002] Vehicle-to-cloud (V2X) communication refers to the information exchange between vehicles and the cloud. This interaction involves sensitive user information such as phone numbers and account passwords. To address this, appropriate information transmission security technologies are typically employed, such as PKI (Public Key Infrastructure). However, in actual vehicle use, these security technologies are prone to failure, leading to the malfunction of some network functions. Therefore, improving the security and stability of V2X communication is a crucial technical challenge that needs to be addressed. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, device, new energy vehicle, and computer-readable storage medium for obtaining vehicle-to-cloud communication security certificates to address the aforementioned technical issues, so as to improve the security and stability of vehicle-to-cloud communication.

[0004] To resolve abnormal vehicle-side communication security certificates and achieve secure vehicle-to-cloud interaction.

[0005] Firstly, this application provides a method for obtaining a vehicle-to-cloud communication security certificate, including:

[0006] Listen for vehicle startup broadcast messages using a pre-registered broadcast receiver;

[0007] When the broadcast receiver detects the power-on broadcast message, the pre-configured certificate service is started based on the overridden receive callback method in the broadcast receiver.

[0008] When the certificate service is started, determine the current status of the certificate used for vehicle-to-cloud communication security in the vehicle;

[0009] If an anomaly is detected in the current status of the certificate, check the vehicle's network connectivity.

[0010] When the vehicle's network connection is valid, a temporary communication channel for vehicle-to-cloud communication is established based on the temporary certificate file and temporary private key; based on the temporary communication channel, a certificate request is sent to the cloud, and the certificate information returned by the cloud is received; the temporary certificate file and temporary private key are only applicable to the application for a vehicle-to-cloud communication security certificate.

[0011] Save the certificate information to the target path for use in vehicle-to-cloud communication.

[0012] In one embodiment, determining the current status of the certificate used for vehicle-to-cloud communication security in the vehicle includes:

[0013] Check if a certificate file for vehicle-to-cloud communication security exists in the target path;

[0014] If a certificate file exists in the target path, the validity period of the certificate corresponding to the certificate file is determined by reading the certificate file, and whether the certificate has expired is determined by the certificate validity period and the current time.

[0015] If the certificate file is not found in the target path and / or the certificate has expired, it is determined that the current status of the certificate is abnormal.

[0016] In one embodiment, checking the vehicle's network connectivity includes:

[0017] Based on the preset timer's timing cycle, the vehicle's current active network and current network capability information are acquired at intervals.

[0018] Based on the current active network and current network capability information, check whether the vehicle's network has internet connectivity and whether it has been verified; if the vehicle's network has internet connectivity and has been verified, determine that the vehicle's network connection is valid.

[0019] In one embodiment, a certificate request is sent to the cloud via a temporary communication channel, including:

[0020] Construct a certificate request for applying for a vehicle-to-cloud communication security certificate; the variable names in the certificate request correspond to the key-value pairs used to store the vehicle-to-cloud communication security certificate in the cloud;

[0021] Based on observable data containers, certificate requests are sent to the cloud via temporary communication channels to automatically trigger network request result monitoring after the certificate request is sent.

[0022] In one embodiment, after sending a certificate request to the cloud via a temporary communication channel based on an observable data container, the method further includes: monitoring whether certificate information returned by the cloud is received based on observation of the data container; verifying the validity of the certificate information if the certificate information is received; and saving the certificate information to a target path, including: saving the certificate information to the target path if the certificate information is valid.

[0023] In one embodiment, the temporary certificate file and temporary private key are shared by vehicles in the same production batch; the method further includes: synchronously updating the temporary certificate file and temporary private key in the event of a system update for the vehicle.

[0024] In one embodiment, the method further includes: registering a broadcast receiver in the vehicle's application configuration file; setting the broadcast receiver to listen for the vehicle's power-on broadcast message; and rewriting the receive callback method corresponding to the broadcast receiver to start the certificate service.

[0025] Secondly, this application also provides a vehicle-to-cloud communication security certificate acquisition device, comprising:

[0026] The listening module is used to listen for vehicle power-on broadcast messages based on a pre-registered broadcast receiver; when the broadcast receiver detects the power-on broadcast message, it starts the pre-configured certificate service based on the overridden receive callback method in the broadcast receiver;

[0027] The determination module is used to determine the current status of the certificates used for vehicle-to-cloud communication security in the vehicle when the certificate service is started;

[0028] The acquisition module is used to check the vehicle's network connection status when an anomaly is detected in the current status of the certificate; if the vehicle's network connection is valid, it constructs a temporary communication channel for vehicle-to-cloud communication based on the temporary certificate file and temporary private key; based on the temporary communication channel, it sends a certificate request to the cloud and receives the certificate information returned by the cloud; the temporary certificate file and temporary private key are only applicable to the application for a vehicle-to-cloud communication security certificate; and it saves the certificate information to the target path for use in vehicle-to-cloud communication.

[0029] Thirdly, this application also provides a new energy vehicle, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the vehicle-cloud communication security certificate acquisition method in the first aspect.

[0030] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for obtaining the vehicle-cloud communication security certificate in the first aspect.

[0031] The aforementioned method, device, new energy vehicle, computer-readable storage medium, and computer program product for obtaining vehicle-to-cloud communication security certificates, by listening to the vehicle's startup broadcast messages according to a pre-registered broadcast receiver, enables the system to invoke the certificate service upon vehicle startup, determine the current status of the certificate used for vehicle-to-cloud communication security in the vehicle, and if the current status is abnormal but the network connection is valid, construct a temporary communication channel for vehicle-to-cloud communication using a temporary certificate file and a temporary private key. A certificate request is then sent to the cloud through this temporary communication channel to obtain certificate information, which is then saved to a target path for use in vehicle-to-cloud communication. This ensures that the status of the vehicle-to-cloud communication security certificate is determined and a usable certificate is provided each time the vehicle starts up, avoiding the impact of unavailable vehicle-to-cloud communication certificates. In other words, it guarantees that a usable vehicle-to-cloud communication security certificate is available in the vehicle when needed, thus ensuring the security and stability of vehicle-to-cloud communication. Simultaneously, the temporary communication channel constructed using the temporary certificate file and temporary private key facilitates the application for a usable vehicle-to-cloud communication security certificate from the cloud, ensuring that the vehicle can apply for a certificate from the cloud through the temporary communication channel before obtaining a formal certificate. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is an application environment diagram of a method for obtaining a vehicle-to-cloud communication security certificate in one embodiment;

[0034] Figure 2 This is a flowchart illustrating a method for obtaining a vehicle-to-cloud communication security certificate in one embodiment;

[0035] Figure 3 This is a schematic diagram of a PKI two-way authentication process in one embodiment;

[0036] Figure 4 This is another flowchart illustrating the method for obtaining a vehicle-to-cloud communication security certificate in another embodiment;

[0037] Figure 5 This is a structural block diagram of a vehicle-to-cloud communication security certificate acquisition device in one embodiment;

[0038] Figure 6 This is an internal structure diagram of a new energy vehicle in one embodiment. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0040] The method for obtaining a vehicle-to-cloud communication security certificate provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, vehicle 101 interacts with cloud 102 via data exchange, i.e., vehicle-to-cloud communication. Any data interaction between vehicle 101 and cloud 102 is sufficient. Vehicle 101 can be, but is not limited to, sedans, SUVs (sport utility vehicles or suburban utility vehicles), MPVs (multi-Purpose Vehicles), sports cars, trucks, off-road vehicles, dump trucks, tractor-trailers, agricultural vehicles, and special vehicles (such as sanitation vehicles, snowplows, bulldozers, etc.). For example, the vehicle can be a new energy electric vehicle. Cloud 102 can be broadly interpreted as providing on-demand access to shared computing resources and data. Users can access cloud resources and services anytime, anywhere, and through any device. For example, cloud 102 can include servers, which can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services. Cloud 102 can also include data storage systems that store data to be processed.

[0041] Currently, vehicle-to-cloud communication security certificates are typically applied for and imported into vehicles during the production line phase. This approach ensures that the certificate application is completed before the vehicle leaves the production line, thus guaranteeing communication security to some extent during the digital certificate application process. However, this certificate application is a one-time operation, and there is no automatic recovery method if the certificate subsequently encounters an anomaly. Possible anomalies include certificate expiration and abnormal deletion of the certificate file. If the certificate is abnormal, it will affect vehicle-to-cloud communication. Therefore, the technical solution of this invention provides a method for obtaining vehicle-to-cloud communication security certificates based on the production line PKI certificate application. Each time a vehicle starts, a background certificate service is activated to check the certificate validity. If the certificate is abnormal, the certificate application process is automatically triggered based on the vehicle's network status. After the certificate application is successful and imported into the vehicle, the service program is automatically stopped, minimizing memory consumption.

[0042] In one exemplary embodiment, such as Figure 2 As shown, a method for obtaining a vehicle-to-cloud communication security certificate is provided, which can be applied to... Figure 1Taking vehicle 101 as an example, this method can be more specifically applied to in-vehicle operating systems, in-vehicle infotainment systems, etc. An in-vehicle infotainment system is a product or system installed inside a car, which enables information communication between people and the vehicle, and between the vehicle and the outside world. The method specifically includes the following steps S201 to S205:

[0043] Step S201: Listen for vehicle power-on broadcast messages based on a pre-registered broadcast receiver; if the broadcast receiver detects a power-on broadcast message, start the pre-configured certificate service based on the callback method overridden in the broadcast receiver.

[0044] The broadcast receiver can be a message-based component whose main function is to listen for and respond to broadcast messages sent by other components within the system or application. These messages can be system events (such as changes in battery level or network status) or custom events (such as the completion of data download within the application). Specifically, in this embodiment, the message can be the vehicle's power-on broadcast message. The vehicle's power-on broadcast message indicates that the vehicle has transitioned from a non-operating state to an operating state. For example, the transition from a non-operating state to an operating state can be, but is not limited to, the vehicle engine starting, the vehicle drive motor being powered on, the vehicle's air conditioning being activated, the vehicle's anti-theft system being unlocked, the continuous damping control system (CDC), the vehicle operating system starting, the vehicle-to-cloud communication module starting, etc., and can also be the vehicle's infotainment system starting.

[0045] A callback method is a function or method included in the broadcast receiver. Its principle is that when a specific event occurs, one function or method is called by another. Correspondingly, the receive callback method is the callback method that occurs when the broadcast receiver receives the power-on broadcast message.

[0046] Among them, certificate services, which are services related to vehicle-cloud communication security certificates, can be understood in a broad sense. Certificate services can include subsequent steps and methods such as determining whether the certificate is valid, polling the network connection status, building a temporary communication channel for vehicle-cloud communication, sending a certificate request to the cloud, and receiving the certificate information returned by the cloud.

[0047] Among them, the vehicle-to-cloud communication security certificate is a security certificate used in the process of vehicle-to-cloud communication to ensure the security of data transmission. The security certificate is used to establish encrypted connections and protect sensitive data from unauthorized access.

[0048] For example, when the vehicle is powered on, the vehicle's infotainment system can listen for the vehicle's power-on broadcast message through a pre-registered broadcast receiver. Due to the overridden receive callback method in the broadcast receiver, when the broadcast receiver hears the power-on broadcast message, it calls the pre-set certificate service, so that the preset certificate service can be automatically started every time the vehicle is powered on.

[0049] Step S202: If the certificate service is started, determine the current status of the certificate used for vehicle-to-cloud communication security in the vehicle.

[0050] The current status of the certificate can be understood as whether a valid vehicle-to-cloud communication security certificate exists in the vehicle. For example, the current status can be abnormal or normal. An abnormal current status can be used to indicate that the certificate may be unavailable, that is, the vehicle may not be able to establish a secure and stable vehicle-to-cloud communication channel through the certificate. Conversely, a normal current status indicates that the certificate is available and a secure and stable vehicle-to-cloud communication channel can be established.

[0051] For example, when the certificate service is started, the current status of the certificate used for vehicle-to-cloud communication security in the vehicle can be determined, so as to facilitate the next step based on whether the current status is abnormal or not.

[0052] Step S203: If it is determined that there is an anomaly in the current status of the certificate, check the vehicle's network connectivity.

[0053] Polling, in this context, refers to periodically sending requests to obtain the latest data or status updates. Specifically, in this embodiment, it can be obtaining the latest network connection status of the vehicle. The vehicle's network connection status indicates whether the vehicle can access the internet, and can include whether the network connection is valid or invalid.

[0054] For example, if it is determined that there is an anomaly in the current status of the certificate, the network connection status of the vehicle can be polled, so as to facilitate taking the next step based on the network connection status of the vehicle.

[0055] Step S204: When the vehicle's network connection is valid, construct a temporary communication channel for vehicle-to-cloud communication based on the temporary certificate file and temporary private key; send a certificate request to the cloud based on the temporary communication channel, and receive the certificate information returned by the cloud; the temporary certificate file and temporary private key are applicable to the application for a vehicle-to-cloud communication security certificate.

[0056] A temporary certificate file is a file containing public key information and the public key owner's information, used to verify the identity of a user or service within a specific time period. A temporary private key, corresponding to the temporary certificate file, is a private key used for encrypting and decrypting data and is used in conjunction with the temporary certificate file. The temporary certificate file and temporary private key are used to obtain temporary authorization to access protected resources, such as cloud storage services; specifically, in this embodiment, this could be resources related to the vehicle-to-cloud communication security certificate. The temporary certificate file and temporary private key have a limited validity period, for example, between 30 minutes and 36 hours. This reduces the risk of information leakage because even if the temporary key is leaked, an attacker can only use it for a limited time. The certificate information returned by the cloud is the relevant information returned by the cloud to the vehicle in response to the certificate request received from the vehicle.

[0057] For example, if an anomaly is detected in the certificate but the vehicle's network connection is valid, a temporary communication channel for vehicle-to-cloud communication can be constructed based on a pre-saved temporary certificate file and a temporary private key. Through this temporary communication channel, a certificate request can be sent to the cloud (i.e., applying for a valid vehicle-to-cloud communication security certificate), and the certificate information returned by the cloud can be received. The temporary certificate file and temporary private key are only applicable to the scenario of applying for a vehicle-to-cloud communication security certificate.

[0058] Step S205: Save the certificate information to the target path for use in vehicle-to-cloud communication.

[0059] The target path is the storage path used to store the vehicle-to-cloud communication security certificate file. Through the target path, operations such as accessing, modifying, deleting, replacing, and saving the vehicle-to-cloud communication security certificate information can be performed.

[0060] For example, after the aforementioned steps and receiving the certificate information, the certificate information can be automatically saved to the target path. When vehicle-to-cloud communication is required, the certificate information can be called according to the target path to achieve secure and stable communication between the vehicle and the cloud.

[0061] In this embodiment, by listening to the vehicle's startup broadcast message according to a pre-registered broadcast receiver, the system invokes the certificate service upon vehicle startup to determine the current status of the certificate used for vehicle-to-cloud communication security. If the current status is abnormal, but the network connection is valid, a temporary communication channel for vehicle-to-cloud communication is constructed using a temporary certificate file and a temporary private key. A certificate request is then sent to the cloud through this temporary communication channel to obtain certificate information, which is saved to a target path for use in vehicle-to-cloud communication. This ensures that the vehicle's vehicle-to-cloud communication security certificate status is determined and a usable certificate is provided each time the vehicle starts up, avoiding the impact of unavailable certificates on vehicle-to-cloud communication. This guarantees that a usable certificate is available in the vehicle when vehicle-to-cloud communication is needed, thus ensuring the security and stability of vehicle-to-cloud communication. Simultaneously, the temporary communication channel, constructed using a temporary certificate file and a temporary private key, facilitates the application for a usable vehicle-to-cloud communication security certificate from the cloud, ensuring that the vehicle can apply for a certificate from the cloud through the temporary communication channel before obtaining a formal certificate.

[0062] In one embodiment, "determining the current status of the certificate used for vehicle-to-cloud communication security in the aforementioned embodiment" may include: checking whether a certificate file for vehicle-to-cloud communication security exists in the target path; if a certificate file exists in the target path, determining the certificate validity period corresponding to the certificate file based on reading the certificate file, and determining whether the certificate has expired based on the certificate validity period and the current time; if no certificate file is found in the target path and / or the certificate has expired, determining that the current status of the certificate is abnormal.

[0063] Among them, the certificate file is the specific data file corresponding to the certificate used for vehicle-to-cloud communication security; the certificate validity period indicates the period during which the certificate used for vehicle-to-cloud communication security is available, which may include the number of days the certificate is available, such as 30 days, 100 days, 150 days, etc., and may also include the last available time of the certificate.

[0064] For example, to determine the current status of a certificate used for vehicle-to-cloud communication security in a vehicle, one can first check if a certificate file for vehicle-to-cloud communication security exists in the target path. If it exists, the certificate file can be read to determine the certificate's validity period. Then, based on the certificate's validity period and the current time, it can be determined whether the certificate has expired. For example, if the current time is after the certificate's validity period, it indicates that the certificate has expired; if the current time is within the certificate's validity period, it indicates that the certificate has not expired. Further, if at least one of the following conditions is met, the current status of the certificate can be determined as abnormal: Condition 1, no certificate is found in the target path; Condition 2, the certificate has expired.

[0065] In this embodiment, the current status of the certificate used for vehicle-to-cloud communication security in the vehicle is determined by comprehensively checking whether a certificate file for vehicle-to-cloud communication security exists in the target path and whether the certificate has expired. This helps to obtain a more accurate current status of the certificate, thereby helping to ensure the provision of a usable vehicle-to-cloud communication security certificate and avoid the impact of abnormal vehicle-to-cloud communication security certificates on the security and stability of vehicle-to-cloud communication.

[0066] In one embodiment, "checking the vehicle's network connectivity" in the aforementioned embodiment may include: acquiring the vehicle's current active network and current network capability information at intervals based on a preset timer's timing period; checking whether the vehicle's network has internet connectivity capability and whether it has been verified based on the current active network and current network capability information; and determining that the vehicle's network connection is valid if it is found that the vehicle's network has internet connectivity capability and has been verified.

[0067] The preset timer refers to a pre-set component, unit, or module used for timing. It can be a countdown or countdown timer, and can have a timing period, which can be a large period or a small period. For example, every 10 seconds is a small period, and every 10 small periods is a large period, i.e., 100 seconds. The currently active network refers to the network the vehicle is currently connected to; for example, the vehicle is currently connected to a Wi-Fi network named ABC. Current network capability information refers to the capability information of the network the vehicle is currently connected to, such as whether it can access the internet, the maximum allowed download speed, and the upload speed. Having internet connectivity capability (NET_CAPABILITY_INTERNET) means that it theoretically can provide access to the public internet; having passed verification (NET_CAPABILITY_VALIDATED) indicates that the network not only claims to support internet connectivity but has also been tested and confirmed by the system to actually access the internet.

[0068] For example, polling the vehicle's network connectivity status can be implemented using the following method: The vehicle's current active network and network capability information is acquired at preset timer intervals. For instance, the vehicle's current active network and network capability information is acquired every 2 seconds, for a total of five acquisitions per cycle. Furthermore, if the vehicle's current active network and network capability information is obtained within a cycle, indicating a valid network connection, the acquisition stops, i.e., polling ceases; otherwise, the next cycle can begin. After acquiring the vehicle's current active network and network capability information, it can be used to check whether the vehicle's network has internet connectivity and whether it has been verified. If the vehicle's network has internet connectivity and has been verified, then the vehicle's network connection is considered valid.

[0069] In this embodiment, the vehicle's current active network and network capability information are obtained through a timing period. Based on this information, the vehicle's network connectivity and verification are checked to determine its validity. This helps to obtain the vehicle's network connection status more accurately and efficiently, facilitating subsequent steps such as sending certificate requests to the cloud and receiving certificate information returned from the cloud. This ensures that a usable vehicle-to-cloud communication certificate is provided immediately upon vehicle startup, guaranteeing the security and stability of vehicle-to-cloud communication.

[0070] In one embodiment, the "sending a certificate request to the cloud based on a temporary communication channel" in the aforementioned embodiments may include: constructing a certificate request for applying for a vehicle-to-cloud communication security certificate; the variable names in the certificate request correspond to the key-value pairs used to store the vehicle-to-cloud communication security certificate in the cloud; and sending the certificate request to the cloud through a temporary communication channel based on an observable data container, so as to automatically trigger network request result listening after the certificate request is sent.

[0071] The certificate request, used to apply for a vehicle-to-cloud communication security certificate, can include two parts: a request object and its corresponding parameters. The request object can include, but is not limited to, geographical attributes such as country, region, province, and city; subject attributes such as the applicant's organization and contact email; a public key; and other optional attributes. Correspondingly, the parameters can be specific information, such as the code or name of a specific country, region, province, or city, or the applicant's organization name, such as "Unit A." Variable names are the names used to represent variables. Key-value pairs are the key values. An observable data container is a special class that wraps data so that changes to this data can automatically notify all observers. This container typically has lifecycle awareness, meaning it can determine when to update observers based on the lifecycle state of other application components. Network request result monitoring involves listening to the results returned by the cloud after sending a certificate request.

[0072] For example, a certificate request for a vehicle-to-cloud communication security certificate can be constructed. Specifically, a request object can be set and corresponding parameters configured. The variable names in the constructed certificate request correspond to the key-value pairs stored in the cloud for the vehicle-to-cloud communication security certificate. This correspondence arises because the certificate request is a JSON data request class, and the information related to the vehicle-to-cloud communication security certificate stored in the cloud is JSON data. JSON, or JavaScript Object Notation, is a lightweight data-interchange format. JSON data is a collection of key-value pairs. Then, an observable data container can be used to send the certificate request to the cloud via a temporary communication channel, automatically triggering a network request result listener after the certificate request is sent.

[0073] It should be noted that when sending a certificate request to the cloud through a temporary communication channel, the cloud can be a cloud specifically responsible for the vehicle-to-cloud communication security certificate, or it can be a cloud with other functions. This cloud can be the same as or a different cloud from the vehicle-to-cloud communication cloud.

[0074] In this embodiment, a certificate request for vehicle-to-cloud communication security certificate application is constructed. Based on an observable data container, the certificate request is sent to the cloud through a temporary communication channel, automatically triggering network request result monitoring after the certificate request is sent. This provides a specific implementation method for sending a certificate request to the cloud based on a temporary communication channel. Simultaneously, since the variable names in the certificate request correspond to the key-value pairs used to store the vehicle-to-cloud communication security certificate in the cloud, the required data, i.e., certificate information, can be accurately obtained, avoiding issues caused by inconsistent formats or names. By utilizing an observable data container to monitor network request results, this supports subsequent steps such as receiving certificate information returned from the cloud, ultimately ensuring the provision of a usable vehicle-to-cloud communication security certificate as soon as the vehicle boots up, guaranteeing the security and stability of vehicle-to-cloud communication.

[0075] In one embodiment, based on an observable data container, a certificate request is sent to the cloud via a temporary communication channel. After the network request result is automatically triggered after the certificate request is sent, the method for obtaining the vehicle-cloud communication security certificate in the aforementioned embodiment further includes: based on the observation of the data container, listening to whether the certificate information returned by the cloud is received; if the certificate information is received, verifying the validity of the certificate information; the "saving certificate information to the target path" in the aforementioned embodiment may include: if the certificate information is valid, saving the certificate information to the target path.

[0076] The certificate information refers to the information related to the vehicle-to-cloud communication security certificate returned by the cloud in response to the certificate request. The certificate information returned by the cloud can include a real and valid vehicle-to-cloud communication security certificate, a null value, an invalid vehicle-to-cloud communication security certificate, or other information.

[0077] For example, the observable data container described in the preceding steps can be used to monitor whether certificate information returned from the cloud has been received. If the monitoring confirms that certificate information has been received, its validity needs to be verified since, as mentioned earlier, the certificate information may be invalid. If the verification passes, meaning the certificate information is valid, it can be saved to the target path.

[0078] In this embodiment, by monitoring whether certificate information is received from the cloud, the certificate information is verified upon receipt to ensure its authenticity and validity, and then the valid certificate information is saved to the target path. This ensures that the vehicle-to-cloud communication security certificate used by the vehicle is usable, avoiding situations where the certificate information returned from the cloud contains null values ​​or invalid certificates, which could affect vehicle-to-cloud communication based on that certificate information. This helps ensure that the provided vehicle-to-cloud communication security certificate is usable and does not affect the security and stability of vehicle-to-cloud communication.

[0079] In one embodiment, the temporary certificate file and the temporary private key are shared by vehicles in the same production batch; the method for obtaining the vehicle-to-cloud communication security certificate in the aforementioned embodiment further includes: synchronously updating the temporary certificate file and the temporary private key in the event of a system update of the vehicle.

[0080] System updates can be updates to the entire system, or updates to parts of the system or subsystems; updating temporary certificate files and temporary private keys can be done simultaneously or in a specific order, such as chronological order.

[0081] For example, the temporary certificate file and temporary private key can be generic for the production batch corresponding to the vehicle. These files can also serve as a dedicated temporary secure channel for vehicle-to-cloud communication, enabling the vehicle to apply for and obtain a vehicle-to-cloud communication security certificate from the cloud. Once the vehicle obtains the certificate, the temporary certificate file and temporary private key are no longer needed. Therefore, vehicles in the same production batch can share the same temporary certificate file and temporary private key. Furthermore, the temporary certificate file and temporary private key can be updated along with vehicle system updates.

[0082] In this embodiment, since the temporary certificate file and temporary private key can be universal for the corresponding production batch of the vehicle, the number of temporary certificate files and temporary private keys required can be reduced, thus lowering related management costs. Furthermore, the temporary certificate file and temporary private key can be updated along with the vehicle system, ensuring that the temporary certificate file and temporary private key in the vehicle are up-to-date and eliminating the need for dedicated updates.

[0083] In one embodiment, the method for obtaining the vehicle-to-cloud communication security certificate in the aforementioned embodiment further includes: registering a broadcast receiver in the application configuration file in the vehicle; setting the broadcast receiver to listen for the vehicle's boot broadcast message; and rewriting the receiving callback method corresponding to the broadcast receiver to start the certificate service.

[0084] The application configuration file, which can be an AndroidManifest.xml file, is used for each application project. As the root configuration file of the project's source code set, it describes the necessary information about the application project. The application here can be the application corresponding to the broadcast receiver. The broadcast receiver, certificate service, and the method for obtaining the entire vehicle-to-cloud communication security certificate can all correspond to the same application. The receive callback method is the method that is called when the broadcast receiver receives the boot broadcast, such as the onReceive method.

[0085] For example, to receive the vehicle system's power-on broadcast via a broadcast receiver, a broadcast receiver can be registered in the application configuration file beforehand, and the broadcast receiver is configured to listen for the vehicle's power-on broadcast message. Since the receive callback method is overridden to start the certificate service, the certificate service will be started if the broadcast receiver receives the power-on broadcast.

[0086] In this embodiment, by registering a broadcast receiver in the application configuration file and setting the event that the broadcast receiver is interested in—the vehicle's power-on broadcast message—and rewriting the corresponding receive callback method of the broadcast receiver to start the certificate service, the certificate service can be automatically started once the vehicle is powered on. This facilitates subsequent steps such as determining whether the certificate is valid, thereby helping to ensure that a usable vehicle-to-cloud communication security certificate exists in the vehicle at the first time and avoid affecting vehicle-to-cloud secure communication.

[0087] In one exemplary embodiment, a method for obtaining a vehicle-to-cloud communication security certificate is provided. This method is for PKI certificates. For ease of understanding, PKI will be explained below:

[0088] PKI, or Public Key Infrastructure, is a fundamental framework for authentication and encryption in modern digital environments, used to protect network communication security. PKI uses asymmetric encryption, meaning it uses a key pair for encryption and decryption. This key pair contains a public key and a private key. The public key is public and can be freely distributed, while the private key is kept secret. Anyone can use the public key to encrypt information, but only the holder of the private key can decrypt it. However, encryption only solves half the problem of secure communication. The other half is determining the true owner of the information. This is where another core component of PKI—digital certificates—comes in. A digital certificate is similar to an ID card; it is essentially an electronic document that typically contains information about the authenticator, the authenticated person, the validity period, and verification methods for all of the above, ensuring the certificate holder's identity is authentic and trustworthy. The process of communicating using digital certificates is called authentication, which is usually divided into one-way authentication and two-way authentication. One-way authentication involves one party confirming their identity, while two-way authentication involves both parties mutually confirming their identities. Figure 3 As shown, a possible two-way authentication process is provided, which includes nine steps: the client sends an HTTPS connection request, the server returns a certificate containing the server's public key, the client obtains the server's public key from the server's certificate, and the client sends a certificate containing the client's public key to the server.

[0089] Currently, for vehicles requiring cloud communication, PKI-related technologies are typically used to ensure the security of vehicle-to-cloud communication. Under current technology, digital certificates are usually applied for during the vehicle production line stage and imported into the vehicle's memory. This approach completes the certificate application process before the vehicle leaves the production line, thus guaranteeing communication security to some extent during the digital certificate application process. However, this certificate application is a one-time operation; if the certificate subsequently becomes abnormal, there is no automatic recovery method. Possible abnormalities include: certificate expiration, abnormal deletion of certificate files, etc. If the certificate is abnormal, some network functions will not function properly, such as failed or unresponsive owner account login, thus affecting the stability of vehicle-to-cloud communication.

[0090] This embodiment proposes the above method based on the application for PKI certificates for production lines. The method is described in detail below:

[0091] like Figure 4 As shown, the overall idea and steps of this method are as follows: When the vehicle system starts up each time, a PKI service program (i.e., PKIService) running in the background is woken up to check the validity of the certificate; if the certificate is abnormal, the network connection status is checked by polling; when the network is connected, the certificate application process is automatically triggered; after the certificate application is successful and imported, the service program is automatically stopped, without consuming too much memory.

[0092] The following is a detailed explanation of the steps shown in the diagram, using the Android system as an example:

[0093] First, regarding the steps for implementing PKIService automatic startup, this corresponds to "listening for vehicle startup broadcast messages based on a pre-registered broadcast receiver; and starting the pre-configured certificate service based on the overridden receive callback method in the broadcast receiver when the broadcast receiver detects the startup broadcast message." Details are as follows:

[0094] The CDC (Distributed Control Center) powers on, and then the vehicle's system sends a boot broadcast to start the PKIService. The general idea is to define a boot receiver (BootReceiver), which needs to be registered in AndroidManifest.xml, to listen for the boot broadcast. Within the onReceive method of this listener's callback, the PKIService is started, thus achieving automatic startup upon system boot.

[0095] CDC, or Continuous Damping Control, is a system that automatically adjusts the damping of shock absorbers based on road conditions and vehicle driving status to provide better ride comfort and handling stability. CDC startup refers to the process by which the electronic control unit begins monitoring the vehicle's status and controlling the shock absorber damping. This process occurs automatically when the vehicle is started, without manual intervention from the user. AndroidManifest.xml is a crucial file in Android applications, providing basic information about the application and defining its components, permissions, and other important settings. The onReceive method is a core callback method for broadcast receivers in Android. This method is automatically called when a registered broadcast receiver matches a corresponding broadcast intent.

[0096] Below is one possible implementation, including the specific code and corresponding code comments. The code comments are followed by double forward slashes " / / ", and the same applies below:

[0097] The main code implementation of the BootReceiver class is as follows:

[0098] / / Set the BootReceiver within the PKIService program to listen for the boot broadcast.

[0099] class BootReceiver:BroadcastReceiver(){

[0100] / / Handle received broadcast messages by overriding the onReceive method.

[0101] / / When the system sends a broadcast for the completion of booting (BOOT_COMPLETED), onReceive will be automatically called.

[0102] override fun onReceive(context: Context?, intent: Intent?) {

[0103] / / Create an Intent object startIntent to start the PKIService service.

[0104] val startIntent = Intent(context, PKIService::class.java)

[0105] / / Used to actually start the service, enabling PKIService to start automatically after the device boots.

[0106] context?.startService(startIntent)

[0107] }

[0108] }

[0109] To enable the BootReceiver to receive the boot broadcast, the broadcast receiver also needs to be registered in the AndroidManifest.xml file. The relevant code is as follows:

[0110] <!-- Declare a broadcast receiver, specify the class name of the receiver, and set to listen for system broadcasts -->

[0111] <receiver android:name=".receiver.BootReceiver"

[0112] android:exported="true">

[0113] <!— Set to listen for the android.intent.action.BOOT_COMPLETED broadcast, i.e., the broadcast for the completion of booting -->

[0114] <intent-filter>

[0115] <action android:name="android.intent.action.BOOT_COMPLETED" / >

[0116] / / BOOT_COMPLETED,

[0117]

[0118]

[0119] It is understandable that the same logic based on the above specific implementation method can also be implemented in other languages ​​or codes. This application does not limit the implementation code or language.

[0120] Second, regarding the steps for implementing certificate validity checks, this corresponds to "determining the current status of the certificate used for vehicle-to-cloud communication security in the vehicle when the certificate service is running," as detailed below:

[0121] The general approach is to set certificate validity criteria and perform these checks when the PKIService starts. If all criteria are met, the certificate is considered valid; otherwise, it is considered invalid. The specific criteria are whether the certificate exists and whether it has expired. Below is a possible implementation, including the code and corresponding comments:

[0122] / / First, define a general judgment function for easy direct calling. The validity of the certificate is determined by the function's return value of true or false.

[0123] fun certValidCheck():Boolean{

[0124] / / A certificate is considered valid if both of the following testing conditions are met.

[0125] / / The results of all conditions are ANDed, so that the judgment conditions can be modified according to specific business needs.

[0126] return checkExitst() && checkExpried()

[0127] }

[0128] / / Check if the certificate file exists.

[0129] fun checkExists():Boolean{

[0130] ` / / certPath` is the full path to the certificate file, customized according to project requirements, and remains globally unchanged. A full path is the complete path from the root directory of the file system to the location of the file. It includes all directory levels starting from the root directory and the final filename. The full path ensures the uniqueness of a file within the file system, allowing direct access to the file via this path.

[0131] / / You can use the exist method of the Java File class to determine if the file exists.

[0132] return File(certPath).exists

[0133] }

[0134] / / Check if the certificate has expired

[0135] fun checkExpired():Boolean{

[0136] / / Obtain the certificate factory and define the certificate format to be read as X.509.

[0137] val cf = CertificateFactory.getInstance("X.509")

[0138] / / Create a file read stream to read from the full path of the certPath certificate.

[0139] val in1 = FileInputStream(certPath)

[0140] / / Read the certificate from the file stream and convert it to X.509 format for easier information reading.

[0141] val cert = cf.generateCertificate(in1) as X509Certificate

[0142] / / Obtain certificate validity period

[0143] val notAfter = cert.notAfter / / Expiry date

[0144] val now = Date() / / Get the current date and time

[0145] / / Check if the certificate has expired

[0146] if(now.compareTo(notAfter)>0){

[0147] If "now" appears after "notAfter", it means the certificate has expired.

[0148] return false

[0149] }else{

[0150] return true

[0151] }

[0152] }

[0153] It is understandable that the same logic based on the above specific implementation method can also be implemented in other languages ​​or codes. This application does not limit the implementation code or language.

[0154] Third, regarding the steps for implementing network connectivity polling detection, this corresponds to the content related to "checking the vehicle's network connectivity when it is determined that the current status of the certificate is abnormal," as detailed below:

[0155] The general approach is as follows: Set a timer, starting when the certificate is invalid after the PKIService starts, with a 1-second interval, and perform a network connection check every second. If a network connection is detected, stop polling and proceed with the certificate request; if a network connection is not detected, continue polling. Below is a possible implementation, including specific code and corresponding comments:

[0156] / / Use CountDownTimer to define a countdown timer.

[0157] / / Set the total time to 10*1000ms (i.e., 10s), with each interval being 1000ms (i.e., 1s).

[0158] val networkAvailableTimer = object :CountDownTimer(10*1000,1000){

[0159] / / The onTick method will be executed automatically every 1 second. The polling operation can be implemented by overriding the onTick method.

[0160] The `onTick` method is a callback method of the `CountDownTimer` class. When using `CountDownTimer` to implement countdown functionality, the `onTick` method is called every time the countdown updates.

[0161] override fun onTick(p0: Long) {

[0162] / / The network connection can be determined using the isConnectedAvailableNetwork method. This method can be used to determine both tbox and Wi-Fi networks.

[0163] if (isConnectedAvailableNetwork(this@PKIService)){

[0164] / / If the network is already connected, the timer will be canceled.

[0165] cancel()

[0166] / / Trigger automatic certificate application.

[0167] requestCert()

[0168] }

[0169] }

[0170] / / The onFinish method will be executed automatically after the timer finishes counting down. It can be overridden to restart the timer.

[0171] override fun onFinish() { / / Execute when the timer ends.

[0172] / / Check network connectivity.

[0173] if (!isConnectedAvailableNetwork(this@PKIService)){

[0174] / / If the network is not connected, the timer will restart.

[0175] start()

[0176] }

[0177] }

[0178] }

[0179] The following section elaborates on the implementation of the isConnectedAvailableNetwork method for determining network connectivity.

[0180] fun isConnectedAvailableNetwork(context: Context): Boolean {

[0181] / / Obtain network connection information through the ConnectivityManager service provided by Android.

[0182] val cm: ConnectivityManager =

[0183] context.getSystemService(Context.CONNECTIVITY_SERVICE) asConnectivityManager

[0184] / / Get the currently active network; return true if it exists, otherwise return false.

[0185] val network: Network = cm.activeNetwork ?: return false

[0186] / / Get current network capability information; return false if no information is available.

[0187] val capabilities: NetworkCapabilities =

[0188] cm.getNetworkCapabilities(network) ?: return false

[0189] / / The hasCapability method is used to check whether the network has internet connectivity and whether it has been verified.

[0190] / / If both conditions are met, return true, indicating that the current network connection is available and the internet can be accessed.

[0191] / / Otherwise, return false, indicating that the current network is unavailable or the internet cannot be accessed.

[0192] return (capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)

[0193] && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED))

[0194] }

[0195] It is understandable that the same logic based on the above specific implementation method can also be implemented in other languages ​​or codes. This application does not limit the implementation code or language.

[0196] The following content corresponds to "when the vehicle's network connection is valid, a temporary communication channel for vehicle-to-cloud communication is constructed based on the temporary certificate file and temporary private key; based on the temporary communication channel, a certificate request is sent to the cloud, and the certificate information returned by the cloud is received; the scope of the temporary certificate file and temporary private key is the application of a vehicle-to-cloud communication security certificate; the certificate information is saved to the target path for use in vehicle-to-cloud communication" and other related content.

[0197] Fourth, regarding the steps involved in sending a certificate request:

[0198] The following provides a possible implementation, including specific code and corresponding code comments:

[0199] / / CertRequest is the request class corresponding to JSON data requests from the cloud. The variable names within its object correspond to the jsonkey values. This means that when parsing JSON data into Java objects, the keys in the JSON match the field (variable) names in the Java object. This mapping makes the parsing process more intuitive and efficient.

[0200] / / Used to store and manage Certificate Request (CertRequest) objects. Responsive processing of network requests can be achieved by publishing request objects to LiveData. LiveData is an observable data holder class that notifies observers when data changes. It has the following characteristics: Lifecycle Awareness: LiveData automatically manages the lifecycle of observers, ensuring updates are sent only when the observer is active (e.g., STARTED or RESUMED); Safe Data Updates: LiveData ensures data updates always occur on the main thread, avoiding concurrency issues in multi-threaded environments; Prevention of Memory Leaks: Because LiveData is lifecycle-bound, it automatically removes observers when they become inactive, preventing memory leaks; Transformable Data: LiveData supports data transformation using Transformations classes, such as map() and switchMap() methods, providing new data views without altering the original LiveData.

[0201] val requestLiveData = MutableLiveData <certrequest>()

[0202] fun requestCert(){

[0203] / / Construct a certificate request and send the request using the livedata response.

[0204] requestLiveData.postValue(CertRequest())

[0205] }

[0206] val requestData = Transformations.switchMap(requestLiveData){certRequest->

[0207] / / Set the certRequest parameters and execute the network request to apply for a certificate.

[0208] Before constructing a PKI certificate request and sending it to a certificate authority, you need to set the parameters in the request. These parameters describe the certificate holder's identity information and the certificate's use case so that the CA can correctly issue the certificate, ensure that the requested certificate meets expectations and security requirements.

[0209] / / Repo is a network wrapper class. The requestCert function sends a request and returns a server response.

[0210] Repo.requestCert(requestBody)

[0211] }

[0212] / / When the service is created, initialize the certificate request and listen for its return.

[0213] / / If the request returns, subsequent operations such as certificate import will be automatically responded to.

[0214] fun initRequestCertObserve(){ / / Listen by observing changes in livedata.

[0215] requestData.observe(this@PKIService){result->

[0216] / / Get the response.

[0217] The `observe` method is a key method of `LiveData`, used to register observers to listen for changes in the data of the `LiveData` object. When the value of the `LiveData` object changes, the registered observers are notified and perform the corresponding operations in their callback methods.

[0218] val response = result.getOrNull()

[0219] / / getOrNull() is used to safely retrieve a value. If the specified key does not exist in the map, it returns null instead of throwing an exception.

[0220] if(response!=null && response.status ==true){

[0221] / / Certificate application successful, import certificate.

[0222] }

[0223] }

[0224] }

[0225] In addition to the steps described in the diagram above, PKIService also needs to include a temporary certificate file and a temporary private key, which are updated in real time with system updates to ensure their validity. This temporary certificate is only used to establish a secure communication channel with the cloud when applying for a certificate, thereby ensuring the security of automatically applied certificates. The temporary certificate and temporary private key are universal certificates for the same batch of vehicle-mounted systems and can establish a secure communication channel with the cloud, but are only used for certificate application. Non-temporary certificates (collectively referred to as formal certificates) are obtained during the certificate application process. They contain vehicle-mounted system information and are therefore only used by the current vehicle-mounted system to establish a secure communication channel with the cloud, i.e., for other app network functions. The methods for establishing a secure communication channel between the temporary certificate and the formal certificate and the cloud can be basically the same. One possible implementation is provided below:

[0226] To establish a connection with the cloud using OkHttp, you can set the certificate chain information using the `builder.sslSocketFactory` method when creating the OkHttp builder. This certificate chain information can be generated by importing the certificate and private key files into `KeyManagerFactory` and `TrustManagerFactory` to create an object, which can then be used as a parameter to create the OkHttp builder. After that, create an OkHttp Client, and communicate with the cloud through this Client to complete secure communication using certificates.

[0227] OkHttp is a network request framework used in Android development. SSLSocketFactory is a Java factory class for creating SSL / TLS secure sockets. It allows applications to communicate securely via SSL or TLS protocols, typically used for HTTPS connections. KeyManagerFactory and TrustManagerFactory are two important Java factory classes for handling SSL / TLS certificate and key management. They are responsible for managing and verifying client and server authentication, respectively. Specifically, KeyManagerFactory creates KeyManager objects, which manage client authentication information—how the client proves its identity to the server; TrustManagerFactory creates TrustManager objects, which manage a list of trusted certificates used to verify the trustworthiness of certificates provided by the server. TrustManager decides whether to accept a certificate from the server and ensures that the certificate was issued by a trusted CA (Certificate Authority).

[0228] It is understandable that the same logic based on the above specific implementation method can also be implemented using other languages ​​or codes. This application does not limit the implementation code or language.

[0229] In general, the method provided in this embodiment can be used in a variety of scenarios. It is not necessarily used only for certificate abnormal recovery scenarios. It can also be used in other scenarios, such as when the vehicle system needs to be upgraded from a version without PKI to a version with PKI. In this case, a PKI certificate needs to be obtained outside the production line. In this case, the PKIService service can be used directly to automatically apply for the certificate after the system is upgraded.

[0230] In this embodiment, the PKI certificate application has a high fault tolerance rate. It can automatically check the certificate status and apply for a certificate and resolve certificate anomalies every time the vehicle starts up and connects to the network. This increases the fault tolerance rate of the PKI certificate application service, ensures the normal use of the vehicle network function, maintains the security of vehicle-to-cloud communication, and also ensures the normal use of the vehicle network function.

[0231] By registering a broadcast receiver in the application configuration file and setting the event the broadcast receiver is interested in—the vehicle's power-on broadcast message—and rewriting the corresponding receive callback method to start the certificate service, the certificate service can be automatically started once the vehicle is powered on to determine the current status of the certificate used for vehicle-to-cloud communication security. The current status of the certificate is determined by comprehensively checking whether the certificate file for vehicle-to-cloud communication security exists in the target path and whether the certificate has expired, which helps to obtain a more accurate certificate status. If the current status is abnormal, the vehicle's network connection status is polled. The vehicle's current active network and network capability information are obtained through a timer cycle, and based on this information, the vehicle's network connectivity and verification are checked to determine if the network connection is valid. This helps to obtain the vehicle's network connection status more accurately and efficiently. If the network connection is valid, a temporary communication channel for vehicle-to-cloud communication is established using a temporary certificate file and a temporary private key. Since temporary certificate files and temporary private keys can be universal for the corresponding production batch of vehicles, the number of temporary certificate files and temporary private keys required can be reduced, lowering related management costs. Simultaneously, temporary certificate files and temporary private keys can be updated with vehicle system updates, ensuring that the temporary certificate files and temporary private keys in the vehicle are up-to-date and eliminating the need for dedicated updates. Certificate requests are sent to the cloud via temporary communication channels to obtain certificate information. Specifically, a certificate request for vehicle-to-cloud communication security certificate application is constructed and sent to the cloud via a temporary communication channel based on an observable data container, automatically triggering network request result monitoring after the certificate request is sent. Because the variable names in the certificate request correspond to the key-value pairs used to store vehicle-to-cloud communication security certificates in the cloud, accurate retrieval of the required data, i.e., certificate information, can be achieved, avoiding issues caused by inconsistent formats or names. By utilizing an observable data container to monitor network request results, the system listens for the receipt of certificate information returned from the cloud. When certificate information is received, it is verified to ensure its authenticity and validity, and the valid certificate information is saved to the target path. This ensures that the vehicle-to-cloud communication security certificate used by the vehicle is usable, thus avoiding situations where the certificate information returned by the cloud contains null values ​​or invalid certificates, which could affect the vehicle-to-cloud communication based on the certificate information. In other words, it helps to ensure that the provided vehicle-to-cloud communication security certificate is usable and does not affect the security and stability of vehicle-to-cloud communication.This enables the determination of the vehicle's vehicle-to-cloud communication security certificate status and the provision of a usable vehicle-to-cloud communication security certificate every time the vehicle is powered on. This avoids the impact of factors such as the unavailability of the vehicle-to-cloud communication security certificate on vehicle-to-cloud communication, thus ensuring that a usable vehicle-to-cloud communication security certificate exists in the vehicle when vehicle-to-cloud communication is needed, thereby ensuring the security and stability of vehicle-to-cloud communication.

[0232] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0233] Based on the same inventive concept, this application also provides a vehicle-to-cloud communication security certificate acquisition device for implementing the above-described method for acquiring vehicle-to-cloud communication security certificates. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of the one or more vehicle-to-cloud communication security certificate acquisition device embodiments provided below can be found in the limitations of the vehicle-to-cloud communication security certificate acquisition method described above, and will not be repeated here.

[0234] In one exemplary embodiment, such as Figure 5 As shown, a vehicle-to-cloud communication security certificate acquisition device 500 is provided, comprising:

[0235] The listening module 501 is used to listen for the vehicle's power-on broadcast message based on a pre-registered broadcast receiver; when the broadcast receiver detects the power-on broadcast message, it starts the pre-set certificate service based on the overridden receive callback method in the broadcast receiver.

[0236] The determination module 502 is used to determine the current status of the certificate used for vehicle-to-cloud communication security in the vehicle when the certificate service is started;

[0237] The acquisition module 503 is used to check the vehicle's network connection status when it is determined that there is an anomaly in the current status of the certificate; if the vehicle's network connection is valid, it constructs a temporary communication channel for vehicle-to-cloud communication based on the temporary certificate file and the temporary private key; based on the temporary communication channel, it sends a certificate request to the cloud and receives the certificate information returned by the cloud; the temporary certificate file and the temporary private key are applicable to the case of applying for a vehicle-to-cloud communication security certificate; and it saves the certificate information to the target path for use in vehicle-to-cloud communication.

[0238] The vehicle-to-cloud communication security certificate acquisition device 500 based on the above embodiment uses a listening module 501 to listen to the vehicle's startup broadcast message according to a pre-registered broadcast receiver, enabling the invocation of the certificate service when the vehicle starts. When the listening module 501 initiates the certificate service, a determining module 502 determines the current status of the certificate used for vehicle-to-cloud communication security in the vehicle. If the determining module 502 determines that the current certificate status is abnormal, the acquisition module 503 checks whether the network connection is valid. If valid, the acquisition module 503 constructs a temporary communication channel for vehicle-to-cloud communication using a temporary certificate file and a temporary private key, sends a certificate request to the cloud through the temporary communication channel to obtain certificate information, and saves the certificate information to a target path for use in vehicle-to-cloud communication. This ensures that the status of the vehicle-to-cloud communication security certificate in the vehicle can be determined and a usable vehicle-to-cloud communication security certificate can be provided each time the vehicle starts up, avoiding the impact of unavailable vehicle-to-cloud communication certificates on vehicle-to-cloud communication. In other words, it guarantees that a usable vehicle-to-cloud communication security certificate exists in the vehicle when vehicle-to-cloud communication is needed, thereby ensuring the security and stability of vehicle-to-cloud communication. At the same time, temporary communication channels are built using temporary certificate files and temporary private keys to facilitate the application for a usable vehicle-to-cloud communication security certificate from the cloud, thereby ensuring that vehicles can apply for certificates from the cloud through temporary communication channels before obtaining a formal certificate.

[0239] In one embodiment, the determining module 502 is further configured to check whether a certificate file for vehicle-to-cloud communication security exists in the target path; if a certificate file exists in the target path, the validity period of the certificate corresponding to the certificate file is determined based on reading the certificate file, and whether the certificate has expired is determined based on the certificate validity period and the current time; if no certificate is found in the target path and / or the certificate has expired, the current status of the certificate is determined to be abnormal.

[0240] In one embodiment, the acquisition module 503 is further configured to acquire the vehicle's current active network and current network capability information at intervals based on the timing period of a preset timer; check whether the vehicle's network has Internet connectivity capability and whether it has been verified based on the current active network and current network capability information; and determine that the vehicle's network connection is valid if it is found that the vehicle's network has Internet connectivity capability and has been verified.

[0241] In one embodiment, the acquisition module 503 is further configured to construct a certificate request for applying for a vehicle-to-cloud communication security certificate; the variable name in the certificate request corresponds to the key-value pair used to store the vehicle-to-cloud communication security certificate in the cloud; based on the observable data container, the certificate request is sent to the cloud through a temporary communication channel so as to automatically trigger network request result listening after the certificate request is sent.

[0242] In one embodiment, the acquisition module 503 is further configured to send a certificate request to the cloud via a temporary communication channel based on an observable data container, so that after automatically triggering network request result listening after the certificate request is sent, it listens for whether the certificate information returned by the cloud is received based on the observation of the data container; if the certificate information is received, it verifies the validity of the certificate information; if the certificate information is valid, it saves the certificate information to the target path.

[0243] In one embodiment, the temporary certificate file and temporary private key are common to the production batch corresponding to the vehicle; the acquisition module 503 is also used to update the temporary certificate file and temporary private key when the vehicle is undergoing a system update.

[0244] In one embodiment, the listening module 501 is further configured to register a broadcast receiver in the application configuration file; the broadcast receiver is configured to listen for the vehicle's power-on broadcast message; and the receiving callback method corresponding to the broadcast receiver is rewritten to start the certificate service.

[0245] The modules in the aforementioned vehicle-to-cloud communication security certificate acquisition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0246] In one exemplary embodiment, a new energy vehicle is provided, which can be a terminal, and its internal structure diagram can be as follows. Figure 6 As shown, the new energy vehicle includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for obtaining a vehicle-to-cloud communication security certificate. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the new energy vehicle can be a touch layer covering the display screen, or it can be a button, trackball or touchpad set on the new energy vehicle, or it can be an external keyboard, touchpad or mouse, etc.

[0247] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the new energy vehicle to which the present application is applied. A specific new energy vehicle may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0248] In one embodiment, a new energy vehicle is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0249] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0250] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0251] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0252] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0253] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.< / certrequest>

Claims

1. A method for obtaining a vehicle-to-cloud communication security certificate, characterized in that, The method includes: The system listens for the vehicle's power-on broadcast message using a pre-registered broadcast receiver; the broadcast receiver is registered in the vehicle's application configuration file, is configured to listen for the power-on broadcast message, and the corresponding receive callback method of the broadcast receiver is rewritten to start the certificate service. When the broadcast receiver detects the power-on broadcast message, it starts the pre-configured certificate service based on the rewritten receive callback method in the broadcast receiver. When the certificate service is started, the current status of the certificate used for vehicle-to-cloud communication security in the vehicle is determined based on the certificate service; If it is determined that there is an anomaly in the current state of the certificate, the network connectivity of the vehicle is checked based on the certificate service; When the vehicle's network connection is valid, a temporary communication channel for vehicle-to-cloud communication is constructed based on the certificate service using a temporary certificate file and a temporary private key. Based on this temporary communication channel, a certificate request is sent to the cloud, and certificate information returned by the cloud is received. The temporary certificate file and the temporary private key are applicable to the application for a vehicle-to-cloud communication security certificate. The certificate information is saved to the target path based on the certificate service for use in vehicle-to-cloud communication.

2. The method according to claim 1, characterized in that, Determining the current status of the certificate used for vehicle-to-cloud communication security in the vehicle includes: Check if a certificate file for vehicle-to-cloud communication security exists in the target path; If the certificate file exists in the target path, the certificate validity period corresponding to the certificate file is determined based on reading the certificate file, and the certificate validity period and the current time are used to determine whether the certificate has expired. If the certificate file is not found in the target path and / or the certificate has expired, it is determined that the current status of the certificate is abnormal.

3. The method according to claim 1, characterized in that, The process of checking the vehicle's network connectivity includes: Based on the preset timer's timing period, the vehicle's current active network and current network capability information are acquired at intervals. Based on the current active network and the current network capability information, check whether the vehicle's network has internet connectivity and whether it has been verified. If the vehicle's network is found to have internet connectivity and this has been verified, the vehicle's network connection is determined to be valid.

4. The method according to claim 1, characterized in that, Sending a certificate request to the cloud based on the temporary communication channel includes: Construct a certificate request for applying for a vehicle-to-cloud communication security certificate; the variable names in the certificate request correspond to the key-value pairs used to store vehicle-to-cloud communication security certificates in the cloud. Based on the observable data container, the certificate request is sent to the cloud through the temporary communication channel to automatically trigger network request result monitoring after the certificate request is sent.

5. The method according to claim 4, characterized in that, After sending the certificate request to the cloud via the temporary communication channel based on the observable data container, the method further includes: Based on the observation of the data container, listen for whether the certificate information returned by the cloud is received; Upon receiving the certificate information, verify the validity of the certificate information; Saving the certificate information to the target path includes: If the certificate information is valid, save the certificate information to the target path.

6. The method according to any one of claims 1 to 5, characterized in that, The temporary certificate file and the temporary private key are shared by vehicles in the same production batch.

7. The method according to claim 6, characterized in that, The method further includes: In the event of a system update for the vehicle, the temporary certificate file and the temporary private key are updated synchronously.

8. A vehicle-to-cloud communication security certificate acquisition device, characterized in that, The device includes: The monitoring module is used to monitor the vehicle's power-on broadcast message based on a pre-registered broadcast receiver; when the broadcast receiver detects the power-on broadcast message, it starts a pre-set certificate service based on the rewritten receive callback method in the broadcast receiver; a broadcast receiver is registered in the vehicle's application configuration file, the broadcast receiver is set to monitor the power-on broadcast message, and the corresponding receive callback method of the broadcast receiver is rewritten to start the certificate service. The determination module is used to determine the current status of the certificate used for vehicle-to-cloud communication security in the vehicle based on the certificate service when the certificate service is started. The acquisition module is configured to, when it is determined that the current status of the certificate is abnormal, poll the network connection status of the vehicle based on the certificate service; if the network connection of the vehicle is valid, construct a temporary communication channel for vehicle-to-cloud communication based on the certificate service using a temporary certificate file and a temporary private key, send a certificate request to the cloud based on the temporary communication channel, and receive certificate information returned by the cloud; the temporary certificate file and the temporary private key are applicable to the application for a vehicle-to-cloud communication security certificate; and save the certificate information to a target path based on the certificate service for use in vehicle-to-cloud communication.

9. A new energy vehicle, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Vehicle ECU digital certificate application method and system

    CN116094730A

  • Vehicle Certificate Application Method, Vehicle-Mounted Device, and Roadside Unit

    US20230155813A1