A data transmission method, apparatus and device
By establishing a second data channel in advance and switching it when the vehicle status changes, the problem of connection interruption caused by network changes in vehicle-to-cloud communication is solved, and the real-time performance and stability of communication are improved.
Patent Information
- Application Number
- CN202611469794.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-21
- Publication Date
- 2026-11-17
AI Technical Summary
In traditional vehicle-to-cloud communication, communication connections are interrupted due to changes in the mobile network during vehicle movement, and connection recovery takes a long time, resulting in poor real-time performance and stability of business data transmission.
When the vehicle status changes, a second data channel is established in advance, and after receiving a response, business data is transmitted through the first data channel. Once the second data channel is ready, a switch is performed, and the first data channel is closed after path verification to ensure communication continuity.
It reduces the time spent waiting for channel establishment when switching business data, maintains the original connection, reduces the risk of business interruption, and improves the real-time performance and stability of communication.
Smart Images

Figure CN123123413A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electric vehicle technology, and in particular to a data transmission method, apparatus, and device. Background Technology
[0002] With the continuous improvement of the intelligence of electric vehicles, vehicle-to-cloud communication has become a core foundational capability. Vehicle-side devices typically need to maintain a communication connection with a cloud server to upload vehicle information and receive business data from the cloud server. In related technologies, vehicle-to-cloud communication usually employs a long connection based on the Transmission Control Protocol (TCP), and authentication and business message transmission are completed over this long connection.
[0003] However, during actual operation of electric vehicles, the vehicle's location constantly changes, and the mobile communication network accessed by the vehicle-side equipment may experience signal fluctuations, base station switching, or network address changes. This can lead to interruptions in the original communication connection. After a communication connection interruption, the vehicle-side equipment needs to re-establish the connection, perform identity authentication, and restore the service session, resulting in some service data not being transmitted in a timely manner. In addition, frequent connection reconstruction and data retransmission increase communication traffic, processor load, and power consumption of the vehicle-side equipment, affecting the real-time performance and stability of vehicle-to-cloud communication.
[0004] Therefore, there is an urgent need for a data transmission method, device, and equipment to solve the problems in traditional vehicle-to-cloud communication, such as communication connection interruptions caused by changes in the mobile network during vehicle movement, resulting in long connection recovery times and poor real-time performance and stability of business data transmission. Summary of the Invention
[0005] The purpose of this application is to provide a data transmission method, apparatus, and device to solve the problems in traditional vehicle-to-cloud communication where communication connection interruptions are caused by changes in the mobile network during vehicle operation, resulting in long connection recovery times and poor real-time performance and stability of business data transmission.
[0006] In a first aspect, embodiments of this application provide a data transmission method applied to a vehicle-side device of an electric vehicle. The method includes: acquiring vehicle status information of the electric vehicle; when the vehicle status information determines that the electric vehicle has entered a first motion state, sending a second data channel establishment request to a cloud server, and maintaining the transmission of business data through the first data channel after receiving a channel establishment response; when the vehicle status information determines that the electric vehicle has entered a second motion state from the first motion state, sending a channel switching request to the cloud server, and transmitting business data and heartbeat data through the second data channel after receiving a channel switching response; when the vehicle status information determines that the electric vehicle has entered a third motion state, sending a path verification request to the cloud server through the second data channel, and closing the first data channel after receiving a path verification response indicating successful path verification.
[0007] The data transmission method provided in this application embodiment initiates the establishment of a second data channel when the electric vehicle enters a first motion state, allowing the establishment process of the second data channel to be completed before subsequent service data switching. Simultaneously, after receiving a channel establishment response, service data is still transmitted through the first data channel, enabling current services to continue during the preparation of the second data channel and reducing the impact of the channel establishment process on existing service transmission. After the electric vehicle transitions from the first motion state to the second motion state, the vehicle-side device completes the switching interaction with the cloud server through a channel switching request and response, and then transmits service data through the second data channel. Since the second data channel has already been established in the previous stage, the waiting time for channel establishment during service switching can be reduced. Meanwhile, the first data channel continues to transmit heartbeat data, which helps maintain the original connection, ensuring that the original communication connection is retained after service data is transferred to the second data channel, supporting communication continuity during switching. After the network access path changes, the vehicle-side device initiates path verification through the second data channel. Only after receiving a response indicating successful path verification does it close the first data channel, ensuring that the exit of the original channel is contingent upon the changed path having communication capabilities, reducing the risk of service interruption caused by prematurely closing the original channel. Closing the first data channel can also reduce the heartbeat transmission and connection management overhead required to maintain the channel.
[0008] One possible implementation involves vehicle status information including inertial measurement information, unlock status, historical usage time information, vehicle speed information, and throttle position. Network access information includes cellular network identifier and network address. Determining whether the electric vehicle enters a first motion state based on the vehicle status information includes: determining that the acceleration in the inertial measurement information reaches a first threshold, the unlock status indicates that the electric vehicle has completed unlocking, or the current time falls within a historical usage period. The historical usage period is determined based on historical usage time information. Determining whether the electric vehicle enters a second motion state based on the vehicle status information includes: determining that the vehicle speed continuously reaches a second threshold or the throttle position indicates that the throttle has been operated. Determining whether the electric vehicle enters a third motion state based on network access information includes: determining that the electric vehicle enters a third motion state when the cellular network identifier or network address changes.
[0009] One possible implementation involves sending a second data channel establishment request to the cloud server, followed by the method of: if it is determined that the duration of the electric vehicle in the first motion state has reached a preset duration and the electric vehicle has not entered the second motion state, closing the established second data channel and continuing to transmit business data through the first data channel.
[0010] One possible implementation of the data transmission method provided in this application embodiment further includes: before closing the first data channel, obtaining the service data transmission status and path verification result of the second data channel. If it is determined that a transmission anomaly or path verification failure has occurred in the second data channel, the transmission of service data through the second data channel is stopped, and the transmission of service data through the first data channel is resumed.
[0011] One possible implementation, the data transmission method provided in this application embodiment, further includes: when it is determined that the electric vehicle's speed is zero and the inertial measurement information continuously indicates that the electric vehicle is stationary, sending a first data channel recovery request to the cloud server. After receiving the first data channel recovery response sent by the cloud server, transmitting business data through the first data channel and closing the second data channel.
[0012] Secondly, embodiments of this application provide a data transmission method applied to a cloud server. The method includes: transmitting business data with an electric vehicle via a first data channel; receiving a second data channel establishment request sent by the electric vehicle when entering a first motion state, establishing the second data channel, and sending a channel establishment response to the electric vehicle; receiving a channel switching request sent by the electric vehicle when entering a second motion state from the first motion state, sending a channel switching response to the electric vehicle, and transmitting business data via the second data channel and heartbeat data via the first data channel; and receiving a path verification request sent by the electric vehicle via the second data channel when entering a third motion state, performing path verification, and sending a path verification response to the electric vehicle.
[0013] One possible implementation involves establishing a second data channel and sending a channel establishment response to the electric vehicle, including: establishing a second data channel connection with the electric vehicle and a message transmission session based on the second data channel connection; establishing an association between the second data channel and the vehicle session corresponding to the electric vehicle; sending a channel establishment response to the electric vehicle; and keeping the second data channel in a standby state until a channel switching request is received. The standby state indicates that business data is not transmitted to the electric vehicle through the second data channel.
[0014] One possible implementation involves sending a channel switching response to the electric vehicle and transmitting service data via a second data channel and heartbeat data via a first data channel. This includes: switching the service data transmission relationship of the vehicle session corresponding to the electric vehicle from the first data channel to the second data channel based on the channel switching request; maintaining the connection state of the first data channel and stopping the transmission of service data via the first data channel; and sending a channel switching response to the electric vehicle to transmit service data via the second data channel and heartbeat data via the first data channel.
[0015] One possible implementation involves a cloud server comprising multiple service nodes and a distributed storage unit. The method further includes: after establishing a second data channel, associating and storing the connection identifier and session context data corresponding to the second data channel in the distributed storage unit. The session context data includes connection address information, secure session information, transmission parameters, packet number information, and data stream status information. If it is determined that the target service node receiving the path verification request is different from the service node establishing the second data channel, the target service node retrieves the corresponding session context data from the distributed storage unit based on the connection identifier carried in the path verification request. The session corresponding to the second data channel is then restored based on the session context data, and path verification is performed based on the restored session.
[0016] One possible implementation involves performing path verification and sending a path verification response to the electric vehicle, including: sending path verification data to the electric vehicle through the network access path that received the path verification request; sending a path verification success response to the electric vehicle if the path response data returned by the electric vehicle corresponds to the path verification data; and sending a path verification failure response to the electric vehicle if no corresponding path response data is received, and resuming the transmission of service data with the electric vehicle through the first data channel.
[0017] One possible implementation, as provided in this application embodiment, further includes: receiving a first data channel recovery request sent by the electric vehicle when it re-enters a stationary state; restoring the first data channel; and, after determining that the first data channel can transmit service data, sending a first data channel recovery response to the electric vehicle; transmitting service data through the first data channel; and ceasing the transmission of service data through the second data channel.
[0018] Thirdly, embodiments of this application provide a data transmission device for use in vehicle-side equipment of an electric vehicle. The device includes: an acquisition module, a sending module, a transmission module, and a receiving module.
[0019] The acquisition module is used to acquire the vehicle status information of the electric vehicle.
[0020] The sending module is used to send a second data channel establishment request to the cloud server when the electric vehicle is determined to have entered the first motion state based on the vehicle status information, and to continue transmitting business data through the first data channel after receiving the channel establishment response.
[0021] The transmission module is used to send a channel switching request to the cloud server when the electric vehicle is determined to have entered a second motion state from a first motion state based on the vehicle status information. After receiving the channel switching response, it transmits business data through the second data channel and heartbeat data through the first data channel.
[0022] The receiving module is used to send a path verification request to the cloud server through the second data channel when it is determined that the electric vehicle has entered the third motion state based on the network access information, and to close the first data channel after receiving a path verification response indicating that the path verification is successful.
[0023] Fourthly, embodiments of this application provide a data transmission device applied to a cloud server. The device includes a transmission module, a receiving module, and a verification module.
[0024] The transmission module is used to transmit business data with the electric vehicle through the first data channel. The receiving module is used to receive the second data channel establishment request sent by the electric vehicle when it enters the first motion state, establish the second data channel and send the channel establishment response to the electric vehicle; The transmission module is used to receive a channel switching request sent by the electric vehicle when it enters a second motion state from the first motion state, send a channel switching response to the electric vehicle, and transmit service data through the second data channel and heartbeat data through the first data channel. The verification module is used to receive the path verification request sent by the electric vehicle through the second data channel when the electric vehicle enters the third motion state, perform path verification, and send a path verification response to the electric vehicle.
[0025] Fifthly, embodiments of this application provide a data transmission device that has the function of implementing the data transmission method of the first aspect or any possible implementation of the first aspect, or the second aspect or any possible implementation of the second aspect. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described function.
[0026] Sixthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, enable the computer to perform the data transmission method of the first aspect or any possible implementation thereof, or the second aspect or any possible implementation thereof.
[0027] In a seventh aspect, embodiments of this application provide a computer program product containing instructions that, when run on a computer, enable the computer to execute the data transmission method of the first aspect or any possible implementation thereof, or the second aspect or any possible implementation thereof.
[0028] The technical effects of any of the design methods in aspects three through seven can be found in the first aspect or different possible implementations of the first aspect, or the second aspect or any possible implementation of the second aspect, and will not be repeated here. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0030] Figure 1 A schematic diagram of the structure of an electric vehicle provided in this application embodiment; Figure 2 A system architecture diagram of a data transmission system provided in this application embodiment; Figure 3 A flowchart illustrating a data transmission method provided in this application embodiment; Figure 4 A schematic diagram of a data transmission device provided in an embodiment of this application; Figure 5 This is another structural schematic diagram of a data transmission device provided in an embodiment of this application; Figure 6 Another system architecture diagram of a data transmission system provided in this application embodiment. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0032] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0033] In related technologies, electric vehicles can be equipped with vehicle-mounted devices with mobile communication capabilities. These devices communicate with a cloud server to report vehicle information and facilitate remote business interactions. For example, the vehicle-mounted device can upload vehicle location, battery status, driving records, and fault information to the cloud server, while the cloud server can send query commands, control commands, and configuration data to the vehicle-mounted device. Since these services need to be continuously performed during vehicle use, the vehicle-mounted device and the cloud server typically establish a persistent connection to carry business messages.
[0034] In one related implementation, the vehicle-mounted device establishes a connection with the cloud server based on the Transmission Control Protocol (TCP). After completing security authentication and establishing a service session, data transmission commences. Once the connection is established, the vehicle-mounted device can periodically send heartbeat data to maintain the connection and monitor the communication status. When a connection anomaly is detected, the vehicle-mounted device re-initiates a connection request and resumes transmitting service data after the connection is restored. This method can meet communication requirements when network access conditions are relatively stable.
[0035] However, in actual use, electric vehicles go through different stages such as parking, starting, and driving, and their location and surrounding wireless communication environment will change accordingly. During driving, differences in signal coverage, network congestion, and changes in network access paths may all affect the communication between the vehicle-side equipment and the cloud server. For communication methods that rely on existing network addresses and connection states, changes in network access conditions may cause existing connections to fail to continue carrying service data, requiring the re-establishment of connections and the restoration of corresponding service sessions.
[0036] During the aforementioned processing, connection anomaly detection, connection re-establishment, and business session recovery typically require a certain amount of time. Before communication is fully restored, newly generated vehicle information may need to wait to be sent, and business instructions issued by the cloud server may not reach the vehicle-side devices in a timely manner. Especially when network access conditions change continuously, repeatedly executing the connection recovery process will prolong the waiting time for business data, affecting the continuity of vehicle-cloud interaction. Furthermore, stopping the use of the original connection before the new communication path has transmission capabilities may also cause a temporary interruption of business transmission.
[0037] Based on this, embodiments of this application provide a data transmission method applied to vehicle-side devices of electric vehicles. The method includes: acquiring vehicle status information of the electric vehicle; if, based on the vehicle status information, the electric vehicle enters a first motion state, sending a second data channel establishment request to a cloud server, and after receiving a channel establishment response, continuing to transmit business data through the first data channel; if, based on the vehicle status information, the electric vehicle enters a second motion state from the first motion state, sending a channel switching request to the cloud server, and after receiving a channel switching response, transmitting business data through the second data channel and heartbeat data through the first data channel; if, based on network access information, the electric vehicle enters a third motion state, sending a path verification request to the cloud server through the second data channel, and closing the first data channel after receiving a path verification response indicating successful path verification.
[0038] The data transmission method provided in this application embodiment initiates the establishment of a second data channel when the electric vehicle enters a first motion state, allowing the establishment process of the second data channel to be completed before subsequent service data switching. Simultaneously, after receiving a channel establishment response, service data is still transmitted through the first data channel, enabling current services to continue during the preparation of the second data channel and reducing the impact of the channel establishment process on existing service transmission. After the electric vehicle transitions from the first motion state to the second motion state, the vehicle-side device completes the switching interaction with the cloud server through a channel switching request and response, and then transmits service data through the second data channel. Since the second data channel has already been established in the previous stage, the waiting time for channel establishment during service switching can be reduced. Meanwhile, the first data channel continues to transmit heartbeat data, which helps maintain the original connection, ensuring that the original communication connection is retained after service data is transferred to the second data channel, supporting communication continuity during switching. After the network access path changes, the vehicle-side device initiates path verification through the second data channel. Only after receiving a response indicating successful path verification does it close the first data channel, ensuring that the exit of the original channel is contingent upon the changed path having communication capabilities, reducing the risk of service interruption caused by prematurely closing the original channel. Closing the first data channel can also reduce the heartbeat transmission and connection management overhead required to maintain the channel.
[0039] The methods provided in the embodiments of this application will now be described in conjunction with the specific accompanying drawings.
[0040] On the one hand, embodiments of this application provide an electric vehicle. For example... Figure 1 As shown, the electric vehicle 100 may include: vehicle-end equipment 101 and vehicle status detection equipment 102. The electric vehicle 100 can be an electric two-wheeler or an electric three-wheeler. The following description uses an electric two-wheeler as an example.
[0041] The vehicle-mounted device 101 is installed on the electric vehicle 100. The vehicle-mounted device 101 may include a processor, a memory, and a cellular communication module. The processor is connected to both the memory and the cellular communication module. The memory stores program instructions and vehicle-related data. The processor executes the program instructions, and the cellular communication module accesses the mobile communication network, enabling the vehicle-mounted device 101 to interact with a cloud server. The vehicle-mounted device 101 can obtain the cellular network identifier and network address corresponding to the currently accessed network through the cellular communication module.
[0042] The vehicle status detection device 102 is connected to the vehicle-side device 101 and is used to provide vehicle status detection data to the vehicle-side device 101. The vehicle status detection device 102 may include an inertial measurement sensor, a vehicle speed sensor, and a throttle position sensor. The inertial measurement sensor is used to detect motion data such as vehicle acceleration; the vehicle speed sensor is used to detect the vehicle's speed; and the throttle position sensor is used to detect the throttle's operating position or position changes. The vehicle-side device 101 can obtain inertial measurement information, vehicle speed information, and throttle status based on the above detection data.
[0043] Furthermore, the electric vehicle 100 may also include an electronic lock 103. This electronic lock 103 is connected to the vehicle-side device 101. The electronic lock 103 is used to perform vehicle locking and unlocking operations, and the vehicle-side device 101 can obtain the vehicle's unlocking status based on the status information fed back by the electronic lock 103. In addition, the vehicle-side device 101 can record the vehicle's historical usage time and store this historical usage time information in a memory for later determination of historical usage periods.
[0044] It should be noted that, Figure 1 The device shown is used to illustrate the vehicle hardware composition related to the data transmission method of this application. The electric vehicle 100 may also include a power battery, a drive motor, a motor controller, and other physical devices for vehicle operation, which will not be described in detail in this application.
[0045] On the one hand, embodiments of this application provide a data transmission system. For example... Figure 2 As shown, the data transmission system 200 may include an electric vehicle 100 and a cloud server 201. The vehicle-mounted device 101 in the electric vehicle 100 communicates with the cloud server 201 via a mobile communication network. The cloud server 201 hosts the cloud platform system and performs data reception, business processing, and data distribution operations. The cloud server 201 can be a single server or multiple servers providing services together.
[0046] Specifically, the vehicle-mounted device 101 can upload vehicle location, operating status, driving records, and fault information to the cloud server 201. The cloud server 201 can send control commands, query commands, and configuration data to the vehicle-mounted device 101. For electric vehicles that are frequently used, the vehicle will undergo unlocking, starting, driving, and parking processes multiple times. During driving, the cellular network identifier or network address may also change. Therefore, the vehicle-mounted device 101 and the cloud server 201 need to continuously interact under different vehicle states and network access conditions.
[0047] In this embodiment, a first data channel and a second data channel can be established between the vehicle-mounted device 101 and the cloud server 201. The first data channel can use a transmission control protocol, and the second data channel can use a fast user datagram internet connection protocol. These first and second data channels can be implemented through network communication between the cellular communication module of the vehicle-mounted device 101 and the cloud server 201.
[0048] The vehicle-side device 101 identifies the vehicle's current stage of motion based on vehicle status information and sends a corresponding channel establishment request or channel switching request to the cloud server 201. The cloud server 201 establishes the channel and adjusts service transmission accordingly based on the received request, and returns a corresponding response. When network access conditions change, the vehicle-side device 101 and the cloud server 201 confirm that the changed path can communicate through path verification interaction, and then exit the original data channel, thereby supporting vehicle-to-cloud data transmission in scenarios of frequent vehicle use and changing mobile networks.
[0049] It should be noted that, Figure 2 The data transmission system 200 shown is merely an example of an application scenario of the method provided in the embodiments of this application, and is not intended to limit the application scenario of the method provided in the embodiments of this application.
[0050] On one hand, embodiments of this application provide a data transmission method. This method can be... Figure 2 The vehicle-mounted device 101 and the cloud server 201 in the data transmission system 200 shown interact and execute. For example... Figure 3 As shown, the method may include the following steps.
[0051] S301, the cloud server transmits business data to the electric vehicle through the first data channel.
[0052] The first data channel is a communication channel between the cloud server and the vehicle-mounted equipment of the electric vehicle, used to carry business data. The first data channel can be a long-lived connection channel that establishes a connection based on the Transmission Control Protocol (TCP), provides security protection through transport layer security protocols, and exchanges business messages through message queue telemetry transport protocols. For example, the first data connection channel is a long-lived connection channel that establishes a connection based on the Transmission Control Protocol (TCP).
[0053] Specifically, the vehicle-mounted device can access the mobile communication network via a cellular communication module and initiate a Transmission Control Protocol (TCP) connection request based on the pre-configured cloud server address and port. Upon receiving the connection request, the cloud server returns a connection confirmation message, and the vehicle-mounted device further returns a confirmation message, establishing a transport layer connection through the aforementioned three-way handshake. Subsequently, the vehicle-mounted device and the cloud server perform a secure handshake on this connection, completing authentication and session key negotiation, establishing a secure communication connection capable of encrypting and verifying the integrity of subsequent business data.
[0054] Based on this, the vehicle-mounted device sends a message transmission session establishment message to the cloud server. This message carries information such as the client identifier, username, and password. The cloud server verifies the corresponding identity information, and returns a session establishment response upon successful verification, thus completing the establishment of the first data channel.
[0055] The business data can include vehicle status reporting data, remote control data, and remote upgrade data for electric vehicles. For example, vehicle status reporting data can include battery voltage, battery temperature, battery current, vehicle location information, location anomaly information, and speed anomaly information; remote control data can include vehicle query commands, vehicle control commands, and corresponding execution results; and remote upgrade data can include software upgrade tasks and related upgrade data.
[0056] Specifically, a message broker service runs on the cloud server, and the vehicle-side device runs a message client program that communicates with this message broker service. After collecting vehicle data, the vehicle-side device organizes the collected data into business messages and publishes them to the corresponding business topics through the first data channel. After receiving the messages, the cloud server forwards them to the corresponding data analysis or vehicle management processes for processing. For business data that needs to be distributed to electric vehicles, the cloud server publishes the corresponding data to the business topics subscribed to by the vehicle-side device, which then receives, parses, and executes the corresponding operations.
[0057] For example, when a cloud server needs to query the battery status of an electric vehicle, it can send a battery status query command through the first data channel. After receiving the command, the vehicle-side device obtains data such as battery voltage, temperature, and current, and then returns the query results through the first data channel, thus completing a vehicle-cloud business interaction.
[0058] When the electric vehicle is stationary or has not yet triggered a subsequent channel switch, the vehicle-side equipment and the cloud server can continue to use the first data channel for the aforementioned interactions. This data transmission process can occur simultaneously with subsequent vehicle status monitoring.
[0059] S302, the vehicle-side device obtains the vehicle status information of the electric vehicle.
[0060] Vehicle status information reflects the current operating status and usage details of the electric vehicle, providing a basis for determining the vehicle's operational phase. This information can originate from onboard detection equipment, the vehicle controller, and historical usage records stored on the vehicle's terminal devices.
[0061] Specifically, the vehicle-mounted equipment can receive data output from the vehicle detection equipment via the vehicle bus or signal interface, read status information provided by the vehicle controller, and retrieve historical vehicle usage records from local storage. Information requiring continuous monitoring can be acquired according to a preset sampling period; event information such as unlocking can be acquired upon receiving the corresponding event notification.
[0062] One possible implementation involves vehicle status information including inertial measurement information, unlock status, historical usage time information, vehicle speed information, and throttle position. Network access information includes cellular network identifier and network address. If the acceleration in the inertial measurement information reaches a first threshold, the unlock status indicates the electric vehicle has unlocked, or the current time falls within a historical usage period, the electric vehicle is determined to enter a first motion state. The historical usage period is determined based on the historical usage time information. If the vehicle speed information indicates the electric vehicle's speed continuously reaches a second threshold, or the throttle position indicates the throttle has been operated, the electric vehicle is determined to enter a second motion state. If the cellular network identifier or network address changes, the electric vehicle is determined to enter a third motion state.
[0063] The inertial measurement information can be provided by inertial measurement sensors installed on the electric vehicle, reflecting the acceleration of the vehicle when subjected to vibration, thrust, or changes in position. A first threshold is a judgment threshold corresponding to the aforementioned acceleration information, which can be preset according to sensor configuration and vehicle usage. When the acceleration reaches the first threshold, the vehicle-side equipment can identify inertial changes related to vehicle readiness for use.
[0064] The unlock status reflects the actual unlocking status of the electric vehicle. The vehicle-side equipment can receive the unlocking result from the electronic lock or vehicle controller, and after confirming that the vehicle has been unlocked, it obtains information indicating that the vehicle is in the unlocked state. For example, when the user unlocks the vehicle using a key or remote unlocking operation, the vehicle-side equipment can trigger the determination of the first motion state based on the unlocking result.
[0065] Historical vehicle usage time information is used to record the usage time of a vehicle throughout its history. Specifically, the vehicle-side equipment can determine the historical usage periods of the electric vehicle based on the time ranges corresponding to multiple uses in the historical records. For example, if a vehicle begins use around the same time on multiple historical dates, the corresponding frequently used time range can be determined based on these usage records. When the current time falls within this range, it can be determined that the vehicle intends to move.
[0066] Based on the above information, the first motion state is used to characterize the stage when the vehicle has the intention to move. Acceleration reaching the first threshold, unlocking, and being in a historical usage period constitute corresponding triggering conditions. When any one of these conditions is met, the determination of the first motion state can be triggered.
[0067] Furthermore, vehicle speed information can be provided by a vehicle speed acquisition device or a vehicle controller. A vehicle speed consistently reaching the second threshold can be understood as the vehicle speed remaining at or above the second threshold within a preset observation period. Continuously observing vehicle speed can reduce the impact of single-detection fluctuations on motion state determination. The first threshold is used for acceleration determination, and the second threshold is used for vehicle speed determination. The first and second thresholds are set according to their respective detection quantities.
[0068] The throttle position can be determined based on the signal output by the throttle Hall sensor. For example, the vehicle-side equipment reads the detection signal corresponding to the change in throttle position. When this signal indicates that the throttle has been operated, it recognizes that vehicle driving operation has occurred. Therefore, the vehicle speed continuously reaching the second threshold or the throttle being operated can be used to determine that the vehicle has entered the second motion state.
[0069] In addition, the vehicle-mounted equipment can also obtain network access information through the cellular communication module. The cellular network identifier can include the identification information of the currently accessed cell, and the network address can include the Internet Protocol address used by the vehicle-mounted communication interface. The vehicle-mounted equipment records previously acquired network access information and compares it with the currently acquired information. When the cellular network identifier or network address changes, it determines that the vehicle has entered a third motion state.
[0070] The third motion state characterizes the stage where network access changes occur during vehicle movement. Changes in cellular network identifiers and network addresses can trigger the determination of this state separately, without requiring both pieces of information to change simultaneously.
[0071] It should be noted that the aforementioned acceleration threshold, vehicle speed threshold, and related judgment duration can be pre-configured or remotely configured by the cloud server and sent to the vehicle-side device to adapt the corresponding judgment conditions to different vehicle models and usage scenarios.
[0072] S303: When the vehicle status information determines that the electric vehicle has entered the first motion state, the vehicle-side device sends a second data channel establishment request to the cloud server.
[0073] The second data channel serves as another communication channel between the vehicle-mounted equipment and the cloud server for subsequent business transmission. In this embodiment, the second data channel can establish a transmission connection using the Quick UDP Internet Connections (QUIC) protocol based on the User Datagram Protocol, and establish a message transmission session on this connection. The QUIC protocol provides capabilities such as connection management, reliable transmission, multi-stream transmission, and connection migration, enabling the second data channel to perform corresponding connection maintenance when network access conditions change.
[0074] Specifically, after identifying the first motion state according to the determination method in S302, the vehicle-mounted device reads the pre-configured cloud server domain name, service port and application layer protocol configuration, initializes the protocol processing process corresponding to the second data channel, and sends an establishment request to the cloud server.
[0075] For example, the vehicle-mounted device can be pre-configured with the domain name, port, and message transmission protocol of the cloud-based QUIC service at the factory. When no available cached session exists, the vehicle-mounted device initializes the security authentication configuration and security session context, generates the connection identifier required for the initial connection, and initiates the connection establishment process to the cloud server by carrying the client's security handshake message in the QUIC initial data packet.
[0076] The second data channel establishment request is used to trigger the establishment of the second data channel, which can be achieved through the initial connection message and subsequent handshake interaction of the corresponding protocol. When the vehicle-side device initiates this establishment process, the service transmission of the first data channel is maintained, allowing the second data channel to complete preparation in the background.
[0077] One possible implementation involves sending a second data channel establishment request to the cloud server, followed by the method of: if it is determined that the duration of the electric vehicle in the first motion state has reached a preset duration and the electric vehicle has not entered the second motion state, closing the established second data channel and continuing to transmit business data through the first data channel.
[0078] The duration of the first motion state is the time during which the vehicle enters the first motion state but has not yet entered the second motion state. The preset duration is used to limit the duration of the second data channel while waiting to carry business data. It can be preset by the vehicle-side equipment or adjusted according to the configuration issued by the cloud server.
[0079] Specifically, the vehicle-side equipment records the corresponding time when it determines that the vehicle has entered the first motion state, and continuously monitors the vehicle status after sending a second data channel establishment request. When the second data channel has been established, but the vehicle has not entered the second motion state within a preset time, the vehicle-side equipment terminates the connection corresponding to the second data channel, releases the corresponding connection maintenance resources, and continues to use the first data channel to transmit business data.
[0080] For example, if a user does not continue using the vehicle after unlocking it, or if the vehicle is briefly pushed and then parked again, the first motion state may be established, but the second motion state may not subsequently be entered. Through the above processing, the second data channel pre-established due to the determination of the motion intention can be recovered.
[0081] The aforementioned duration monitoring can begin after the establishment request is sent, while the closure of the second data channel occurs when the corresponding channel has been established but has not yet entered the second activity state. Once the second activity state has been entered and the second data channel has begun transmitting service data, the second data channel will no longer be closed according to the pre-establishment waiting condition.
[0082] S304, the cloud server receives the second data channel establishment request sent by the vehicle-side device when the electric vehicle enters the first motion state, establishes the second data channel and sends a channel establishment response to the vehicle-side device.
[0083] The channel establishment response is the processing result returned by the cloud server during the establishment of the second data channel, used to inform the vehicle-side equipment that the second data channel has completed the necessary preparations. Establishing the second data channel may include establishing a transmission connection, security authentication, and establishing an application-layer message transmission session.
[0084] Specifically, the cloud server receives connection messages initiated by the vehicle-side device through a pre-configured service port. Based on the protocol and handshake information in the connection message, it completes transmission parameter negotiation and a secure handshake with the vehicle-side device. After the secure communication connection is established, it further processes the message transmission session establishment request initiated by the vehicle-side device, enabling the second data channel to send and receive business messages.
[0085] One possible implementation involves establishing a second data channel and sending a channel establishment response to the vehicle-side device, including: establishing a second data channel connection with the vehicle-side device and a message transmission session based on the second data channel connection; establishing an association between the second data channel and the vehicle session corresponding to the electric vehicle; sending a channel establishment response to the vehicle-side device, and keeping the second data channel in a standby state before receiving a channel switching request; the standby state is used to indicate that business data is not transmitted to the vehicle-side device through the second data channel.
[0086] The second data channel connection provides underlying data transmission capabilities, while the message transmission session organizes message sending and receiving on this connection according to application layer protocols. The vehicle session maintains the business interaction relationships for the same electric vehicle, enabling the cloud server to determine which vehicle the corresponding data originates from and which vehicle-side device the data to be sent to.
[0087] Specifically, the vehicle-mounted device and the cloud server can simultaneously negotiate the transmission connection and transport layer security protocol through a QUIC handshake. After the connection is secure, the vehicle-mounted device sends a connection message using the Message Queuing Telemetry Transport Protocol (MQTP). The cloud server verifies the username, password, and other information carried in the message and returns a session establishment response, thus establishing the message transmission session for the second data channel.
[0088] Subsequently, the cloud server can establish an association between the second data channel and the vehicle session based on the vehicle identity information corresponding to the vehicle-side device. This association ensures that the communication connections established by the first and second data channels respectively correspond to the same electric vehicle's business processing object. Message transmission sessions are maintained according to their respective connections, and the vehicle session is used to organize business relationships at the vehicle level.
[0089] During the establishment process described above, the security authentication method can be configured according to the vehicle's hardware configuration and business requirements. For example, for vehicle-mounted devices with limited hardware resources, a one-way certificate authentication method can be used, where the vehicle verifies the cloud server's certificate, and then the username and password in the message transmission session are combined to complete vehicle identity authentication. For vehicle-mounted devices with the corresponding hardware conditions, a two-way certificate authentication method can be used, where the vehicle-mounted device and the cloud server verify each other's certificates, and then the username, password, and the binding relationship between the certificate and the vehicle identity are combined to complete authentication.
[0090] For example, the process of issuing, loading, and mutually authenticating a TLS certificate for an electric vehicle can be used to illustrate the security authentication process when establishing a second data channel.
[0091] First, before vehicles are put into use, a public key infrastructure is established for issuing and managing digital certificates. The certificate management system is configured with root certificate authorities and intermediate certificate authorities. The root certificate authority issues intermediate certificates, and the intermediate certificate authorities then issue cloud server certificates and vehicle device certificates, respectively. The private key of the root certificate authority is stored in a security module to protect the keys upon which certificate issuance depends.
[0092] For cloud servers, the certificate management system configures a server private key and uses an intermediate certificate authority to issue the corresponding X.509 server certificate. The cloud server obtains the server certificate from the security service center through an online interface and loads the corresponding certificate, private key, and trust configuration when starting the communication service for subsequent secure handshakes.
[0093] For electric vehicles, during the vehicle production process, the Manufacturing Execution System (MAS) assigns a Vehicle Identification Number (VIN) to each vehicle. Based on the VIN, the software system generates a Vehicle Identification ID (VID) using a preset hash message authentication code calculation method. When issuing the equipment certificate for the vehicle, the VID is written into the certificate's common name (CN) field, and the certification authority records the binding relationship between the VIN, VID, and certificate serial number, ensuring that the certificate corresponds to a specific vehicle.
[0094] The device certificate may include the certificate version, certificate serial number, signature algorithm, digest algorithm, issuing authority, validity period, and subject information. The certificate serial number is used to distinguish the corresponding certificate, and the vehicle system identifier in the certificate body is used to associate it with the corresponding electric vehicle.
[0095] Subsequently, during the vehicle's off-line inspection, the device certificate, corresponding private key, and trust chain certificate are written to the secure storage area of the vehicle-side communication module via an encrypted channel provided by a programming tool or diagnostic equipment. After the vehicle is powered on, the vehicle-side device loads the aforementioned certificate and key materials, checks the matching of the device certificate and private key, and the configuration of the corresponding certificate chain, preparing for connection establishment.
[0096] When the electric vehicle enters its first moving state, the vehicle-mounted device initiates a QUIC connection based on the pre-configured cloud server domain name and port, and carries a client handshake message in the initial connection message. During the handshake process, the cloud server returns a server handshake message and server certificate, and simultaneously requests the vehicle-mounted device to provide its device certificate.
[0097] After receiving the server certificate, the vehicle-mounted device verifies the server certificate based on its local trusted certificate configuration and provides the vehicle's device certificate and corresponding verification information to the cloud server. The cloud server verifies the device certificate based on its local trusted configuration. During the handshake process, both parties complete two-way authentication and session key negotiation, using the obtained session key to encrypt and protect the integrity of subsequent communication data.
[0098] After a secure connection is established, the vehicle-mounted device continues to send Message Queuing Telemetry Transport (MQTT) connection messages, providing the corresponding username and password. The cloud server verifies the username and password, and, in conjunction with the binding relationships stored in the authentication center, checks whether the vehicle identity corresponding to the username, the vehicle system identifier in the device certificate, and the certificate serial number are associated with the same electric vehicle.
[0099] After successful verification, the cloud server establishes a message transmission session, associates the second data channel with the vehicle session corresponding to the electric vehicle, and returns a channel establishment response. At this time, the second data channel is in standby mode, while the first data channel continues to carry business data until a channel switching request is received subsequently.
[0100] Furthermore, for situations where available cached sessions exist, the vehicle-mounted device and the cloud server can reuse cached information according to the session recovery methods supported by the protocol, reducing the waiting time required for renegotiation. When the conditions for early data transmission are met, allowed early data can be sent in advance using a zero-round-trip method, and the corresponding handshake confirmation can continue to be completed. This method is used to reduce the waiting time for sending early data; the readiness of the service channel is still based on the corresponding connection and message session meeting the usage conditions.
[0101] After the connection and message transmission session are established, the cloud server sends a channel establishment response to the vehicle-side device and keeps the second data channel in a standby state. At this time, the second data channel has the capability for subsequent service transmission, but the current service is still carried by the first data channel. The second data channel can perform necessary protocol control and connection maintenance interactions.
[0102] One possible implementation involves a cloud server comprising multiple service nodes and a distributed storage unit. After establishing a second data channel, the connection identifier and session context data corresponding to the second data channel are associated and stored in the distributed storage unit. The session context data includes connection address information, secure session information, transmission parameters, packet number information, and data stream status information. If the target service node receiving the path verification request is different from the service node establishing the second data channel, the target service node retrieves the corresponding session context data from the distributed storage unit based on the connection identifier carried in the path verification request. The session corresponding to the second data channel is restored based on the session context data, and path verification is performed based on the restored session.
[0103] The service nodes are cloud service instances that handle vehicle-to-cloud connectivity and business data processing. The distributed storage unit stores connection-related data accessible to multiple service nodes, enabling subsequent service nodes receiving data to obtain the corresponding session information.
[0104] Specifically, the distributed storage unit can use a remote dictionary server (Redis) for distributed caching, storing session data in a key-value pair manner. The connection identifier is used to locate the corresponding record, and the session context data is used to store the information needed to restore the connection processing state.
[0105] For example, session context data can record the vehicle-side connection identifier list, the cloud-side connection identifier list, the current vehicle-side address and port, the current cloud-side address and port, the encryption context of the secure session, connection transmission parameters, the numbers of sent and received data packets, and the status of active data streams on the connection. It can also save the timestamps of the corresponding records to reflect the recording time of the session data.
[0106] The connection address information is used to identify the corresponding communication endpoint; the security session information is used to support message decryption and integrity verification; the transmission parameters are used to restore the connection's transmission configuration; the packet number information is used to reflect the data packet transmission and reception status; and the data stream status information is used to restore the processing relationship of existing service flows. All of the above information can be updated as the connection processing status changes.
[0107] For example, taking the transfer of the second data channel of the same electric vehicle from cloud service node A to service node B as an example, the session recovery process during connection migration is illustrated. In this embodiment, the cloud server adopts a distributed deployment method consisting of multiple service nodes and receives data sent by the vehicle-side device through public network proxy and load balancing services. Both service node A and service node B can access the Redis distributed cache used to store connection session data.
[0108] After entering the first motion state, the vehicle-mounted device establishes a second data channel with service node A through the cloud service entry point. Service node A uses the valid connection identifier associated with this connection as an index to save the corresponding session context data to the Redis distributed cache.
[0109] Specifically, the session context data can record the vehicle-side connection identifier list, the cloud-side connection identifier list, the current vehicle-side address and port, the current cloud-side address and port, the TLS 1.3 encryption context, QUIC transmission parameters, the numbers of sent and received data packets, the status of active data streams on the connection, and the corresponding millisecond-level timestamps. Service node A updates the above session information when processing data transmission and reception for the corresponding connection.
[0110] Subsequently, the electric vehicle enters driving mode, and the second data channel begins to carry service data. During a network access change, the communication address or port of the vehicle-side device changes. Under the new network access conditions, the vehicle-side device uses the available target connection identifier assigned to that connection to send data packets carrying path verification requests.
[0111] Assume that this data packet, after being processed by a public network proxy and load balancer, is forwarded to service node B. Since service node B has not yet established a local processing state for this connection, it first obtains the target connection identifier from the received data packet, and then queries the Redis distributed cache based on this identifier to obtain the corresponding session context data.
[0112] After obtaining valid session context data, service node B restores its local security session information, transmission parameters, packet numbering information, and active data stream status, enabling the local connection processing to correspond to the connection state before the migration. Subsequently, service node B uses the restored security session information to decrypt and verify the integrity of received packets, parse path verification requests, and continue to execute the corresponding path verification.
[0113] After successful path verification, service node B updates the corresponding path record based on the verified vehicle-side communication address and port, continues to process the service data sent by the electric vehicle through the second data channel, and sends the service data to the vehicle-side device through the corresponding path. Simultaneously, service node B writes the updated connection state to the distributed cache for subsequent connection maintenance.
[0114] Through the above process, service node B can restore the processing state of the existing connection using the session context stored in the distributed cache. If context restoration and path verification are successful, business interactions on the second data channel can continue, reducing the overhead of re-executing the complete connection establishment process due to changes in the backend service node.
[0115] S305: After receiving the channel establishment response, the vehicle-side equipment continues to transmit service data through the first data channel.
[0116] Maintaining the transmission of business data through the first data channel means that after the vehicle-side equipment confirms that the second data channel is ready, it still maintains the transmission relationship between the current business data and the first data channel.
[0117] Specifically, after receiving the channel establishment response, the vehicle-side equipment can record the status that the second data channel has been successfully established, while keeping the business data sending interface pointing to the first data channel. Newly generated vehicle status reporting data will continue to be sent through the first data channel; control or query data sent from the cloud server will continue to be received and processed through the first data channel.
[0118] During this period, the second data channel remains in standby mode, and the vehicle-side equipment continues to monitor vehicle status information. Service data switching is executed only when the conditions for determining the second motion state are subsequently met; if the preset waiting time condition described in S303 is met but the vehicle has not yet entered the second motion state, the pre-built channel is reclaimed.
[0119] Through the above processing, the preparation process of the second data channel can be completed before the actual service switchover, while the service transmission when the vehicle only shows the intention to move continues to be carried out through the first data channel.
[0120] S306: When the vehicle status information determines that the electric vehicle has changed from the first motion state to the second motion state, the vehicle-side device sends a channel switching request to the cloud server.
[0121] The channel switching request is used to notify the cloud server to adjust the business data transmission relationship of the corresponding electric vehicle, so that subsequent business data can be transmitted through the established second data channel.
[0122] Specifically, the vehicle-side device continuously acquires vehicle speed information and throttle status during the first motion state. When it is determined, as described in S302, that the vehicle speed continuously reaches the second threshold or the throttle has been operated, the device determines that the electric vehicle has entered the second motion state from the first motion state, and sends a channel switching request when the second data channel is ready.
[0123] For example, after the vehicle is unlocked, the vehicle-side device has already established a second data channel in the background; subsequently, when the user operates the throttle, or when the vehicle's speed continuously reaches a second threshold, the vehicle-side device can trigger a channel switching interaction. Thus, motion intention is used to trigger channel preparation, and the determination of the actual vehicle usage stage is used to trigger adjustments to service transmission.
[0124] During the actual transmission process, the vehicle-mounted device can send a channel switching request through the first data channel that maintains the connection. After the request is sent, the vehicle-mounted device waits for the cloud server to return a corresponding response and performs a local channel switch based on the response, so that the service transmission adjustments between the vehicle-mounted device and the cloud server are coordinated.
[0125] S307, the cloud server receives the channel switching request sent by the vehicle-end device when the electric vehicle enters the second motion state from the first motion state, sends the channel switching response to the vehicle-end device, and transmits business data through the second data channel and heartbeat data through the first data channel.
[0126] The channel switching response is the processing result returned by the cloud server in response to this channel switching request. It is used to inform the vehicle-side device that the corresponding vehicle session is ready to conduct business interactions through the second data channel.
[0127] Specifically, after receiving a channel switching request, the cloud server determines the corresponding vehicle session and second data channel based on the vehicle-side device that initiated the request. After confirming that the second data channel is ready, it adjusts the transmission relationship of the corresponding business data and returns a channel switching response.
[0128] One possible implementation involves sending a channel switching response to the vehicle-side device and transmitting service data through the second data channel and heartbeat data through the first data channel, including: switching the service data transmission relationship of the vehicle session corresponding to the electric vehicle from the first data channel to the second data channel according to the channel switching request; maintaining the connection state of the first data channel and stopping the transmission of service data through the first data channel; sending a channel switching response to the vehicle-side device and transmitting service data through the second data channel and heartbeat data through the first data channel.
[0129] Among them, the business data transmission relationship is the correspondence between the vehicle session and the business data carrying channel, which is used to determine which channel the vehicle's business data should be sent and received through.
[0130] Specifically, the cloud server can update the service channel record corresponding to the vehicle session, hand over subsequent service data to be sent to the second data channel, and receive service data uploaded by the vehicle-side device through the second data channel. For the first data channel, the cloud server stops using this channel to carry subsequent service data, but retains the connection status and necessary connection maintenance information.
[0131] Based on the above processing, the cloud server and the vehicle-mounted equipment continue to interact via the first data channel. Stopping business data transmission does not affect necessary channel control message exchanges; therefore, control information such as channel switching responses can still be transmitted through the corresponding available connections.
[0132] Furthermore, when the second data channel adopts the QUIC protocol, different data streams can be used to transmit service messages according to the service type. A data stream is a transmission unit within the same connection that can be separately organized and delivered in an orderly manner.
[0133] For example, business messages corresponding to vehicle status reporting, location information reporting, and remote control interactions can be distributed to different data streams. The cloud server, based on the business type of the data stream, assigns the received data to different processing threads for corresponding business processing, enabling the reception and processing of different business processes to be performed separately.
[0134] At this time, when a data stream is waiting for data to be replenished due to packet loss, it will not directly block the delivery of other data streams due to the ordered delivery requirements within that stream, thereby reducing the impact of receiving wait between different services.
[0135] S308: After receiving the channel switching response, the vehicle-side equipment transmits service data through the second data channel and heartbeat data through the first data channel.
[0136] Heartbeat data is interactive data used to maintain the connection and detect the communication status, which can be achieved through periodically sent keep-alive messages and corresponding responses.
[0137] Specifically, after receiving the channel switching response, the vehicle-mounted device updates the channel corresponding to its local business data sending interface, enabling subsequent data to be reported to be sent through the second data channel, and also receiving business data from the cloud server through the second data channel. Simultaneously, the vehicle-mounted device sends heartbeat messages through the first data channel according to a preset heartbeat cycle, and the cloud server returns a corresponding response based on the received heartbeat messages.
[0138] Through the above interaction, the first data channel maintains its connection as long as the network path remains available, while the second data channel undertakes the current service transmission tasks. The vehicle-side equipment can understand the availability of the first data channel based on heartbeat and connection status information, providing a corresponding connection basis for possible subsequent service rollback.
[0139] In this embodiment, the first data channel and the second data channel can use the same application layer service protocol and service message format. Specifically, the organization method, service theme, and service processing rules of vehicle status data can remain consistent. The communication adaptation process selects the corresponding transmission connection according to the current channel configuration, so that channel switching can be implemented in the service message carrying method.
[0140] Furthermore, for business data with lower requirements for strong consistency and suitable for differential representation, differential compression can be combined to reduce data transmission volume. For example, when both communicating parties have the same reference data, the sending end can generate differential content based on the changes in the current data relative to the reference data, and the receiving end can recover the current data by combining the corresponding reference data, reducing the overhead of repeatedly sending unchanged data.
[0141] During deployment, the vehicle-side equipment can simultaneously retain the protocol processing capabilities corresponding to both types of channels. Based on the vehicle model's hardware conditions and regional network status, the second data channel can be activated in batches via remote software upgrades. Since both types of channels can use the same business message processing rules, the business system can be deployed gradually with appropriate communication adaptation support.
[0142] S309: When it is determined that the electric vehicle has entered the third motion state based on the network access information, the vehicle-side device sends a path verification request to the cloud server through the second data channel.
[0143] The path verification request is used to trigger the verification of the current network access path of the second data channel. The network access path reflects the access relationship and communication address information traversed by the vehicle-side device and the cloud server during current data communication.
[0144] Specifically, the vehicle-mounted equipment continuously obtains current network access information through the cellular communication module and compares it with previously recorded information. When a change in the cellular network identifier or network address is detected, the system determines to enter the third motion state in accordance with the method described in S302, and uses the changed network access conditions to send a path verification request to the cloud server through the second data channel.
[0145] For example, switching to another service cell while the electric vehicle is in motion, or a change in the network address used by the vehicle's communication interface, can trigger the aforementioned verification process. Similarly, for changes in the peer address detected by the cloud server, corresponding path verification can be initiated based on the difference between the source address of the received packet and the peer address recorded in the current session.
[0146] When the second data channel uses the QUIC protocol, the connection identifier can be used to associate data packets with changed addresses with existing connections. The vehicle-mounted equipment and the cloud server can verify the new network path while retaining existing connection session information, allowing connection migration and complete connection re-establishment to be handled separately.
[0147] If an existing connection can continue to be used, business data can continue to be transmitted through path verification and path update; if a new connection needs to be established, it should be handled according to the corresponding connection establishment or cache session recovery process.
[0148] Another possible implementation is that the channel switch corresponding to the second motion state may not be completed between the vehicle-mounted device and the cloud, i.e., a change in the cellular network identifier or network address is detected. In this case, the vehicle-mounted device can first check the establishment and readiness status of the second data channel.
[0149] For example, if a second data channel has been established but has not yet carried business data, it can be used after the corresponding handover interaction is completed, and path verification can be performed. If the second data channel has not yet been established or is not ready, the establishment process of the second data channel can be initiated first, and the corresponding business handover and path verification can be performed after the channel has transmission capabilities. If the establishment of the second data channel fails, the first data channel can continue to be used or restored for business transmission.
[0150] S310: The cloud server receives a path verification request sent by the vehicle-side device through the second data channel when the electric vehicle enters the third motion state, performs path verification, and sends a path verification response to the vehicle-side device.
[0151] Path verification is used to confirm that the current network path can support data round trips between the cloud server and the vehicle-side equipment. The path verification response is used to send the verification processing result back to the vehicle-side equipment, allowing the vehicle-side equipment to determine the subsequent channel processing method.
[0152] Specifically, after receiving a path verification request, the cloud server determines the connection and current access path corresponding to the request. In the aforementioned multi-service node deployment scenario, if the current service node does not hold the corresponding session processing state, it can first obtain the session context data and complete the recovery as described in S304, and then perform this path verification.
[0153] One possible implementation involves performing path verification and sending a path verification response to the vehicle-side device, including: sending path verification data to the vehicle-side device via the network access path that received the path verification request; sending a path verification success response to the vehicle-side device if the path response data returned by the vehicle-side device corresponds to the path verification data; and sending a path verification failure response to the vehicle-side device if the corresponding path response data is not received, and resuming the transmission of service data with the vehicle-side device through the first data channel.
[0154] The path verification data is the verification data generated by the cloud server for this verification, and the path response data is the response content returned by the vehicle-side device based on the verification data. Successful and failed path verification responses are used to notify the final processing result of this verification.
[0155] For example, using the aforementioned connection migration scenario, let's take the verification of the new network path of the vehicle-side device after the service node B restores the session corresponding to the second data channel as an example to illustrate the specific process of path verification.
[0156] After a network access change occurs in an electric vehicle, the vehicle-side device sends a path verification request through the second data channel. After receiving and parsing the request, service node B obtains the current vehicle-side communication address information based on the source address and port of the data packet, and determines the network path that needs to be verified this time by combining it with the address information recorded in the original session.
[0157] For ease of explanation, the network path to be verified will be denoted as path P. Service node B generates an eight-byte random checksum R, records the correspondence between checksum R and path P, writes checksum R into the QUIC path challenge frame PATH_CHALLENGE, sends it to the vehicle-side device through path P, and simultaneously starts the timing process for this path verification.
[0158] After receiving a data packet containing a path challenge frame, the vehicle-mounted device reads the checksum R, generates a path response frame PATH_RESPONSE containing the same checksum, and returns a response to the service node B via the network path that received the path challenge frame. This response serves as proof that the vehicle-mounted device has received the verification data and is able to return the corresponding content through the appropriate communication process.
[0159] After receiving the path response frame, service node B extracts the checksum and compares it with the currently stored checksum R. If the checksums match and the verification has not timed out, the node determines that the verification is for path P based on the sending record corresponding to checksum R, and thus determines that path P has been successfully verified.
[0160] After successful path verification, service node B updates the path usage information corresponding to the second data channel, enabling subsequent business data to be transmitted via the verified path P. It also sends a successful verification response to the vehicle-side device via the second data channel. Upon receiving this response, the vehicle-side device closes the first data channel according to S311 and continues business interaction with the cloud server via the second data channel.
[0161] If the path response data received by service node B does not correspond to the current verification value R, then the path verification will not be considered successful. If no valid response is received after the preset verification time limit expires, service node B will determine that the path verification has failed and will not confirm the new path based on the verification result.
[0162] In the event of path verification failure, service node B can send a path verification failure response to the vehicle-side device through the still-available first data channel and resume service data transmission on that channel. The vehicle-side device retains the first data channel based on the failure result and stops transmitting service data through the faulty second data channel. If the original connection of the first data channel has failed, the connection and service session are restored first according to the corresponding communication protocol, and then service data transmission is resumed.
[0163] PATH_RESPONSE is used to send back the verification data in the path challenge frame, while the path verification success response and path verification failure response are processing result notifications generated by the channel management process. By processing the verification data response and verification result notification separately, the path verification process at the protocol layer can be seamlessly integrated with the channel closure or service rollback operations of the vehicle-side equipment.
[0164] In other specific scenarios, the vehicle-mounted device can also proactively generate a random checksum and send a path challenge frame when it detects a change in its own address or the address of the peer device. In this case, the cloud server returns a path response frame containing the same checksum, and the vehicle-mounted device completes path verification based on the corresponding verification record. Both communicating parties maintain their respective verification records, and after receiving the path challenge frame, the peer device returns the corresponding path response frame according to the protocol requirements.
[0165] The aforementioned path verification relies on an established secure connection to confirm the reachability of the connection on the corresponding network path. Data encryption and integrity protection for the connection continue to use the corresponding secure session information.
[0166] S311, after receiving a path verification response indicating successful path verification, the vehicle-side device closes the first data channel.
[0167] Closing the first data channel means ending the communication connection corresponding to the channel, stopping the corresponding heartbeat interaction, and releasing the communication resources used to maintain the connection.
[0168] Specifically, after receiving the path verification response, the vehicle-side device reads the corresponding verification result. If the path verification is successful, the vehicle-side device executes the connection closing operation corresponding to the first data channel, allowing business data to continue to be transmitted through the second data channel. The cloud server terminates the corresponding first data channel connection maintenance based on the connection closing interaction or the change in connection status.
[0169] One possible implementation is to obtain the service data transmission status and path verification result of the second data channel before closing the first data channel; if it is determined that the second data channel has experienced a transmission anomaly or path verification failure, stop transmitting service data through the second data channel and resume transmitting service data through the first data channel.
[0170] The service data transmission status reflects the current sending, receiving, and connection operation of the second data channel, and can be obtained from the sending results, connection status notifications, and timeout information returned by the communication interface. The path verification result can be obtained from the verification result notification in S310.
[0171] Specifically, the vehicle-mounted equipment can continuously acquire the business data transmission status after the second data channel begins carrying business data, and obtain the corresponding verification result after performing path verification. When an abnormality is detected in the second data channel transmission or path verification fails, the vehicle-mounted equipment retains the first data channel and adjusts the channel corresponding to the local business data sending interface, so that the business data is retransmitted through the first data channel.
[0172] If the first data channel remains connected, its service transmission can be restored. If the original connection has failed due to network changes, the vehicle-mounted equipment re-establishes the connection according to the protocol used by the first data channel, and resumes service data transmission after the connection and service session are restored. This ensures that service rollback is adapted to the actual availability of the first data channel.
[0173] One possible implementation involves sending a first data channel recovery request to the cloud server when the vehicle speed is determined to be zero and the inertial measurement information continuously indicates that the vehicle is stationary; after receiving the first data channel recovery response from the cloud server, transmitting business data through the first data channel and closing the second data channel.
[0174] The first data channel recovery request is used to request the restoration of the communication state for business interactions through the first data channel. This request can be sent while the first data channel is still maintaining a heartbeat, or it can be sent when the first data channel has been closed and the second data channel is carrying business data.
[0175] Specifically, the vehicle-mounted equipment continuously acquires vehicle speed and inertial measurement information during the use of the second data channel. When the vehicle speed is zero and the inertial measurement information indicates that the vehicle is stationary, the duration for which both conditions are met is timed. After the duration reaches a preset stationary time, it is determined that the electric vehicle has returned to a stationary state, and a first data channel recovery request is sent to the cloud server.
[0176] For example, if an electric vehicle stops briefly while in motion and the preset stationary time has not yet been reached, the current channel configuration can be maintained. Only when the vehicle remains stationary and inertial measurement information consistently indicates that it is stationary will the first data channel be triggered to resume operation. The preset stationary time can be set according to the vehicle's usage scenario or remotely configured by a cloud server.
[0177] If the first data channel is closed, the vehicle-side device can send a recovery request through the still-in-use second data channel and initiate the corresponding connection recovery process according to the protocol adopted by the first data channel.
[0178] Correspondingly, the cloud server receives the first data channel recovery request sent by the vehicle-side device when the electric vehicle returns to a stationary state; restores the first data channel, and after determining that the first data channel can transmit business data, sends a first data channel recovery response to the vehicle-side device; transmits business data through the first data channel, and stops transmitting business data through the second data channel.
[0179] Specifically, after receiving a recovery request, the cloud server determines the status of the first data channel corresponding to the electric vehicle. If the original connection is still maintaining a heartbeat and is available, the service transmission relationship between the vehicle session and the first data channel is restored; if the original connection has been closed, the cloud server accepts the re-initiated connection request from the vehicle device through the corresponding service interface, and completes the restoration of transmission connection, security authentication, and message transmission session.
[0180] After confirming that the first data channel can send and receive business data, the cloud server sends a first data channel recovery response back to the vehicle-side device. Upon receiving this response, the vehicle-side device adjusts the local business data transmission channel, resumes sending and receiving business data through the first data channel, and then closes the second data channel.
[0181] Through the above processing, after the electric vehicle returns to a stationary state, it can exit the second data channel after the first data channel restores its service transmission capability, release the connection maintenance resources corresponding to the second data channel, and continue to complete the vehicle-cloud service interaction in the stationary state.
[0182] The foregoing mainly describes the solutions provided in the embodiments of this application from the perspective of the working principle of the device. It is understood that, in order to achieve the above functions, the data transmission device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the algorithm steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0183] This application embodiment can divide the data transmission device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module.
[0184] It should be noted that the module division in this embodiment is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. When dividing functional modules according to their respective functions, Figure 4 A schematic diagram illustrating a possible configuration of the data transmission apparatus described above and in the embodiments is shown. Figure 4 As shown, the data transmission device 400 may include: an acquisition module 401, a sending module 402, a transmission module 403, and a receiving module 404.
[0185] The acquisition module 401 is used to support the data transmission device 400 in performing operations. Figure 3 S302 in the illustrated data transmission method.
[0186] The sending module 402 is used to support the data transmission device 400 in performing its functions. Figure 3 S303 and S305 in the illustrated data transmission method.
[0187] Transmission module 403 is used to support the data transmission device 400 in performing its functions. Figure 3 S306 and S308 in the illustrated data transmission method.
[0188] Receiver module 404 is used to support the data transmission device 400 in performing its functions. Figure 3 S309 in the illustrated data transmission method.
[0189] One possible implementation involves vehicle status information including inertial measurement information, unlock status, historical vehicle usage time information, vehicle speed information, and throttle status. Network access information includes cellular network identifier and network address.
[0190] The sending module, when determining whether an electric vehicle has entered the first motion state based on vehicle status information, specifically determines that the electric vehicle has entered the first motion state when the acceleration in the inertial measurement information reaches a first threshold, the unlocked state indicates that the electric vehicle has completed unlocking, or the current time falls within a historical usage period. The historical usage period is determined based on historical usage time information.
[0191] The transmission module, when used to determine whether an electric vehicle has entered a second motion state from a first motion state based on vehicle status information, is specifically used to: determine whether the electric vehicle has entered a second motion state when the vehicle speed information indicates that the vehicle speed has continuously reached a second threshold or the throttle status indicates that the throttle of the electric vehicle has been operated.
[0192] The receiving module, when used to determine whether an electric vehicle has entered a third motion state based on network access information, is specifically used to: determine whether an electric vehicle has entered a third motion state when it is determined that the cellular network identifier or network address has changed.
[0193] In one possible implementation, after sending a second data channel establishment request to the cloud server, the data transmission device provided in this application embodiment is further configured to: close the established second data channel and continue to transmit business data through the first data channel when it is determined that the duration of the electric vehicle in the first motion state has reached a preset duration and the electric vehicle has not entered the second motion state.
[0194] In one possible implementation, the data transmission apparatus provided in this application embodiment is further configured to: obtain the service data transmission status and path verification result of the second data channel before closing the first data channel; and, if it is determined that a transmission abnormality or path verification failure has occurred in the second data channel, stop transmitting service data through the second data channel and resume transmitting service data through the first data channel.
[0195] In one possible implementation, the data transmission device provided in this application embodiment is further configured to: send a first data channel recovery request to a cloud server when it is determined that the electric vehicle's speed is zero and the inertial measurement information continuously indicates that the electric vehicle is stationary; and after receiving the first data channel recovery response from the cloud server, transmit business data through the first data channel and close the second data channel.
[0196] When dividing each function into modules according to its corresponding function. Figure 5 A schematic diagram illustrating another possible configuration of the data transmission apparatus involved in the above and embodiment examples is shown. For example... Figure 5 As shown, the data transmission device 500 may include: a transmission module 501, a receiving module 502, and a verification module 503.
[0197] The transmission module 501 is used to support the data transmission device 500 in performing its functions. Figure 3 S301 and S307 in the illustrated data transmission method.
[0198] Receiver module 502 is used to support the data transmission device 500 in performing its functions. Figure 3 S310 in the illustrated data transmission method.
[0199] Verification module 503 is used to support the data transmission device 500 in performing [the following actions]. Figure 3 S310 in the illustrated data transmission method.
[0200] One possible implementation involves a receiving module that, when establishing a second data channel and sending a channel establishment response to the electric vehicle, specifically performs the following: establishes a second data channel connection with the electric vehicle and a message transmission session based on the second data channel connection; establishes an association between the second data channel and the vehicle session corresponding to the electric vehicle; sends a channel establishment response to the electric vehicle; and keeps the second data channel in a standby state until a channel switching request is received. The standby state indicates that business data is not transmitted to the electric vehicle through the second data channel.
[0201] One possible implementation involves a transmission module that, when sending a channel switching response to the electric vehicle and transmitting service data via the second data channel and heartbeat data via the first data channel, specifically performs the following: Based on the channel switching request, switches the service data transmission relationship of the vehicle session corresponding to the electric vehicle from the first data channel to the second data channel. It maintains the connection state of the first data channel and stops transmitting service data via the first data channel. It then sends a channel switching response to the electric vehicle to transmit service data via the second data channel and heartbeat data via the first data channel.
[0202] One possible implementation involves a cloud server comprising multiple service nodes and a distributed storage unit. The data transmission apparatus provided in this application embodiment is further configured to: after establishing a second data channel, associate and store the connection identifier corresponding to the second data channel and session context data in the distributed storage unit. The session context data includes connection address information, secure session information, transmission parameters, packet number information, and data stream status information. If it is determined that the target service node receiving the path verification request is different from the service node establishing the second data channel, the target service node retrieves the corresponding session context data from the distributed storage unit based on the connection identifier carried in the path verification request. The session corresponding to the second data channel is restored based on the session context data, and path verification is performed based on the restored session.
[0203] One possible implementation involves a verification module that, when performing path verification and sending a path verification response to the electric vehicle, specifically: sends path verification data to the electric vehicle via the network access path that received the path verification request; if path response data is received from the electric vehicle and corresponds to the path verification data, a path verification success response is sent to the electric vehicle; if no corresponding path response data is received, a path verification failure response is sent to the electric vehicle, and service data transmission with the electric vehicle resumes via the first data channel.
[0204] In one possible implementation, the data transmission apparatus provided in this application embodiment is further configured to: receive a first data channel recovery request sent by the electric vehicle when it re-enters a stationary state; restore the first data channel, and after determining that the first data channel can transmit service data, send a first data channel recovery response to the electric vehicle; transmit service data through the first data channel, and stop transmitting service data through the second data channel.
[0205] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0206] The data transmission device 400 and data transmission device 500 provided in this application embodiment are used to perform the above-described... Figure 3 The data transmission method shown can therefore achieve the same effect as the data transmission method described above.
[0207] This application also provides a data transmission device that can execute the data transmission method and related steps described in the above method embodiments.
[0208] This application also provides a computer-readable storage medium storing instructions thereon, which, when executed, perform the data transmission method and related steps in the above method embodiments.
[0209] This application also provides a computer program product that, when run on a computer, causes the computer to execute the data transmission method and related steps described in the above method embodiments.
[0210] In some embodiments, the methods shown in this application can be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of art.
[0211] This application embodiment also provides a data transmission system 200, such as... Figure 6 As shown, the data transmission system 200 includes at least one processor 601 and at least one interface circuit 602.
[0212] As an example, when the data transmission system 200 includes a processor and an interface circuit, the processor can be... Figure 6 The processor 601 shown in the solid box (or the processor 601 shown in the dashed box) can be an interface circuit. Figure 6 The interface circuit 602 is shown in the solid box (or the dashed box). When the data transmission system 200 includes two processors and two interface circuits, the two processors include... Figure 6 The processor 601 shown in the solid box and the processor 601 shown in the dashed box, these two interface circuits include Figure 6 Interface circuit 602 is shown in both solid and dashed boxes. No limitations are imposed on this.
[0213] Processor 601 and interface circuit 602 can be interconnected via a line. For example, interface circuit 602 can be used to receive signals. Alternatively, interface circuit 602 can be used to send signals to other devices (e.g., processor 601). For instance, interface circuit 602 can read computer instructions stored in memory and send those instructions to processor 601. Processor 601 executes the instructions and, in conjunction with input / output devices, implements the various steps in the above embodiments, such as implementing... Figure 3The methods illustrated are the steps performed in the embodiments shown. Of course, this data transmission system may also include other discrete components, and this application does not specifically limit this.
[0214] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0215] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0216] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0217] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0218] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to it, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0219] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data transmission method, characterized by, A vehicle-side device applied to an electric vehicle, the method comprising: Obtain the vehicle status information of the electric vehicle; If the electric vehicle is determined to have entered the first motion state based on the vehicle status information, a second data channel establishment request is sent to the cloud server, and after receiving the channel establishment response, business data is transmitted through the first data channel. If the electric vehicle is determined to have entered the second motion state from the first motion state based on the vehicle status information, a channel switching request is sent to the cloud server. After receiving the channel switching response, business data is transmitted through the second data channel and heartbeat data is transmitted through the first data channel. When it is determined that the electric vehicle has entered the third motion state based on the network access information, a path verification request is sent to the cloud server through the second data channel, and the first data channel is closed after receiving a path verification response indicating that the path verification was successful.
2. The method of claim 1, wherein, The vehicle status information includes inertial measurement information, unlock status, historical vehicle usage time information, vehicle speed information, and throttle status; the network access information includes cellular network identifier and network address. The step of determining that the electric vehicle has entered the first motion state based on the vehicle status information includes: If the acceleration in the inertial measurement information reaches a first threshold, the unlocking state indicates that the electric vehicle has completed unlocking, or the current time is within a historical usage period, the electric vehicle is determined to enter the first motion state; the historical usage period is determined based on the historical usage time information. The step of determining whether the electric vehicle has transitioned from the first motion state to the second motion state based on the vehicle state information includes: If the vehicle speed information indicates that the vehicle speed of the electric vehicle has continuously reached the second threshold or the throttle state indicates that the throttle of the electric vehicle has been operated, the electric vehicle is determined to have entered the second motion state. The step of determining that the electric vehicle has entered a third motion state based on the network access information includes: If the cellular network identifier or the network address changes, the electric vehicle is determined to have entered the third motion state.
3. The method of claim 1, wherein, After sending the second data channel establishment request to the cloud server, the method further includes: If it is determined that the duration of the electric vehicle in the first motion state reaches a preset duration and the electric vehicle has not entered the second motion state, the established second data channel is closed, and the service data continues to be transmitted through the first data channel.
4. The method of claim 1, wherein, The method further includes: Before closing the first data channel, obtain the business data transmission status and path verification results of the second data channel; If a transmission anomaly or path verification failure is detected in the second data channel, the transmission of service data through the second data channel shall be stopped, and the transmission of service data through the first data channel shall be resumed.
5. The method of claim 1, wherein, The method further includes: If it is determined that the speed of the electric vehicle is zero and the inertial measurement information continuously indicates that the electric vehicle is stationary, a first data channel recovery request is sent to the cloud server. After receiving the first data channel recovery response from the cloud server, business data is transmitted through the first data channel, and the second data channel is closed.
6. A data transmission method, characterized by, Applied to a cloud server, the method includes: Business data is transmitted to the electric vehicle via the first data channel; Receive a second data channel establishment request sent by the electric vehicle when it enters the first motion state, establish the second data channel and send a channel establishment response to the electric vehicle; The system receives a channel switching request sent by the electric vehicle when it transitions from the first motion state to the second motion state, sends a channel switching response to the electric vehicle, and transmits service data through the second data channel and heartbeat data through the first data channel. The system receives a path verification request sent by the electric vehicle through the second data channel when the electric vehicle enters the third motion state, performs path verification, and sends a path verification response to the electric vehicle.
7. The method of claim 6, wherein, The establishment of the second data channel and the transmission of the channel establishment response to the electric vehicle include: Establish a second data channel connection with the electric vehicle and a message transmission session based on the second data channel connection; Establish the association between the second data channel and the vehicle session corresponding to the electric vehicle; Send the channel establishment response to the electric vehicle, and keep the second data channel in a standby state before receiving the channel switching request; the standby state is used to indicate that service data is not transmitted to the electric vehicle through the second data channel.
8. The method of claim 6, wherein, The step of sending a channel switching response to the electric vehicle, transmitting service data through the second data channel, and transmitting heartbeat data through the first data channel includes: According to the channel switching request, the business data transmission relationship of the vehicle session corresponding to the electric vehicle is switched from the first data channel to the second data channel; Maintain the connection status of the first data channel and stop transmitting service data through the first data channel; The channel switching response is sent to the electric vehicle to transmit service data through the second data channel and heartbeat data through the first data channel.
9. The method of claim 6, wherein, The cloud server includes multiple service nodes and distributed storage units; the method further includes: After establishing the second data channel, the connection identifier and session context data corresponding to the second data channel are associated and stored in the distributed storage unit; the session context data includes connection address information, security session information, transmission parameters, packet number information, and data stream status information. If it is determined that the target service node receiving the path verification request is different from the service node establishing the second data channel, the target service node obtains the corresponding session context data from the distributed storage unit according to the connection identifier carried in the path verification request. The session corresponding to the second data channel is restored based on the session context data, and path verification is performed based on the restored session.
10. The method of claim 6, wherein, The execution of path verification and sending a path verification response to the electric vehicle includes: The network access path that receives the path verification request sends path verification data to the electric vehicle. If the path response data returned by the electric vehicle is received and the path response data corresponds to the path verification data, a path verification success response is sent to the electric vehicle. If no corresponding path response data is received, a path verification failure response is sent to the electric vehicle, and the transmission of service data with the electric vehicle is resumed through the first data channel.
11. The method of claim 6, wherein, The method further includes: Receive the first data channel recovery request sent by the electric vehicle when it returns to a stationary state; The first data channel is restored, and after determining that the first data channel can transmit service data, a first data channel restoration response is sent to the electric vehicle. Transmit service data through the first data channel and stop transmitting service data through the second data channel.
12. A data transmission apparatus, characterized by comprising: A vehicle-side device for use in electric vehicles, the device comprising: The acquisition module is used to acquire the vehicle status information of the electric vehicle; The sending module is used to send a second data channel establishment request to the cloud server when the electric vehicle is determined to have entered a first motion state based on the vehicle status information, and to continue transmitting business data through the first data channel after receiving the channel establishment response. The transmission module is used to send a channel switching request to the cloud server when the electric vehicle is determined to have entered the second motion state from the first motion state based on the vehicle status information, and to transmit business data through the second data channel and heartbeat data through the first data channel after receiving the channel switching response. The receiving module is configured to send a path verification request to the cloud server through the second data channel when it is determined that the electric vehicle has entered a third motion state based on network access information, and to close the first data channel after receiving a path verification response indicating that the path verification was successful.
13. A data transmission apparatus, characterized by comprising: The device, used in a cloud server, includes: The transmission module is used to transmit business data with the electric vehicle through the first data channel; The receiving module is used to receive the second data channel establishment request sent by the electric vehicle when it enters the first motion state, establish the second data channel and send the channel establishment response to the electric vehicle; The transmission module is also used to receive a channel switching request sent by the electric vehicle when it enters the second motion state from the first motion state, send a channel switching response to the electric vehicle, and transmit service data through the second data channel and heartbeat data through the first data channel. The verification module is used to receive the path verification request sent by the electric vehicle through the second data channel when the electric vehicle enters the third motion state, perform path verification, and send a path verification response to the electric vehicle.
14. A data transmission device, characterized by The data transmission device includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the data transmission method of any one of claims 1-5 or any one of claims 6-11.
