CN114205813A - Method and device for adding friends, electronic equipment and readable storage medium - Google Patents

Method and device for adding friends, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114205813A
CN114205813A CN202111468541.3A CN202111468541A CN114205813A CN 114205813 A CN114205813 A CN 114205813A CN 202111468541 A CN202111468541 A CN 202111468541A CN 114205813 A CN114205813 A CN 114205813A
Authority
CN
China
Prior art keywords
vehicle
mounted terminal
communication connection
terminal
request
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.)
Pending
Application number
CN202111468541.3A
Other languages
Chinese (zh)
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.)
Apollo Zhilian Beijing Technology Co Ltd
Apollo Zhixing Technology Guangzhou Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Apollo Zhixing Technology Guangzhou 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 Apollo Zhilian Beijing Technology Co Ltd, Apollo Zhixing Technology Guangzhou Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN202111468541.3A priority Critical patent/CN114205813A/en
Publication of CN114205813A publication Critical patent/CN114205813A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Abstract

The disclosure provides a method and a device for adding friends, electronic equipment and a readable storage medium, relates to the technical field of car networking and intelligent cabins, and particularly relates to the technical field of car machine interconnection. The specific implementation scheme is as follows: sending a communication connection request to a second vehicle-mounted terminal, and enabling the second vehicle-mounted terminal to respond to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal; and obtaining friend request information from the first mobile terminal, sending the friend request information to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.

Description

Method and device for adding friends, electronic equipment and readable storage medium
Technical Field
The disclosure relates to the technical field of car networking and intelligent cabins, in particular to the technical field of car interconnection, and particularly relates to a method and device for adding friends, electronic equipment and a readable storage medium.
Background
With the rapid development of terminal technology, the vehicle-mounted terminal on the vehicle is more and more popular, and the functions realized by the vehicle-mounted terminal are more and more abundant.
However, the existing vehicle-mounted terminal generally does not have a social function, and cannot meet the social requirement of the user in a vehicle-mounted scene.
Disclosure of Invention
In order to solve at least one of the above drawbacks, the present disclosure provides a method, an apparatus, an electronic device, and a readable storage medium for adding a friend.
According to a first aspect of the present disclosure, there is provided a method of adding a friend, the method comprising:
sending a communication connection request to a second vehicle-mounted terminal, and enabling the second vehicle-mounted terminal to respond to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal;
and obtaining friend request information from the first mobile terminal, sending the friend request information to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information.
According to a second aspect of the present disclosure, there is provided another method for adding a friend, the method including:
in response to receiving a communication connection request sent by a first vehicle-mounted terminal, establishing communication connection with the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from a first mobile terminal;
and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information.
According to a third aspect of the present disclosure, there is provided an apparatus for adding a friend, the apparatus comprising:
the communication connection request module is used for sending a communication connection request to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal responds to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal;
and the friend request module is used for acquiring friend request information from the first mobile terminal, sending the friend request information to the second vehicle-mounted terminal, enabling the second vehicle-mounted terminal to send the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information.
According to a fourth aspect of the present disclosure, there is provided another apparatus for adding a friend, the apparatus including:
the communication connection module is used for responding to a received communication connection request sent by the first vehicle-mounted terminal, establishing communication connection with the first vehicle-mounted terminal and enabling the first vehicle-mounted terminal to acquire friend request information from the first mobile terminal;
and the friend request processing module is used for responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information.
According to a fifth aspect of the present disclosure, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of adding buddies.
According to a sixth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the above method of adding a friend.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above method of adding buddies.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flowchart of a method for adding a friend according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another method for adding a friend according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a specific implementation manner of a method for adding a friend according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a device for adding friends according to the present disclosure;
fig. 5 is a schematic structural diagram of another friend adding device provided in accordance with the present disclosure;
fig. 6 is a block diagram of an electronic device for implementing a method of adding a friend according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The traditional social contact application program generally initiates a request for adding friends in a code scanning mode or a user account number input mode to realize a social contact function, but the mode is complicated and is not suitable for a vehicle-mounted scene. In the related art, a way of adding friends by acquiring information of nearby owners exists, but in this way, the requirement on the vehicle-mounted terminal is high because the network of the vehicle-mounted terminal and the support of the positioning function are required.
The method, the device, the electronic device and the readable storage medium for adding the friend provided by the embodiment of the application aim to solve at least one of the above technical problems in the prior art.
Fig. 1 shows a schematic flow chart of a method for adding a friend according to an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes:
step S110: sending a communication connection request to a second vehicle-mounted terminal, and enabling the second vehicle-mounted terminal to respond to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal;
step S120: and obtaining friend request information from the first mobile terminal, sending the friend request information to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information.
The first mobile terminal and the second mobile terminal can be mobile phones, tablet computers and the like.
The first mobile terminal is pre-connected with the first vehicle-mounted terminal, the second mobile terminal is pre-connected with the second vehicle-mounted terminal, and the connection mode of the first mobile terminal with the first vehicle-mounted terminal mobile terminal and the connection mode of the second mobile terminal with the second vehicle-mounted terminal can adopt wired connection or wireless connection.
In the embodiment of the present disclosure, a user using the first mobile terminal and the first in-vehicle terminal may be regarded as a first user, and a user using the second mobile terminal and the second in-vehicle terminal may be regarded as a second user.
When the first user has a requirement for social contact with the second user, the first vehicle-mounted terminal can be operated to send a request for establishing communication connection to the second vehicle-mounted terminal, and the second vehicle-mounted terminal establishes communication connection with the first vehicle-mounted terminal in response to receiving the request for establishing communication connection sent by the first vehicle-mounted terminal, so that communication between the first vehicle-mounted terminal and the second vehicle-mounted terminal is achieved.
The first user can submit the friend related information through the first mobile terminal, and after the second vehicle-mounted terminal establishes the communication connection with the first vehicle-mounted terminal, the first vehicle-mounted terminal can acquire the friend related information from the first mobile terminal and send friend request information to the second vehicle-mounted terminal.
After receiving the friend request information, the second vehicle-mounted terminal can send the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information.
The second mobile terminal can display a friend request verification interface to the second user according to the friend request information, and the second user can agree to add friends or refuse to add friends on the friend request verification interface. If the second user agrees to add the friend, the first user and the second user become friends and can communicate with each other through the first mobile terminal and the second mobile terminal.
According to the method provided by the embodiment of the disclosure, the second vehicle-mounted terminal responds to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal by sending the communication connection request to the second vehicle-mounted terminal; acquiring friend request information from a first mobile terminal; and sending the friend request information to a second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to a second mobile terminal, and the second mobile terminal processes the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.
In the embodiment of the disclosure, the friend request information may include the user identifier of the first user, so that the second mobile terminal can complete the operation of adding a friend based on the user identifier of the first user.
As an example, the friend request information may further include message information of the added friend, such as a message in a text form or a message in a voice form.
As an example, the second mobile terminal may generate a friend request verification interface based on the friend request information and display the friend request verification interface to the second user, where the friend request verification interface may display the user identifier of the first user, the message information of the added friend, and the like, and the second user may perform an operation of agreeing to add the friend or an operation of rejecting the addition of the friend on the friend request verification interface. For example, clicking a control corresponding to the operation of agreeing to add the friend or clicking a control corresponding to the operation of refusing to add the friend.
In the embodiment of the present disclosure, the communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal may include, but is not limited to, a wireless fidelity (WiFi) direct communication connection, a bluetooth communication connection, and a WiFi hotspot communication connection.
In an optional manner of the present disclosure, if the communication connection request is a WiFi direct connection request and the communication connection is a WiFi direct connection communication connection, before sending the communication connection request to the second vehicle-mounted terminal, the method further includes:
searching candidate vehicle-mounted terminals allowing to establish WiFi direct connection communication connection;
and determining a second vehicle-mounted terminal in the candidate vehicle-mounted terminals based on the selection operation of the first user on the candidate vehicle-mounted terminals.
In the embodiment of the disclosure, the first vehicle-mounted terminal and the second vehicle-mounted terminal can be in WiFi direct connection communication connection. WiFi directly links communication connection's connection distance is great, more can satisfy the demand under the on-vehicle scene.
The first user can start a WiFi direct connection function of the first vehicle-mounted terminal, the first vehicle-mounted terminal searches for candidate vehicle-mounted terminals allowing WiFi direct connection communication connection to be established and displays the candidate vehicle-mounted terminals to the first user, the first user can select from the candidate vehicle-mounted terminals, the first vehicle-mounted terminal determines a second vehicle-mounted terminal from the candidate vehicle-mounted terminals based on selection operation of the first user on the candidate vehicle-mounted terminals, and then a WiFi direct connection request can be sent to the second vehicle-mounted terminal.
In an optional manner of the present disclosure, searching for a candidate vehicle-mounted terminal that allows establishing a WiFi direct communication connection includes:
searching for an initial vehicle-mounted terminal allowing the establishment of WiFi direct connection communication connection;
and determining candidate vehicle-mounted terminals from the initial vehicle-mounted terminals based on the WiFi direct connection identification of the initial vehicle-mounted terminals.
In the embodiment of the disclosure, the WiFi direct connection identifier may be generated for the vehicle-mounted terminal based on a preconfigured rule in the WiFi direct connection function.
As one example, the WiFi direct identification may include, but is not limited to, at least one of the following information:
identification information corresponding to the vehicle-mounted application program;
identification information of the belonging vehicle;
characteristic information of the belonging vehicle;
and the user self-defines the identification information.
The identification information corresponding to the vehicle-mounted application program may be a program name of the vehicle-mounted application program deployed in the vehicle-mounted terminal, the identification information of the vehicle may be a model of the vehicle, and the like, the characteristic information of the vehicle may include information such as a color of the vehicle, and the user-defined identification information may be configured individually by a user. In actual use, the identification information of the vehicle-mounted application program, the identification information of the vehicle, the characteristic information of the vehicle and the user-defined identification information can be combined according to a preset sequence to obtain the WiFi direct connection identification.
The initial vehicle-mounted terminals searched out by the first vehicle-mounted terminal can be all vehicle-mounted terminals supporting the WiFi direct connection function, and then candidate vehicle-mounted terminals with the appointed vehicle-mounted application programs can be screened out from the initial vehicle-mounted terminals. As an example, the WiFi direct connection identifier includes vehicle-mounted application identifier information, and the vehicle-mounted application identifier information may determine whether the initial vehicle-mounted terminal deploys the specified vehicle-mounted application, so as to screen out the candidate vehicle-mounted terminal where the specified vehicle-mounted application is deployed.
In an optional mode of the present disclosure, obtaining a selection operation of a first user on a candidate vehicle-mounted terminal includes:
displaying WiFi direct connection identification of the candidate vehicle-mounted terminal;
and detecting the selection operation of the first user on the candidate vehicle-mounted terminal based on the WiFi direct connection identification of the candidate vehicle-mounted terminal.
In the embodiment of the disclosure, the WiFi direct connection identifiers of the candidate vehicle-mounted terminals can be displayed, for example, the WiFi direct connection identifiers of the candidate vehicle-mounted terminals are displayed in a display list mode. The first user can select the candidate vehicle-mounted terminal based on the WiFi direct connection identifier of the candidate vehicle-mounted terminal, for example, click a control corresponding to the WiFi direct connection identifier of a certain candidate vehicle-mounted terminal.
As an example, the WiFi direct connection identifier may include identification information of a vehicle and feature information of the vehicle, and the user may select according to the identification information of the vehicle and the feature information of the vehicle. If the first user sees that the second user drives a vehicle with the xx model, the color of the vehicle is red, at this time, the first user can start the WiFi direct connection function, selects candidate vehicle-mounted terminals containing the xx model and the red in the WiFi direct connection identifier, and determines the candidate vehicle-mounted terminals as vehicle-mounted terminals (namely second vehicle-mounted terminals) corresponding to the second user.
When a friend adding request is initiated in a social application program, identification information of a user to which a friend is added needs to be acquired, and the user generally needs to scan a code or input a user account, which is tedious and not suitable for being used in a vehicle-mounted scene. In the embodiment of the disclosure, the first user selects the second vehicle-mounted terminal from the nearby candidate vehicle-mounted terminals based on the WiFi direct connection identifier, and then sends the friend request information based on the communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal, so that the second mobile terminal can obtain the friend request information to complete the operation of adding friends. According to the scheme provided by the embodiment of the disclosure, the user identification of the second user is acquired without the modes of code scanning or user account input and the like, so that the method and the device are more convenient and faster, and are more suitable for being used in a vehicle-mounted scene.
In an optional implementation manner of the present disclosure, the WiFi direct connection request may carry a WiFi direct connection identifier, when the second vehicle-mounted terminal receives the WiFi direct connection request sent by the first vehicle-mounted terminal, it may be determined whether the WiFi direct connection identifier carried in the WiFi direct connection request satisfies a preset rule, the preset rule may include, in the WiFi direct connection identifier, identification information of a designated vehicle-mounted application program, and the vehicle-mounted application program identification information may determine whether the initial vehicle-mounted terminal deploys the designated vehicle-mounted application program, so as to ensure that the first vehicle-mounted terminal is the WiFi direct connection request initiated based on the designated vehicle-mounted application program.
In an optional manner of the present disclosure, after the second vehicle-mounted terminal establishes the WiFi direct communication connection with the first vehicle-mounted terminal, the method further includes:
and sending a socket connection request to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal responds to the received socket connection request and establishes socket communication connection with the first vehicle-mounted terminal.
In the embodiment of the disclosure, after the first vehicle-mounted terminal and the second vehicle-mounted terminal establish the WiFi direct connection, the first vehicle-mounted terminal equivalently establishes a wireless local area network with the second vehicle-mounted terminal, and the first mobile terminal may communicate with the second vehicle-mounted terminal in a manner of performing User Datagram Protocol (UDP) broadcast in the wireless local area network.
After the WiFi direct connection communication connection is established between the first vehicle-mounted terminal and the second vehicle-mounted terminal, in order to improve communication efficiency, socket communication connection can be further established between the first vehicle-mounted terminal and the second vehicle-mounted terminal, and data interaction is carried out based on the socket communication connection.
Specifically, the first vehicle-mounted terminal may send a socket connection request to the second vehicle-mounted terminal, where the socket connection request carries a request parameter, the request parameter may include Internet Protocol (IP) address information of the first vehicle-mounted terminal and port information of the first vehicle-mounted terminal, and the second vehicle-mounted terminal may establish a socket connection with the first vehicle-mounted terminal based on the IP address information and the port information.
In the embodiment of the disclosure, the request parameter may further include verification information for the first vehicle-mounted terminal.
The verification information of the first vehicle-mounted terminal may be used to verify the identity of the first vehicle-mounted terminal, and as an example, the verification information may be identification information of a service channel.
The second vehicle-mounted terminal may check validity of the check information, and as an example, the second vehicle-mounted terminal may send the check information to the cloud server for checking. When the second vehicle-mounted terminal sends the verification information, the verification information can be encrypted through the encryption key, and the cloud server decrypts through the preset decryption key to obtain the verification information.
If the verification information passes the verification, the second vehicle-mounted terminal can establish socket connection with the first vehicle-mounted terminal based on the IP address information and the port information, and if the verification information fails, the second vehicle-mounted terminal can disconnect WiFi direct connection.
By adding the verification information, the identity verification of the first vehicle-mounted terminal is realized, so that the service requirements of a service provider in actual use can be better met.
In an optional manner of the present disclosure, before sending the WiFi direct connection request to the second vehicle-mounted terminal, the method further includes:
and encrypting the request parameters carried by the WiFi direct connection request based on a preset encryption key.
In the embodiment of the disclosure, the first onboard terminal may locally preset an encryption key for encrypting the request parameter, and the second onboard terminal may locally preset a decryption key corresponding to the encryption key for decrypting the request parameter.
In actual use, the first vehicle-mounted terminal and the second vehicle-mounted terminal can both preset a symmetric key locally, the first vehicle-mounted terminal can encrypt the request parameter through the symmetric key, and the second vehicle-mounted terminal can decrypt the request parameter through the symmetric key.
In an optional mode of the present disclosure, the method further includes:
and in response to receiving a processing result of the friend request information sent by the first mobile terminal or the second vehicle-mounted terminal, disconnecting the communication connection with the second vehicle-mounted terminal.
In the embodiment of the disclosure, the first vehicle-mounted terminal may disconnect the communication connection with the second vehicle-mounted terminal after receiving the processing result of the friend request information.
The processing result of the friend request information can be sent to the second vehicle-mounted terminal by the second mobile terminal and then sent to the first vehicle-mounted terminal by the second vehicle-mounted terminal. The second mobile terminal can also return the processing result of the friend request information to the first mobile terminal, and the first mobile terminal sends the processing result of the friend request information to the first vehicle-mounted terminal.
The operation of disconnecting the communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal may be performed by the first vehicle-mounted terminal or may be performed by the second vehicle-mounted terminal. The socket communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal can be disconnected firstly, then the WiFi direct connection communication connection is disconnected, and the WiFi direct connection communication connection can also be directly disconnected.
In an optional mode of the present disclosure, the sending of the communication connection request to the second in-vehicle terminal includes:
determining whether a vehicle to which the first vehicle-mounted terminal belongs is in a preset driving state;
and if so, sending a communication connection request to the second vehicle-mounted terminal.
In the embodiment of the present disclosure, when the communication connection request is sent to the second vehicle-mounted terminal, whether the vehicle to which the first vehicle-mounted terminal belongs is in the preset driving state may be checked. The preset running state may be a parking state, and the like.
In the in-vehicle scenario, when the vehicle is in a driving state, a user may cause a driving safety problem if operating the in-vehicle terminal or the mobile terminal. When the WiFi direct connection function is detected to be started by a user, whether a vehicle to which the first vehicle-mounted terminal belongs is in a preset running state or not is determined, and the communication connection request is continuously sent when the vehicle is in the preset running state. If the vehicle is not in the preset running state, such as in the driving state, the operation of the user can be refused, and prompt information is displayed to the user to prompt the user to drive safely.
In practical use, the first vehicle-mounted terminal may detect the driving state of the vehicle before executing each step of the method, and execute the subsequent steps when determining that the vehicle is in the preset driving state.
Fig. 2 is a flowchart illustrating another method for adding a friend according to an embodiment of the present disclosure, and as shown in fig. 2, the method mainly includes:
step S210: in response to receiving a communication connection request sent by a first vehicle-mounted terminal, establishing communication connection with the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from a first mobile terminal;
step S220: and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information.
The first mobile terminal and the second mobile terminal can be mobile phones, tablet computers and the like.
The first mobile terminal is pre-connected with the first vehicle-mounted terminal, the second mobile terminal is pre-connected with the second vehicle-mounted terminal, the connection mode of the first mobile terminal and the first vehicle-mounted terminal, and the connection mode of the second mobile terminal and the second vehicle-mounted terminal can adopt wired connection or wireless connection, and as an example, the first mobile terminal and the first vehicle-mounted terminal, and the second mobile terminal and the second vehicle-mounted terminal can be in wired connection through USB interfaces.
In the embodiment of the present disclosure, a user using the first mobile terminal and the first in-vehicle terminal may be regarded as a first user, and a user using the second mobile terminal and the second in-vehicle terminal may be regarded as a second user.
When the first user has a requirement for social contact with the second user, the first vehicle-mounted terminal can be operated to send a request for establishing communication connection to the second vehicle-mounted terminal, and the second vehicle-mounted terminal establishes communication connection with the first vehicle-mounted terminal in response to receiving the request for establishing communication connection sent by the first vehicle-mounted terminal, so that communication between the first vehicle-mounted terminal and the second vehicle-mounted terminal is achieved.
The first user can submit the friend related information through the first mobile terminal, and after the second vehicle-mounted terminal establishes the communication connection with the first vehicle-mounted terminal, the first vehicle-mounted terminal can acquire the friend related information from the first mobile terminal and send friend request information to the second vehicle-mounted terminal.
After receiving the friend request information, the second vehicle-mounted terminal can send the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information.
The second mobile terminal can display a friend request verification interface to the second user according to the friend request information, and the second user can agree to add friends or refuse to add friends on the friend request verification interface. If the second user agrees to add the friend, the first user and the second user become friends and can communicate with each other through the first mobile terminal and the second mobile terminal.
The method provided by the embodiment of the disclosure establishes communication connection with the first vehicle-mounted terminal by responding to the received communication connection request sent by the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from the first mobile terminal; and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.
In the embodiment of the disclosure, the friend request information may include the user identifier of the first user, so that the second mobile terminal can complete the operation of adding a friend based on the user identifier of the first user.
As an example, the friend request information may further include message information of the added friend, such as a message in a text form or a message in a voice form.
As an example, the second mobile terminal may generate a friend request verification interface based on the friend request information and display the friend request verification interface to the second user, where the friend request verification interface may display the user identifier of the first user, the message information of the added friend, and the like, and the second user may perform an operation of agreeing to add the friend or an operation of rejecting the addition of the friend on the friend request verification interface. For example, clicking a control corresponding to the operation of agreeing to add the friend or clicking a control corresponding to the operation of refusing to add the friend.
In the embodiment of the present disclosure, the communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal may include, but is not limited to, a WiFi direct communication connection, a bluetooth communication connection, and a WiFi hotspot communication connection.
In an optional implementation manner of the present disclosure, if the communication connection request is a WiFi direct connection request and the communication connection is a WiFi direct connection communication connection, after establishing a communication connection with the first vehicle-mounted terminal, the method further includes:
and responding to a socket connection request sent by the first vehicle-mounted terminal, and establishing socket communication connection with the first vehicle-mounted terminal.
In the embodiment of the disclosure, the first vehicle-mounted terminal and the second vehicle-mounted terminal can be in WiFi direct connection communication connection. WiFi directly links communication connection's connection distance is great, more can satisfy the demand under the on-vehicle scene.
In the embodiment of the disclosure, after the first vehicle-mounted terminal and the second vehicle-mounted terminal establish the WiFi direct connection, the first vehicle-mounted terminal equivalently establishes a wireless local area network with the second vehicle-mounted terminal, and the first mobile terminal can communicate with the second vehicle-mounted terminal in a manner of performing UDP broadcast in the wireless local area network.
After the WiFi direct connection communication connection is established between the first vehicle-mounted terminal and the second vehicle-mounted terminal, in order to improve communication efficiency, socket communication connection can be further established between the first vehicle-mounted terminal and the second vehicle-mounted terminal, and data interaction is carried out based on the socket communication connection.
In an optional implementation manner of the present disclosure, establishing socket communication with the first vehicle-mounted terminal includes:
acquiring request parameters carried by a socket connection request;
and establishing socket communication connection with the first vehicle-mounted terminal through the port information of the first vehicle-mounted terminal based on the IP address information of the first vehicle-mounted terminal included in the request parameter.
In the embodiment of the disclosure, the first vehicle-mounted terminal may send a socket connection request to the second vehicle-mounted terminal, the socket connection request carries a request parameter, the request parameter may include IP address information of the first vehicle-mounted terminal and port information of the first vehicle-mounted terminal, and the second vehicle-mounted terminal may establish a socket connection with the first vehicle-mounted terminal based on the I P address information and the port information.
In an optional implementation manner of the present disclosure, the request parameter includes check information of the first vehicle-mounted terminal, and establishes a socket communication connection with the first vehicle-mounted terminal, including:
checking the checking information;
and if the verification is passed, establishing socket communication connection with the first vehicle-mounted terminal.
The verification information of the first vehicle-mounted terminal may be used to verify the identity of the first vehicle-mounted terminal, and as an example, the verification information may be identification information of a service channel.
The second vehicle-mounted terminal may check validity of the check information, and as an example, the second vehicle-mounted terminal may send the check information to the cloud server for checking. When the second vehicle-mounted terminal sends the verification information, the verification information can be encrypted through the encryption key, and the cloud server decrypts through the preset decryption key to obtain the verification information.
If the verification information passes the verification, the second vehicle-mounted terminal can establish socket connection with the first vehicle-mounted terminal based on the IP address information and the port information, and if the verification information fails, the second vehicle-mounted terminal can disconnect WiFi direct connection.
By adding the verification information, the identity verification of the first vehicle-mounted terminal is realized, so that the service requirements of a service provider in actual use can be better met.
In an optional implementation manner of the present disclosure, if the request parameter is encrypted by a preset encryption key, the method further includes:
and decrypting the request parameter based on a preset decryption key corresponding to the encryption key.
In the embodiment of the disclosure, the first vehicle-mounted terminal may locally preset an encryption key for encrypting the request parameter, and the second vehicle-mounted terminal may locally preset a decryption key corresponding to the encryption key for decrypting the request parameter.
In practical use, the first vehicle-mounted terminal and the second vehicle-mounted terminal can both preset a symmetric key at the bottom of a shift, the first vehicle-mounted terminal can encrypt the request parameter through the symmetric key, and the second vehicle-mounted terminal can decrypt the request parameter through the symmetric key.
In an optional mode of the present disclosure, the WiFi direct connection request carries a WiFi direct connection identifier, and establishes a communication connection with the first vehicle-mounted terminal, including:
determining whether the WiFi direct connection identifier meets a preset rule;
and if so, establishing WiFi direct connection communication connection with the first vehicle-mounted terminal.
In the embodiment of the present disclosure, the WiFi direct connection identifier may include, but is not limited to, at least one of the following information:
identification information corresponding to the vehicle-mounted application program;
identification information of the belonging vehicle;
characteristic information of the belonging vehicle;
and the user self-defines the identification information.
The identification information corresponding to the vehicle-mounted application program may be a program name of the vehicle-mounted application program deployed in the vehicle-mounted terminal, the identification information of the vehicle may be a model of the vehicle, and the like, the characteristic information of the vehicle may include information such as a color of the vehicle, and the user-defined identification information may be configured individually by a user. In actual use, the identification information of the vehicle-mounted application program, the identification information of the vehicle, the characteristic information of the vehicle and the user-defined identification information can be combined according to a preset sequence to obtain the WiFi direct connection identification.
In the embodiment of the disclosure, the WiFi direct connection request may carry a WiFi direct connection identifier, when the second vehicle-mounted terminal receives the WiFi direct connection request sent by the first vehicle-mounted terminal, it may be determined whether the WiFi direct connection identifier carried in the WiFi direct connection request meets a preset rule, the preset rule may include designated vehicle-mounted application program identifier information in the WiFi direct connection identifier, and the vehicle-mounted application program identifier information may determine whether the initial vehicle-mounted terminal deploys a designated vehicle-mounted application program, so as to ensure that the first vehicle-mounted terminal is the WiFi direct connection request initiated based on the designated vehicle-mounted application program.
In an optional mode of the present disclosure, the method further includes:
and in response to receiving a processing result of the friend request information returned by the second mobile terminal, disconnecting the communication connection with the first vehicle-mounted terminal.
In the embodiment of the disclosure, the second vehicle-mounted terminal may disconnect the communication connection with the second vehicle-mounted terminal after receiving the processing result of the friend request information returned by the second mobile terminal.
The operation of disconnecting the communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal may be performed by the first vehicle-mounted terminal or may be performed by the second vehicle-mounted terminal. The socket communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal can be disconnected firstly, then the WiFi direct connection communication connection is disconnected, and the WiFi direct connection communication connection can also be directly disconnected.
As an example, fig. 3 is a flowchart illustrating a specific implementation manner of a method for adding a friend according to an embodiment of the present disclosure. The designated in-vehicle application in this example is a car life (CareLife) application.
As shown in fig. 3, the a user is the first user. The vehicle machine system of the user A is the vehicle machine system of the first vehicle-mounted terminal. A user car machine CareLife, namely the vehicle-mounted application installed on the first vehicle-mounted terminal. A, a user mobile phone CareLife, namely a vehicle-mounted application installed on a first vehicle-mounted terminal. The B user is the second user. And the B user vehicle machine CareLife is a vehicle-mounted application installed on the second vehicle-mounted terminal. And B, the user mobile phone CareLife is the vehicle-mounted application installed on the second vehicle-mounted terminal.
1. And initiating WiFi direct connection, namely sending a WiFi direct connection request to the second vehicle-mounted terminal by the first vehicle-mounted terminal.
2. And C, receiving WiFi direct connection initiated by the CareLife of the vehicle machine of the user A, checking the identity, and allowing a direct connection process without user confirmation if the identity is CareLife information. Namely, after the second vehicle-mounted terminal receives the WiFi direct connection request, whether the WiFi direct connection identification carried in the WiFi direct connection request meets a preset rule or not is determined, and if the WiFi direct connection identification meets the preset rule, the WiFi direct connection communication connection between the second vehicle-mounted terminal and the first vehicle-mounted terminal is established.
3. And when the WiFi direct connection is detected to be successful, starting to send UDP broadcast, wherein the UDP broadcast content is encryption information: IP + port number + vehicle channel number (encrypted). The method comprises the steps that a socket connection request is sent to a second vehicle-mounted terminal in a UDP (user Datagram protocol) broadcasting mode, request parameters of the socket connection request comprise IP (Internet protocol) address information of a first vehicle-mounted terminal, port information of the first vehicle-mounted terminal and identification information of a service channel, and the request parameters are encrypted by an encryption key preset by the first vehicle-mounted terminal.
4. WiFi directly links successfully, is in same LAN with A user car machine CareLife, can receive the UDP broadcast, directly links after successful in WiFi promptly, and first on-vehicle terminal is in same LAN with second on-vehicle terminal, and second on-vehicle terminal can receive the socket connection request of UDP broadcast.
5. Receiving the UDP broadcast, starting to decrypt the information (symmetric encryption, the private key comes from CareLife local storage). Namely, the second vehicle-mounted terminal decrypts the request parameter based on a decryption key preset in the local.
6. And requesting the cloud platform to check the validity of the channel number according to the vehicle channel number in the information. Namely, the second vehicle-mounted terminal sends the identification information of the service channel to the cloud server for verification, and the identification information of the service channel is encrypted before being sent.
7. And asymmetrically encrypting and decrypting the vehicle channel number, and checking whether the channel number exists and is effective in a background database. The cloud server decrypts through a preset decryption key to obtain the identification information of the service channel, and then checks whether the identification information exists or not and validity of the identification information.
8. And after the vehicle channel number is checked, establishing socket connection according to the IP + port number in the valid field. After verification by the cloud server, the service channel is determined to be valid, and the second vehicle-mounted terminal establishes socket communication connection with the first vehicle-mounted terminal based on the IP address information of the first vehicle-mounted terminal and the port information of the first vehicle-mounted terminal.
9. And after the socket connection is established, communication conditions are met. Namely, the socket communication connection between the first vehicle-mounted terminal and the second vehicle-mounted terminal is established, and the first vehicle-mounted terminal and the second vehicle-mounted terminal can communicate based on the socket communication connection.
10. And acquiring a User Identification (UID) of CareLife of the mobile phone. Namely, the first vehicle-mounted terminal acquires the user identifier of the first user from the first mobile terminal.
11. And sending the UID of the CareLife of the mobile phone. And the first mobile terminal returns the user identification of the first user to the first vehicle-mounted terminal.
12. And sending the UID of CareLife of the mobile phone of the vehicle A user. Namely, the first vehicle-mounted terminal sends the user identification of the first user to the second vehicle-mounted terminal.
13. And receiving the UID of the CareLife of the user A, namely receiving the user identification of the first user by the second vehicle-mounted terminal.
14. And sending the UID of the CareLife of the user A, namely sending the user identification of the first user to the second mobile terminal by the second vehicle-mounted terminal.
15. And acquiring the UID, adding the friends according to the UID, and sending the first piece of information. That is, the second mobile terminal performs the operation of adding a friend based on the user identifier of the first user, and after the friend is successfully added, the second mobile terminal can send a message to the first mobile terminal.
16. And completing the information exchange to disconnect the socket connection. Namely, the second mobile terminal returns the processing result of the friend request information to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal is disconnected from the socket communication connection with the first vehicle-mounted terminal.
17. And actively disconnecting the socket connection and recycling resources. Namely, the second vehicle-mounted terminal responds to the received processing result of the friend request information returned by the second mobile terminal, and the second vehicle-mounted terminal disconnects the communication connection with the first vehicle-mounted terminal.
Based on the same principle as the method shown in fig. 1, fig. 4 shows a schematic structural diagram of a device for adding a friend provided by the embodiment of the present disclosure, and as shown in fig. 4, the device for adding a friend 40 may include:
a communication connection request module 410, configured to send a communication connection request to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal establishes a communication connection with the first vehicle-mounted terminal in response to receiving the communication connection request sent by the first vehicle-mounted terminal;
the friend request module 420 is configured to obtain friend request information from the first mobile terminal, send the friend request information to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information.
The device provided by the embodiment of the disclosure enables the second vehicle-mounted terminal to respond to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal by sending the communication connection request to the second vehicle-mounted terminal; acquiring friend request information from a first mobile terminal; and sending the friend request information to a second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to a second mobile terminal, and the second mobile terminal processes the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.
Optionally, if the communication connection request is a WiFi direct connection request, the communication connection is a WiFi direct connection communication connection, the apparatus further includes a second vehicle-mounted terminal determining module, and the second vehicle-mounted terminal determining module is configured to:
searching candidate vehicle-mounted terminals allowing to establish WiFi direct connection communication connection before sending a communication connection request to a second vehicle-mounted terminal;
and determining a second vehicle-mounted terminal in the candidate vehicle-mounted terminals based on the selection operation of the first user on the candidate vehicle-mounted terminals.
Optionally, the second vehicle-mounted terminal determining module is specifically configured to, when searching for a candidate vehicle-mounted terminal that allows the WiFi direct communication connection to be established:
searching for an initial vehicle-mounted terminal allowing the establishment of WiFi direct connection communication connection;
and determining candidate vehicle-mounted terminals from the initial vehicle-mounted terminals based on the WiFi direct connection identification of the initial vehicle-mounted terminals.
Optionally, the second in-vehicle terminal determining module is specifically configured to, when obtaining a selection operation of the first user on the candidate in-vehicle terminal:
displaying WiFi direct connection identification of the candidate vehicle-mounted terminal;
and detecting the selection operation of the first user on the candidate vehicle-mounted terminal based on the WiFi direct connection identification of the candidate vehicle-mounted terminal.
Optionally, the apparatus further includes a socket communication request module, where the socket communication request module is configured to:
after the WiFi direct connection communication connection with the first vehicle-mounted terminal is established by the second vehicle-mounted terminal, a socket connection request is sent to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal responds to the received socket connection request and establishes socket communication connection with the first vehicle-mounted terminal.
Optionally, the apparatus further comprises:
a request parameter encryption module: the method and the device are used for encrypting the request parameters carried by the socket connection request based on the preset encryption key before sending the socket connection request to the second vehicle-mounted terminal.
Optionally, the apparatus further comprises:
and the communication connection disconnection module is used for responding to the received processing result of the friend request information sent by the first mobile terminal or the second vehicle-mounted terminal and disconnecting the communication connection with the second vehicle-mounted terminal.
Optionally, when the communication connection request module sends the communication connection request to the second vehicle-mounted terminal, the communication connection request module is specifically configured to:
determining whether a vehicle to which the first vehicle-mounted terminal belongs is in a preset driving state;
and if so, sending a communication connection request to the second vehicle-mounted terminal.
It can be understood that the modules of the device for adding a friend in the embodiment of the present disclosure have functions of implementing corresponding steps of the method for adding a friend in the embodiment shown in fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the function description of each module of the device for adding a friend, reference may be specifically made to the corresponding description of the method for adding a friend in the embodiment shown in fig. 1, and details are not described here again.
Based on the same principle as the method shown in fig. 2, fig. 5 shows a schematic structural diagram of another friend adding apparatus provided in the embodiment of the present disclosure, and as shown in fig. 5, the friend adding apparatus 50 may include:
the communication connection module 510 is configured to establish a communication connection with a first vehicle-mounted terminal in response to receiving a communication connection request sent by the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from a first mobile terminal;
and the friend request processing module 520 is configured to send the friend request information to the second mobile terminal in response to receiving the friend request information sent by the first vehicle-mounted terminal, so that the second mobile terminal processes the friend request information.
The device provided by the embodiment of the disclosure establishes communication connection with the first vehicle-mounted terminal by responding to the received communication connection request sent by the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from the first mobile terminal; and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.
Optionally, if the communication connection request is a WiFi direct connection request and the communication connection is a WiFi direct connection communication connection, after establishing a communication connection with the first vehicle-mounted terminal, the apparatus further includes:
and the socket communication connection module is used for responding to a socket connection request sent by the first vehicle-mounted terminal and establishing socket communication connection with the first vehicle-mounted terminal.
Optionally, the socket communication connection module is specifically configured to, when establishing socket communication with the first vehicle-mounted terminal:
acquiring request parameters carried by a socket connection request;
and establishing socket communication connection with the first vehicle-mounted terminal through port information of the first vehicle-mounted terminal based on the internet Interconnection Protocol (IP) address information of the first vehicle-mounted terminal included in the request parameter.
Optionally, the request parameter includes check information for the first vehicle-mounted terminal, and the socket communication connection module is specifically configured to, when establishing a socket communication connection with the first vehicle-mounted terminal:
checking the checking information;
and if the verification is passed, establishing socket communication connection with the first vehicle-mounted terminal.
Optionally, if the request parameter is encrypted by a preset encryption key, the apparatus further includes:
and the decryption module is used for decrypting the request parameter based on a preset decryption key corresponding to the encryption key.
Optionally, the WiFi direct connection request carries a WiFi direct connection identifier, and the communication connection module is specifically configured to, when establishing a communication connection with the first vehicle-mounted terminal:
determining whether the WiFi direct connection identifier meets a preset rule;
and if so, establishing WiFi direct connection communication connection with the first vehicle-mounted terminal.
Optionally, the apparatus further comprises:
and the communication connection disconnection module is used for responding to the received processing result of the friend request information returned by the second mobile terminal and disconnecting the communication connection with the first vehicle-mounted terminal.
It can be understood that the modules of the device for adding a friend in the embodiment of the present disclosure have functions of implementing corresponding steps of the method for adding a friend in the embodiment shown in fig. 2. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the function description of each module of the device for adding a friend, reference may be specifically made to the corresponding description of the method for adding a friend in the embodiment shown in fig. 2, and details are not described here again.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for adding friends provided by the embodiment of the disclosure.
Compared with the prior art, the electronic equipment establishes communication connection with the first vehicle-mounted terminal by responding to the received communication connection request sent by the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from the first mobile terminal; and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the method of adding a friend provided by the embodiments of the present disclosure.
Compared with the prior art, the readable storage medium establishes communication connection with the first vehicle-mounted terminal in response to receiving a communication connection request sent by the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from the first mobile terminal; and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.
The computer program product comprises a computer program which, when executed by a processor, implements the method of adding friends as provided by the embodiments of the present disclosure.
Compared with the prior art, the computer program product establishes communication connection with the first vehicle-mounted terminal by responding to the received communication connection request sent by the first vehicle-mounted terminal, so that the first vehicle-mounted terminal obtains friend request information from the first mobile terminal; and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to the second mobile terminal, and enabling the second mobile terminal to process the friend request information. Based on the scheme, the friend request information can be sent to the mobile terminal based on the communication connection established between the vehicle-mounted terminals, so that a user can finish the operation of adding friends in a vehicle-mounted scene, the social function in the vehicle-mounted scene is realized, and the social requirement of the user can be met.
Fig. 6 illustrates a schematic block diagram of an example electronic device 2000, which may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the device 2000 includes a computing unit 2010, which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)2020, or a computer program loaded from a storage unit 2080 into a Random Access Memory (RAM) 2030. In the RAM 2030, various programs and data required for the operation of the device 2000 can also be stored. The computing unit 2010, ROM 2020, and RAM 2030 are coupled to each other via bus 2040. An input/output (I/O) interface 2050 is also connected to bus 2040.
Various components in device 2000 are connected to I/O interface 2050, including: an input unit 2060 such as a keyboard, a mouse, or the like; an output unit 2070 such as various types of displays, speakers, and the like; a storage unit 2080 such as a magnetic disk, an optical disk, and the like; and a communication unit 2090, such as a network card, modem, wireless communication transceiver, etc. The communication unit 2090 allows the device 2000 to exchange information/data with other devices over a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 2010 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 2010 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The computing unit 2010 executes the method of adding friends provided in the embodiments of the present disclosure. For example, in some embodiments, performing the method of adding buddies provided in embodiments of the present disclosure may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 2080. In some embodiments, some or all of the computer program may be loaded onto and/or installed onto the device 2000 via the ROM 2020 and/or the communication unit 2090. When the computer program is loaded into RAM 2030 and executed by computing unit 2010, one or more steps of the method of adding buddies provided in embodiments of the present disclosure may be performed. Alternatively, in other embodiments, the computing unit 2010 may be configured in any other suitable manner (e.g., by way of firmware) to perform the method of adding buddies provided in embodiments of the present disclosure.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (20)

1. A method of adding buddies, comprising:
sending a communication connection request to a second vehicle-mounted terminal, and enabling the second vehicle-mounted terminal to respond to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal;
and obtaining friend request information from a first mobile terminal, sending the friend request information to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information.
2. The method of claim 1, wherein if the communication connection request is a WiFi direct connection request and the communication connection is a WiFi direct communication connection, before the sending the communication connection request to the second on-board terminal, the method further comprises:
searching candidate vehicle-mounted terminals allowing to establish WiFi direct connection communication connection;
and determining a second vehicle-mounted terminal in the candidate vehicle-mounted terminals based on the selection operation of the first user on the candidate vehicle-mounted terminals.
3. The method of claim 2, wherein the searching for candidate vehicle terminals that allow for establishing a WiFi direct communication connection comprises:
searching for an initial vehicle-mounted terminal allowing the establishment of WiFi direct connection communication connection;
and determining candidate vehicle-mounted terminals from the initial vehicle-mounted terminals based on the WiFi direct connection identification of the initial vehicle-mounted terminals.
4. The method according to claim 2 or 3, wherein the obtaining of the selection operation of the candidate vehicle-mounted terminal by the first user comprises:
displaying the WiFi direct connection identification of the candidate vehicle-mounted terminal;
and detecting the selection operation of the first user on the candidate vehicle-mounted terminal based on the WiFi direct connection identification of the candidate vehicle-mounted terminal.
5. The method of any of claims 2-4, wherein after the second in-vehicle terminal establishes the WiFi direct communication connection with the first in-vehicle terminal, the method further comprises:
and sending a socket connection request to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal responds to the received socket connection request and establishes socket communication connection with the first vehicle-mounted terminal.
6. The method of claim 5, wherein prior to sending a socket connection request to the second onboard terminal, the method further comprises:
and encrypting the request parameters carried by the socket connection request based on a preset encryption key.
7. The method of any of claims 1-6, further comprising:
and in response to receiving a processing result of the friend request information sent by the first mobile terminal or the second vehicle-mounted terminal, disconnecting the communication connection with the second vehicle-mounted terminal.
8. The method according to any of claims 1-7, wherein the sending of the communication connection request to the second on-board terminal comprises:
determining whether the vehicle to which the first vehicle-mounted terminal belongs is in a preset driving state;
and if so, sending a communication connection request to the second vehicle-mounted terminal.
9. A method of adding buddies, comprising:
responding to a received communication connection request sent by a first vehicle-mounted terminal, establishing communication connection with the first vehicle-mounted terminal, and enabling the first vehicle-mounted terminal to obtain friend request information from a first mobile terminal;
and responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to a second mobile terminal, and enabling the second mobile terminal to process the friend request information.
10. The method of claim 9, wherein if the communication connection request is a WiFi direct request and the communication connection is a WiFi direct communication connection, after the establishing the communication connection with the first vehicle-mounted terminal, the method further comprises:
and responding to a socket connection request sent by a first vehicle-mounted terminal, and establishing socket communication connection with the first vehicle-mounted terminal.
11. The method of claim 10, wherein the establishing socket communication with the first onboard terminal comprises:
acquiring request parameters carried by the socket connection request;
and establishing a socket communication connection with the first vehicle-mounted terminal by using the port information of the first vehicle-mounted terminal based on the internet Interconnection Protocol (IP) address information of the first vehicle-mounted terminal included in the request parameter.
12. The method of claim 11, wherein the request parameter includes verification information of the first vehicle-mounted terminal, and the establishing of the socket communication connection with the first vehicle-mounted terminal includes:
checking the checking information;
and if the verification is passed, establishing socket communication connection with the first vehicle-mounted terminal.
13. The method of claim 11 or 12, wherein if the request parameter is encrypted by a preset encryption key, the method further comprises:
and decrypting the request parameter based on a preset decryption key corresponding to the encryption key.
14. The method according to any one of claims 10 to 13, wherein the WiFi direct request carries a WiFi direct identifier, and the establishing a communication connection with the first vehicle-mounted terminal includes:
determining whether the WiFi direct connection identifier meets a preset rule;
and if so, establishing WiFi direct connection communication connection with the first vehicle-mounted terminal.
15. The method according to any one of claims 9-14, further comprising:
and in response to receiving a processing result of the friend request information returned by the second mobile terminal, disconnecting the communication connection with the first vehicle-mounted terminal.
16. An apparatus for adding friends, comprising:
the communication connection request module is used for sending a communication connection request to a second vehicle-mounted terminal, so that the second vehicle-mounted terminal responds to the received communication connection request sent by the first vehicle-mounted terminal to establish communication connection with the first vehicle-mounted terminal;
and the friend request module is used for acquiring friend request information from a first mobile terminal, sending the friend request information to the second vehicle-mounted terminal, so that the second vehicle-mounted terminal sends the friend request information to the second mobile terminal, and the second mobile terminal processes the friend request information.
17. An apparatus for adding friends, comprising:
the communication connection module is used for responding to a received communication connection request sent by a first vehicle-mounted terminal, establishing communication connection with the first vehicle-mounted terminal and enabling the first vehicle-mounted terminal to acquire friend request information from a first mobile terminal;
and the friend request processing module is used for responding to the received friend request information sent by the first vehicle-mounted terminal, sending the friend request information to a second mobile terminal, and enabling the second mobile terminal to process the friend request information.
18. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-15.
19. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-15.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-15.
CN202111468541.3A 2021-12-03 2021-12-03 Method and device for adding friends, electronic equipment and readable storage medium Pending CN114205813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111468541.3A CN114205813A (en) 2021-12-03 2021-12-03 Method and device for adding friends, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111468541.3A CN114205813A (en) 2021-12-03 2021-12-03 Method and device for adding friends, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114205813A true CN114205813A (en) 2022-03-18

Family

ID=80650472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111468541.3A Pending CN114205813A (en) 2021-12-03 2021-12-03 Method and device for adding friends, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114205813A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110121991A1 (en) * 2009-11-25 2011-05-26 Basir Otman A Vehicle to vehicle chatting and communication system
CN105120009A (en) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 Terminal interconnection method and device
CN106604359A (en) * 2016-10-12 2017-04-26 惠州市德赛西威汽车电子股份有限公司 Networking method of mobile phone and plurality of vehicle-mounted WiFi, and WiFi equipment used for same
CN110225090A (en) * 2019-05-10 2019-09-10 北京梦想要有科技有限公司 A kind of automobile friend's intercommunion platform, operating method and installation method based on car networking
CN111314400A (en) * 2018-12-11 2020-06-19 中兴通讯股份有限公司 Vehicle data processing method and device, computer equipment and storage medium
CN111400610A (en) * 2020-02-11 2020-07-10 北京梧桐车联科技有限责任公司 Vehicle-mounted social contact method and device and computer storage medium
CN112654020A (en) * 2020-12-15 2021-04-13 北京百度网讯科技有限公司 Method, device, equipment and storage medium for establishing wireless connection
CN113726608A (en) * 2021-08-30 2021-11-30 阿波罗智联(北京)科技有限公司 Data processing method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110121991A1 (en) * 2009-11-25 2011-05-26 Basir Otman A Vehicle to vehicle chatting and communication system
CN105120009A (en) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 Terminal interconnection method and device
CN106604359A (en) * 2016-10-12 2017-04-26 惠州市德赛西威汽车电子股份有限公司 Networking method of mobile phone and plurality of vehicle-mounted WiFi, and WiFi equipment used for same
CN111314400A (en) * 2018-12-11 2020-06-19 中兴通讯股份有限公司 Vehicle data processing method and device, computer equipment and storage medium
CN110225090A (en) * 2019-05-10 2019-09-10 北京梦想要有科技有限公司 A kind of automobile friend's intercommunion platform, operating method and installation method based on car networking
CN111400610A (en) * 2020-02-11 2020-07-10 北京梧桐车联科技有限责任公司 Vehicle-mounted social contact method and device and computer storage medium
CN112654020A (en) * 2020-12-15 2021-04-13 北京百度网讯科技有限公司 Method, device, equipment and storage medium for establishing wireless connection
KR20210096581A (en) * 2020-12-15 2021-08-05 아폴로 인텔리전트 커넥티비티 (베이징) 테크놀로지 씨오., 엘티디. Method, apparatus, device and storage medium for establishing wireless connection
CN113726608A (en) * 2021-08-30 2021-11-30 阿波罗智联(北京)科技有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN112654020B (en) Method, device, equipment and storage medium for establishing wireless connection
US20180041893A1 (en) Method and system of multi-terminal mapping to a virtual sim card
EP3276917B1 (en) Terminal remote assistance method, device and system
US20150024688A1 (en) Automatic Pairing of a Vehicle and a Mobile Communications Device
CN110958256B (en) Cluster management method and management system
CN107979830B (en) Bluetooth connection method, device, equipment and storage medium for intelligent rearview mirror
CN102999628A (en) Search method and information search terminal
CN115273289B (en) Physical key activation method, system, device, equipment and medium
CN115038062A (en) Bluetooth authentication method, device and equipment
KR20160029323A (en) User Grouping Method and System using Vehicle-to-Vehicle Communication
US10470101B2 (en) Wireless communication system and wireless communication device
CN105812343A (en) Wearable service authentication method, cloud platform, wearable device and terminal
CN115484158B (en) Communication configuration method and device of vehicle-mounted equipment based on eSIM card
CN115801299B (en) Meta universe identity authentication method, device, equipment and storage medium
CN114205813A (en) Method and device for adding friends, electronic equipment and readable storage medium
US20150195708A1 (en) Application installation system and method
CN114666363A (en) Information transmission method and device, electronic equipment, storage medium and product
US11178210B2 (en) Transmission of visual content to display devices based on location detection
CN117311851A (en) Method, apparatus and computer storage medium for information processing
CN110891053A (en) Method for establishing communication connection between android APP and operating system based on local area network
CN104580070A (en) Method, device and system for confirming network conversations
CN115098052A (en) Screen projection method, device, equipment and storage medium
CN108307534B (en) Method and device for establishing connection between devices
CN114143063A (en) Information processing method, information processing apparatus, electronic device, and storage medium
CN116962114A (en) Equipment interconnection method, device, equipment and medium based on distributed soft bus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination