CN113411371A - Communication method and device applied to vehicle, electronic equipment and vehicle - Google Patents

Communication method and device applied to vehicle, electronic equipment and vehicle Download PDF

Info

Publication number
CN113411371A
CN113411371A CN202011262588.XA CN202011262588A CN113411371A CN 113411371 A CN113411371 A CN 113411371A CN 202011262588 A CN202011262588 A CN 202011262588A CN 113411371 A CN113411371 A CN 113411371A
Authority
CN
China
Prior art keywords
vehicle
network request
server
data
data flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011262588.XA
Other languages
Chinese (zh)
Other versions
CN113411371B (en
Inventor
俞一帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011262588.XA priority Critical patent/CN113411371B/en
Publication of CN113411371A publication Critical patent/CN113411371A/en
Application granted granted Critical
Publication of CN113411371B publication Critical patent/CN113411371B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Traffic Control Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a communication method, a communication device, electronic equipment and a computer-readable storage medium which are applied to a vehicle; relates to automatic driving and cloud technology, and the method comprises the following steps: establishing a communication connection between the vehicle and the server; based on a first data flow channel in the communication connection, sending a first network request of the vehicle to the server to receive a first response message returned by the server based on the first data flow channel; sending a second network request of the vehicle to the server based on a second data flow channel in the communication connection so as to receive a second response message returned by the server based on the first data flow channel; closing the second data stream channel; wherein; the second network request is a request transmitted at a time later than the first network request, and the first response message and the second response message are used to generate a travel instruction of the vehicle. By the method and the device, efficient network communication of the vehicle can be achieved on the basis of saving communication resources.

Description

Communication method and device applied to vehicle, electronic equipment and vehicle
Technical Field
The present application relates to an automatic driving technology based on artificial intelligence, and in particular, to a communication method and apparatus applied to a vehicle, an electronic device, a vehicle, and a computer-readable storage medium.
Background
Artificial Intelligence (AI) is a theory, method and technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results.
Autonomous driving is an important application direction of artificial intelligence, and has different levels (e.g., from L1 to L5), and in autonomous driving of different levels, network communication of a vehicle is inevitably involved, and for example, the vehicle can acquire data for autonomous driving from a server through network communication, thereby controlling the safe and reliable arrival of the vehicle at a destination.
In this process, communication with the server needs to be continuously maintained in order to acquire data in real time, but the resources of the vehicle and the server are greatly consumed, and no effective solution exists for the related art how to perform efficient communication.
Disclosure of Invention
The embodiment of the application provides a communication method and device applied to a vehicle, electronic equipment, the vehicle and a computer-readable storage medium, and the method and device can realize efficient network communication of the vehicle on the basis of saving communication resources.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a communication method applied to a vehicle, which comprises the following steps:
establishing a communication connection between the vehicle and the server;
based on a first data flow channel in the communication connection, sending a first network request of the vehicle to the server to receive a first response message returned by the server based on the first data flow channel;
sending a second network request of the vehicle to the server based on a second data flow channel in the communication connection to receive a second response message returned by the server based on the first data flow channel;
closing the second data stream channel;
wherein; the second network request is a request transmitted at a time later than the first network request, and the first response message and the second response message are used to generate a travel instruction of the vehicle.
The embodiment of the application provides a communication device who is applied to vehicle includes:
the connection module is used for establishing communication connection between the vehicle and the server;
the communication module is used for sending a first network request of the vehicle to the server based on a first data flow channel in the communication connection so as to receive a first response message returned by the server based on the first data flow channel;
the communication module is further used for sending a second network request of the vehicle to the server based on a second data flow channel in the communication connection so as to receive a second response message returned by the server based on the first data flow channel;
the management module is used for closing the second data stream channel;
wherein; the second network request is a request transmitted at a time later than the first network request, and the first response message and the second response message are used to generate a travel instruction of the vehicle.
In the foregoing solution, the communication module is further configured to: in response to establishment of a communication connection between the vehicle and the server, creating a first data flow path carried in the communication connection; sending the first network request to the server through the first data stream path; wherein the first data stream channel is maintained when idle.
In the foregoing solution, the communication module is further configured to: when determining that the second network request needs to be sent to the server, creating a second data stream channel carried in the communication connection; sending the second network request to the server through the second data stream path; the management module is further configured to: closing the second data flow path when the second network request is sent to completion.
In the foregoing solution, before the sending of the second network request of the vehicle to the server based on the second data flow channel in the communication connection, the communication module is further configured to: determining that the second network request needs to be sent when at least one of the following conditions is met: a change in position of the vehicle; the vehicle deviates from the already decided driving route; the vehicle needs to avoid a congested road section ahead.
In the foregoing solution, the management module is further configured to: when the second network request is sent and completed and a third response message returned by the server for the second network request is received, closing the second data flow channel in response to the third response message; wherein the third response message is used to indicate that the second data stream channel is closed.
In the foregoing solution, the management module is further configured to: determining a hold time for the second data flow channel based on a record of historical network requests for the vehicle; wherein the historical network request is sent prior to the first network request; keeping the second data stream channel for the keeping time from the time when the second network request is sent; and when the keeping time is reached and the second data stream channel is still idle, closing the second data stream channel.
In the foregoing solution, the management module is further configured to: extracting the transmission times of the plurality of historical network requests from the record of historical network requests of the vehicle to determine adjacent transmission time intervals of the historical network requests; determining the transmission time interval as the hold time; wherein the types of the transmission time interval include: maximum transmission time interval, average transmission time interval, minimum transmission time interval.
In the foregoing solution, the management module is further configured to: acquiring real-time driving environment data and real-time driving state data of the vehicle to extract real-time driving environment characteristics and real-time driving state characteristics of the vehicle; calling a neural network model to predict a sending time interval based on the real-time driving environment characteristics and the real-time driving state characteristics as the holding time of the second data flow channel; the training sample of the neural network model comprises driving environment data and driving state data, the marking data of the training sample comprises a sending time interval of historical network requests sent in the driving process, and the sending time interval of the historical network requests is extracted from records of the historical network requests of the vehicle.
In the foregoing solution, the communication module is further configured to: writing the real-time location of the vehicle into the first network request; sending a first network request carrying the real-time position to the server through the first data stream channel; wherein the real-time location is used for enabling the server to inquire the road data matched with the real-time location and write the road data into the first response message.
In the foregoing solution, the communication module is further configured to: writing a target location and a real-time location of the vehicle into the first network request; sending the first network request to the server through the first data stream path; the target position and the real-time position are used for enabling a server to obtain a driving route from the real-time position to the target position, and the driving route is written into the first response message.
In the foregoing solution, the communication module is further configured to: receiving a plurality of block coded data sequentially returned by the server based on the first data stream channel; caching the received multiple block coded data according to a receiving sequence; and when the block coded data which is finished is received, decoding the cached block coded data to obtain the first response message.
In the foregoing solution, before the receiving the first response message returned by the server based on the first data stream channel, the communication module is further configured to: receiving a fourth response message which is returned by the server through the first data stream channel and aims at the first network request; wherein the fourth response message is sent when the server queries the target data for responding to the first network request, and is used for prompting the following information: the server returns the block coded data of the target data to the vehicle in a block transmission coding mode; the buffer is pre-allocated for block coded data to be received.
In the foregoing solution, the communication module is further configured to: obtaining a preset time interval for sending a second network request of the vehicle to the server; and when the preset time interval is larger than a first time threshold, sending a second network request of the vehicle to the server according to the preset time interval based on a second data flow channel in the communication connection.
In the foregoing solution, when the preset time interval is not greater than the first time threshold, the communication module is further configured to: creating a third data flow path carried in the communication connection in the process of sending a second network request of the vehicle to the server based on a second data flow path in the communication connection; sending a third network request to the server through the third data stream path.
In the foregoing solution, the communication module is further configured to: starting timing from a second network request to the server for the vehicle; when the timing time does not exceed a second time threshold, receiving a plurality of second response messages returned by the server based on the first data stream channel; wherein the plurality of second response messages are response messages generated within the timing time according to the second network request.
In the foregoing solution, the connection module is further configured to: acquiring a network address of the server; sending a communication connection establishment request based on the network address of the server so as to enable the server to return a connection response corresponding to the communication connection establishment request to the vehicle; wherein the connection response is to prompt the server that the communication connection establishment request for the vehicle has been accepted.
An embodiment of the present application provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the communication method applied to the vehicle provided by the embodiment of the application when executing the executable instructions stored in the memory.
The embodiment of the application provides a computer-readable storage medium, which stores executable instructions for causing a processor to execute, so as to implement the communication method applied to the vehicle provided by the embodiment of the application.
The embodiment of the application provides a vehicle, is provided with the communication device who is applied to the vehicle that this application embodiment provided.
The embodiment of the application has the following beneficial effects:
the first data flow channel in the communication connection between the vehicle and the server is multiplexed to receive the response message of the server for the network request of the vehicle, so that the real-time property of the vehicle for receiving data is ensured; the network request is sent through the second data flow channel and is closed in time, so that communication resources between the vehicle and the server are saved; therefore, the transmission of multiple data streams in the same communication connection is realized, the communication resource consumption is effectively saved, and the communication resource utilization rate and the data transmission efficiency are improved.
Drawings
Fig. 1A is a schematic structural diagram of a communication system applied to a vehicle according to an embodiment of the present application;
FIG. 1B is a schematic flow chart of a communication system applied to a vehicle according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
3A-3D are schematic flow charts of communication methods applied to a vehicle provided by embodiments of the present application;
fig. 4 is a system architecture diagram of a communication method applied to a vehicle according to an embodiment of the present application;
fig. 5 is a data transmission diagram of a communication method applied to a vehicle according to an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where appropriate, so as to enable the embodiments of the application described herein to be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
1) The V2X network is one of support technologies for intelligent automobiles and intelligent transportation, and includes various application communication application scenarios, such as vehicle-to-vehicle, vehicle-to-infrastructure, vehicle-to-pedestrian, vehicle-to-external network, and the like.
2) A long connection means that multiple packets can be sent continuously over one connection, and during the connection hold period, if no packet is sent, a link check packet needs to be sent in both directions.
3) And in short connection, the connection is established once when the client and the server perform data transmission once, and the connection is interrupted when the task is finished.
4) HTTP/3, which is the hypertext transfer protocol 3.0, belongs to a request-response protocol, usually running on top of UDP, which specifies what messages a client may send to a server and what responses get.
In the related technology, a List-Watch mechanism is adopted to realize data uploading and sending, the List-Watch mechanism is based on a HyperText Transfer Protocol (HTTP), is an important asynchronous message notification mechanism of a K8S (a cluster management tool), acquires full data through a List function, monitors incremental data through a Watch function, ensures message reliability, real-time performance and sequence, a Lis t function is responsible for realizing the List resources through short connection based on the HTTP Protocol, monitors resource change events through the Watch function, is realized through long connection based on the HTTP, a K8S realizes the List-Watch mechanism through an informer module, the informer module is equivalent to an accessor connected with a client, requires the accessor resource through the List function, then calls the Watch function change events, the accessor sends resource change event information to an informer module, and calls a corresponding function to process the event, whenever the apis over detects that the state of the resource is changed, the event is pushed to the information module in time, so that the real-time performance of the message is guaranteed, but the following problems exist when a List-Watch mechanism is used for the vehicle-road collaborative information service facing the intelligent internet automobile: (1) the cloud host resource consumption is too fast, and the List-Watch mechanism mainly depends on HTTP 1.1 connection to realize the transmission of the monitored data at present. HTTP 1.1 works based on a connection of a Transmission Control Protocol (TCP), and maintaining the TCP connection requires consuming a certain amount of cloud host resources, for example, a central processing unit (cpu) and a memory, because in the vehicle-road cooperative service, there are many intelligent internet vehicle data accessed to the cloud host, and the connection with the cloud host may be maintained for a long time, which may cause the resources of the cloud host to be consumed quickly, and thus, more hosts are required to be deployed at the cloud end to ensure normal operation of the service; (2) the information monitoring cost is high, and in the vehicle-road cooperative service, the intelligent networked vehicle always needs to obtain road perception information related to the position of the intelligent networked vehicle from the cloud host. When the vehicle is in a moving state, the real-time position of the vehicle is constantly changed, so that the vehicle needs to continuously report the position to the cloud host to ensure that effective road perception information is obtained, the List-Watch mechanism only supports the vehicle to complete position information reporting once in a certain HTTP 1.1 connection, in order to ensure that the cloud host can always obtain the position information of the vehicle in time, the vehicle needs to continuously establish a new HTTP 1.1 connection with the cloud host, and a large amount of overhead is generated in the system to support the continuous establishment of the new connection.
The embodiment of the present application provides a communication method and apparatus applied to a vehicle, an electronic device, a vehicle, and a computer-readable storage medium, which can implement efficient network communication of the vehicle on the basis of saving communication resources. Next, an exemplary application when the electronic apparatus is implemented as an in-vehicle apparatus will be explained.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of a communication system applied to a vehicle according to an embodiment of the present disclosure, in-vehicle device 400-1 is installed in vehicle 500-1, in-vehicle device 400-2 is installed in vehicle 500-2, in-vehicle application 410-1 is run in-vehicle device 400-1, in-vehicle application 410-2 is run in-vehicle device 400-2, in-vehicle device 400-1 and in-vehicle device 400-2 are connected to server 200 through network 300, and network 300 may be a wide area network or a local area network, or a combination of both. As an example, the above-mentioned in-vehicle application may be an electronic map client, an automatic driving client.
Requesting a communication connection to be established with the server 200 through the in-vehicle device 400-1 and the in-vehicle device 400-2, that is, issuing a communication connection establishment request, the server 200 accepting the communication connection establishment request, so that the in-vehicle device 400-1 and the in-vehicle device 400-2 successfully establish independent communication connections with the server 200, respectively (communication connection a and communication connection B, see step 101 in fig. 1B), the in-vehicle device 400-1 creating a data stream channel 1 in the communication connection a (carrying a data stream in the data stream channel), and sending a first network request to the server 200 through the data stream channel 1, the server 200 returning a first response message according to the first network request to the in-vehicle device 400-1 through the data stream 1 in the communication connection a (see step 102 in fig. 1B), the in-vehicle device 400-1 creating a data stream 2 in the communication connection a, and transmits a second network request to the server 200 through the data stream 2, the server 200 returns a second response message according to the second network request to the in-vehicle apparatus 400-1 through the data stream 1 in the communication connection a (see step 103 in fig. 1B), the in-vehicle apparatus 400-1 closes the data stream 2 (see step 104 in fig. 1B), the in-vehicle apparatus 400-2 creates the data stream 1 in the communication connection B, and transmits a first network request to the server 200 through the data stream 1, the server 200 returns a first response message according to the first network request to the in-vehicle apparatus 400-1 through the data stream 1 in the communication connection B, the in-vehicle apparatus 400-1 creates the data stream 2 in the communication connection B, and transmits a second network request to the server 200 through the data stream 2, and the server 200 returns a second response message according to the second network request to the in-vehicle device 400-1 through the data stream 1 in the communication connection B.
In some embodiments, the server 200 may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, a cloud internet of things, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform. The electronic device may also be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc. associated with the in-vehicle device 400-1. The vehicle-mounted device and the server may be directly or indirectly connected through wired or wireless communication, and the embodiment of the present invention is not limited.
The Cloud IOT aims to connect information sensed by sensing equipment in the traditional Internet of things and received instructions into the Internet, really realizes networking, and realizes mass data storage and operation through a Cloud computing technology.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, taking the electronic device as an in-vehicle device as an example, an in-vehicle device 400-1 shown in fig. 2 includes: at least one processor 410, memory 450, at least one network interface 420, and a user interface 430. The various components in the in-vehicle device 400-1 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable communications among the components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 440 in fig. 2.
The Processor 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 450 optionally includes one or more storage devices physically located remote from processor 410.
The memory 450 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The memory 450 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data, examples of which include programs, modules, and data structures, or a subset or superset thereof, to support various operations, as exemplified below.
An operating system 451, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for communicating to other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
a presentation module 453 for enabling presentation of information (e.g., user interfaces for operating peripherals and displaying content and information) via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the communication device applied to the vehicle provided by the embodiment of the present application may be implemented in software, and fig. 2 illustrates the communication device 455 applied to the vehicle, which may be software in the form of programs and plug-ins, and the like, stored in the memory 450, and includes the following software modules: a connection module 4551, a communication module 4552 and a management module 4553, which are logical and thus may be arbitrarily combined or further divided according to the functions implemented, and the functions of the respective modules will be described hereinafter.
In other embodiments, the communication Device applied to the vehicle provided by the embodiments of the present Application may be implemented in hardware, and for example, the communication Device applied to the vehicle provided by the embodiments of the present Application may be a processor in the form of a hardware decoding processor, which is programmed to execute the communication method applied to the vehicle provided by the embodiments of the present Application, for example, the processor in the form of the hardware decoding processor may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
The communication method applied to the vehicle provided by the embodiment of the present application will be described in conjunction with the exemplary application and implementation of the vehicle provided by the embodiment of the present application.
Referring to fig. 3A, fig. 3A is a flowchart illustrating a communication method applied to a vehicle according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 3A.
The following execution subject is a vehicle, and according to the understanding of the foregoing, the execution subject may specifically be a mobile terminal or an onboard device in the vehicle, and for convenience of description, the vehicle, the mobile terminal, and the onboard device are not specifically distinguished.
In step 201, the vehicle establishes a communication connection with a server.
In some embodiments, referring to fig. 3B, fig. 3B is a flowchart illustrating a communication method applied to a vehicle according to an embodiment of the present application, and the establishing of the communication connection between the vehicle and the server in step 201 may be implemented by the following steps.
In step 2011, the vehicle obtains the network address of the server.
In step 2012, the vehicle sends a communication connection establishment request based on the network address of the server.
In step 2013, the server returns a connection response corresponding to the communication connection establishment request to the vehicle.
As an example, the connection response is used to prompt the server that the communication connection establishment request for the vehicle has been accepted.
As an example, the vehicle acquires a network address (e.g., an IP address) and a working port of the cloud host from the cloud host scheduling server, the vehicle initiates a communication connection establishment request to the cloud host according to the network address, the communication connection establishment request also carries a serial number identifier of the communication connection, and if the server accepts the communication connection establishment request, a connection response is returned to the vehicle to prompt the server that the communication connection establishment request of the vehicle has been accepted, so that the communication connection establishment process is completed.
In step 202, a first network request of the vehicle is sent to a server based on a first data flow path in the communication connection.
In some embodiments, the step 202 of sending the first network request of the vehicle to the server based on the first data flow channel in the communication connection may be implemented by, in response to establishment of the communication connection between the vehicle and the server, creating the first data flow channel carried in the communication connection; sending a first network request to a server through a first data stream channel; wherein the first data stream channel is maintained when idle.
As an example, when the communication connection is successfully established, the vehicle creates a first data stream channel carried in the communication connection, and sends the first network request to the server through the first data stream channel, and since the first data stream channel is a long connection data stream channel subsequently used for receiving data issued by the server, the first data stream channel is still maintained in an idle state, so as to carry the data issued by the server to the vehicle randomly.
In some embodiments, referring to fig. 3C, fig. 3C is a flowchart illustrating a communication method applied to a vehicle according to an embodiment of the present application, and the step 202 of sending a first network request of the vehicle to a server based on a first data stream channel in a communication connection may be implemented as follows.
In step 2021, the real-time location of the vehicle is written to the first network request.
In step 2022, the vehicle sends a first network request carrying the real-time location to the server through the first data flow path.
As an example, the real-time location is used to cause the server to query road data adapted to the real-time location and write the road data into the first response message.
As an example, after the vehicle establishes a communication connection with the server, the real-time location of the vehicle may be written into a first network request, where the first network request may be a request transmitted based on an HTTP Protocol, the vehicle end writes the first network request into a first data stream channel created in the communication connection, the vehicle sends the first network request to the server through a User Datagram Protocol (UDP) port based on the first data stream channel, the server receives the first network request, reads a real-time location of the vehicle therefrom, and queries road data adapted to the real-time location according to the real-time location of the vehicle, where the real-time location is a location, and the road data adapted to the real-time location is road data in a neighboring area of the location a, where the real-time location represents that the vehicle is located at the location a and the road data adapted to the real-time location is the road data in the neighboring area of the location a, and the neighboring area may be determined by a preset threshold, for example, centering on the location a, the circular area with the preset threshold as the radius is the neighboring area of the point a, the road data of the neighboring area may include data of all objects of the neighboring area, for example, data of traffic lights, data of pedestrians, data of other vehicles on the road, and the like, and may also be data of an object specified in the first network request, for example, only data of other vehicles on the road is specified and obtained, the first network request is sent through a first data flow channel (long connection data flow channel), the sending timing is that after the communication connection is established, the first data flow channel is created by vehicle control, the obtaining of the first response message (for example, the first response message carrying the road data) is triggered through the first network request, so that in a subsequent process, the server may issue a second response message in response to the second network request through the first data flow channel (for example, a second response message carrying road data).
In some embodiments, the step 202 of sending the first network request of the vehicle to the server based on the first data stream channel in the communication connection may be implemented by writing the target location and the real-time location of the vehicle into the first network request; sending a first network request to a server through a first data stream channel; the target position and the real-time position are used for enabling the server to obtain a driving route from the real-time position to the target position, and the driving route is written into the first response message.
After the vehicle establishes a communication connection with the server, as an example, the target location and the real-time location of the vehicle may be written into the first network request, the first network request can be a request transmitted based on an HTTP Protocol, the vehicle end writes the first network request into a first data stream channel created in the communication connection, the vehicle sends the first network request to the server through a User Datagram Protocol (UDP) port based on the first data stream channel, the server receives the first network request, reads a target position and a real-time position of the vehicle from the first network request, and inquiring a driving route from the real-time position to the target position according to the target position and the real-time position of the vehicle, for example, the real-time location is a location a, the target location is a location B, and the server queries a travel route from the location a to the location B, which helps generate a travel instruction for the vehicle.
As an example, the first network request may also carry vehicle information for storage in the server, for example, a traveling speed of the vehicle, a traveling direction of the vehicle, and the like, so that when the server responds to the first network request of another vehicle, the server may generate a first response message responding to the first network request in the communication connection of another vehicle with reference to the vehicle information.
In step 203, the server generates a first response message according to the first network request.
In an example, the first response message is generated according to the first network request and carried in the first network response corresponding to the first network request, and what kind of response message needs to be obtained may be specified in the first network request, for example, the first network request carries a real-time position, a preset threshold and a specified query object, the real-time position is a location a, the preset threshold is 20 meters, and the specified query object is data of a traffic light, and then the first response message carries real-time traffic light data in an area (constrained by 20 meters) adjacent to the location a. And the server encapsulates the first response message into block data based on a block coding transmission mode, and then writes the block data into the first data stream channel for issuing.
In some embodiments, before receiving the first response message returned by the server based on the first data stream channel in step 204, the following technical solutions may also be performed: receiving a fourth response message which is returned by the server through the first data stream channel and aims at the first network request; wherein the fourth response message is sent when the server inquires the target data for responding to the first network request, and is used for prompting the following information: the server returns the block coded data of the target data to the vehicle in a block transmission coding mode; the buffer is pre-allocated for block coded data to be received.
As an example, after receiving the first network request, the server may query whether target data for responding to the first network request exists, if the target data is queried, set a data transmission mode of a first response message carrying the target data as a block transmission code, write a fourth response message for indicating the data transmission mode into a first data flow channel in the communication connection, return the fourth response message to the vehicle through a port based on the first data flow channel, where the fourth response message is further used to prompt that a buffer is pre-allocated for block encoded data to be received, and the fourth response message may be further encapsulated with the first response message or the second response message into one message. By prompting the vehicle to pre-allocate the cache for the block coded data to be received in advance, the subsequent data receiving efficiency can be effectively improved, and the data transmission efficiency is improved.
In step 204, the vehicle receives a first response message returned by the server based on the first data flow path.
In some embodiments, referring to fig. 3D, fig. 3D is a flowchart illustrating a communication method applied to a vehicle according to an embodiment of the present application, and the receiving of the first response message returned by the server based on the first data stream channel in step 204 may be implemented as follows.
In step 2041, the vehicle receives a plurality of block encoded data that the server sequentially returns based on the first data flow channel.
In step 2042, the vehicle buffers the received plurality of block encoded data in the order received.
In step 2043, when the vehicle receives the end block coded data, the buffered block coded data is decoded to obtain a first response message.
As an example, since the server sends the event information to the vehicle end through a block transmission coding mechanism, when block transmission coding is used, the data to be transmitted is decomposed into a series of data blocks and is sent in one or more block sequences, so that the server can send the data without knowing the total size of the sent data in advance, the vehicle receives a plurality of block coded data which are sequentially returned by the server based on the first data flow channel, and since the fourth response information is received in advance, the vehicle buffers the received plurality of block coded data according to the receiving sequence by using a pre-allocated buffer, and when the vehicle receives 0 data which is used for finishing block coding and indicates that the block coded data is completely transmitted, the buffered block coded data is decoded to obtain the first response message.
In step 205, a second network request for the vehicle is sent to the server based on a second data flow path in the communication connection.
As an example, the first network request is sent through a first data flow channel (long connection data flow channel), the sending occasion is after the communication connection is established, the first data flow channel is created by the vehicle control, the obtaining of the first response message is triggered by the first network request, so that the server can send a second response message responding to the second network request through the first data flow channel in the subsequent process, the second network request is any request sent later than the first network request, that is, not a specific request, but a third network request or a fourth network request, and so on, for example, when it is determined that the real-time position of the vehicle needs to be uploaded, the second network request can be sent to the server through the second data flow channel (short connection data flow channel) or other newly created data flow channels, the first data flow channel is created before sending the first network request, the second data flow path is created prior to sending the second network request.
In some embodiments, the embodiment of step 205 sending the second network request of the vehicle to the server based on the second data flow channel in the communication connection is similar to the embodiment of step 202, except that the data flow channels sending the network request are not identical, step 202 is a first network request sent through the first data flow channel (long connection data flow channel), step 205 is a second network request sent through the second data flow channel (short connection data flow channel), and various conditions of the first network request are applicable to the second network request, the first data flow channel is used for multiple sending and first uploading, and the second data flow channel is mainly used for multiple uploading.
In some embodiments, the step 205 of sending the second network request of the vehicle to the server based on the second data flow channel in the communication connection may be implemented by creating the second data flow channel carried in the communication connection when it is determined that the second network request sent to the server needs to be sent; a second network request is sent to the server through a second data stream path.
As an example, the second data flow channel is a short connection data flow channel, that is, a data flow channel that does not need to be maintained for a long time, and the condition for determining that the second network request needs to be sent to the server depends on a specific driving scenario of the vehicle, for example, for a driving scenario of automatic driving, a new real-time location needs to be sent to the server whenever the location of the vehicle changes, so as to ensure that the vehicle can obtain a real-time effective second response message, thereby ensuring the safety degree of automatic driving.
In some embodiments, before the step 205 is executed to send the second network request of the vehicle to the server based on the second data stream channel in the communication connection, the following technical solutions may also be executed: determining that a second network request needs to be sent when at least one of the following conditions is met: the position of the vehicle changes; the vehicle deviates from the already decided driving route; the vehicle needs to avoid the congested road section ahead.
As an example, the manner in which the change in the position of the vehicle is determined is as follows: acquiring the last position of the vehicle which sends a second network request of the vehicle to the server last time; determining a distance between a last position and a real-time position of the vehicle; when the distance exceeds the distance threshold, it is determined that the position of the vehicle has changed.
In some embodiments, the step 205 of sending the second network request of the vehicle to the server based on the second data stream channel in the communication connection may be implemented by the following technical solutions: acquiring a preset time interval for sending a second network request of the vehicle to the server; when the preset time interval is greater than the first time threshold, a second network request of the vehicle is sent to the server at the preset time interval based on a second data flow channel in the communication connection.
As an example, in a certain mode, the vehicle sends the second network request to the server at a fixed time interval (preset time interval), the preset time interval for sending the second network request of the vehicle to the server is obtained, when the preset time interval is greater than the first time threshold, the first time threshold is the empirical transmission time of the second network request and the second response message, that is, the empirical occupation time of the second data stream channel is occupied, for example, when the first time threshold is 5 seconds, the occupation time of the second data stream channel in one response process is defaulted to be 5 seconds, and when the second network request is sent again, the second data stream channel is not occupied, so that the second network request that can be sent at the preset time interval will keep uploading through the second data stream channel, that is, based on the second data stream channel in the communication connection, and sending a second network request of the vehicle to the server according to the preset time interval, thereby not only saving the virtual resources occupied by the data flow channel, but also facilitating the management of the data flow channel and avoiding repeatedly creating the data flow channel and closing the data flow channel.
In some embodiments, when the preset time interval is not greater than the first time threshold, the following technical solutions may also be implemented: creating a third data flow path carried in the communication connection in a process of sending a second network request of the vehicle to the server based on the second data flow path in the communication connection; and sending the third network request to the server through the third data stream channel.
As an example, taking the above embodiment as a support, in a certain mode, the vehicle sends the second network request to the server with a fixed time interval (preset time interval), obtains the preset time interval for sending the second network request of the vehicle to the server, when the preset time interval is not greater than the first time threshold, the first time threshold is the empirical transmission time of the second network request and the second response message, i.e. the empirical occupation time of the second data stream channel is occupied, for example, when the first time threshold is 5 seconds, the occupation time of the second data stream channel in one response process is defaulted to be 5 seconds, if the preset time interval is 3 seconds, the second data stream channel is already occupied, so that the third data stream channel needs to be created, then the third data stream channel carried in the communication connection is created, and sending the third network request to the server through the third data stream channel, which is equivalent to that the third network request and the second network request are overlapped from the transmission time point of view, so that the function of creating a plurality of data streams in the communication connection is fully utilized, and the data transmission efficiency is ensured.
In step 206, the server generates a second response message in accordance with the second network request.
As an example, the second response message is generated according to the second network request and is carried in the second network response corresponding to the second network request, and the implementation manner in which the server generates the second response message according to the second network request in step 206 may refer to the implementation manner in which the server generates the first response message according to the first network request in step 203.
In step 207, the vehicle receives a second response message returned by the server based on the first data stream channel.
For example, the data carried in the first response message and the data carried in the second response message are both used for generating a driving instruction of the vehicle, for example, the first response message and the second response message may carry a driving route, so that in an application scenario of automatic driving, the vehicle may generate a hardware control instruction according to the driving route to control the vehicle to drive according to the driving route.
In some embodiments, the receiving of the second response message returned by the server based on the first data stream channel in step 207 may be implemented by the following technical solutions: starting timing from a second network request to send the vehicle to the server; when the timing time does not exceed a second time threshold, receiving a plurality of second response messages returned by the server based on the first data stream channel; the plurality of second response messages are response messages generated within the timing time according to the second network request.
As an example, since the real-time position of the vehicle is changing continuously during the driving process, but the change amplitude is small, it may be default that the position of the vehicle does not change fundamentally on a certain scale, the time is counted from the sending of the second network request of the vehicle to the server, when the time does not exceed the second time threshold, the vehicle position is considered not to change greatly, that is, the server defaults that the position of the vehicle does not change greatly within the second time threshold, so that the server continuously obtains the second response message adapted to the second network request sent by the vehicle within the time, which corresponds to a time period, the vehicle may receive a plurality of second response messages returned by the server based on the first data stream channel, wherein the plurality of second response messages are response messages generated within the time according to the second network request, rather than only responding to a certain second network request, and returning the second response message once, and by the embodiment, providing richer second response messages for the vehicle without frequently uploading the second network request, thereby saving resource consumption and time consumption of data transmission.
In step 208, the second data stream channel is closed.
As an example, the second data flow path is closed by vehicle control.
In some embodiments, the closing of the second data stream channel in step 208 may be implemented by: when the sending completes the second network request, the second data flow path is closed.
In some embodiments, the closing the second data flow channel when the second network request is completed is implemented by the following technical solutions: when the second network request is sent and completed and a third response message returned by the server aiming at the second network request is received, responding to the third response message and closing the second data flow channel; wherein the third response message is used for indicating that the second data stream channel is closed.
As an example, the second data flow channel belongs to a short connection data flow channel, and may be closed before receiving the response message from the server, that is, when the second network request is sent and a third response message returned by the server for the second network request is received, the second data flow channel is closed in response to the third response message for instructing to close the second data flow channel.
In some embodiments, the closing of the second data stream channel in step 208 may be implemented by: determining a hold time for the second data flow path based on the record of historical network requests for the vehicle; wherein the historical network request is sent prior to the first network request; starting timing from the sending of the second network request, and keeping the second data stream channel in the keeping time; and when the timing reaches the holding time and the second data stream channel is still idle, closing the second data stream channel.
As an example, the second data flow channel belongs to a short connection data flow channel, the short connection data flow channel may be kept closed for a period of time, the holding time of the second data flow channel is determined based on the record of the historical network requests of the vehicle, the historical network requests are sent before the first network requests, that is, the network requests with reference meaning can be the first network requests or the second network requests in other communication connections from other vehicles, the second network requests are timed to be sent, the second data flow channel is kept in the holding time, when the timing reaches the holding time and the second data flow channel is still idle, the second data flow channel is closed, when the timing reaches the holding time and the second data flow channel is occupied, the second data flow channel is not closed, the number of times of creating the data flow channel can be reduced by the above embodiment, the already created data stream channel is used as much as possible, thereby saving the virtual resources and time consumed for creating the data stream channel.
In some embodiments, the determining the holding time of the second data stream channel based on the record of the historical network requests of the vehicle may be implemented by: extracting transmission times of a plurality of historical network requests from a record of historical network requests of the vehicle to determine transmission time intervals of adjacent historical network requests; determining a transmission time interval as a holding time; wherein the types of the transmission time interval include: maximum transmission time interval, average transmission time interval, minimum transmission time interval.
As an example, the holding time may be further modified based on the transmission time interval, for example, for a loose holding mode, the modification coefficient of the transmission time interval is greater than the modification coefficient threshold, for a strict protection mode, the modification coefficient of the transmission time interval is greater than the modification coefficient threshold, or the modification coefficient of the transmission time interval may be comprehensively determined based on the communication network quality (e.g., the uplink and downlink rate of the channel) and the signal strength of the vehicle, wherein the better the communication network quality (the faster the uplink and downlink rate of the channel) and/or the higher the signal strength, the loose holding mode may be adopted; the worse the communication network quality (the slower the channel uplink and downlink rates) and/or the lower the signal strength, a loose hold may be used, and the communication network quality and the signal strength generally have the same trend of change.
In some embodiments, the determining the holding time of the second data stream channel based on the record of the historical network requests of the vehicle may be implemented by: acquiring real-time driving environment data and real-time driving state data of the vehicle to extract real-time driving environment characteristics and real-time driving state characteristics of the vehicle; calling a neural network model to predict a sending time interval based on the real-time driving environment characteristics and the real-time driving state characteristics to serve as the holding time of the second data flow channel; the training sample of the neural network model comprises driving environment data and driving state data, the marking data of the training sample comprises the sending time interval of the historical network request sent in the driving process, and the sending time interval of the historical network request is extracted from the record of the historical network request of the vehicle.
The sending time interval can also be predicted, by way of example, in an artificial intelligence manner, as the holding time for the second data stream channel, training a neural network model through a training sample, wherein the training sample comprises driving environment data and driving state data, marking data of the training sample comprises sending time intervals of historical network requests sent in the driving process, the sending time intervals of the historical network requests are extracted from records of the historical network requests of the vehicle, the sending time intervals are directly predicted through the neural network model based on real-time driving environment characteristics and real-time driving state characteristics, thereby improving the intelligence of the control logic in the embodiment, reducing manual intervention, determining reliable retention time through real and verifiable historical data, therefore, efficient data transmission is realized, and resources consumed by the establishment and closing of the data stream channel are effectively saved.
In the following, an exemplary application of the communication method applied to the vehicle provided by the embodiment of the present application in an application scenario based on cloud technology will be described.
The communication method applied to the vehicle provided by the embodiment of the application can be applied to the vehicle-road cooperative service facing the intelligent internet vehicle, the vehicle-road cooperative service can further enhance the capabilities of the automatic driving service and the vehicle networking service, and the functions provided by the communication method applied to the vehicle provided by the embodiment of the application are deployed at the cloud host and the intelligent internet vehicle end which are positioned at the edge of the V2X network, so that the intelligent internet vehicle can obtain real-time and effective road perception information from the cloud host in the motion process.
The communication method applied to the vehicle provided by the embodiment of the application can enable the intelligent internet vehicle and the cloud host to carry out efficient long connection data interaction, so that the resource consumption of the cloud host is reduced, and the interaction process between the vehicle and the cloud host is simplified. Data interaction is carried out between the vehicle-end communication module and the cloud-end communication module through an HTTP/3 protocol, a plurality of data stream channels (stream 0) are established in QUIC connection (connection) between a vehicle end and the cloud end, one data stream works in an HTTP long connection mode and is used for the cloud end to send information to the vehicle end, the other data streams work in an HTTP short connection mode and are used for the vehicle end to send information to the cloud end, the cloud-end communication module sends road data generated in real time to the vehicle end in a blocking transmission coding mode, the vehicle-end communication module sends a network request (the network request can include vehicle-end information) to a cloud host in a data uploading mode, after uploading is completed, the data stream is closed, and when new data are sent, a new data stream channel is established for uploading.
In some embodiments, the cloud communication module sends the real-time generated road data to the vehicle end in a blocking transmission coding mode, and the cloud communication module sends the event information to the vehicle end through a blocking transmission coding mechanism in HTTP/1.1, the HTTP blocking transmission coding allows the cloud communication module to maintain HTTP long connection for dynamically generated Content, the long connection requires the cloud communication module to send a Content-Length message header field before the message body is sent, but for the dynamically generated Content, the Content is unknown before the Content is created, when the blocking transmission coding is used, the data is decomposed into a series of data blocks and sent by one or more blocks, so that the cloud communication module can send the data without knowing the total size of the sent Content in advance, and when the vehicle end sends a request to the cloud communication module, the cloud communication module sets a value of a transmission coding (Transfer-Encoding) as a blocking in the header of the HTTP message in a response message And the block (chunked) represents that the block transmission coding is adopted, and after the vehicle end receives the information, the vehicle end maintains the connection with the cloud communication module for a long time and waits for the next data block.
Referring to fig. 4, fig. 4 is a system architecture diagram of a communication method applied to a vehicle according to an embodiment of the present application, where the system architecture includes: the vehicle-end processing module (disposed in a vehicle), the cloud-end processing module (disposed in a cloud host) and the cloud host scheduling server, data interaction is completed through HTTP/3 Connection between the modules, wherein the vehicle-end processing module comprises a road perception information receiving function, a vehicle information reporting function and a Connection management function, the cloud-end processing module comprises a vehicle information receiving function, a road perception information issuing function and a Connection management function, a bidirectional data Connection is established between the vehicle-end processing module and the cloud-end processing module, the data Connection works based on the HTTP/3 Protocol, the establishment of the HTTP/3 Connection depends on a fast User Datagram Protocol (UDP) Internet transmission Connection (QUIC, Quick UDP Internet Connection), namely, the QUIC Protocol actually realizes data transmission based on the UDP Protocol.
In some embodiments, the vehicle-end processing module first obtains an Internet Protocol (IP) address and a working port of the cloud host from the cloud host scheduling server, then, the vehicle-end processing module initiates a QUIC Connection request to the cloud host, and numbers the Connection to Connection0, after the QUIC Connection is established, the vehicle-end processing module creates a data stream channel stream0 and sends an HTTP/3 request to the cloud host through the data stream, where the request may or may not include current location information of the vehicle-end, such as road data directly indicating a certain location expected to be obtained in the request, and the cloud host obtains/3 request content from the data stream channel stream0 and extracts vehicle location information therefrom, after the cloud host confirms that the request can be processed (queries a response message for responding to the request), an HTTP/3 response is generated and returned to a vehicle-end processing module through a data stream channel stream0, the response is packaged into a QUIC data frame and then sent to the vehicle-end processing module through a V2X network in the form of a UDP data packet, after the vehicle-end processing module receives the HTTP/3 response frame returned by the cloud host, the data stream establishment based on long connection between the two parties is completed, the HTTP/3 response returned by the cloud host indicates that the cloud host sends road perception information to the vehicle-end processing module in a block transmission coding mode, and therefore the vehicle end continuously obtains road perception information data from the cloud host through the data stream channel stream 0.
In some embodiments, after the vehicle-end processing module and the cloud host complete establishing a data stream based on a long connection, a real-time location may be reported to the cloud host at a fixed time interval (e.g., 500ms), the vehicle-end processing module sends location information to the cloud host as an independent data stream, the vehicle-end processing module still obtains road awareness information from the cloud host through a data stream channel stream0, when the location information needs to be reported, for example, the location information changes significantly, or a time interval elapses from last reporting of the location information, the vehicle-end creates a new data stream, for example, stream 1 or stream 2 (respectively corresponding to different HTTP/3 data transmission connections), and sends a new HTTP/3 request to the cloud host through the data stream, where the request may include vehicle location information.
After receiving the HTTP/3 request on the newly created data stream, the cloud host extracts the vehicle position information in the data stream, then returns an HTTP/3 response to the vehicle end processing module through the data stream, the response prompts that the cloud host receives the vehicle position information and informs the vehicle end processing module of closing the data stream immediately after receiving the HTTP/3 response, and after acquiring the latest position information of the vehicle, the cloud host sends road perception information generated according to the latest position information to the vehicle end processing module through a data stream channel stream 0.
In some embodiments, referring to fig. 5, fig. 5 is a data transmission schematic diagram of a communication method applied to a vehicle provided by an embodiment of the present application, in which a vehicle-end processing module of the vehicle requests a cloud host scheduling server to obtain an IP address of a cloud host, the cloud host scheduling server returns the IP address of the cloud host to the vehicle, the vehicle initiates a request for establishing a QUIC connection, and sets a requested connection number to 0, i.e., communication connection0, the cloud host reads the QUIC connection request in the corresponding communication connection0 through a UDP port, the cloud host returns a QUIC connection response to represent that the connection request of the vehicle end is accepted, the vehicle end writes an HTTP/3 request into a certain data stream in the communication connection0 and sets its number to 0, i.e., a data stream0 (corresponding to the first data stream in the foregoing), the vehicle end sends an HTTP/3 request to the cloud host through the UDP port (first network request), the request is packaged in a data stream0, the cloud host reads an HTTP/3 request from the data stream0 to read the real-time position of the vehicle from the HTTP/3 request, the cloud host generates an HTTP/3 response (fourth response message) and sets the data transmission mode as a block transmission code, the cloud host writes the HTTP/3 response into the data stream0 in the communication connection0, the cloud host returns the data stream0 to the vehicle end through a UDP port, and the cloud host generates road perception information according to the vehicle position in the HTTP/3 request and packages the road perception information into block data, the cloud host writes the block data (carried in the first response message) into the data stream0, the vehicle reads the data stream0 returned by the cloud host to read the HTTP/3 response therefrom, and the vehicle receives the block data returned by the cloud host, and extracting the road perception information therein, the vehicle generating new position information, so that the vehicle generates a new HTTP/3 request (second network request) and writes the new position information therein, the vehicle end sends a new HTTP/3 request to the cloud host through the UDP port, the request is encapsulated in the data stream 1 (second data stream channel), the cloud host reads the data stream 1 in the communication connection0 through the UDP port, the cloud host reads the HTTP/3 request from the data stream 1 to read the vehicle position information from the HTTP/3 request, the cloud host generates again an HTTP/3 response (third response message) and writes it into the data stream 1 in the communication connection0, the cloud host returns the data stream of the data stream 1 through the UDP port, the vehicle reads the data stream 1 returned by the cloud host, and reading the HTTP/3 response from the vehicle, closing the data stream channel stream 1 by the vehicle, generating road perception information according to the latest position of the vehicle by the cloud host, packaging the road perception information into block data, writing the block data (carried in a second response message) into the data stream channel stream0 in connection0 by the cloud host, and extracting the road perception information from the block data returned by the cloud host by the vehicle.
The communication method applied to the vehicle provided by the embodiment of the application can provide high-efficiency road perception information push service for the vehicle-road cooperative service in the intelligent networked vehicle, due to the adoption of the UDP-based H TTP/3 protocol for data transmission, the resource consumption of the cloud host is greatly reduced, in the case of an equivalent number of vehicle connections, the vehicle uploads the network request to the server via a plurality of data streams in the communication connection between the vehicle and the server, and the corresponding response message is sent to the vehicle by the server through the fixed data stream in the same communication connection, therefore, data transmission based on multiple data streams in the same communication connection is realized, communication resource consumption and time consumption caused by the fact that different communication connections are established in each data transmission are effectively saved, the utilization rate of the communication resources and the data transmission efficiency are improved, and therefore data transmission overhead generated by real-time updating of the vehicle position is effectively controlled.
Continuing with the exemplary structure provided by the embodiments of the present application implemented as software modules in the vehicle-applied communication device 455, in some embodiments, as shown in fig. 2, the software modules stored in the memory 450 in the vehicle-applied communication device 455 may include: a connection module 4551 configured to establish a communication connection between the vehicle and the server; a communication module 4552, configured to send a first network request of the vehicle to the server based on the first data flow channel in the communication connection, so as to receive a first response message returned by the server based on the first data flow channel; the communication module 4552 is further configured to send a second network request of the vehicle to the server based on the second data flow channel in the communication connection, so as to receive a second response message returned by the server based on the first data flow channel; a management module 4553, configured to close the second data stream channel; wherein; the second network request is a request transmitted at a time later than the first network request, and the first response message and the second response message are used to generate a travel instruction of the vehicle.
In some embodiments, the communication module 4552 is further configured to: in response to establishment of a communication connection between the vehicle and the server, creating a first data flow path carried in the communication connection; sending a first network request to a server through a first data stream channel; wherein the first data stream channel is maintained when idle.
In some embodiments, the communication module 4552 is further configured to: when determining that a second network request needs to be sent to the server, creating a second data stream channel carried in the communication connection; sending a second network request to the server through a second data stream channel; the management module 4553 is further configured to: when the sending completes the second network request, the second data flow path is closed.
In some embodiments, before sending the second network request of the vehicle to the server based on the second data flow channel in the communication connection, the communication module 4552 is further configured to: determining that a second network request needs to be sent when at least one of the following conditions is met: the position of the vehicle changes; the vehicle deviates from the already decided driving route; the vehicle needs to avoid the congested road section ahead.
In some embodiments, the management module 4553 is further configured to: when the second network request is sent and completed and a third response message returned by the server aiming at the second network request is received, responding to the third response message and closing the second data flow channel; wherein the third response message is used for indicating that the second data stream channel is closed.
In some embodiments, the management module 4553 is further configured to: determining a hold time for the second data flow path based on the record of historical network requests for the vehicle; wherein the historical network request is sent prior to the first network request; starting timing from the sending of the second network request, and keeping the second data stream channel in the keeping time; and when the timing reaches the holding time and the second data stream channel is still idle, closing the second data stream channel.
In some embodiments, the management module 4553 is further configured to: extracting transmission times of a plurality of historical network requests from a record of historical network requests of the vehicle to determine transmission time intervals of adjacent historical network requests; determining a transmission time interval as a holding time; wherein the types of the transmission time interval include: maximum transmission time interval, average transmission time interval, minimum transmission time interval.
In some embodiments, the management module 4553 is further configured to: acquiring real-time driving environment data and real-time driving state data of the vehicle to extract real-time driving environment characteristics and real-time driving state characteristics of the vehicle; calling a neural network model to predict a sending time interval based on the real-time driving environment characteristics and the real-time driving state characteristics to serve as the holding time of the second data flow channel; the training sample of the neural network model comprises driving environment data and driving state data, the marking data of the training sample comprises the sending time interval of the historical network request sent in the driving process, and the sending time interval of the historical network request is extracted from the record of the historical network request of the vehicle.
In some embodiments, the communication module 4552 is further configured to: writing the real-time location of the vehicle into the first network request; sending a first network request carrying a real-time position to a server through a first data stream channel; and the real-time position is used for enabling the server to inquire the road data matched with the real-time position and write the road data into the first response message.
In some embodiments, the communication module 4552 is further configured to: writing the target position and the real-time position of the vehicle into the first network request; sending a first network request to a server through a first data stream channel; the target position and the real-time position are used for enabling the server to obtain a driving route from the real-time position to the target position, and the driving route is written into the first response message.
In some embodiments, the communication module 4552 is further configured to: receiving a plurality of block coded data which are sequentially returned by the server based on the first data stream channel; caching the received multiple block coded data according to a receiving sequence; and when the block coded data which is finished is received, decoding the cached block coded data to obtain a first response message.
In some embodiments, before receiving the first response message returned by the server based on the first data stream channel, the communication module 4552 is further configured to: receiving a fourth response message which is returned by the server through the first data stream channel and aims at the first network request; wherein the fourth response message is sent when the server inquires the target data for responding to the first network request, and is used for prompting the following information: the server returns the block coded data of the target data to the vehicle in a block transmission coding mode; the buffer is pre-allocated for block coded data to be received.
In some embodiments, the communication module 4552 is further configured to: acquiring a preset time interval for sending a second network request of the vehicle to the server; when the preset time interval is greater than the first time threshold, a second network request of the vehicle is sent to the server at the preset time interval based on a second data flow channel in the communication connection.
In some embodiments, when the preset time interval is not greater than the first time threshold, the communication module 4552 is further configured to: creating a third data flow path carried in the communication connection in a process of sending a second network request of the vehicle to the server based on the second data flow path in the communication connection; and sending the third network request to the server through the third data stream channel.
In some embodiments, the communication module 4552 is further configured to: starting timing from a second network request to send the vehicle to the server; when the timing time does not exceed a second time threshold, receiving a plurality of second response messages returned by the server based on the first data stream channel; the plurality of second response messages are response messages generated within the timing time according to the second network request.
In some embodiments, the connection module 4551 is further configured to: acquiring a network address of a server; sending a communication connection establishment request based on the network address of the server so as to enable the server to return a connection response corresponding to the communication connection establishment request to the vehicle; wherein the connection response is used to prompt the server that the communication connection establishment request of the vehicle has been accepted.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the communication method applied to the vehicle, which is described in the embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium having stored therein executable instructions that, when executed by a processor, cause the processor to perform a communication method applied to a vehicle as provided by embodiments of the present application, for example, the communication method applied to a vehicle as illustrated in fig. 3A-3D.
The embodiment of the present application provides a vehicle, for example, a vehicle using electric energy, fuel and various hybrid powers, such as an electric vehicle, a fuel vehicle, etc., wherein the communication device applied to the vehicle provided in the embodiment of the present application is provided, the communication device applied to the vehicle may be implemented in a hardware manner, for example, a processor integrated with a communication method applied to the vehicle in a hardware decoding manner; or may be implemented in software, for example, an electronic map program/module/plug-in, an automatic driving program/module/plug-in, etc.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
In summary, according to the embodiments of the present application, through the multiple data streams in the communication connection between the vehicle and the server, the vehicle uploads the network request to the server, and sends the corresponding response message to the vehicle from the server through the fixed data stream in the same communication connection, so that data transmission based on multiple data streams in the same communication connection is implemented, communication resource consumption and time consumption caused by establishing different communication connections for each data transmission are effectively reduced, and communication resource utilization rate and data transmission efficiency are improved.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (15)

1. A communication method applied to a vehicle, characterized in that the method comprises:
establishing a communication connection between the vehicle and the server;
based on a first data flow channel in the communication connection, sending a first network request of the vehicle to the server to receive a first response message returned by the server based on the first data flow channel;
sending a second network request of the vehicle to the server based on a second data flow channel in the communication connection to receive a second response message returned by the server based on the first data flow channel;
closing the second data stream channel;
wherein; the second network request is a request transmitted at a time later than the first network request, and the first response message and the second response message are used to generate a travel instruction of the vehicle.
2. The method of claim 1, wherein sending the first network request of the vehicle to the server based on the first data flow path in the communication connection comprises:
in response to establishment of a communication connection between the vehicle and the server, creating a first data flow path carried in the communication connection;
sending the first network request to the server through the first data stream path;
wherein the first data stream channel is maintained when idle.
3. The method of claim 1, wherein sending a second network request of the vehicle to the server based on a second data flow path in the communication connection comprises:
when determining that the second network request needs to be sent to the server, creating a second data stream channel carried in the communication connection;
sending the second network request to the server through the second data stream path;
the closing the second data stream channel comprises:
closing the second data flow path when the second network request is sent to completion.
4. The method of claim 3, wherein prior to sending the second network request for the vehicle to the server based on the second data flow path in the communication connection, the method further comprises:
determining that the second network request needs to be sent when at least one of the following conditions is met:
a change in position of the vehicle;
the vehicle deviates from the already decided driving route;
the vehicle needs to avoid a congested road section ahead.
5. The method of claim 3, wherein closing the second data flow path when the sending completes the second network request comprises:
when the second network request is sent and completed and a third response message returned by the server for the second network request is received, closing the second data flow channel in response to the third response message;
wherein the third response message is used to indicate that the second data stream channel is closed.
6. The method of claim 1, wherein closing the second data stream channel comprises:
determining a hold time for the second data flow channel based on a record of historical network requests for the vehicle;
wherein the historical network request is sent prior to the first network request;
keeping the second data stream channel for the keeping time from the time when the second network request is sent;
and when the keeping time is reached and the second data stream channel is still idle, closing the second data stream channel.
7. The method of claim 6, wherein determining the hold time for the second data flow path based on the record of historical network requests for the vehicle comprises:
extracting a plurality of transmission times of the historical network requests from the record of the historical network requests of the vehicle to determine adjacent transmission time intervals of the historical network requests;
determining the transmission time interval as the hold time;
wherein the types of the transmission time interval include: maximum transmission time interval, average transmission time interval, minimum transmission time interval.
8. The method of claim 1, wherein sending the first network request of the vehicle to the server based on the first data flow path in the communication connection comprises:
writing the real-time location of the vehicle into the first network request;
sending a first network request carrying the real-time position to the server through the first data stream channel;
wherein the real-time location is used for enabling the server to inquire the road data matched with the real-time location and write the road data into the first response message.
9. The method of claim 1, wherein sending a second network request of the vehicle to the server based on a second data flow path in the communication connection comprises:
obtaining a preset time interval for sending a second network request of the vehicle to the server;
and when the preset time interval is larger than a first time threshold, sending a second network request of the vehicle to the server according to the preset time interval based on a second data flow channel in the communication connection.
10. The method of claim 9, wherein when the preset time interval is not greater than the first time threshold, the method further comprises:
creating a third data flow path carried in the communication connection in the process of sending a second network request of the vehicle to the server based on a second data flow path in the communication connection;
sending a third network request to the server through the third data stream path.
11. The method of claim 1, wherein receiving the second response message returned by the server based on the first data stream channel comprises:
starting timing from a second network request to the server for the vehicle;
when the timing time does not exceed a second time threshold, receiving a plurality of second response messages returned by the server based on the first data stream channel;
wherein the plurality of second response messages are response messages generated within the timing time according to the second network request.
12. A communication device applied to a vehicle, characterized by comprising:
the connection module is used for establishing communication connection between the vehicle and the server;
the communication module is used for sending a first network request of the vehicle to the server based on a first data flow channel in the communication connection so as to receive a first response message returned by the server based on the first data flow channel;
the communication module is further used for sending a second network request of the vehicle to the server based on a second data flow channel in the communication connection so as to receive a second response message returned by the server based on the first data flow channel;
the management module is used for closing the second data stream channel;
wherein; the second network request is a request transmitted at a time later than the first network request, and the first response message and the second response message are used to generate a travel instruction of the vehicle.
13. An electronic device, comprising:
a memory for storing executable instructions;
a processor for implementing the communication method applied to the vehicle of any one of claims 1 to 11 when executing the executable instructions stored in the memory.
14. A computer-readable storage medium storing executable instructions for implementing the communication method applied to a vehicle according to any one of claims 1 to 11 when executed by a processor.
15. A vehicle characterized by being provided with the communication device applied to a vehicle according to claim 12.
CN202011262588.XA 2020-11-12 2020-11-12 Communication method and device applied to vehicle, electronic equipment and vehicle Active CN113411371B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011262588.XA CN113411371B (en) 2020-11-12 2020-11-12 Communication method and device applied to vehicle, electronic equipment and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011262588.XA CN113411371B (en) 2020-11-12 2020-11-12 Communication method and device applied to vehicle, electronic equipment and vehicle

Publications (2)

Publication Number Publication Date
CN113411371A true CN113411371A (en) 2021-09-17
CN113411371B CN113411371B (en) 2024-02-06

Family

ID=77677455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011262588.XA Active CN113411371B (en) 2020-11-12 2020-11-12 Communication method and device applied to vehicle, electronic equipment and vehicle

Country Status (1)

Country Link
CN (1) CN113411371B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710522A (en) * 2022-03-17 2022-07-05 重庆长安汽车股份有限公司 Android platform-based vehicle-mounted network architecture system and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7768939B1 (en) * 2007-01-02 2010-08-03 Juniper Networks, Inc. Network proxy with asymmetric connection connectivity
CN104754003A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 Data transmission method and system
CN104995972A (en) * 2013-02-15 2015-10-21 日本电气株式会社 Mobile communication system, service platform, network-parameter control method, and non- transitory computer-readable medium
CN107135279A (en) * 2017-07-07 2017-09-05 网宿科技股份有限公司 It is a kind of to handle the method and apparatus that request is set up in long connection
CN109461238A (en) * 2018-10-30 2019-03-12 北京摩拜科技有限公司 Control method for vehicle, server, vehicle and Vehicular system
CN110708283A (en) * 2019-08-29 2020-01-17 中国第一汽车股份有限公司 Method and device for processing abnormal connection between vehicle and terminal, vehicle and storage medium
CN111355794A (en) * 2020-02-26 2020-06-30 腾讯科技(深圳)有限公司 Resource determination and vehicle communication method, device, medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7768939B1 (en) * 2007-01-02 2010-08-03 Juniper Networks, Inc. Network proxy with asymmetric connection connectivity
CN104995972A (en) * 2013-02-15 2015-10-21 日本电气株式会社 Mobile communication system, service platform, network-parameter control method, and non- transitory computer-readable medium
CN104754003A (en) * 2013-12-30 2015-07-01 腾讯科技(深圳)有限公司 Data transmission method and system
CN107135279A (en) * 2017-07-07 2017-09-05 网宿科技股份有限公司 It is a kind of to handle the method and apparatus that request is set up in long connection
CN109461238A (en) * 2018-10-30 2019-03-12 北京摩拜科技有限公司 Control method for vehicle, server, vehicle and Vehicular system
CN110708283A (en) * 2019-08-29 2020-01-17 中国第一汽车股份有限公司 Method and device for processing abnormal connection between vehicle and terminal, vehicle and storage medium
CN111355794A (en) * 2020-02-26 2020-06-30 腾讯科技(深圳)有限公司 Resource determination and vehicle communication method, device, medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710522A (en) * 2022-03-17 2022-07-05 重庆长安汽车股份有限公司 Android platform-based vehicle-mounted network architecture system and method
CN114710522B (en) * 2022-03-17 2023-05-26 重庆长安汽车股份有限公司 Vehicle-mounted network architecture system and method based on Android platform

Also Published As

Publication number Publication date
CN113411371B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
CN111147564B (en) Data file transmission method, system and communication terminal
EP4013007B1 (en) Vehicle-road cooperation apparatus and method, electronic device and storage medium
CN113473651B (en) Communication system and communication method for providing wireless terminal with access to IP network
CN112804661B (en) Map data transmission method, system, edge server and storage medium
CN112613024B (en) Data interaction method, device, system and storage medium
CN108234149B (en) Network request management method and device
CN110708682B (en) Vehicle-ground data communication method and device, computer equipment and storage medium
US20190297474A1 (en) Connecting and managing vehicles using a publish-subscribe system
CN111897492B (en) Data processing method and device based on block device driver and electronic device
CN112492052A (en) Remote debugging method and device for intelligent networked vehicle data
CN113411371B (en) Communication method and device applied to vehicle, electronic equipment and vehicle
KR20140060132A (en) Method and apparatus for providing a web service in a wireless communication system
CN112907942A (en) Vehicle scheduling method, device, equipment and medium based on edge calculation
US10849075B2 (en) Method and device for allocation of transmission power and terminal
CN111163453A (en) Emergency vehicle response method and equipment
WO2024001266A1 (en) Video stream transmission control method and apparatus, device, and medium
Herrera-Quintero et al. ITS for Smart Parking Systems, towards the creation of smart city services using IoT and cloud approaches
CN114679420A (en) Intelligent Internet of vehicles, data processing method, electronic equipment and storage medium
CN115348333B (en) Data transmission method, system and equipment based on UDP double-end communication interaction
WO2017206560A1 (en) Device to device (d2d) communication method and apparatus, and vehicle networking terminal
Bansal et al. Enhancing constrained application protocol using message options for internet of things
CN107231567B (en) Message transmission method, device and system
US11171806B1 (en) Dynamic quality of service control for automotive ethernet
CN114489730A (en) Remote upgrading method, terminal equipment and computer readable storage medium
Wen et al. An Efficient Data Acquisition System for Large Numbers of Various Vehicle Terminals

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40052341

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant