Background
When a plurality of vehicles travel together, communication between the vehicles is sometimes required, for example, communication between the vehicles is performed, or data is transmitted between the vehicles. In the prior art, a communication tool in a mobile phone is used for communication, and when a user takes the mobile phone in a vehicle, the vehicle communicates with the mobile phone of the user. However, this communication method is based on a mobile phone carried by a user, and a call can be made between vehicles only when the user is in the vehicle. The inventor of the present application finds in implementing the present invention that the above-mentioned solution of the prior art has a drawback that when a user is not in the vehicle, or the user changes the riding vehicle, the communication between the vehicles cannot be normally performed. Therefore, it is necessary to provide a communication method based on a vehicle.
Disclosure of Invention
It is an object of embodiments of the present invention to provide a method and apparatus for inter-vehicle communication that addresses the above technical problems, or at least partially addresses the above technical problems.
In order to achieve the above object, an embodiment of the present invention provides a method for inter-vehicle communication, which is used for a client of a first vehicle, and includes: receiving an instruction to select a second vehicle as a conversation object; determining the position information of the second vehicle and the current position information of the first vehicle, and generating a session connection request comprising the position information of the first vehicle, the position information of the second vehicle and the current time; sending the session connection request to a server; receiving a session establishment notification sent by a server, wherein the session establishment notification comprises a first identifier allocated to a first vehicle and a second identifier allocated to a second vehicle for a session requested to be established, and indicates that a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is established; communicating with a second vehicle using the established session connection between the first identification of the first vehicle and the second identification of the second vehicle.
Optionally, the method further includes: receiving an instruction for ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle; generating a session end notification for ending the session connection between the first identification of the first vehicle and the second identification of the second vehicle; sending the session completion notification to the server and the second vehicle, respectively; receiving an acknowledgement message of the server and the second vehicle for the session end notification; the session connection between the first identification of the first vehicle and the second identification of the second vehicle is ended.
Optionally, the method further includes: receiving a conversation ending notice sent by the second vehicle for ending the conversation connection between the first identification of the first vehicle and the second identification of the second vehicle; sending an acknowledgement message for the session end notification to the second vehicle; and ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle according to the session ending notice.
Optionally, the method further includes: receiving a request sent by a server for establishing session connection with a third vehicle; receiving an instruction to allow a session connection with a third vehicle; generating a response for accepting the request according to the instruction for allowing the session connection with the third vehicle; and sending the response of the acceptance request to the server.
Optionally, the method further includes: receiving a session establishment notification sent by the server, wherein the session establishment notification comprises a fourth identifier allocated to the first vehicle and a third identifier allocated to a third vehicle for the session requested to be established, and indicates that a session between the fourth identifier of the first vehicle and the third identifier of the third vehicle is established; communicating with a third vehicle using the established session connection between the fourth identification of the first vehicle and the third identification of the third vehicle.
According to another aspect of the present invention, there is provided a method of inter-vehicle communication for a server, the method including: receiving a session connection request sent by a first vehicle, wherein the session connection request comprises position information of the first vehicle, position information of a second vehicle and current time; sending a request to the second vehicle to establish a session connection with the first vehicle; receiving a response of the acceptance request sent by the second vehicle; generating a first identifier allocated to the first vehicle and a second identifier allocated to the second vehicle for the session requested to be established according to the position information of the first vehicle, the position information of the second vehicle and the current time; and sending a session establishment notification to the first vehicle and the second vehicle respectively, wherein the session establishment notification comprises a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle, and indicates that a session connection is established between the first identifier of the first vehicle and the second identifier of the second vehicle.
Optionally, the method further includes: receiving a session end notification for ending a session connection between a first identification of the first vehicle and a second identification of the second vehicle from the first vehicle or the second vehicle; releasing the first identifier assigned to the first vehicle and the second identifier assigned to the second vehicle according to the session end notification; sending an acknowledgement message to the first vehicle or the second vehicle in response to the session end notification.
Optionally, the method further includes: and after receiving the notification of the session ending, releasing the storage space for storing the related information of the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle.
According to another aspect of the present invention, there is provided an apparatus for inter-vehicle communication for a client of a first vehicle, the apparatus comprising: the input module is used for receiving an instruction of selecting a second vehicle as a conversation object; the processing module is used for determining the position information of the second vehicle and the current position information of the first vehicle and generating a session connection request comprising the position information of the first vehicle, the position information of the second vehicle and the current time; a sending module, configured to send the session connection request to a server; a receiving module, configured to receive a session establishment notification sent by a server, where the session establishment notification includes a first identifier assigned to a first vehicle and a second identifier assigned to a second vehicle for a session requested to be established, and indicates that a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is established; the processing module is further configured to communicate with a second vehicle using the established session connection between the first identification of the first vehicle and the second identification of the second vehicle.
Optionally, the input module is further configured to receive an instruction to end a session connection between a first identifier of the first vehicle and a second identifier of the second vehicle; the processing module is further configured to generate a session end notification for ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle; the sending module is further configured to send the session completion notification to the server and the second vehicle, respectively; the receiving module is further configured to receive an acknowledgement message of the server and the second vehicle for the session end notification; the processing module is further configured to end the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle.
Optionally, the receiving module is further configured to receive a session end notification that ends a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle, where the session end notification is sent by the second vehicle; the sending module is further configured to send an acknowledgement message for the session end notification to the second vehicle; the processing module is further used for ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle according to the session ending notice.
Optionally, the receiving module is further configured to receive a request sent by the server to establish a session connection with a third vehicle; the input module is further used for receiving an instruction for allowing conversation connection with a third vehicle; the processing module is further used for generating a response for accepting the request according to the instruction for allowing the conversation connection with the third vehicle; the sending module is further configured to send a response to the request acceptance to the server.
Optionally, the receiving module is further configured to receive a session establishment notification sent by the server, where the session establishment notification includes a fourth identifier assigned to the first vehicle and a third identifier assigned to the third vehicle for the session requested to be established, and indicates that a session between the fourth identifier of the first vehicle and the third identifier of the third vehicle is established; the processing module is further configured to communicate with a third vehicle using the established session connection between the fourth identification of the first vehicle and the third identification of the third vehicle.
According to still another aspect of the present invention, there is provided an apparatus for inter-vehicle communication, for a server, the apparatus including: the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a conversation connection request sent by a first vehicle, and the conversation connection request comprises the position information of the first vehicle, the position information of a second vehicle and the current time; a sending module, configured to send a request for establishing a session connection with a first vehicle to the second vehicle; the receiving module is further used for receiving a response of the acceptance request sent by the second vehicle; the processing module is used for generating a first identifier distributed to the first vehicle and a second identifier distributed to the second vehicle aiming at the session requested to be established according to the position information of the first vehicle, the position information of the second vehicle and the current time; the sending module is further configured to send a session establishment notification to the first vehicle and the second vehicle, respectively, where the session establishment notification includes a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle, and indicates that a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is established.
Optionally, the receiving module is further configured to receive, from the first vehicle or the second vehicle, a session end notification for ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle; the processing module is further used for releasing the first identifier distributed to the first vehicle and the second identifier distributed to the second vehicle according to the conversation end notification; the sending module is further configured to send a confirmation message to the first vehicle or the second vehicle in response to the session end notification.
Optionally, the processing module is further configured to release a storage space used for storing the relevant information of the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle after receiving the notification of the session completion.
Through the technical scheme, the server allocates the identifiers for the vehicles for conversation, the conversation connection is established among the vehicles by using the allocated identifiers, and the vehicles communicate by using the conversation connection, so that the vehicles can communicate on the basis of the vehicles without depending on an external user carrying a mobile phone for communication, and dependence on the user is eliminated.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
Example one
Fig. 1 is a flowchart of a method of inter-vehicle communication according to an embodiment of the present invention, which may be used for a client of a vehicle, such as a vehicle event recorder in the vehicle, a central control system of the vehicle, and the like. In this embodiment, taking the method as an example for being used in a client in a first vehicle, as shown in fig. 1, the method may include the following steps.
In step S110, an instruction to select the second vehicle as the conversation object is received.
For example, a map may be displayed in the screen of the vehicle, with icons of nearby vehicles marked in the map. When the user clicks an icon of a certain vehicle, for example, a second vehicle, in the map displayed on the screen, the client receives an input instruction to select the second vehicle as a conversation object.
In step S120, the location information of the second vehicle and the current location information of the first vehicle are determined, and a session connection request including the location information of the first vehicle, the location information of the second vehicle, and the current time is generated.
For example, after receiving an input instruction to select a second vehicle as a session object, the client reads the location information of the second vehicle from a map, determines the location information of the first vehicle by using a Global Positioning System (GPS), and reads the current time from a clock of a System in which the client is located. Thereafter, the obtained position information of the first vehicle, the position information of the second vehicle, and the current time are packaged as data into the session connection request.
In step S130, a session connection request is transmitted to the server.
For example, the client may send the session connection request to the server through various wireless communication networks, such as a cellular network or a wireless local area network. The server may receive the position information of the respective vehicles in real time and distribute the position information of the vehicles to the respective vehicles so that the positions of nearby vehicles may be displayed in a map in the vehicles. Also, the server records a communication address, such as an IP address, of each vehicle. Therefore, after receiving the session connection request sent by the first vehicle, the server searches the IP address of the second vehicle through the position of the second vehicle, and sends the request for establishing session connection with the first vehicle to the second vehicle. And after receiving a response of accepting the request sent by the second vehicle, the server generates a first identifier distributed to the first vehicle and a second identifier distributed to the second vehicle for the session established by the request according to the position information of the first vehicle, the position information of the second vehicle and the current time. The server packages a first identification distributed to the first vehicle and a second identification distributed to the second vehicle into the session establishment notification, and carries information in the session establishment notification to indicate that session connection between the first identification of the first vehicle and the second identification of the second vehicle is established. The session establishment notification may also carry respective IP addresses of the first vehicle and the second vehicle for use in subsequent communications.
In step S140, a session establishment notification sent by the server is received.
The session establishment notification includes a first identification assigned to the first vehicle and a second identification assigned to the second vehicle for the session requested to be established and indicates that a session connection is established between the first identification of the first vehicle and the second identification of the second vehicle.
After receiving the conversation establishment notification, the client analyzes a first identifier distributed to the first vehicle and a second identifier distributed to the second vehicle from the conversation establishment notification, and determines that conversation connection is established between the first vehicle and the second vehicle, wherein the conversation connection uses the first identifier and the second identifier. A plurality of session connections may be established between the first vehicle and the second vehicle, each session connection corresponding to a different vehicle identification. For example, when a voice call is performed between the first vehicle and the second vehicle, the session connection corresponding to the first identifier and the second identifier is used. The first vehicle may further establish another session connection with the second vehicle at different times in the above manner, for example, perform data sharing using the session connection, and at this time, the server may assign another group identifier for the session connection to the first vehicle and the second vehicle, for example, assign a fifth identifier to the first vehicle and assign a sixth identifier to the second vehicle. The session connection for data sharing corresponds to the fifth identification and the sixth identification.
In step S150, communication is performed with the second vehicle using the established session connection between the first identity of the first vehicle and the second identity of the second vehicle.
As such, the first vehicle and the second vehicle communicate with the second vehicle using the session connection corresponding to the first identification and the second identification.
Through the technical scheme, communication can be carried out based on the vehicle, communication is carried out without depending on an external user carrying a mobile phone, and dependence on the user is eliminated.
Example two
In the present embodiment, the first vehicle actively initiates the end of communication, as shown in fig. 2, and the method may include the following steps.
In step S202, an instruction to end a session connection between a first identifier of a first vehicle and a second identifier of a second vehicle is received.
In step S204, a session end notification for ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is generated.
In step S206, the session end notification is transmitted to the server and the second vehicle, respectively.
At step S208, a confirmation message of the server and the second vehicle for the session end notification is received.
In step S210, the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is ended.
For example, when a session connection between a first identifier of a first vehicle and a second identifier of a second vehicle is established, the client displays an end button for the session connection in the screen, and when the user clicks the end button, an instruction to end the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is received. And then, the client generates a session ending notice carrying the first identifier and the second identifier, and sends the session ending notice to the server and the second vehicle. After receiving the conversation end notification, the server and the second vehicle analyze a first identifier of the first vehicle and a second identifier of the second vehicle, end the conversation connection between the first identifier of the first vehicle and the second identifier of the second vehicle, and send a confirmation message to the first vehicle. And after receiving the confirmation message, the first vehicle ends the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle.
Through the technical scheme, the first vehicle can respond to the user instruction to finish the conversation.
EXAMPLE III
In this embodiment, the end of communication is actively initiated by the second vehicle, and the first vehicle responds to the end of communication initiated by the second vehicle. As shown in fig. 3, the method may further include the following steps.
In step S302, a session end notification that ends a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle, which is transmitted by the second vehicle, is received.
In step S304, a confirmation message for the session end notification is transmitted to the second vehicle.
In step S306, the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is ended according to the session end notification.
For example, in the present embodiment, the second vehicle actively initiates the end of communication, and the first vehicle receives the session end notification sent by the second vehicle. And responding to the received conversation ending notice, the first vehicle replies a confirmation message to the second vehicle, and ends the conversation connection between the first identification of the first vehicle and the second identification of the second vehicle, and releases the resources used for the conversation connection.
Through the technical scheme, the first vehicle can respond to the session termination initiated by the second vehicle to terminate the session.
Example four
In this embodiment, session establishment is initiated by the third vehicle, to which the first vehicle responds. As shown in fig. 4, the method may include the following steps.
In step S402, a request sent by the server to establish a session connection with the third vehicle is received.
In step S404, an instruction to permit a session connection with the third vehicle is received.
In step S406, a response to accept the request is generated in accordance with the instruction to permit the session connection with the third vehicle.
In step S408, a response to accept the request is sent to the server.
For example, the third vehicle sends a session connection request to the server, and after receiving the session connection request, the server searches for relevant information of the third vehicle, packages the relevant information of the third vehicle into the request for establishing session connection with the third vehicle, and sends the request to the first vehicle. The first vehicle displays relevant information of the third vehicle, such as the current position of the third vehicle, a registered account, account identity information and the like, and pops up a button for accepting or not accepting the request, if a user clicks the button for accepting the request, the client receives an instruction for allowing session connection with the third vehicle, the client generates a response for accepting the request according to the instruction for allowing session connection with the third vehicle, and sends the response for accepting the request to the server.
Embodiment five, as shown in fig. 5, the method may further include the following steps.
In step S502, a session establishment notification sent by the server is received.
The session establishment notification includes a fourth identification assigned to the first vehicle and a third identification assigned to the third vehicle for the session requested to be established, and indicates that a session is established between the fourth identification of the first vehicle and the third identification of the third vehicle.
In step S504, a communication is made with the third vehicle using the established session connection between the fourth identification of the first vehicle and the third identification of the third vehicle.
For example, after receiving a response sent by the first vehicle to accept the request, the server generates a fourth identifier assigned to the first vehicle and a third identifier assigned to the third vehicle for the session established for the request. And the server packages the fourth identifier distributed to the first vehicle and the third identifier distributed to the third vehicle into the session establishment notification, and carries information in the session establishment notification to indicate that session connection between the fourth identifier of the first vehicle and the third identifier of the third vehicle is established. And the first vehicle receives the conversation establishment notice, analyzes a fourth identification distributed to the first vehicle and a third identification distributed to the third vehicle, and determines that the conversation between the fourth identification of the first vehicle and the third identification of the third vehicle is established. The first vehicle then communicates with the third vehicle using the established session connection between the fourth identification of the first vehicle and the third identification of the third vehicle.
Through the technical scheme, the first vehicle responds to the session connection request of the third vehicle, establishes session connection with the third vehicle and communicates with the third vehicle by using the session connection.
EXAMPLE six
FIG. 6 is a flow chart of a method for inter-vehicle communication of a server according to an embodiment of the present invention. As shown in fig. 6, the method may include the following steps.
In step S610, a session connection request sent by a first vehicle is received.
Wherein the session connection request includes location information of the first vehicle, location information of the second vehicle, and a current time.
In step S620, a request to establish a session connection with the first vehicle is sent to the second vehicle.
In step S630, a response to the acceptance request sent by the second vehicle is received.
In step S640, a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle for the session requested to be established are generated based on the location information of the first vehicle, the location information of the second vehicle, and the current time.
In step S650, session establishment notifications are transmitted to the first vehicle and the second vehicle, respectively.
Wherein the session establishment notification includes a first identification assigned to the first vehicle and a second identification assigned to the second vehicle and indicates that a session connection is established between the first identification of the first vehicle and the second identification of the second vehicle.
EXAMPLE seven
FIG. 7 is a flow chart of a method for inter-vehicle ending communications for a server according to an embodiment of the present invention; as shown in fig. 7, the method may include the following steps.
In step S702, a session end notification for ending a session connection between a first identifier of the first vehicle and a second identifier of the second vehicle is received from the first vehicle or the second vehicle.
In step S704, the first identifier assigned to the first vehicle and the second identifier assigned to the second vehicle are released according to the session end notification.
In step S706, in response to the session end notification, a confirmation message is transmitted to the first vehicle or the second vehicle.
Further, the method further comprises: and after receiving the notification of the session ending, releasing the storage space for storing the related information of the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle.
The method used in the server in the sixth embodiment and the seventh embodiment corresponds to the method used in the client, and for specific implementation, reference may be made to the detailed description of the method used in the client, which is not described herein again.
Fig. 8 is a flow chart of a method of inter-vehicle communication according to an implementation scenario in which a first vehicle and a second vehicle may be connected to a server over a network, respectively, and the first vehicle and the second vehicle will have a wireless network present. As shown in fig. 8, the method may include the following steps.
In step S802, the client in the first vehicle receives an instruction to select the second vehicle as the conversation object. In step S804, the client in the first vehicle determines the location information of the second vehicle and the current location information and current time of the first vehicle, and generates a session connection request, where the session connection request includes the location information of the first vehicle, the location information of the second vehicle and the current time. In step S806, the client in the first vehicle sends a session connection request to the server. In step S808, the server receives a session connection request sent by the first vehicle. In step S810, the server transmits a request for establishing a session connection with the first vehicle to the second vehicle. In step S812, the client in the second vehicle receives the request sent by the server to establish the session connection with the first vehicle. In step S814, the client in the second vehicle receives an instruction to allow a session connection with the first vehicle. In step S816, the client in the second vehicle generates a response accepting the request according to the instruction to allow the session connection with the first vehicle. In step S818, the client in the second vehicle transmits a response to the server to accept the request. In step S820, the server receives a response of the acceptance request transmitted by the second vehicle. In step S822, the server generates a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle for the session requested to be established, based on the location information of the first vehicle, the location information of the second vehicle, and the current time. In step S824, the server transmits a session establishment notification to the first vehicle and the second vehicle, respectively, the session establishment notification including a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle, and indicating that a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is established. In step S826, the client of the first vehicle receives the session establishment notification transmitted by the server. In step S828, the client of the first vehicle communicates with the second vehicle using the established first inter-identification session connection of the first vehicle and the second inter-identification session connection of the second vehicle. In step S830, the client of the second vehicle receives the session establishment notification transmitted by the server. In step S832, the client of the second vehicle communicates with the first vehicle using the established first identification of the first vehicle and the established second inter-identification session connection of the second vehicle.
The above embodiments are intended to illustrate the technical solutions of the present invention, and are not intended to limit the scope of the present invention.
Fig. 9 is a structural diagram of an apparatus for inter-vehicle communication according to an embodiment of the present invention, which can be used for a client of a vehicle, such as a drive recorder in the vehicle, a central control system of the vehicle, and the like. In this embodiment, taking the method applied to the client in the first vehicle as an example, as shown in fig. 9, the apparatus may include the following modules.
An input module 910, configured to receive an instruction to select a second vehicle as a session object;
a processing module 920, configured to determine location information of the second vehicle and current location information of the first vehicle, and generate a session connection request including the location information of the first vehicle, the location information of the second vehicle, and a current time;
a sending module 930, configured to send the session connection request to a server;
a receiving module 940, configured to receive a session establishment notification sent by the server, where the session establishment notification includes a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle for the session requested to be established, and indicates that a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is established;
the processing module 920 is further configured to communicate with the second vehicle using the established session connection between the first identity of the first vehicle and the second identity of the second vehicle.
In an alternative embodiment, the input module 910 is further configured to receive an instruction to end the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle; the processing module 920 is further configured to generate a session ending notification for ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle; the sending module 930 is further configured to send the session ending notification to the server and the second vehicle, respectively; the receiving module 940 is further configured to receive an acknowledgement message of the server and the second vehicle for the session end notification; the processing module 920 is further configured to end the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle.
In an optional embodiment, the receiving module 940 is further configured to receive a session ending notification sent by the second vehicle to end the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle; the sending module 930 is further configured to send an acknowledgement message for the session end notification to the second vehicle; the processing module 920 is further configured to end the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle according to the session end notification.
In an alternative embodiment, the receiving module 940 is further configured to receive a request sent by the server to establish a session connection with a third vehicle; the input module 910 is further configured to receive an instruction to allow a session connection with a third vehicle; the processing module 920 is further configured to generate a response to accept the request according to the instruction to allow the session connection with the third vehicle; the sending module 930 is further configured to send the response of the acceptance request to the server.
In an alternative embodiment, the receiving module 940 is further configured to receive a session establishment notification sent by the server, where the session establishment notification includes a fourth identifier assigned to the first vehicle and a third identifier assigned to the third vehicle for the session requested to be established, and indicates that a session between the fourth identifier of the first vehicle and the third identifier of the third vehicle is established; the processing module 920 is further configured to communicate with a third vehicle using the established session connection between the fourth identification of the first vehicle and the third identification of the third vehicle.
The above device corresponds to the above method, and the detailed description of the specific embodiments can be found in the method, which is not repeated herein.
Through the technical scheme, communication can be carried out based on the vehicle, communication is carried out without depending on an external user carrying a mobile phone, and dependence on the user is eliminated.
Fig. 10 is a structural diagram of an apparatus for inter-vehicle communication of a server according to an embodiment of the present invention. As shown in fig. 10, the apparatus may include the following modules.
A receiving module 1010, configured to receive a session connection request sent by a first vehicle, where the session connection request includes location information of the first vehicle, location information of a second vehicle, and a current time;
a sending module 1020, configured to send a request to the second vehicle to establish a session connection with the first vehicle;
the receiving module 1010 is further configured to receive a response of the acceptance request sent by the second vehicle;
a processing module 1030 configured to generate a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle for the session requested to be established, according to the location information of the first vehicle, the location information of the second vehicle, and the current time;
the sending module 1020 is further configured to send a session establishment notification to the first vehicle and the second vehicle, respectively, where the session establishment notification includes a first identifier assigned to the first vehicle and a second identifier assigned to the second vehicle, and indicates that a session connection between the first identifier of the first vehicle and the second identifier of the second vehicle is established.
In an alternative embodiment, the receiving module 1010 is further configured to receive a session ending notification for ending the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle from the first vehicle or the second vehicle; the processing module 1030 is further configured to release the first identifier assigned to the first vehicle and the second identifier assigned to the second vehicle according to the session end notification; the sending module 1020 is further configured to send a confirmation message to the first vehicle or the second vehicle in response to the session end notification.
In an alternative embodiment, the processing module 1030 is further configured to release a storage space for storing the relevant information of the session connection between the first identifier of the first vehicle and the second identifier of the second vehicle after receiving the notification of the end of the session.
The above device corresponds to the above method, and the detailed description of the specific embodiments can be found in the method, which is not repeated herein.
Through the technical scheme, communication can be carried out based on the vehicle, communication is carried out without depending on an external user carrying a mobile phone, and dependence on the user is eliminated.
Although the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solutions of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, the embodiments of the present invention do not describe every possible combination.
Those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a (may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, any combination of various different implementation manners of the embodiments of the present invention is also possible, and the embodiments of the present invention should be considered as disclosed in the embodiments of the present invention as long as the combination does not depart from the spirit of the embodiments of the present invention.