WO2022161071A1 - 一种群组成员或好友的添加方法、电子设备 - Google Patents

一种群组成员或好友的添加方法、电子设备 Download PDF

Info

Publication number
WO2022161071A1
WO2022161071A1 PCT/CN2021/141790 CN2021141790W WO2022161071A1 WO 2022161071 A1 WO2022161071 A1 WO 2022161071A1 CN 2021141790 W CN2021141790 W CN 2021141790W WO 2022161071 A1 WO2022161071 A1 WO 2022161071A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
message
antenna
distance
mobile phone
Prior art date
Application number
PCT/CN2021/141790
Other languages
English (en)
French (fr)
Inventor
时锐
薛清风
杨嘉辰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022161071A1 publication Critical patent/WO2022161071A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a method and electronic device for adding group members or friends.
  • Social applications have the function of adding friends and group members.
  • users can be added as friends and group members by searching for user accounts, scanning QR codes, etc.
  • these methods still require users to open social applications and perform manual operations several times to complete. In this way, the operation of adding friends and group members among users is cumbersome and time-consuming, which is not conducive to the promotion of social applications, especially the promotion of newly launched social applications, and the user experience is poor.
  • the present application provides a method and electronic device for adding group members or friends.
  • the technical solution provided by the present application can reduce the operation of adding friends and group members among users, shorten the time-consuming, facilitate the use of the user, and improve the user experience.
  • an embodiment of the present application provides a method for adding group members or friends.
  • the method can be applied to a first electronic device running a first social application.
  • the first electronic device includes: a first antenna, the transmission distance of the first antenna is a first distance, and the first distance is greater than a preset first safety distance; a second antenna, the transmission distance of the second antenna is the second distance, the second The distance is less than or equal to the preset first safety distance; wherein, the first antenna and the second antenna are different antennas.
  • the method includes: receiving a first user input; the first electronic device generates a random key; the first electronic device sends a first message through the second antenna, the first message including the random key; receiving a random key from the second electronic device; the second message; the first electronic device decrypts the second message using the random key, and obtains a user account on the first social application; the first electronic device sends the first social application to the first social application through the first social application and the first antenna
  • the application server sends a request message; the request message includes the user account; the request message also includes the group ID corresponding to the first user input or the user account of the first electronic device on the first social application; the first response from the application server is received message; in response to the first response message, the first electronic device prompts the first user to input the corresponding group to add group members successfully, or the first electronic device successfully adds friends to the user account on the first social application; wherein,
  • the preset first security distance is a security distance at which the first electronic device and the second electronic device can exchange secret information in plain
  • the first electronic device uses the second antenna to send the first message, and other electronic devices outside the preset distance cannot receive the first message, so the security of communication can be ensured.
  • the user of the first electronic device does not need to go through complicated operations, but only needs to ensure that the distance between the first electronic device and the second electronic device is less than or equal to the preset first safety distance, so that the second electronic device
  • the device can add friends or group members after receiving the first message, which effectively reduces tedious manual operations.
  • the method helps reduce the difficulty of adding friends or group members between users, and improves communication efficiency.
  • the first electronic device sends the first message through the second antenna; including: the first electronic device sends the first message through the second antenna in a wireless communication manner of Bluetooth or ZigBee; the first The electronic device receives the second message from the second electronic device; including: receiving the second message from the second electronic device in a wireless communication manner of Bluetooth or ZigBee.
  • the wireless communication mode of Bluetooth or ZigBee is used to improve communication efficiency and save cellular traffic.
  • the first electronic device in response to the first user input, the first electronic device generates a random key; including: in response to the first user input, the first electronic device passes through the first antenna with wireless fidelity (wireless fidelity, Wi-Fi)-aware wireless communication mode, publishes adding a group member service message or adding a friend service message; the first electronic device receives a response message from the second electronic device in a Wi-Fi-aware wireless communication mode; In response to the response message, the first electronic device generates a random key.
  • wireless fidelity wireless fidelity, Wi-Fi
  • the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.
  • the first electronic device sends the first message through the second antenna; including: the first electronic device sends the first message through the second antenna in a Wi-Fi-aware wireless communication manner; the first electronic device sends the first message through the second antenna.
  • the device receives the second message from the second electronic device; including: receiving the second message from the second electronic device in a Wi-Fi aware wireless communication manner.
  • the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.
  • the first electronic device receives the second message from the second electronic device; including: the distance between the first electronic device and the second electronic device is less than or equal to a preset second message After the safety distance, a second message from the second electronic device is received; the preset second safety distance is associated with the second electronic device.
  • the preset second security distance is a security distance at which the first electronic device and the second electronic device can exchange secret information in plaintext. In this method, other electronic devices outside the preset second safety distance cannot receive the second message, so the safety of communication can be ensured.
  • the receiving the second message from the second electronic device includes: after the distance between the first electronic device and the second electronic device is greater than a preset second safety distance, receiving a second message from the second electronic device; the preset second safety distance is associated with the second electronic device.
  • the second electronic device may also use the first antenna to send the second message.
  • the method can reduce the operations of adding friends and group members between users, shorten the time-consuming and improve the user experience.
  • the first electronic device sends a request message to the application server of the first social application; including: through the encryption mechanism of the first social application, the first electronic device sends the request message to the application server of the first social application ; the first electronic device receives the first response message from the application server; including: receiving the first response message from the application server, and obtaining the decrypted first response message through the decryption mechanism of the first social application.
  • the communication between the first electronic device and the application server of the first social application is performed through an encryption and decryption mechanism, which can ensure the security of the communication.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a first electronic device.
  • the first electronic device runs a first social application.
  • the method includes: receiving a first user input; in response to the first user input, the first electronic device publishes a group member service message or a friend adding service message through the first antenna; After the distance between the devices is less than or equal to the preset second safe distance, a first message from the second electronic device is received; a user account on the first social application is obtained from the first message, and a prompt is given to the user confirming the account; receiving a second user input for confirming the addition; in response to the second user input, the first electronic device sends a request message to the application server of the first social application through the first antenna and the first social application; requesting The message includes a user account; the request message also includes a group identifier corresponding to the first user input or a user account of the first electronic device on the first social application; receiving a first response message from the application server; responding to
  • the operation of adding friends and group members between users can be reduced, the time-consuming time can be shortened, the use of users can be facilitated, and the user experience can be improved.
  • the method can avoid adding illegal users. account or avoid adding to illegal users' group accounts to further improve security.
  • the first electronic device publishes a group member service message or a friend add service message through the first antenna; including: the first electronic device sends a Wi- Fi-aware, Bluetooth or ZigBee wireless communication methods, publish a group member service message or add a friend service message; the first message received from the second electronic device; including: Wi-Fi awareness, Bluetooth or ZigBee In a wireless communication manner, a first message from the second electronic device is received.
  • the wireless communication modes of Wi-Fi perception, Bluetooth or ZigBee are used to improve communication efficiency and save cellular traffic.
  • the first electronic device sends a request message to the application server of the first social application; including: through the encryption mechanism of the first social application, the first electronic device sends the request message to the application server of the first social application ;
  • the first electronic device receives the first response message from the application server; including: the first electronic device receives the first response message from the application server, and obtains the decrypted first response message through the decryption mechanism of the first social application. A response message.
  • the communication between the first electronic device and the application server of the first social application is performed through an encryption and decryption mechanism, which can ensure the security of the communication.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a first electronic device.
  • the first electronic device runs a first social application;
  • the first electronic device includes: a first antenna, the transmission distance of the first antenna is a first distance, and the first distance is greater than a preset first safety distance;
  • the second antenna the second The transmission distance of the antenna is the second distance, and the second distance is less than or equal to the preset first safety distance; wherein, the first antenna and the second antenna are different antennas.
  • the method includes: receiving a first user input; in response to the first user input, the first electronic device publishes a group member service message or a friend adding service message through the first antenna; After the distance between the devices is less than or equal to the preset second safety distance, the first message from the second electronic device is received; the preset second safety distance is that the first electronic device and the second electronic device can exchange secrets in plaintext The safety distance of the information; in response to the first message, a random key is obtained from the first message, and the random key is used to encrypt the group ID corresponding to the first user input or the user of the first electronic device on the first social application account; the first electronic device sends a second message through the second antenna; the second message includes the encrypted group identification or user account; a first response message from the application server of the first social application is received; in response to the first In response to the message, the first electronic device prompts that the first user input the corresponding group to add group members successfully, or the first electronic device successfully added friends to the user account on the first social application; wherein the
  • the above method can reduce the operation of adding friends and group members between users, shorten the time-consuming, facilitate the use of the user, and improve the user experience.
  • Other electronic devices outside a safe distance cannot receive the first message, so the security of communication can be guaranteed.
  • the first electronic device receives the first response message from the application server of the first social application; including: receiving the first response message from the application server of the first social application, and passing the first response message from the application server of the first social application
  • the decryption mechanism of the first social application obtains the decrypted first response message.
  • the communication between the first electronic device and the application server of the first social application is performed through an encryption and decryption mechanism, which can ensure the security of the communication.
  • the first antenna and the second antenna are connected to the same wireless communication module;
  • the wireless communication module includes one of a Wi-Fi chip, a Bluetooth chip and a ZigBee chip.
  • the number of Wi-Fi chips, Bluetooth chips or ZigBee chips in the wireless communication module is one, and the first antenna and the second antenna are connected to the Wi-Fi chip, the Bluetooth chip or the ZigBee chip.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a first electronic device.
  • the first electronic device runs the first social application, and the first electronic device includes: a first antenna, the transmission distance of the first antenna under the first transmission power is the first distance, and the transmission distance of the first antenna under the second transmission power is the second distance, the first distance is greater than the preset first safety distance, and the second distance is less than or equal to the preset first safety distance.
  • the method includes: receiving a first user input; in response to the first user input, the first electronic device generates a random key; the first electronic device sends a first message through a first antenna at a second transmit power, the first message Including a random key; receiving a second message from the second electronic device; in response to the second message, the first electronic device decrypts the second message using the random key, and obtains a user account on the first social application; the first The electronic device sends a request message to the application server of the first social application; the request message includes the user account; the request message also includes the group identifier corresponding to the first user input or the user account of the first electronic device on the first social application; receiving The first response message from the application server; in response to the first response message, the first electronic device prompts that the first user input the corresponding group to add group members successfully, or, the user of the first electronic device on the first social application The account is successfully added as a friend; wherein, the preset first security distance is a security distance at which the first electronic device and the
  • the first electronic device sends the first message through the first antenna under the second transmit power; including: the first electronic device transmits the first message through the first antenna under the second transmit power
  • the first antenna sends the first message in the wireless communication mode of Bluetooth or ZigBee
  • the receiving the second message from the second electronic device includes: receiving the second message from the second electronic device in the wireless communication mode of Bluetooth or ZigBee The second message of the electronic device.
  • the first electronic device in response to the first user input, the first electronic device generates a random key; including: in response to the first user input, the first electronic device passes the first The first antenna under the transmission power, in a Wi-Fi-aware wireless communication mode, publishes a group member service message or a friend-adding service message; in a Wi-Fi-aware wireless communication mode, receives a message from the second A response message from the electronic device; in response to the response message, the first electronic device generates a random key.
  • the first electronic device sends the first message through the first antenna under the second transmit power; including: the first electronic device transmits the first message through the second transmit power
  • the first antenna sends a first message in a Wi-Fi-aware wireless communication mode
  • the receiving a second message from the second electronic device includes: receiving a Wi-Fi-aware wireless communication mode from the second message of the second electronic device.
  • the receiving a second message from the second electronic device includes: the distance between the first electronic device and the second electronic device is less than or equal to a preset second message After the safety distance, a second message from the second electronic device is received; the preset second safety distance is associated with the second electronic device.
  • the first electronic device receives the second message from the second electronic device; including: the distance between the first electronic device and the second electronic device is greater than a preset second safety distance Afterwards, a second message from the second electronic device is received; the preset second safety distance is associated with the second electronic device.
  • the first electronic device sends a request message to the application server of the first social application; including: through an encryption mechanism of the first social application, the first electronic device sends the request message to the first social application.
  • the application server of the first social application sends a request message; the receiving the first response message from the application server includes: receiving the first response message from the application server, and sending the request message through the first social application
  • the decryption mechanism obtains the decrypted first response message.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a first electronic device.
  • the first electronic device runs the first social application, and the first electronic device includes: a first antenna, the transmission distance of the first antenna under the first transmission power is the first distance, and the transmission distance of the first antenna under the second transmission power is the second distance, the first distance is greater than the preset first safety distance, and the second distance is less than or equal to the preset first safety distance; the method includes: receiving a first user input; in response to the first user input, The first electronic device publishes a group member service message or a friend add service message through the first antenna under the first transmit power; the distance between the first electronic device and the second electronic device is less than or equal to a preset second After the safe distance, the first message from the second electronic device is received; in response to the first message, a random key is obtained from the first message, and the random key is used to encrypt the group identifier corresponding to the first user input; the first An electronic device publish
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a second electronic device.
  • the second electronic device runs the first social application, and the second electronic device includes: a third antenna, the transmission distance of the third antenna is a third distance, and the third distance is greater than the preset second safe distance; the fourth antenna, the fourth The emission distance of the antenna is a fourth distance, and the fourth distance is less than or equal to the preset second safety distance; wherein, the third antenna and the fourth antenna are different antennas; the method includes: connecting the first electronic device and the second After the distance between the electronic devices is less than or equal to the preset first safety distance, the first message from the first electronic device is received; in response to the first message, the random key is obtained from the first message, and the The user account of the second electronic device on the first social application uses a random key to encrypt the user account; the second electronic device sends a second message through the fourth antenna, and the second message includes the encrypted user account; A second response message from the application server of the
  • the method can reduce the operation of adding friends and group members between users, shorten the time-consuming, facilitate the use of users, and improve user experience.
  • the first electronic device uses the second antenna to send the first message, which is at a preset distance. Other electronic devices cannot receive the first message, so the security of communication can be guaranteed.
  • receiving the first message from the first electronic device including: receiving the first message from the first electronic device in a Bluetooth or ZigBee wireless communication manner;
  • the fourth antenna sends the second message, which includes: the second electronic device sends the second message through the fourth antenna in a wireless communication manner of Bluetooth or ZigBee.
  • the wireless communication mode of Bluetooth or ZigBee is used to improve communication efficiency and save cellular traffic.
  • the method before receiving the first message from the first electronic device, the method further includes: the second electronic device, in a Wi-Fi aware wireless communication manner, receives the message from the first electronic device.
  • the adding group member service message or the adding friend service message of the first electronic device in response to the adding group member service message or the adding friend service message, the second electronic device sends a Wi-Fi message through the third antenna.
  • -Fi-aware wireless communication mode sending a response message to the first electronic device.
  • the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.
  • the first electronic device receives the first message from the first electronic device; including: receiving the first message from the first electronic device in a Wi-Fi aware wireless communication manner; the The second electronic device sends the second message through the fourth antenna; including: the second electronic device sends the second message to the first electronic device through the fourth antenna in a Wi-Fi aware wireless communication manner.
  • the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.
  • the first electronic device receives the second response message from the application server of the first social application; including: the first electronic device receives the second response from the application server of the first social application message, and obtain the decrypted second response message through the decryption mechanism of the first social application.
  • the communication between the first electronic device and the application server of the first social application is performed through an encryption and decryption mechanism, which can ensure the security of the communication.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a second electronic device running a first social application; the method includes: connecting the first electronic device with the first social application. After the distance between the two electronic devices is less than or equal to the preset first safety distance, the first message from the first electronic device is received; in response to the first message, the random key is obtained from the first message, and the To the user account of the second electronic device on the first social application, use the random key to encrypt the user account; the second electronic device sends a second message through the third antenna, and the second message includes the encrypted user account; A request message from an application server of a social application; a first user operation for confirming the addition is received; in response to the first user operation, the second electronic device sends a reply message to the application server; the reply message is used to indicate confirmation of the addition; wherein, The preset first security distance is a security distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.
  • the method can reduce the operations of adding friends and group members between users, shorten the time-consuming, facilitate the use of users, and improve user experience.
  • Sending the reply message by the application server can avoid adding the user account of the illegal user or the group account of the illegal user, thereby further improving the security.
  • the second electronic device receives the first message from the first electronic device; including: receiving the first message from the first electronic device in a Bluetooth or ZigBee wireless communication manner;
  • the second electronic device sends the second message through the fourth antenna; including: the second electronic device sends the second message through the fourth antenna in a wireless communication manner of Bluetooth or ZigBee.
  • the method before the second electronic device receives the first message from the first electronic device, the method further includes:
  • the second electronic device receives, in a Wi-Fi-aware wireless communication manner, a service message of adding a group member or a service message of adding a friend from the first electronic device;
  • the second electronic device In response to the adding a group member service message or the adding a friend service message, the second electronic device sends a response to the first electronic device in a Wi-Fi aware wireless communication manner through the third antenna information.
  • the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.
  • the second electronic device receives the first message from the first electronic device; including: receiving the first message from the first electronic device in a Wi-Fi aware wireless communication manner;
  • the second electronic device sends the second message through the fourth antenna; including: the second electronic device sends the second message to the first electronic device through the fourth antenna in a Wi-Fi-aware wireless communication manner Second message.
  • the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.
  • the second electronic device receives the request message from the application server of the first social application; including: receiving the request message from the application server of the first social application, and sending the request message through the The decryption mechanism of the first social application obtains the decrypted request message;
  • the second electronic device sends a reply message to the application server; including: sending, by the first electronic device, a reply message to the application server through an encryption mechanism of the first social networking application.
  • the communication between the first electronic device and the application server of the first social application is performed through an encryption and decryption mechanism, which can ensure the security of the communication.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a second electronic device.
  • the second electronic device runs the first social application, and the second electronic device includes: a third antenna, the transmission distance of the third antenna is a third distance, and the third distance is greater than the preset second safe distance; the fourth antenna, the fourth The transmission distance of the antenna is a fourth distance, and the fourth distance is less than or equal to a preset second safety distance; wherein, the third antenna and the fourth antenna are different antennas; the method includes: receiving a signal from the first electronic device.
  • Add group member service message or add friend service message in response to adding group member service message or add friend service message, obtain the user account of the second electronic device on the first social application; the second electronic device passes through the fourth antenna , sending a first message to the first electronic device; the first message includes the user account of the second electronic device on the first social application; receiving a second response message from the application server of the first social application; in response to the second response message, the second electronic device prompts that the user account is successfully added to a group, or the user account is successfully added to a friend; wherein, the preset second security distance is the distance between the first electronic device and the second electronic device that can exchange secret information in plaintext a safe distance.
  • the second electronic device receiving the second response message from the application server of the first social application includes: receiving the second response from the application server of the first social application message, and obtain the decrypted second response message through the decryption mechanism of the first social application.
  • the method further includes: switching the second electronic device to the third antenna.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a second electronic device.
  • the second electronic device runs the first social application, and the second electronic device includes: a third antenna, the transmission distance of the third antenna is a third distance, and the third distance is greater than the preset second safe distance; the fourth antenna, the fourth The transmission distance of the antenna is a fourth distance, and the fourth distance is less than or equal to a preset second safety distance; wherein, the third antenna and the fourth antenna are different antennas; the method includes: receiving a signal from the first electronic device.
  • Add a group member service message or add a friend service message in response to the add group member service message or add a friend service message, the second electronic device generates a random key; the second electronic device sends the first message through the fourth antenna; the first The message includes a random key; after the distance between the first electronic device and the second electronic device is less than or equal to the preset first safe distance, the second electronic device receives the second message from the first electronic device, using the random key The key decrypts the second message, obtains a group identifier on the first social networking application, or the user account of the first electronic device on the first social networking application, and obtains the second electronic device in the first social networking application.
  • the user account on the application the second electronic device sends a request message to the application server of the first social application through the third antenna and the first social application; the request message includes the group identifier or the first electronic device on the first social application. the user account, and the user account of the second electronic device on the first social application; receiving a second response message from the application server; in response to the second response message, the second electronic device prompts that the user account has been successfully added to the group, Or, the user account is successfully added as a friend; wherein, the preset first security distance is a security distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.
  • the second electronic device receives the second response message from the application server; including: receiving the second response message from the application server and decrypting the first social application mechanism to obtain the decrypted second response message.
  • the wireless communication mode between the first electronic device and the second electronic device is one of Wi-Fi awareness, Bluetooth and ZigBee.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a second electronic device.
  • the second electronic device runs the first social application
  • the second electronic device includes: a third antenna, the transmission distance of the third antenna under the third transmission power is the third distance, and the transmission distance of the third antenna under the fourth transmission power is the fourth distance, the third distance is greater than the preset second safety distance, and the fourth distance is less than or equal to the preset second safety distance
  • the method includes: the distance between the first electronic device and the second electronic device After being less than or equal to the preset first safety distance, the first message from the first electronic device is received; in response to the first message, the random key is obtained from the first message, and the second electronic device is obtained in the first message.
  • a user account on a social application uses a random key to encrypt the user account; the second electronic device sends a second message through the third antenna under the fourth transmit power, and the second message includes the encrypted user account;
  • a second response message from the application server of the social application in response to the second response message, the second electronic device prompts that the user account is successfully added to a group, or the user account is successfully added to a friend; wherein, the preset first safety distance It is a safe distance where the first electronic device and the second electronic device can exchange secret information in plaintext.
  • the second electronic device receives the first message from the first electronic device, including: receiving the first message from the first electronic device in a Bluetooth or ZigBee wireless communication manner;
  • the method before the second electronic device receives the first message from the first electronic device, the method further includes:
  • the second electronic device receives, in a Wi-Fi-aware wireless communication manner, a service message of adding a group member or a service message of adding a friend from the first electronic device;
  • the second electronic device In response to the adding a group member service message or the adding a friend service message, the second electronic device sends a Wi-Fi-aware wireless communication method to the second electronic device through the third antenna at the fourth transmit power.
  • the first electronic device sends a response message.
  • the second electronic device receiving the first message from the first electronic device includes: receiving the first message from the first electronic device in a Wi-Fi aware wireless communication manner;
  • the second electronic device receives the second response message from the application server of the first social application; including: receiving the second response message from the application server of the first social application, And through the decryption mechanism of the first social application, the decrypted second response message is obtained.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a second electronic device.
  • the second electronic device runs the first social application
  • the second electronic device includes: a third antenna, the transmission distance of the third antenna under the third transmission power is the third distance, and the transmission distance of the third antenna under the fourth transmission power is a fourth distance, the third distance is greater than the preset second safety distance, and the fourth distance is less than or equal to the preset second safety distance.
  • the method includes: receiving a group member adding service message or adding a friend service message from the first electronic device; in response to the adding group member service message or adding a friend service message, acquiring the second electronic device in the first social networking application.
  • the second electronic device sends the first message to the first electronic device through the third antenna under the fourth transmit power; the first message includes the user account of the second electronic device on the first social application; receiving A second response message from the application server of the first social application; in response to the second response message, the second electronic device prompts that the user account is successfully added to a group, or the user account is successfully added to a friend; wherein the preset No.
  • the second safe distance is a safe distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.
  • the second electronic device receives the second response message from the application server of the first social application; including: receiving the second response message from the application server of the first social application, And through the decryption mechanism of the first social application, the decrypted second response message is obtained.
  • the method further includes: the second electronic device adjusts the transmit power of the third antenna to a third transmit power.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a second electronic device.
  • the second electronic device runs the first social application, and the second electronic device includes: a third antenna, the transmission distance of the third antenna under the third transmission power is the third distance, and the transmission distance of the third antenna under the fourth transmission power is a fourth distance, the third distance is greater than the preset second safety distance, and the fourth distance is less than or equal to the preset second safety distance.
  • the method includes: receiving an add group member service message or an add friend service message from the first electronic device; in response to the add group member service message or the add friend service message, the second electronic device generates a random key; the second electronic device generates a random key; The electronic device sends the first message through the third antenna under the fourth transmission power; the first message includes the random key; after the distance between the first electronic device and the second electronic device is less than or equal to the preset first safe distance , the second electronic device receives the second message from the first electronic device, decrypts the second message using the random key, and obtains a group identifier on the first social application, or the first electronic device on the first social application and obtain the user account of the second electronic device on the first social application; the second electronic device sends the user account of the first social application to the application server of the first social application through the third antenna under the third transmission power and the first social application a request message; the request message includes a group identifier or a user account of the first electronic device on the first social networking application, and a user
  • the second electronic device receives the second response message from the application server; including: receiving the second response message from the application server and decrypting the first social application mechanism to obtain the decrypted second response message.
  • the wireless communication mode between the first electronic device and the second electronic device is one of Wi-Fi awareness, Bluetooth and ZigBee.
  • an embodiment of the present application provides a method for adding group members or friends, which is applied to a first electronic device and a second electronic device.
  • the first electronic device runs a first social application
  • the first electronic device includes: a first antenna, the transmission distance of the first antenna is a first distance, and the first distance is greater than a preset first safety distance; the second antenna, the second The transmission distance of the antenna is a second distance, and the second distance is less than or equal to a preset first safety distance; wherein, the first antenna and the second antenna are different antennas;
  • the second electronic device runs the first social application, and the second
  • the electronic device includes: a third antenna, the transmission distance of the third antenna is a third distance, and the third distance is greater than the preset second safety distance; a fourth antenna, the transmission distance of the fourth antenna is a fourth distance, and the fourth distance is less than or equal to the preset second safety distance; wherein, the third antenna and the fourth antenna are different antennas.
  • the method includes:
  • the first electronic device receives the first user input, and the first electronic device generates a random key; the first electronic device sends a first message through the second antenna, and the first message includes the random key; After the distance between the devices is less than or equal to the preset first safety distance, the second electronic device receives the first message from the first electronic device; in response to the first message, the second electronic device obtains from the first message random key, and obtain the user account of the second electronic device on the first social application, the second electronic device uses the random key to encrypt the user account; the second electronic device sends a second message through the fourth antenna, and the second message includes The encrypted user account; the first electronic device receives the second message from the second electronic device; the first electronic device decrypts the second message using the random key, and obtains a user account on the first social application; the first electronic device decrypts the second message using the random key The device sends a request message to the application server of the first social application through the first social application and the first antenna; the request message includes the user account; the request message also
  • an embodiment of the present application provides a communication system, where the communication system may include the first electronic device as described in the first aspect and the second electronic device as described in the sixth aspect, or as described in the second aspect
  • an embodiment of the present application provides a first electronic device, including a processor and a memory.
  • the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the first electronic device can implement any aspect and any aspect performed by the first electronic device. any of the possible design methods below.
  • an embodiment of the present application provides a second electronic device, including a processor and a memory.
  • the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the second electronic device can implement any aspect and any aspect performed by the second electronic device. any of the possible design methods below.
  • an embodiment of the present application further provides an apparatus, where the apparatus includes a module/unit for performing any one of the possible design methods of any of the foregoing aspects.
  • These modules/units can be implemented by hardware or by executing corresponding software by hardware.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a first electronic device, the first electronic device causes the first electronic device to A method of performing any of the above aspects and any possible designs of any of the aspects.
  • the embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a second electronic device, the second electronic device causes the second electronic device to A method of performing any of the above aspects and any possible designs of any of the aspects.
  • an embodiment of the present application further provides a computer program product that, when the computer program product runs on a first electronic device, enables the first electronic device to perform any one of the above-mentioned aspects and any one of the above-mentioned aspects. a possible design approach.
  • an embodiment of the present application further provides a computer program product that, when the computer program product runs on a second electronic device, enables the second electronic device to perform any of the above-mentioned aspects and any of the above-mentioned aspects.
  • an embodiment of the present application further provides a chip or a chip system, where the chip or chip system is coupled to a memory and configured to execute a computer program stored in the memory, so as to execute any aspect and any aspect of the above. Any of the possible design methods.
  • FIGS. 1A to 1D are schematic interface diagrams of a method for adding a group of friends
  • FIG. 2 is a schematic diagram of a scenario of a method for adding group members or friends according to an embodiment of the present application
  • 3A is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • 3B is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • 4A is a schematic diagram of a principle of a wireless communication module and an antenna provided by an embodiment of the present application
  • FIG. 4B is another schematic schematic diagram of a wireless communication module and an antenna provided by an embodiment of the present application.
  • 5A to 5C are schematic diagrams of three specific structures of a wireless communication module and an antenna provided by an embodiment of the present application;
  • FIG. 6 is a schematic diagram of a transmission distance of a wireless communication module and an antenna provided by an embodiment of the present application
  • FIG. 7 is a schematic diagram of user operations in a method for adding a group or a friend according to an embodiment of the present application.
  • FIGS. 8A to 8C are schematic diagrams of a method for adding friends according to Embodiment 1 of the present application.
  • 9A to 9B are schematic diagrams of a method for adding friends according to Embodiment 2 of the present application.
  • 10A to 10B are schematic diagrams of a method for adding friends according to Embodiment 3 of the present application.
  • 11A to 11D are schematic diagrams of a method for adding group members according to Embodiment 4 of the present application.
  • 12A to 12B are schematic diagrams of a method for adding group members according to Embodiment 5 of the present application.
  • FIG. 13 is a schematic flowchart of a method for adding group members according to Embodiment 6 of the present application.
  • FIG. 14A is a schematic flowchart of a method for adding group members according to Embodiment 7 of the present application.
  • FIG. 14B is a schematic flowchart of a method for adding friends according to Embodiment 7 of the present application.
  • FIG. 15 is a schematic structural composition diagram of an electronic device provided by an embodiment of the application.
  • FIG. 16 is a schematic structural composition diagram of a communication system provided by an embodiment of the present application.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • the term “connected” includes both direct and indirect connections unless otherwise specified. "First” and “second” are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features.
  • words such as “exemplarily” or “for example” are used to represent examples, illustrations or illustrations. Any embodiment or design described in the embodiments of the present application as “exemplarily” or “such as” should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplarily” or “such as” is intended to present the related concepts in a specific manner.
  • FIG. 1A to FIG. 1D are introduced through the user's operation and the display and switching of a graphical user interface (GUI).
  • GUI graphical user interface
  • the mobile device is taken as an example of a mobile phone.
  • user Alisa clicks on the user interface 100 of her mobile phone
  • the icon 101 is applied, and then the user interface 101 in (a) of FIG. 1A is switched to the user interface 110 in (b) of FIG. 1A .
  • the mobile phone can add a friend.
  • the mobile phone displays the user interface 120 as shown in (c) of FIG. 1A .
  • the user Alisa can search for the friend to be added by entering the WeChat ID of the friend to be added or the mobile phone number of the friend in the search input box control 121 in the user interface 120 . It is assumed that the user Alisa inputs the mobile phone number of a friend in the search input box control 121 in the user interface 120, and the mobile phone displays the user interface 130 as shown in (d) of FIG. 1A.
  • the mobile phone detects the operation acting on the search control 131, the mobile phone The app's app server sends the search request, and the phone The application's application server fetches the search results.
  • the phone is from The application server of the application successfully acquires the friend's account information, see the user interface 140 shown in (e) of FIG. 1B .
  • the user interface 140 includes the WeChat account information of the friend Lucas to be added.
  • the mobile phone displays the user interface 150 as shown in (f) of FIG. 1B.
  • the user Alisa can input information for the authentication of the other party in the user interface 150, and set permissions and so on.
  • click the send control 151 click the send control 151, and the user Alisa's mobile phone 100 sends the The application server of the application sends a friend addition request.
  • the mobile phone of the user Lucas may display the user interface 160 as shown in (g) of FIG. 1C .
  • the user interface 160 is an interface for adding a friend request, including the verification information sent by the counterpart user Alisa and the WeChat account information of the user Alisa.
  • the user Lucas clicks the operation of going to the verification control 161 in the user interface 160 the user interface 170 as shown in (h) of FIG. 1C is displayed. If the user Lucas agrees to the adding request, the user Lucas can click the completion control 171 in the user interface 170, and the mobile phone sends a friend adding request through message to the application server.
  • the mobile phone 100 of the user Alisa receives the friend adding request pass message from the application server, and then the mobile phone displays the user interface 180 as shown in (i) in FIG. 1D .
  • the mobile phone displays the user interface 190 as shown in (j) in FIG. 1D.
  • the user interface 190 includes a message for prompting the user Alisa's mobile phone 100 to pass the verification, and the user Alisa can send an instant message to and receive an instant message from the other party in the user interface 190 .
  • the present application proposes a method for adding a group or a friend, which can add group members or add friends through ultra-short-range frames and Wi-Fi network awareness technology, because ultra-short-range frames can only Receiving with electronic devices within a preset safe distance from the sender can ensure the security of communication.
  • the method reduces the complexity of adding friends between users, improves user experience, and improves communication efficiency.
  • the friend adding method provided by the embodiment of the present application may be applicable to the communication system architecture shown in FIG. 2 .
  • at least one electronic device among the plurality of electronic devices can support the transmission of ultra-short-range frames.
  • the electronic device 100 can transmit ultra-short-range frames.
  • the electronic device 200 can receive the ultra-short-range frame from the electronic device 100 . This ensures that the content in the ultra-short-range frame is not acquired by other electronic devices, and the electronic device 200 obtains the user account or group account from the ultra-short-range frame, and then can add friends or group members.
  • the electronic device 100 and the electronic device 200 are both illustrated by taking a mobile phone as an example in FIG. 2 .
  • the electronic device 100 and the electronic device 200 may also be any electronic devices such as smart speakers, smart watches, smart bracelets, smart TVs (also referred to as smart screens), and smart home devices.
  • the system shown in FIG. 2 may also include other electronic devices. This embodiment of the present application does not limit this.
  • Each electronic device in FIG. 2 can communicate through a communication network, and can also communicate with a server through a communication network.
  • the communication network may be a local area network, or a wide area network switched by a relay device, or a hybrid networking composed of a local area network and a wide area network, or the like.
  • the communication network when the communication network is a local area network, exemplarily, the communication network may be a Wi-Fi hotspot network, a Wi-Fi peer-to-peer (P2P) network, a Bluetooth network, a Zigbee network or a near field communication ( near field communication, NFC) network and other short-range communication networks.
  • the communication network when the communication network is a wide area network, exemplarily, the communication network may be a 3rd generation wireless telephone technology (3G) network, a 4th generation mobile communication technology (4G) Network, 5th-generation mobile communication technology (5G) network, future evolution of public land mobile network (PLMN), Internet, etc.
  • the data exchanged by different electronic devices through the communication network includes but is not limited to: user accounts or group accounts, pictures, texts, videos, or after the electronic devices process objects such as pictures, texts or videos at least one of the results.
  • the electronic device may be a portable electronic device such as a smartphone, a tablet computer, a laptop computer (Laptop), a wearable electronic device (eg, a smart watch) with wireless communication capabilities. It should be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a fixed electronic device (eg, a desktop computer, etc.). In some embodiments, the electronic device may be a smart home device, such as a smart speaker or the like.
  • FIG. 3A shows the hardware structure of the electronic device 100 .
  • the electronic device 100 includes a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, Antenna 1, Antenna 2, Mobile Communication Module 350, Wireless Communication Module 360, Audio Module 370, Speaker 370A, Receiver 370B, Microphone 370C, Headphone Interface 370D, Sensor Module 380, Key 390, Motor 391, Indicator 392, Camera 393, Display screen 394, and subscriber identification module (subscriber identification module, SIM) card interface 395 and the like.
  • SIM subscriber identification module
  • the sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, an air pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, and ambient light.
  • Processor 310 may include one or more processing units.
  • the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video Codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc.
  • AP application processor
  • modem processor graphics processing unit
  • ISP image signal processor
  • controller a video Codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the electronic device realizes the display function through the GPU, the display screen 394, and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 394 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 310 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the electronic device can realize the shooting function through the ISP, the camera 393, the video codec, the GPU, the display screen 394, and the application processor.
  • the SIM card interface 395 is used to connect a SIM card.
  • the SIM card can be inserted into the SIM card interface 395 or pulled out from the SIM card interface 395 to achieve contact and separation with the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 395 can support Nano SIM card, Micro SIM card, SIM card and so on.
  • the same SIM card interface 395 can insert multiple cards at the same time.
  • the types of the plurality of cards may be the same or different.
  • the SIM card interface 395 can also be compatible with different types of SIM cards.
  • the SIM card interface 395 is also compatible with external memory cards.
  • the electronic device interacts with the network through the SIM card to realize functions such as call and data communication.
  • the electronic device employs an eSIM, ie: an embedded SIM card.
  • the wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 350 can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the electronic device.
  • the mobile communication module 350 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like.
  • the mobile communication module 350 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 350 can also amplify the signal modulated by the modulation and demodulation processor, and then convert it into electromagnetic waves for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 350 may be provided in the processor 310 .
  • at least part of the functional modules of the mobile communication module 350 may be provided in the same device as at least part of the modules of the processor 310 .
  • the wireless communication module 360 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellite systems applied on electronic devices. Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
  • the wireless communication module 360 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 360 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310 .
  • the wireless communication module 360 can also receive the signal to be sent from the processor 310 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device is coupled with the mobile communication module 350, and the antenna 2 is coupled with the wireless communication module 360, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • FIG. 3A do not constitute a specific limitation on the electronic device, and the electronic device may also include more or less components than those shown in the figure, or combine some components, or split some components, Or a different component arrangement.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the combination/connection relationship between the components in Fig. 3A can also be adjusted and modified.
  • FIG. 3B is a block diagram of the software structure of the electronic device 100 provided by the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the software system is divided into three layers, which are an application layer, a service layer, and an operating system (operating system, OS) layer from top to bottom.
  • the application layer can include a series of applications. As shown in FIG. 3B , the application layer may include programs such as social applications, contacts, calendars, and short messages.
  • the service layer includes but is not limited to a variety of services such as ultra-short-distance services.
  • Applications in the application layer can initiate registration with the ultra-short-range service of the service layer, and then can receive ultra-short-range event notifications from the ultra-short-range service.
  • ultra-short-distance services include ultra-short-distance event registration, ultra-short-distance event notification, sending and receiving ultra-short-distance packets and other services.
  • the ultra-short-distance service is to provide the application that supports the ultra-short-distance service with the ability to use the ultra-short-distance service, and to allow the applications that are not activated to still receive the subscribed ultra-short-distance package, so the software structure is provided in the service layer.
  • Ultra short distance service Exemplarily, the social application registers the characteristics of the ultra-short-range packets that it is concerned about with the ultra-short-distance service, such as using the service name (service name) of Wi-Fi awareness (NAN) and the characteristic value of the packet (a certain field value is How many).
  • the ultra-short-range packet may be, for example, a service discovery frame (SDF) of Wi-Fi awareness (NAN), or a broadcast beacon (beacon) frame of Bluetooth, but of course, it is not limited to the above two frames.
  • SDF service discovery frame
  • Beacon broadcast beacon
  • the operating system layer includes protocol stacks and drivers.
  • the protocol stack includes a BLE protocol stack, a Wi-Fi protocol stack, and a NAN protocol stack.
  • the drivers include ultra-short-distance mode control, ultra-short-distance transmission control, ultra-short-distance duty cycle control, Wi-Fi driver, Bluetooth driver, and ultra-short-distance packet sending and receiving.
  • the electronic device 100 may include at least one of a Wi-Fi chip, a Bluetooth chip, a Zigbee chip, and the like.
  • any chip such as Wi-Fi, Bluetooth chip or Zigbee chip receives the ultra-short-range frame, it will pass it to the ultra-short-range service in the service layer through the operating system layer.
  • the ultra-short-range service matches the characteristics of the ultra-short-range packet. It is then passed to the social application in the application layer. If the social application is not activated, the ultra-short-range service can also call the social application through the ultra-short-range event notification, and then deliver the ultra-short-range package to the social application.
  • a social application needs to send an ultra-short-range packet, it can use the interface provided by the ultra-short-range service to send the ultra-short-range packet, and send it through the Wi-Fi or Bluetooth chip through the operating system layer.
  • FIG. 4A shows a principle structure of a wireless communication module and an antenna in an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 310, a wireless communication module 360, a first antenna and a second antenna.
  • the first antenna and the second antenna are used for transmitting and receiving electromagnetic waves.
  • the wireless communication module 360 converts the electromagnetic wave received from the first antenna or the second antenna into a signal, and sends the signal to the processor 310 for processing; or the wireless communication module 360 receives the signal to be sent from the processor 310, via The first antenna or the second antenna is converted into electromagnetic waves and radiated out.
  • the wireless transmission distance when the first antenna is working is greater than the wireless transmission distance when the second antenna is working.
  • the first transmission distance of the signal transmitted by the first antenna is greater than the preset safety distance
  • the second transmission distance of the signal transmitted by the second antenna is less than or equal to the preset safety distance.
  • the value range of the first transmission distance of the first antenna may be (4 meters, 20 meters)
  • the value range of the second transmission distance of the second antenna may be (3 cm, 2 meters).
  • the value range of the first transmission distance can be determined according to the minimum distance and the maximum distance covered by the wireless transmission power when the first antenna is working, or it can be preset by the developer; the value range of the second transmission distance can be determined according to The minimum distance and the maximum distance covered by the wireless transmit power when the second antenna is working are determined, and may also be preset by the developer.
  • the preset security distance is a security distance for exchanging secret information between electronic devices.
  • the preset safe distance may be determined according to the maximum distance covered by the wireless transmit power when the second antenna is working, or may be a distance preset by the developer.
  • the preset safety distance may be 10 cm, 5 cm, or the like.
  • the value range of the preset safety distance may be (0 cm, 30 cm). In this way, when the distance between the electronic device 100 and the electronic device 200 is less than or equal to the preset safe distance, the electronic device 200 can receive the secret information sent by the electronic device 100 . In this way, security risks are reduced.
  • the processor 310 may control the switching of the first antenna and the second antenna.
  • the electronic device 100 adopts the first antenna when the distance between the electronic device 100 and the electronic device 200 is less than the first transmission distance, the electronic device 100 can receive the message sent by the electronic device 200; when the electronic device 200 adopts the second antenna
  • the electronic device 100 can receive the message sent by the electronic device 200 .
  • the first transmission distance and the second transmission distance may also be referred to as the first distance and the second distance, respectively.
  • FIG. 4B shows another principle structure of the wireless communication module and the antenna in the electronic device 100 provided by the embodiment of the present application.
  • the electronic device 100 may include a processor 310 , a wireless communication module 360 and a first antenna; wherein the wireless communication module 360 includes a wireless module 3601 and a variable impedance circuit module 3602 .
  • the first antenna is used to transmit and receive wireless signals.
  • the variable impedance circuit module 3602 may be a circuit composed of variable impedances, an integrated circuit, or the like.
  • the processor 310 controls and adjusts the impedance value of the variable impedance circuit module 3602 to adjust the wireless transmission power loaded on the first antenna, thereby controlling the transmission distance when the first antenna transmits wireless signals.
  • the transmit power of the first antenna is the first transmit power
  • the distance at which the first antenna transmits the wireless signal is the first transmit distance (implementation diagram). 4A)
  • the transmit power of the first antenna is the second transmit power
  • the distance at which the first antenna transmits wireless signals is The second transmission distance (implementing the function of the "second antenna" in FIG. 4A ).
  • the first transmit power is greater than the second transmit power
  • the first transmit distance is greater than a preset safe distance
  • the second transmit distance is less than or equal to the preset safe distance.
  • the first transmission distance and the second transmission distance may be referred to as a first distance and a second distance, respectively.
  • the principle structures illustrated in one example corresponding to FIG. 4A and another example corresponding to FIG. 4B do not constitute specific limitations on the wireless communication module 360 and the antenna in the electronic device 100 .
  • the structure of the wireless communication module 360 and the antenna in the electronic device 100 may include more or less components than shown, or some components may be combined, or some components may be split, or different components layout.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the wireless communication module 360 shown in FIG. 4A may be a Wi-Fi chip, a Bluetooth chip or a ZigBee chip, or a Wi-Fi chip, a Bluetooth chip or a ZigBee chip and a circuit matching it.
  • the wireless module 3601 shown in FIG. 4B may be a Wi-Fi chip, a Bluetooth chip or a ZigBee chip, and the wireless communication module 360 shown in FIG. 4B may be a Wi-Fi chip, a Bluetooth chip or a ZigBee chip and a circuit matching it.
  • Figures 5A-5C show three implementations of the second antenna in Figure 4A.
  • the first antenna and the second antenna may share a part of the wiring.
  • the first antenna may also be called a true antenna or a strong antenna
  • the second antenna may also be called a false antenna or a weak antenna.
  • the first antenna and the second antenna of the electronic device may be switched by a radio frequency switch.
  • both the second antenna and the radio frequency switch (the second antenna is shown in the dotted box in FIGS. 5A-5C ) can be placed in the shielding case or the second antenna can be placed in the chip.
  • the purpose of the second antenna in the embodiment of the present application is to reduce the transmission distance as much as possible.
  • the principle of constructing the second antenna may be:
  • the specific implementation of the second antenna can be as follows:
  • the specific implementation (i) and (ii) of the above-mentioned second antenna may be implemented on a PCB board or inside a chip (Wi-Fi chip, Bluetooth chip or ZigBee chip).
  • the function of the above-mentioned shielding cover is to reduce the intensity of the externally radiated signal, so as to achieve the purpose of weakening the radiation.
  • the above-mentioned shortening of the antenna means that the second antenna is shorter than the first antenna.
  • the structures of the three second antennas are shown in FIGS. 5A to 5C , and the structures of the second antennas are shown in the dashed boxes in FIGS. 5A to 5C .
  • the structures of the first antenna in FIGS. 5A to 5C are all connected to a filter circuit (eg, a ⁇ -type circuit), a matching circuit (eg, a ⁇ -type circuit), and a matching circuit through a radio frequency input/output (RFIO) pin.
  • RFIO radio frequency input/output
  • Antenna body outside the circuit eg, the antenna body can be a piece of metal trace).
  • the lengths of the second antenna a shown in the dashed box in FIG. 5A , the second antenna b shown in the dashed box in FIG. 5B , and the second antenna c shown in the dashed box in FIG. 5C are different, but they are all different from the first antenna. Shorter.
  • the function of the filter circuit is to prevent interference, and the matching circuit is used to match the first antenna.
  • the second antenna a may be located in the shielding case.
  • the second antenna a may include the RFIO pin of the chip (Wi-Fi chip, Bluetooth chip or ZigBee chip) in the shield and the first switch of the 2 switches (the first switch is not connected to any device).
  • the second antenna a may also include a trace between the RFIO pin and the first switch.
  • the 2-way switch refers to the switch between the trace or RFIO pin and the filter circuit. Through the 2-way switch, the trace or RFIO pin can be connected or disconnected from the filter circuit.
  • the first switch is the switch shown in FIG. 5A that is connected to the RFIO pin or trace and disconnected from the filter circuit. It should be understood that the 2-way switch in the embodiment of the present application may be a single-pole double-throw switch.
  • the second antenna b may be located in the shielding case.
  • the second antenna b may include the RFIO pin of the chip (Wi-Fi chip, Bluetooth chip or ZigBee chip) in the shield, the first switch of the 2-way switch (the first switch is connected to the resistance) and the matching device.
  • the second antenna b may also include a first trace between the RFIO pin and the first switch.
  • the second antenna b may further include a second trace between the matching device and the ground.
  • the matching device can be a resistor. Part of the electromagnetic wave radiation can be converted into heat energy and consumed by grounding the resistance, thereby reducing the radiation efficiency of the second antenna b.
  • the 2-way switch refers to the switch between the RFIO pin or the first trace and the resistor and filter circuit. Through this switch, the RFIO pin or the first trace can be connected to the resistor and disconnected from the filter circuit. On, or the RFIO pin or the first trace can be disconnected from the resistor and connected to the filter circuit.
  • the first switch is a switch connected to the matching device and disconnected from the filter circuit among the two switches.
  • the second antenna c may be located in the shielding case.
  • the filter circuit matched by the chip is followed by a matching device (for example, a resistor) to the ground.
  • the second antenna c may include RFIO pins of the chip (Wi-Fi chip, Bluetooth chip or ZigBee chip) in the shield, filter circuit, the first switch of the 2-way switch (the first switch is connected to the resistance) and the matching device ( e.g. resistance).
  • the second antenna c may also include a first trace between the RFIO pin and the filter circuit.
  • the second antenna c may further include a second wire between the filter circuit and the matching device.
  • the 2-way switch refers to the switch between the filter circuit inside the shield, the matching device, and the matching circuit outside the shield.
  • the first switch is a switch used to connect the filter circuit and the matching device in the shield.
  • the first antenna in the above-mentioned FIGS. 5A to 5B may include an RFIO pin, a second switch in the 2-way switch, a filter circuit, a matching circuit, and an antenna body externally connected to the matching circuit.
  • the first antenna in FIGS. 5A to 5B may further include a trace between the RFIO pin and the second switch in the 2-way switch.
  • the second switch is a switch used to connect the RFIO pin and the filter circuit.
  • the above-mentioned first antenna in FIG. 5C may include an RFIO pin, a filter circuit, a second switch in the 2-way switch, a matching circuit, and an antenna body externally connected to the matching circuit.
  • the first antenna in FIG. 5C may also include traces between the RFIO pins and the filter circuit.
  • the second switch is a switch used to connect the filter circuit inside the shield and the matching circuit outside the shield.
  • FIGS. 5A to 5C are the physical first antenna and the second antenna.
  • the electronic device may also have only one antenna physically, but logically includes the first antenna and the second antenna.
  • the electronic device can shield the multi-stage amplifier inside the chip by adjusting the value of the register, so that the transmit power of the physical antenna is the first transmit power, which can be considered as the logical first antenna at this time; the electronic device can also By adjusting the value of the register so that the transmit power of the physical antenna is the second transmit power, it can be considered as the second logical antenna at this time; wherein, the first transmit power is greater than the second transmit power.
  • the electronic device switches the first antenna and the second antenna logically through the value of the internal register of the chip, which can achieve the same effect as switching the first antenna and the second antenna physically through the radio frequency switch.
  • the above different second antenna structures can meet different ultra-short-distance communication requirements (for example, from 10cm to 2m) in combination with the different transmit power (Tx power) settings of the Wi-Fi chip, Bluetooth chip or ZigBee chip.
  • Tx power transmit power
  • Table 1 shows the communication distances of several different second antenna structures with different transmit powers of the Wi-Fi chip.
  • Table 2 shows the communication distances of different transmit powers when several different second antenna structures cooperate with the Bluetooth chip.
  • Table 3 shows the communication distances of different transmit powers when several different second antenna structures cooperate with the ZigBee chip.
  • the difference between the maximum transmit power and the minimum transmit power of the antenna is correlated. If the minimum transmit power of the electronic equipment is reduced very low, the maximum transmit power will also be reduced, so that the distance requirement during normal operation cannot be met. Since different electronic devices have different structures and different safety performance requirements of the electronic devices, manufacturers of electronic devices can use different second antenna structures and transmit powers to ensure the communication distance of the electronic devices. Exemplarily, for different electronic device manufacturers, the thickness of the electronic device casing may be different, so under the condition of the same second antenna structure and the same transmit power, the communication distance at which the electronic device can be discovered may also be different.
  • Different electronic equipment manufacturers can obtain the transmission power corresponding to the safe distance according to the structure of the electronic equipment itself, the structure of the second antenna and a certain transmission power, and combined with the test. Users can set the three second antennas (second antenna a, second antenna b, and second antenna c) according to the actual Wi-Fi chip, Bluetooth chip, and ZigBee chip used, referring to Table 1, Table 2, and Table 3. The transmission power is adjusted according to the test results, so that the second antenna reaches the corresponding safe distance when transmitting.
  • the following takes the electronic device 100 at position 0 and the electronic device 200 at position 1 or position 2, the first emission distance is 5 meters, and the second emission distance is 3 cm as an example.
  • the electronic device 200 When the electronic device 100 transmits a signal through the first antenna at position 0, the electronic device 200 is at position 1, and the distance between the electronic device 100 and the electronic device 200 is smaller than the first transmission distance, and the electronic device 200 can receive the electronic device 100 transmitted wireless signals.
  • the electronic device 100 transmits a signal through the second antenna at position 0 the electronic device 200 is at position 1, and the distance between the electronic device 100 and the electronic device 200 is greater than the second transmission distance, and the electronic device 200 cannot receive the electronic device 100.
  • the electronic device 200 When the electronic device 200 is located at position 2, and the distance between the electronic device 100 and the electronic device 200 is smaller than the second transmission distance, the electronic device 200 can receive the wireless signal transmitted by the electronic device 100.
  • the first transmission distance and the second transmission distance may be the first distance and the second distance, respectively.
  • the electronic device 200 when the electronic device 100 transmits a signal at the position 0 through the first antenna under the first transmit power, the electronic device 200 is located at the position 1, and the distance between the electronic device 100 and the electronic device 200 is smaller than the first transmission distance at this time, The electronic device 200 may receive the wireless signal transmitted by the electronic device 100 .
  • the electronic device 200 When the electronic device 100 transmits a signal through the first antenna under the second transmit power at the position 0, the electronic device 200 is located at the position 1, and the distance between the electronic device 100 and the electronic device 200 is greater than the second transmission distance, and the electronic device 200 The wireless signal transmitted by the electronic device 100 cannot be received; however, when the electronic device 200 is located at position 2, and the distance between the electronic device 100 and the electronic device 200 is smaller than the second transmission distance, the electronic device 200 can receive the signal transmitted by the electronic device 100. wireless signal.
  • the first transmission distance and the second transmission distance may be the first distance and the second distance, respectively.
  • the actual distance between the electronic device 100 and the electronic device 200 may be smaller than the preset safety distance.
  • the preset safe distance is 30 cm; when the ultra-short-range frame sent by the electronic device 100 is received by the electronic device 200, the actual distance between the electronic device 100 and the electronic device 200 is less than 30 cm.
  • different transmission distances can be set by setting the size of the transmission power.
  • the wireless transmission power corresponding to the first antenna is required to be at least a certain power higher than the wireless transmission power corresponding to the second antenna.
  • the wireless transmission power of any point on the product surface including the external antenna may not exceed the preset power (for example, -65dBm, etc.) to meet the preset safety distance requirements.
  • FIG. 7 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the electronic device of Alisa is the electronic device 100
  • the electronic device of Lucas is the electronic device 200 .
  • Alisa and Lucas are illustrative examples for users.
  • the electronic device 100 may include a first antenna and a second antenna
  • the electronic device 200 may include a third antenna and a fourth antenna. It should be noted that the third antenna and the first antenna belong to the same type of antenna, and the fourth antenna and the second antenna belong to the same type of antenna.
  • the fourth antenna belongs to the “second antenna” of the electronic device 200 .
  • the third antenna belongs to the "first antenna” of the electronic device 200 .
  • the expression “third antenna” is used. That is to say, the expression “fourth antenna” does not mean that the electronic device 200 includes at least four antennas; it is to avoid confusion in expression. That is, the electronic device 200 may include two antennas, the "third antenna” and the “fourth antenna”, and the mobile device is not required to have four antennas.
  • the electronic device 100 may include the first antenna; the electronic device 200 may include the third antenna.
  • the first antenna of the electronic device 100 transmits signals with the first transmission power and the second transmission power respectively, so as to realize the function of a strong antenna or a weak antenna, respectively.
  • the third antenna of the electronic device 200 can also transmit signals with the third transmit power and the fourth transmit power respectively according to the mechanism shown in FIG. 4B , so as to respectively implement the function of a strong antenna or a weak antenna.
  • the fourth transmission power belongs to the “second transmission power” of the electronic device 200 .
  • the third transmission power belongs to the "first transmission power” of the electronic device 200 .
  • the expression "third transmit power” is used. That is to say, using the expression "fourth transmission power” does not mean that the antenna included in the electronic device 200 has four transmission powers; it is to avoid confusion in expression. That is, the electronic device 200 can use the antennas of the "third transmit power” and the "fourth transmit power", and the antenna of the electronic device 200 is not required to have four transmit powers.
  • scenario 1 exemplarily describes the process of Alisa and Lucas adding friends to each other on the social application
  • Scenario 2 exemplarily illustrates the process of Lucas joining a group through an introduction by Alisa on the social application.
  • the embodiments of the present application are described by taking a non-full screen as an example, and the embodiments of the present application are also applicable to full screens, which are not limited in the embodiments of the present application.
  • the following describes the interaction flow of the method for adding friends in the first scenario through the first embodiment to the third embodiment.
  • Embodiment 1 relates to FIGS. 8A to 8C .
  • FIG. 8A shows an interaction flow chart of a method for adding friends in the first scenario. As shown in Figure 8A, the method specifically includes the following steps:
  • the mobile phone 100 receives an operation from the user, and the operation is used to add a friend.
  • the user's operation may be a touch operation or a voice operation, which is not limited in this embodiment of the present application.
  • the user interface 800 is the desktop of the mobile phone 100 of the user Alisa.
  • the desktop of user Alisa's mobile phone 100 includes a clock, a gallery, Apps like Photos, Weather, Browser, Settings, and Social Apps.
  • the mobile phone 100 may display the user interface 810 as shown in (b) of FIG. 8B .
  • the user interface 810 is a display interface of a social application, and the user interface 810 displays the information of the existing contacts of the user Alisa.
  • the user interface 810 of the social application includes an extension control 811, and when the mobile phone 100 detects an operation of clicking the extension control 811, a pop-up box 8100 is displayed. After detecting the operation of clicking the add friend control 8101, the mobile phone 100 will issue the add friend service through the first antenna.
  • the mobile phone 100 may further prompt the user Alisa to touch the mobile phone 200 of the user Lucas, that is, the mobile phone 100 displays the interface 820 shown in (c) of FIG. 8B .
  • Interface 820 includes a prompt box prompting the user to touch a friend device. After receiving the prompt, the user Alisa can bring the mobile phone 100 close to or touch the mobile phone 200 of the user Lucas.
  • the mobile phone 100 publishes a friend adding service message through the first antenna.
  • the mobile phone 100 when the user Alisa opens the "add friend" control 8101 in the social networking application 801 of the mobile phone 100, the mobile phone 100 will publish a message of adding a friend service, which is used to discover the surrounding electronic devices subscribed to the service.
  • the friend adding service message includes a unique identification address such as an IP address or a MAC address of the mobile phone 100 .
  • the friend adding service message further includes the identification of the social networking application 801 .
  • the social application 801 can be uniquely identified by this identification.
  • the friend adding service message further includes the user account of the user Alisa on the social networking application.
  • the mobile phone 200 sends a response message (eg, acknowledgement (ACK) information) through the third antenna, where the response message is used to notify the mobile phone 100 that the service has been received.
  • a response message eg, acknowledgement (ACK) information
  • the mobile phone 200 has subscribed to the friend adding service in advance.
  • the mobile phone 200 of the user Lucas automatically subscribes to the friend adding service when the social application is opened, or automatically subscribes to the friend adding service when the social application is started as an application resident in the background.
  • the mobile phone 200 After the mobile phone 200 receives the message of adding a friend service from the mobile phone 100 , it acquires the unique identification address such as the IP address or MAC address of the mobile phone 100 and the identification of the social application 801 .
  • the response message includes a unique identification address such as an IP address or a MAC address of the mobile phone 200 .
  • the mobile phone 100 can obtain the unique identification address such as the IP address or MAC address of the mobile phone 200, and the mobile phone 200 can also obtain the unique identification address such as the IP address or MAC address of the mobile phone 100 and the unique identification address of the social application 801. identification, the mobile phone 100 and the mobile phone 200 can subsequently send messages to each other through the same social application according to the above-mentioned unique identification address.
  • the mobile phone 100 after receiving the response message, the mobile phone 100 randomly generates a key, and obtains a first message including the key.
  • the mobile phone 100 switches from the first antenna to the second antenna.
  • the mobile phone 100 sends the first message through the second antenna.
  • the mobile phone 100 can switch from the first antenna to the second antenna by controlling the radio frequency switch, and then send the first message through the second antenna; at this time, the first message belongs to the ultra-short-range frame ; In this way, the first message sent by the mobile phone 100 will not be received by the electronic device beyond the preset safe distance from the mobile phone 100 .
  • the first message may be a Wi-Fi awareness frame or a beacon frame.
  • the Wi-Fi aware frame is a publish (Publish) frame, a follow-up (Follow-up) frame or a subscribe (Subscribe) frame. If the first message is a Follow-up frame, the key of user Alisa's mobile phone 100 may be carried in the payload field of the Follow-up frame.
  • Wi-Fi awareness frames are based on Wi-Fi awareness technology.
  • the Wi-Fi perception technology can support point-to-point communication in the scenario where the mobile phone 100 and the mobile phone 200 are not connected to the same router, and can also support the point-to-point communication in the scenario where the mobile phone 100 and the mobile phone 200 are connected to the same router.
  • the mobile phone 100 sends the first message through the second antenna, and the success rate of sending data and receiving data may be reduced, so the mobile phone 100 can repeatedly send the key multiple times.
  • the mobile phone 200 within the second distance between the mobile phone 200 and the mobile phone 100, the mobile phone 200 receives the first message, and obtains the key from the first message.
  • the mobile phone 200 may receive the first message and obtain the key therefrom.
  • the mobile phone 200 acquires the user account of the social application in the mobile phone 200.
  • the user Lucas of the mobile phone 200 opens a social application, and the mobile phone 200 can obtain the user account of the user Lucas from the running social application.
  • the social application of the mobile phone 200 is the same as the social application of the mobile phone 100 .
  • the "user account of the social application" in S8707 includes the user account of the last login to the social application.
  • the mobile phone 200 uses the key to encrypt the user account of the social networking application in the mobile phone 200 to generate a second message, where the second message includes the encrypted user account.
  • the mobile phone 200 acquires the user account of the social application of the mobile phone 200. Since the mobile phone 200 is the mobile phone of the user Lucas, generally speaking, the acquired user account of the social application of the mobile phone 200 is the user of Lucas on the social application. Account, use this key to encrypt Lucas' user account on the social app.
  • the user Lucas will bring the mobile phone 200 close to the user Alisa's mobile phone 100;
  • the distance between the mobile phones 100 is less than or equal to the preset safe distance (eg 30cm), the mobile phone 200 can receive the key from the mobile phone 100, and then the mobile phone 200 uses the key to encrypt the user account of the user Lucas.
  • the present embodiment does not limit the length of time that the mobile phone 200 and the mobile phone 100 are close to each other or the length of time that they touch each other.
  • the user Alisa can remove the mobile phone 100.
  • the user Alisa after the user Alisa clicks the operation of adding a friend control 8101, and then approaches or touches the mobile phone 200 of the user Lucas, when the mobile phone of the user Alisa receives the response message shown in S8716, and/or the mobile phone of the user Lucas receives the response message shown in S8716 After receiving the response message shown in S8714, the user Alisa can remove the mobile phone 100.
  • the mobile phone 200 switches the third antenna to the fourth antenna.
  • the mobile phone 200 sends the second message to the mobile phone 100 through the fourth antenna.
  • the mobile phone 200 of the user Lucas can switch from the third antenna to the fourth antenna by controlling the radio frequency switch, and then send the second message through the fourth antenna; at this time, the second message belongs to Ultra-short-range frame; in this way, the second message sent by the mobile phone 200 will not be received by the electronic device 100 outside the preset safe distance.
  • the second message may be a Wi-Fi awareness frame or a beacon frame.
  • the Wi-Fi awareness frame is a Publish frame, a Follow-up frame or a Subscribe frame. If the second message is a Follow-up frame, the encrypted Lucas user account on the social application can be carried in the Follow-up In the payload field of the up frame.
  • the mobile phone 100 of the user Alisa may receive the second message from the mobile phone 200 .
  • the mobile phone 100 of the user Alisa can switch from the second antenna to the first antenna by controlling the radio frequency switch.
  • the mobile phone 100 sends a confirmation message to the mobile phone 200 through the first antenna.
  • the mobile phone 200 switches from the fourth antenna to the third antenna.
  • the mobile phone 200 of the user Lucas can switch from the fourth antenna to the third antenna by controlling the radio frequency switch.
  • the mobile phone 100 decrypts the second message using the key to obtain the user account.
  • the mobile phone 100 After the mobile phone 100 randomly generates the key in S8703, the key is stored locally. At this time, the mobile phone 100 can use the key to decrypt the second message and obtain the user account of the user Lucas on the social application.
  • the mobile phone 100 sends a request message to the application server of the social application through the first antenna, where the request message includes the user accounts of both parties on the social application.
  • the request message sent by the mobile phone 100 to the application server of the social application includes the user account of the user Lucas on the social application and the user account of the user Alisa on the social application.
  • the request message is used to request the user account of the user Alisa on the social application and the user account of the user Lucas on the social application to be friends with each other.
  • the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch the add friend control 8101 to move the mobile phone 100 close to or touch it.
  • the user of the mobile phone 200 does not need any operation to obtain the friend account by touching the mobile phone 200 of the friend; or, the user of the mobile phone 100 does not need to actively search, the user of the mobile phone 100 only needs to touch the add friend control 8101, and the user of the mobile phone 200 only needs to
  • the mobile phone 200 can be approached or touched by the mobile phone 100; in this way, the number of interface operations is effectively reduced, and the user experience is improved.
  • the application server sends a response message to the request message to the mobile phone 200.
  • the mobile phone 200 may further display a prompt message that the friend is successfully added, which is used to prompt the user that the friend is successfully added.
  • the user Lucas does not need to manually confirm, and can receive the message of the success of adding friends from the application service.
  • the distance between the mobile phone 100 and the mobile phone 200 will be less than the preset reflection distance (eg 30cm), so the mobile phone 200 can receive the key from the mobile phone 100, which is equivalent to the user Lucas has actively authorized user Alisa to add him as a friend, so there is no need for user Lucas to manually confirm the operation.
  • the mobile phone 200 may also only display a prompt message that a friend has been successfully added.
  • the interface 830 displays a prompt message from the social application to notify the user that Lucas has added a new friend.
  • the mobile phone 200 may only send out a prompt tone for receiving a prompt message that the friend has been successfully added.
  • the mobile phone 200 may not only send out a prompt tone for receiving the prompt message that the friend is successfully added, but also display the prompt message that the friend is successfully added.
  • the application server sends a response message to the request message to the mobile phone 100.
  • S8717 is located after S8716 in FIG. 8A, in practice, the application server can execute S8717 and S8716 in parallel, or execute S8717 first and then execute S8716, or execute S8716 first and then execute S8717.
  • the mobile phone 100 displays a prompt message that the friend is successfully added.
  • the mobile phone 100 may only send out a prompt tone for the prompt message that the friend has been successfully added.
  • the mobile phone 100 may not only send out a prompt tone for receiving the prompt message that the friend is successfully added, but also display the prompt message that the friend is successfully added.
  • the mobile phone 100 may only display a prompt message that the friend has been successfully added.
  • the mobile phone 100 After the mobile phone 100 receives the prompt message that the friend is successfully added, the user Alisa and the user Lucas can communicate in real time; for details, refer to the example shown in FIG. 1D , which will not be repeated here.
  • the reason why the S8710 uses weak antennas for transmission is to improve security. Because in this embodiment, it needs to be considered that although the illegal electronic device (attack device) is not in the vicinity of the mobile phone 200, the illegal electronic device (attack device) can simulate the mobile phone 100 by means of an external amplifier or the like, namely S8700 to S8701, All or part of "send first message" in S8703, S8705, S8711 to S8712, S8714, S8718, etc., may be simulated by illegal electronic devices.
  • the illegal electronic device simulates the mobile phone 100 and executes all or part of "send the first message" in S8700 to S8701, S8703, S8705, S8711 to S8712, S8714, S8718, etc.
  • the mobile phone 200 sends the second message through the weak antenna, so the illegal electronic device (attack device) cannot receive the second message at S8711, so it cannot decrypt it with the key generated by itself, and thus cannot obtain the user Lucas on the social application user account.
  • the user account of the user Lucas on the social application is prevented from being acquired by an illegal electronic device (attack device), which brings a better experience to the user.
  • the illegal electronic device may receive the second message; while in the previous S8700 to S8701 and S8703 to S8705 " “Send the first message” is also executed by an illegal electronic device (attack device), so in S8714, the illegal electronic device (attack device) can decrypt it with the key generated by itself, and obtain the mobile phone 200 on the social application user account.
  • the third antenna ie, a strong antenna
  • subsequent S8715 and S8718 may be executed, and the application server will execute the subsequent S8716 and S8717; the mobile phone 100 will receive a message that a stranger has been added as a friend, which will affect the use of the mobile phone 100 in social applications and bring inconvenience to the user .
  • S8715, S8716 and S8717 involve the communication interaction between the mobile phone 100, the mobile phone 200 and the application server, and the communication interaction is ensured by the encryption mechanism and decryption mechanism of the social application itself to ensure communication security.
  • the S8701 and the S8702 are only required on the premise that the mobile phone 100 and the mobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If the mobile phone 100 and the mobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S8701 and S8702 may not be set.
  • the response message may be the mobile phone 200 User accounts on social apps were successfully added, or failed to be added.
  • the application server sends a request to the mobile phone 100.
  • the response message of the message is used to prompt repeated addition, or the response message is used to prompt that the user account of the mobile phone 200 on the social application has been friends with the user account of the mobile phone 100 on the social application, and does not need to be added.
  • the mobile phone 100 uses the first antenna by default until the mobile phone 100 switches to the second antenna. After the mobile phone 100 switches to the second antenna, the mobile phone 100 sends messages through the second antenna until the mobile phone 100 switches to the second antenna. to the first antenna. Likewise, the mobile phone 200 passes through the third antenna by default until the mobile phone 200 switches to the fourth antenna. After the mobile phone 200 is switched to the fourth antenna, the mobile phone 200 sends messages through the fourth antenna until the mobile phone 200 is switched to the third antenna.
  • the user Alisa and the user Lucas are used as examples to exemplarily describe the process of adding friends. It should be understood that this method of adding friends is also applicable to adding friends among other users, which is not limited in this application.
  • a Wi-Fi sensing channel may be established between the mobile phone 100 and the mobile phone 200 through the Wi-Fi sensing technology, so the mobile phone 100 and the mobile phone 200 do not need to access the same router.
  • the mobile phone 100 includes a first antenna and a second antenna
  • the mobile phone 200 includes a third antenna and a fourth antenna, that is, both the mobile phone 100 and the mobile phone 200 support the transmission and reception of ultra-short-range frames. Therefore, other electronic devices outside the preset safe distance cannot receive the ultra-short-range frame, so the security of communication can be guaranteed.
  • the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.
  • the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch the add friend control 8101 to move the mobile phone 100 close to or touch it.
  • the user of the mobile phone 200 does not need any operation to obtain the friend account by touching the mobile phone 200 of the friend; or, the user of the mobile phone 100 does not need to actively search, the user of the mobile phone 100 only needs to touch the add friend control 8101, and the user of the mobile phone 200 only needs to
  • the mobile phone 200 can be approached or touched by the mobile phone 100; in this way, the number of interface operations is effectively reduced, and the user experience is improved.
  • Scenario 1 can also be further described through Embodiment 2.
  • the main difference between the second embodiment and the first embodiment is that in the second embodiment, the mobile phone 200 does not send the second message through the fourth antenna, but sends the second message through the third antenna; During the adding process, in order to improve the security and reliability of the friend adding result, the user of the mobile phone 200 needs to participate in the confirmation.
  • FIGS. 9A to 9B The second embodiment relates to FIGS. 9A to 9B .
  • the mobile phone 100 may include a first antenna and a second antenna
  • the mobile phone 200 may include a third antenna; the third antenna here is equivalent to a strong antenna or a true antenna.
  • FIG. 9A shows an interaction flow chart of a method for adding friends in the first scenario. As shown in Figure 9A, the method specifically includes the following steps:
  • S9700 to S9708 They are the same as those of S8700 to S8708 respectively. Please refer to the description of S8700 to S8708, and will not be repeated here.
  • the mobile phone 200 sends the second message to the mobile phone 100 through the third antenna.
  • the difference between the S9709 and the S8710 is that the mobile phone 200 sends the second message through the third antenna. That is to say, this embodiment does not require the mobile phone 200 to support the transmission of ultra-short-range frames, but only requires the mobile phone 100 to support the transmission of ultra-short-range frames.
  • S9710 to S9712 They are the same as S8711 to S8713 respectively. Please refer to the description of S8711 to S8713, and details are not repeated here.
  • the application server forwards the request message to the mobile phone 200.
  • the mobile phone 200 after receiving the request message from the application server, the mobile phone 200 receives an operation from the user, and the operation is used for confirming approval or refusal to be added as a friend.
  • the reason why the application server needs to execute S9713 and the mobile phone 200 to execute S9714 and S9715 is because in this embodiment, it needs to be considered that although the illegal electronic device (attack device) is not near the mobile phone 200, the illegal electronic device (attack device) can
  • the mobile phone 100 is simulated by means of an external amplifier, that is, all or part of "send first message" in S9700 to S9701, S9703, S9705, S9711 to S9712, S9717, etc., may be simulated by illegal electronic devices.
  • the illegal electronic device (attacking device) can receive the second message in S9709, and decrypt it using the key generated by itself, thereby obtaining the user account of the user Lucas on the social application.
  • the user account of the user Lucas on the social application is acquired by an illegal electronic device (attack device), which brings a bad experience to the user.
  • the application server needs to execute S9713, and the mobile phone 200 needs to execute S9714 and S9715, so that S9714 is provided to the user Lucas of the mobile phone 200 for further confirmation steps.
  • the operation received by the mobile phone 200 is used to confirm the consent, it means that the user Lucas confirms that the user (for example, Alisa) is confirmed to be added; if the operation received by the mobile phone 200 is used to refuse to be added as a friend, it means that the user Lucas learns that the request to be added is not a user identified by user Lucas (eg, a stranger other than Alisa). That is, the user Lucas of the mobile phone 200 further confirms to play a role of security protection.
  • the mobile phone 200 displays the interface 940 shown in FIG. 9B .
  • Interface 940 displays the new friend's user account and even displays user image information.
  • the user Lucas can distinguish and confirm whether it is the user account that he wants to add (eg, Alisa); if so, the user Lucas can touch the consent control 941 ;
  • the user Lucas can show the user avatar or user account information displayed on the mobile phone 200 to the user Alisa at this time; if the user Alisa confirms that it is his own account number and avatar, he will confirm to the user Lucas Responses (eg, answering user Lucas "It's my account number, that's right" in a two-person conversation). After the user Alisa confirms to the user Lucas that the avatar or user account displayed on the interface is correct, the user Lucas clicks and operates the consent control 941 shown in FIG. 9B .
  • the user Lucas clicks and operates the consent control 941 shown in FIG. 9B .
  • the user Alisa when the user Alisa confirms that the avatar displayed on the interface is not the avatar of the user Alisa, the user Alisa will inform the user Lucas, so that the user Lucas will click and operate the rejection control 942 shown in FIG. 9B, so as to avoid being added as a friend by an illegal user .
  • the user Lucas when the user Lucas confirms that the avatar displayed on the interface is not the avatar of the user Alisa, or, after negotiating with the user Alisa, the user Lucas confirms that the avatar displayed on the interface is not the avatar of the user Alisa, the user Lucas clicks the operation shown in FIG. 9B As shown in the reject control 942, it is possible to avoid adding illegal users as friends.
  • the mobile phone 200 receives an operation from the user, and the operation is used to instruct the user to agree or refuse to be added as a friend.
  • the mobile phone 200 sends a reply message to the application server, where the reply message is used to notify the friend addition result.
  • the application server sends a response message of the request message to the mobile phone 100.
  • the mobile phone 100 may display the user interface 190 as shown in (j) in FIG. 1D .
  • the user interface 190 includes a message for prompting the user Alisa's mobile phone 100 to pass the verification, and the user Alisa can send an instant message to and receive an instant message from the other party in the user interface 190 .
  • S9712, S9713, S9715, and S9716 involve the communication interaction between the mobile phone 100, the mobile phone 200 and the application server. This communication interaction is ensured by the encryption mechanism and decryption mechanism of the social application itself to ensure communication security. .
  • S9701 and S9702 are only required on the premise that the mobile phone 100 and the mobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If the mobile phone 100 and the mobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S9701 and S9702 may not be set.
  • the response The message may be that the user account of the mobile phone 200 on the social application has been successfully added, or the addition has failed.
  • the application server sends the mobile phone to the mobile phone.
  • the response message sent by 100 to the friend addition request is used to prompt the user to add repeatedly, or to prompt that the user account of the mobile phone 200 on the social application is already friends with the user account of the mobile phone 100 on the social application, and no repeated addition is required.
  • the mobile phone 100 uses the first antenna by default until the mobile phone 100 switches to the second antenna in this embodiment. After the mobile phone 100 switches to the second antenna, the mobile phone 100 sends messages through the second antenna until the mobile phone 100 switches to the second antenna. an antenna. The cell phone 200 is always sending messages through the third antenna.
  • a Wi-Fi sensing channel may be established between the mobile phone 100 and the mobile phone 200 through the Wi-Fi sensing technology, so the mobile phone 100 and the mobile phone 200 do not need to access the same router.
  • the mobile phone 100 includes a first antenna and a second antenna, that is, supports the transmission and reception of ultra-short-range frames.
  • the mobile phone 200 includes a third antenna that supports long-distance communication but does not support transmission of ultra-short-distance frames, or, even supports transmission of ultra-short-distance frames, but does not use it. Therefore, other electronic devices outside the preset safe distance cannot receive the ultra-short-range frame sent by the mobile phone 100, and there is still a confirmation operation by the mobile phone 200, so the security of communication can be guaranteed.
  • the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.
  • the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch the add friend control 8101 to move the mobile phone 100 close to or touch it.
  • the user of the mobile phone 200 only needs to confirm the operation; or, the user of the mobile phone 100 does not need to actively search, the user of the mobile phone 100 only needs to touch the add friend control 8101, and the user of the mobile phone 200 only needs to touch It is only necessary to bring the mobile phone 200 close to or touch the mobile phone 100 and confirm the operation; in this way, the number of interface operations is effectively reduced, and the user experience is improved.
  • Embodiment 3 The main difference between Embodiment 3 and Embodiment 1 and Embodiment 2 is that in Embodiment 3, the mobile phone 100 does not randomly generate and send the key, and the mobile phone 200 directly sends the mobile phone 100 the user account of the mobile phone 200 on the social application; therefore In the friend adding process shown in this embodiment, in order to improve the security and reliability of the friend adding result, the user of the mobile phone 100 needs to participate in the confirmation.
  • the mobile phone 100 may include a first antenna; the mobile phone 200 may include a third antenna and a fourth antenna; the first antenna here is equivalent to a strong antenna or a true antenna.
  • FIG. 10A shows the interaction flow of another method for adding friends in the first scenario. As shown in Figure 10A, the method specifically includes the following steps:
  • S1000 to S1001 they are the same as those of S9700 to S9701, please refer to the description of S9700 to S9701, and are not repeated here.
  • the mobile phone 200 acquires the user account of the mobile phone 200 on the social application, and generates a first message 20, where the first message 20 includes the user account of the mobile phone 200 on the social application.
  • the mobile phone 200 of the user Lucas has subscribed to the friend adding service in advance, so it can receive the friend adding service published by the mobile phone 100 .
  • the mobile phone 200 automatically subscribes to the friend adding service when running the social application, or subscribes to the friend adding service when the social application is started as a service resident in the background.
  • the user Lucas of the mobile phone 200 opens a social application, and the mobile phone 200 can obtain the user account of the user Lucas from the running social application.
  • the social application of the mobile phone 200 is the same as the social application of the mobile phone 100 .
  • the "user account of the social application" in S1002 includes the user account that logged in the social application last time.
  • the mobile phone 200 switches from the third antenna to the fourth antenna.
  • the mobile phone 200 sends the first message 20 to the mobile phone 100 through the fourth antenna.
  • the mobile phone 200 of the user Lucas receives the friend adding service message published by the mobile phone
  • the mobile phone 200 can switch from the third antenna to the fourth antenna by controlling the radio frequency switch, and then send the first message 20 through the fourth antenna.
  • the first message 20 belongs to the ultra-short-range frame, so that the first message 20 sent by the mobile phone 200 will not be received by the mobile phone outside the safe distance.
  • the mobile phone 100 receives the first message 20, and sends a confirmation message through the first antenna;
  • the mobile phone 100 acquires and displays the user account of the mobile phone 200 on the social application.
  • the mobile phone 100 may receive the first message 20 , and then obtain the user account of the mobile phone 200 on the social application from the first message 20 . .
  • the user Lucas will bring the mobile phone 200 close to the mobile phone 100 of the user Alisa.
  • the distance between 200 is less than or equal to a preset safe distance (eg, 30 cm), and the mobile phone 100 can receive the first message.
  • the mobile phone 100 After acquiring the user account of the mobile phone 200 on the social application, the mobile phone 100 displays the user account.
  • the mobile phone 200 switches to the third antenna.
  • the mobile phone 200 can switch from the second antenna to the first antenna by controlling the radio frequency switch.
  • the mobile phone 100 receives an operation from the user, and the operation is used to confirm approval or refusal to add a friend.
  • the subsequent steps are performed; otherwise, the process ends, and the subsequent steps are not performed.
  • the illegal electronic device can simulate the mobile phone 200 by means of an external amplifier or the like. All or part of a message, etc., may be executed by illegal electronic devices (attack devices).
  • the user account of the user Alisa on the social application wants to add the user account of the user Lucas on the social application as a friend, in fact, the user account of the user Alisa on the social application has added an illegal electronic device (attack device) as a friend on the user account on the social application. This obviously brings a bad experience to the user and causes inconvenience to the user.
  • S1008 provides further confirmation steps to Alisa, the user of the mobile phone 100 . If the operation received by the mobile phone 100 is used to confirm the consent, it means that the user Alisa confirms that he is adding the user account of the mobile phone 200 on the social application (for example, the user account of the user Lucas on the social application); if the operation received by the mobile phone 100 If it is used to reject, it means that the user Alisa confirms that he is not adding the user account of the mobile phone 200 on the social application, but is adding a stranger's user account (for example, the user account of a stranger other than the user Lucas on the social application). In this way, further confirmation by the user Alisa of the mobile phone 100 plays a role of security protection.
  • the mobile phone 100 may display the interface 1020 as shown in FIG. 10B .
  • the interface 1020 displays the new friend's user account and even displays the corresponding user image information.
  • the user Alisa can identify whether it is the user account (eg, Lucas) that he wishes to add; if so, the user Alisa can touch the consent control 1021; otherwise, the user Alisa can touch the reject control 1022.
  • the user account eg, Lucas
  • the user Alisa can show the user avatar or user account information displayed on the mobile phone 100 to the user Lucas at this time; if the user Lucas confirms that it is his own account and avatar, he will confirm to the user Alisa Responses (eg, answering user Alisa "It's my account number, that's right" in a two-person conversation). After the user Lucas confirms to the user Alisa that the avatar or user account displayed on the interface is correct, the user Alisa clicks and operates the consent control 1021 shown in FIG. 10B .
  • the user Lucas when the user Lucas confirms that the avatar displayed on the interface is not the avatar of the user Alisa, the user Lucas will inform the user Alisa, so that the user Alisa will click and operate the reject control 1022 shown in FIG. 10B, so as to avoid being added as a friend by an illegal user .
  • the mobile phone 200 may also display the interface 830 as shown in FIG. 8C, reminding the user that Lucas has added a new friend.
  • Cell phone 100 may also display a similar interface.
  • the mobile phone 100 when the mobile phone 100 receives the user's operation to confirm the agreement to add friends, the mobile phone 100 sends a request message to the application server, the request message is used to request to add friends, and the request message includes the user accounts of both parties on the social application.
  • the request message includes the user account of the mobile phone 200 on the social application and the user account of the mobile phone 100 on the social application.
  • the application server after receiving the request message, the application server sends a response message of the request message to the mobile phone 200 .
  • the mobile phone 200 may further display a prompt message that the friend has been successfully added, which is used to prompt the user that the friend has been successfully added.
  • prompting may also be provided by audio such as voice.
  • the application server sends a response message of the request message to the mobile phone 100 .
  • the response The message may be that the user account of the mobile phone 200 on the social application has been successfully added, or the addition has failed.
  • the application server sends the mobile phone to the mobile phone.
  • the response message sent by 100 to the friend addition request is used to prompt the user to add repeatedly, or to prompt that the user account of the mobile phone 200 on the social application is already friends with the user account of the mobile phone 100 on the social application, and no repeated addition is required.
  • the mobile phone 100 displays a prompt message that the friend is successfully added.
  • the user Alisa and the user Lucas can communicate instantly.
  • the specific interface of instant messaging reference may be made to the interface shown in FIG. 1D , which will not be repeated here.
  • S1009, S1010, S1011, etc. involve the communication interaction between the mobile phone 100, the mobile phone 200 and the application server, and the communication interaction is ensured by the encryption mechanism and decryption mechanism of the social application itself to ensure communication security.
  • the mobile phone 100 passes the first antenna by default; the mobile phone 200 passes the third antenna by default, until the mobile phone 200 switches to the fourth antenna, and after the mobile phone 200 switches to the fourth antenna, the mobile phone 200 passes the fourth antenna The antenna sends the message until the handset 200 switches to the third antenna.
  • the mobile phone 200 sends the first message through the fourth antenna. That is to say, this embodiment does not require the mobile phone 100 to support the transmission of ultra-short-range frames, but only needs the mobile phone 200 to support the transmission of ultra-short-range frames.
  • a Wi-Fi sensing channel can be established between the mobile phone 100 and the mobile phone 200 through the Wi-Fi sensing technology, so the mobile phone 100 and the mobile phone 200 do not need to be connected to the same router.
  • the mobile phone 200 includes a third antenna and a fourth antenna, that is, supports the transmission of ultra-short-range frames. Therefore, other electronic devices outside the preset safe distance cannot receive the first message sent by the mobile phone 200, and there is still a confirmation operation on the mobile phone 100, so the security of communication can be guaranteed.
  • the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.
  • the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch the add friend control 8101 to move the mobile phone 100 close to or touch it.
  • the user of the mobile phone 200 only needs to bring the mobile phone 200 close to or touch the mobile phone 100 ; in this way, the number of interface operations is effectively reduced, and the user experience is improved.
  • the relevant content of the third embodiment is the same as the relevant content of the second embodiment.
  • first antenna under the first transmission power and “the first antenna under the second transmission power” are the logically first antenna and the logically second antenna; the above-mentioned “third antenna under the third transmission power” “Antenna” and “The third antenna under the fourth transmit power” are the third antenna logically and the fourth antenna logically.
  • the logically first antenna and the logically second antenna can be implemented by adjusting the transmit power through registers inside the chip.
  • the logical third antenna and the logical fourth antenna can be implemented by adjusting the transmit power through registers inside the chip.
  • FIGS. 11A to 11D The fourth embodiment relates to FIGS. 11A to 11D .
  • the mobile phone 100 may include a first antenna and a second antenna
  • the mobile phone 200 may include a third antenna and a fourth antenna.
  • FIG. 11A shows the flow of the method for adding group members in the second scenario. As shown in Figure 11A, the method specifically includes the following steps:
  • the mobile phone 100 receives an operation from the user, and the operation is used to add a group member.
  • the operation may be a touch operation or a voice operation, which is not limited in this embodiment of the present application.
  • This operation acts on the controls in the group of the social application (that is, the controls that exist only after entering a certain group), rather than the controls outside the group.
  • the mobile phone 100 issues an add group member service.
  • the user interface 11500 is a display interface of a social application, and the user interface 11500 displays information of existing contacts.
  • the user interface 11500 of the social application includes a family group control 11501 .
  • the mobile phone 100 displays the interface 11510 as shown in (b) of FIG. 11B .
  • Interface 11510 includes extension controls 11511 .
  • the mobile phone 100 When the mobile phone 100 detects the operation on the extension control 11511 , the mobile phone 100 displays a pop-up box as shown in the interface 11510 , and the pop-up box includes the add group member control 11512 . After the mobile phone 100 detects the operation on the add group member control 11512, the mobile phone 100 will publish a service message of adding a group member through the first antenna.
  • the mobile phone 100 can also prompt the user Alisa to touch the mobile phone 200 of the user Lucas through its interface (eg, the mobile phone 100 display interface 11520).
  • Interface 11520 includes a prompt box prompting the user to touch a friend's device; the prompt box displays a prompt message. After seeing the prompt message, the user Alisa can bring the mobile phone 100 close to or touch the mobile phone 200 of the user Lucas.
  • the mobile phone 100 publishes a service message of adding group members through the first antenna.
  • the mobile phone 100 when the user Alisa opens the "Add group member" control 11512 in the social application of the mobile phone 100, the mobile phone 100 will publish a message of adding a group member service, which is used to discover surrounding electronic devices subscribed to the group member adding service. .
  • "publish" in S1101 is in the form of broadcasting.
  • the adding group member service message includes a unique identification address such as an IP address or a MAC address of the mobile phone 100 .
  • the adding group member service message further includes the identification of the social application.
  • the social application can be uniquely identified by this identifier.
  • the adding group member service message further includes the user account of the user Alisa on the social networking application.
  • the mobile phone 200 after the mobile phone 200 receives the adding group member service message, the mobile phone 200 sends a response message (for example, acknowledgement (ACK) information) to the mobile phone 100, and the response message is used to indicate that the mobile phone 100 has received the adding group member service information.
  • a response message for example, acknowledgement (ACK) information
  • the mobile phone 200 of the user Lucas has subscribed to the service of adding group members in advance.
  • the mobile phone 200 downloads and installs the social application it automatically subscribes to the service of adding group members, or the social application as a service resident in the background is set by the system to automatically subscribe to the service of adding group members.
  • S1103 to S1114 they are respectively the same as S8703 to S8714, please refer to the description of S8703 to S8714, and are not repeated here.
  • the distance between the mobile phone 100 and the mobile phone 200 will be smaller than the preset safe distance (for example, 30cm, etc.), so the mobile phone 200 to receive the key from the phone 100. That is to say, user Lucas has actively authorized user Alisa to add him as a group member, so there is no need for user Lucas to manually confirm the operation.
  • the preset safe distance for example, 30cm, etc.
  • the mobile phone 100 sends a request message to the application server of the social application, where the request message is used to request to add a group member.
  • the request message includes the user account of the mobile phone 200 on the social application, the group identifier corresponding to the "Add group member” control of the mobile phone 100 on the social application, and the user account of the mobile phone 100 on the social application. It is requested to add the user account of the mobile phone 200 in the social application to the group where the group ID corresponding to the "Add group member” control of the mobile phone 100 in the social application is located. Taking the group as the "family group” as an example, after acquiring the user account of the mobile phone 200 on the social application, the mobile phone 100 can request to add it to the "family group".
  • the application server sends a response message of the request message to the mobile phone 200 .
  • user Lucas can receive the response message from the application server without manual confirmation.
  • the mobile phone 200 may also display a prompt message that a group member has been added.
  • user interface 1130 displays a prompt message from the social application.
  • the prompt message is used to inform the user that Lucas has been added to a new group.
  • the mobile phone 200 may further display a prompt message that the group member is successfully added, for prompting that the group member is successfully added.
  • the application server sends a response message of the request message to the mobile phone 100.
  • S1116 and S1117 are not limited in this application.
  • the mobile phone 100 displays a prompt message that the group member is successfully added.
  • the mobile phone 100 of the user Alisa may display the user interface 1140 as shown in FIG. 11D .
  • Interface 1140 is displayed with a notification.
  • the notification can include: You invited Lucas to join the group chat.
  • S1115 , S1116 , and S1117 involve the communication interaction between the mobile phone 100 , the mobile phone 200 and the application server, and the communication interaction is ensured by the encryption mechanism and decryption mechanism of the social application itself to ensure communication security.
  • S1101 and S1102 are only required on the premise that the mobile phone 100 and the mobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If the mobile phone 100 and the mobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S1101 and S1102 may not be set.
  • the response message may indicate that the user account of the mobile phone 200 on the social application has been successfully added, or the addition has failed.
  • the user account of the mobile phone 200 on the social application already belongs to the group corresponding to the "Add group member” control on the mobile phone 100 on the social application. If a member of the group is identified, the application server sends a response message to the mobile phone 100 to prompt the user to add repeatedly, or to prompt the mobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of the mobile phone 100
  • the members of the group where the corresponding group ID is located do not need to be added repeatedly.
  • the mobile phone 100 passes through the first antenna until the mobile phone 100 switches to the second antenna. After the mobile phone 100 switches to the second antenna, the mobile phone 100 sends a message through the second antenna until the mobile phone 100 switches to the second antenna. an antenna.
  • the mobile phone 200 passes through the third antenna by default until the mobile phone 200 switches to the fourth antenna. After the mobile phone 200 is switched to the fourth antenna, the mobile phone 200 sends messages through the fourth antenna until the mobile phone 200 is switched to the third antenna.
  • a Wi-Fi sensing channel may be established between the mobile phone 100 and the mobile phone 200 through the Wi-Fi sensing technology, so the mobile phone 100 and the mobile phone 200 do not need to access the same router.
  • the mobile phone 100 includes a first antenna and a second antenna
  • the mobile phone 200 includes a third antenna and a fourth antenna, that is, both the mobile phone 100 and the mobile phone 200 support the transmission and reception of ultra-short-range frames. Therefore, other electronic devices outside the preset safe distance cannot receive the ultra-short-range frame, so the security of communication can be guaranteed.
  • the user only needs to touch the add group member control, and then the mobile phone 100 can be approached or touched by the friend's mobile phone 200 to obtain the friend's account, and the group member can be added automatically, which effectively reduces the user's operation. frequency.
  • the mobile phone 200 does not send the second message through the fourth antenna, but sends the second message through the third antenna;
  • the mobile phone 100 may include a first antenna; the mobile phone 200 may include a third antenna and a fourth antenna; the first antenna here is equivalent to a strong antenna or a true antenna.
  • FIG. 12A shows the interaction flow of the method for adding group members in the second scenario. As shown in Figure 12A, the method specifically includes the following steps:
  • S1200 to S1208 they are the same as those of S1100 to S1108 respectively, please refer to the description of S1100 to S1108, and details are not repeated here.
  • the mobile phone 200 sends the second message to the mobile phone 100 through the third antenna.
  • S1209 the difference between S1209 and the above S1110 is that the mobile phone 200 sends the second message through the third antenna. That is to say, this embodiment does not require the mobile phone 200 to support the transmission of ultra-short-range frames, but only requires the mobile phone 100 to support the transmission of ultra-short-range frames.
  • S1210 to S1212 are the same as S1111 to S1113 respectively, please refer to the description of S1111 to S1113 , and details are not repeated here.
  • the application server sends a request message to the mobile phone 200, where the request message is used for requesting to add a group member.
  • the mobile phone 200 after receiving the request message from the application server, the mobile phone 200 receives an operation from the user, and the operation is used for confirming approval or refusal to be added as a group member.
  • the reason why the application server needs to execute S1213 and the mobile phone 200 to execute S1214 and S1215 is because in this embodiment, it needs to be considered that although the illegal electronic device (attack device) is not near the mobile phone 200, the illegal electronic device (attack device) can
  • the mobile phone 100 is simulated by means of an external amplifier, that is, all or part of "send first message" in S1200 to S1201, S1203, S1205, S1211 to S1212, S1217, etc., may be simulated by illegal electronic devices.
  • the illegal electronic device (attacking device) can receive the second message in S1209, and decrypt it using the key generated by itself, thereby obtaining the user account of the user Lucas on the social application.
  • the user account of the user Lucas on the social application is acquired by an illegal electronic device (attack device), which brings a bad experience to the user.
  • the application server needs to execute S1213, and the mobile phone 200 needs to execute S1214 and S1215, so that S1214 is provided to the user Lucas of the mobile phone 200 for further confirmation steps.
  • the operation received by the mobile phone 200 is used to confirm the consent, it means that the user Lucas confirms that the request to add is the group confirmed by the user Lucas (for example, the family group of the mobile phone 100 on the social application); if the operation received by the mobile phone 200 is for If the user refuses to be added as a group member, it means that the user Lucas knows that the group requested to be added is not a group confirmed by the user Lucas (for example, a group other than the family group on the mobile phone 100 on the social application). That is, the user Lucas of the mobile phone 200 further confirms to play a role of security protection.
  • the mobile phone 200 sends a reply message of the request message to the application server, where the reply message is used to notify the group member of the addition result.
  • the application server sends a response message to the mobile phone 100.
  • the response message may indicate that the user account of the mobile phone 200 on the social application has been successfully added, or the addition has failed.
  • the user account of the mobile phone 200 on the social application already belongs to the group corresponding to the "Add group member” control on the mobile phone 100 on the social application. If a member of the group is identified, the application server sends a response message to the mobile phone 100 to prompt the user to add repeatedly, or to prompt the mobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of the mobile phone 100
  • the members of the group where the corresponding group ID is located do not need to be added repeatedly.
  • the mobile phone 100 receives a response message. If the response message indicates that the group member is added successfully, the mobile phone 100 displays a prompt message that the group member was added successfully; if the response message indicates that the group member was added failed, the mobile phone 100 displays the group member added Failed prompt message.
  • the mobile phone 100 of the user Alisa may display the user interface 1140 as shown in FIG. 11D .
  • Interface 1140 is displayed with a notification.
  • the notification can include: You invited Lucas to join the group chat.
  • S1212, S1213, S1215, and S1216, etc. involve the communication interaction between the mobile phone 100, the mobile phone 200 and the application server. This communication interaction is ensured by the encryption mechanism and decryption mechanism of the social application itself to ensure communication security. .
  • S1201 and S1202 are only required on the premise that the mobile phone 100 and the mobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If the mobile phone 100 and the mobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S1201 and S1202 may not be set.
  • the response message may indicate that the user account of the mobile phone 200 on the social application has been successfully added, or the addition has failed.
  • the user account of the mobile phone 200 on the social application already belongs to the group corresponding to the "Add group member” control on the mobile phone 100 on the social application. If a member of the group is identified, the application server sends a response message to the mobile phone 100 to prompt the user to add repeatedly, or to prompt the mobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of the mobile phone 100
  • the members of the group where the corresponding group ID is located do not need to be added repeatedly.
  • the mobile phone 100 uses the first antenna by default until the mobile phone 100 switches to the second antenna in this embodiment. After the mobile phone 100 switches to the second antenna, the mobile phone 100 sends messages through the second antenna until the mobile phone 100 switches to the second antenna. an antenna. The cell phone 200 is always sending messages through the third antenna.
  • a Wi-Fi sensing channel may be established between the mobile phone 100 and the mobile phone 200 through the Wi-Fi sensing technology, so the mobile phone 100 and the mobile phone 200 do not need to access the same router.
  • the mobile phone 100 includes a first antenna and a second antenna, that is, supports the transmission and reception of ultra-short-range frames.
  • the mobile phone 200 includes a third antenna that supports long-distance communication but does not support transmission of ultra-short-distance frames, or, even supports transmission of ultra-short-distance frames, but does not use it. Therefore, other electronic devices outside the preset safe distance cannot receive the ultra-short-range frame sent by the mobile phone 100, and there is still a confirmation operation by the mobile phone 200, so the security of communication can be guaranteed.
  • the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.
  • the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch the add group member control, and move the mobile phone 100 close to or
  • the user account of the mobile phone 200 on the social application can be obtained by touching the mobile phone 200, and the user of the mobile phone 200 only needs to confirm the operation; or, the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch to add a group member Controls, the user of the mobile phone 200 only needs to move the mobile phone 200 close to or touch the mobile phone 100 and confirm the operation; thus, the number of operations by the user is effectively reduced and the user experience is improved.
  • the relevant content of the fifth embodiment is the same as the relevant content of the fourth embodiment.
  • Scenario 2 can also be further elaborated through Embodiment 6.
  • the main difference between the sixth embodiment and the fifth embodiment and the fourth embodiment is that in the sixth embodiment, the mobile phone 100 does not randomly generate and send the key, and the mobile phone 200 directly sends the mobile phone 100 the user account of the mobile phone 200 on the social application; therefore In the group member addition process shown in this embodiment, in order to improve the security and reliability of the group member addition result, the user of the mobile phone 100 needs to participate in the confirmation.
  • the mobile phone 100 may include a first antenna; the mobile phone 200 may include a third antenna and a fourth antenna; the first antenna here is equivalent to a strong antenna or a true antenna.
  • FIG. 13 shows the interaction flow of another method for adding group members in the second scenario. As shown in Figure 13, the method flow specifically includes the following steps:
  • S1300 to S1301 respectively the same as S1200 to S1201, please refer to the description of S1200 to S1201, and details are not repeated here.
  • the mobile phone 200 obtains the user account of the mobile phone 200 on the social application, and generates a first message 30, where the first message 30 includes the user account of the mobile phone 200 on the social application.
  • the mobile phone 200 of the user Lucas has subscribed to the group member adding service in advance, so it can receive the group member adding service message published by the mobile phone 100 .
  • the mobile phone 200 automatically subscribes to the service message of adding group members when running the social application, or subscribes to the service message of adding group members when the social application is started as a service resident in the background.
  • the user Lucas of the mobile phone 200 opens a social application, and the mobile phone 200 can obtain the user account of the user Lucas from the running social application.
  • the social application of the mobile phone 200 is the same as the social application of the mobile phone 100 .
  • the "user account of the social application" in S1302 includes the user account that logged in the social application last time.
  • the mobile phone 200 switches from the third antenna to the fourth antenna.
  • the mobile phone 200 sends the first message 30 to the mobile phone 100 through the fourth antenna.
  • the mobile phone 200 of the user Lucas receives the group member adding service message published by the mobile phone
  • the mobile phone 200 can switch from the third antenna to the fourth antenna by controlling the radio frequency switch, and then send the first message 30 through the fourth antenna, At this time, the first message 30 belongs to the ultra-short-range frame, so that the first message 30 sent by the mobile phone 200 will not be received by the mobile phone outside the safe distance.
  • the mobile phone 100 receives the first message 30, and sends a confirmation message through the first antenna.
  • the mobile phone 100 acquires and displays the user account of the mobile phone 200 on the social application from the first message 30 .
  • the mobile phone 100 may receive the first message 30 , and then obtain the user account of the mobile phone 200 on the social application from the first message 30 . .
  • the user Lucas will bring the mobile phone 200 close to the mobile phone 100 of the user Alisa, or in other words, the user Lucas agrees that the mobile phone 100 of the user Alisa is close to his own The mobile phone 200, in this way, the distance between the mobile phone 100 and the mobile phone 200 is less than or equal to a preset safe distance (eg, 30 cm), and the mobile phone 100 can receive the first message.
  • a preset safe distance eg, 30 cm
  • the mobile phone 100 After acquiring the user account of the mobile phone 200 on the social application, the mobile phone 100 displays the user account.
  • the mobile phone 200 switches to the third antenna.
  • the mobile phone 200 can switch from the fourth antenna to the third antenna by controlling the radio frequency switch.
  • the mobile phone 100 receives an operation from the user, and the operation is used to confirm approval or rejection of the user account of the mobile phone 200 on the social application as a group member.
  • the subsequent steps are performed; otherwise, the process ends, and the subsequent steps are not performed.
  • the illegal electronic device can simulate the mobile phone 200 by means of an external amplifier, etc. All or part of a message, etc., may be executed by illegal electronic devices (attack devices).
  • the user account of the user Alisa on the social application wants to add the user account of the user Lucas on the social application as a group member of a group, in fact, the user account of the user Alisa on the social application is added.
  • the user account of the illegal electronic device (attack device) on the social networking application is a group member of the above-mentioned group. This obviously brings a bad experience to the user and causes inconvenience to the user.
  • S1308 provides further confirmation steps for Alisa, the user of the mobile phone 100 .
  • the operation received by the mobile phone 100 is used to confirm the consent, it means that the user Alisa confirms that he is adding the user account of the mobile phone 200 on the social application (for example, the user account of the user Lucas on the social application) as a group member; if the mobile phone 100 The received operation is used to reject, it means that the user Alisa confirms that he is not adding the user account of the mobile phone 200 on the social application as a group member, but is adding a stranger's user account (for example, a stranger other than user Lucas is in the user accounts on social apps) are group members. In this way, further confirmation by the user Alisa of the mobile phone 100 plays a role of security protection.
  • the interface displayed by the mobile phone 100 displays the user account of the new friend, and even displays the corresponding user image information.
  • the user Alisa can identify whether it is the user account (eg, Lucas) that he wishes to add; if so, the user Alisa can touch the consent control 1021 ; otherwise, the user Alisa can touch the reject control 1022 .
  • the user account eg, Lucas
  • the user Alisa can show the user avatar or user account information displayed on the mobile phone 100 to the user Lucas at this time; if the user Lucas confirms that it is his own account and avatar, he will confirm to the user Alisa Responses (eg, answering user Alisa "It's my account number, that's right" in a two-person conversation). After the user Lucas confirms to the user Alisa that the avatar or user account displayed on the interface is correct, the user Alisa clicks the consent control 1021 on the mobile phone 100 to operate.
  • the user Alisa clicks the consent control 1021 on the mobile phone 100 to operate.
  • the user Lucas when the user Lucas confirms that the avatar displayed on the interface is not the avatar of the user Alisa, the user Lucas will inform the user Alisa, so that the user Alisa will click the rejection control 1022 on the mobile phone 100 to avoid being added as a group by illegal users member.
  • the mobile phone 200 may also display an interface to remind the user that Lucas has been added as a group member of a group.
  • Cell phone 100 may also display a similar interface.
  • the mobile phone 100 sends a request message to the application server, where the request message is used to request to add the user account of the mobile phone 200 on the social application as a group group members.
  • the request message includes the user account of the mobile phone 200 on the social application, the group identifier corresponding to the "Add group member” control of the mobile phone 100 on the social application, and the user account of the mobile phone 100 on the social application. It is requested to add the user account of the mobile phone 200 on the social application to the group where the group ID corresponding to the "add group member” control of the mobile phone 100 on the social application is located. Taking the group as the "family group” as an example, after acquiring the user account of the mobile phone 200 on the social application, the mobile phone 100 can request to add it to the "family group".
  • the application server after receiving the request message, the application server sends a response message of the request message to the mobile phone 200 .
  • the mobile phone 200 may also display a prompt message that a group member has been added.
  • user interface 1130 displays a prompt message from the social application.
  • the prompt message is used to inform the user that Lucas has been added to a new group.
  • the mobile phone 200 may further display a prompt message that the group member is successfully added, for prompting that the group member is successfully added.
  • prompting may also be provided by audio such as voice.
  • the application server sends a response message of the request message to the mobile phone 100 .
  • S1310 and S1311 are not limited in this application.
  • the mobile phone 100 displays a prompt message that the group member is successfully added.
  • the mobile phone 100 of the user Alisa may display the user interface 1140 as shown in FIG. 11D .
  • Interface 1140 is displayed with a notification.
  • the notification can include: You invited Lucas to join the group chat.
  • S1309, S1310, and S1311, etc. involve the communication interaction between the mobile phone 100, the mobile phone 200 and the application server, and the communication interaction is ensured by the encryption mechanism and decryption mechanism of the social application itself to ensure communication security.
  • the user account of the mobile phone 200 on the social application does not belong to the group corresponding to the "Add group member" control on the social application of the mobile phone 100 If a member of the group is identified, the response message may indicate that the user account of the mobile phone 200 on the social application has been successfully added, or the addition has failed.
  • the user account of the mobile phone 200 on the social application already belongs to the group corresponding to the "Add group member” control on the mobile phone 100 on the social application. If the member of the group is identified, the application server sends a response message to the mobile phone 100 to prompt the user to add repeatedly, or to prompt the mobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of the mobile phone 100
  • the members of the group where the corresponding group ID is located do not need to be added repeatedly.
  • the mobile phone 100 passes the first antenna by default; the mobile phone 200 passes the third antenna by default, until the mobile phone 200 switches to the fourth antenna, and after the mobile phone 200 switches to the fourth antenna, the mobile phone 200 passes the fourth antenna The antenna sends the message until the handset 200 switches to the third antenna.
  • the mobile phone 200 sends the first message through the fourth antenna. That is to say, this embodiment does not require the mobile phone 100 to support the transmission of ultra-short-range frames, but only requires the mobile phone 200 to support the transmission of ultra-short-range frames.
  • a Wi-Fi sensing channel can be established between the mobile phone 100 and the mobile phone 200 through the Wi-Fi sensing technology, so the mobile phone 100 and the mobile phone 200 do not need to be connected to the same router.
  • the mobile phone 200 includes a third antenna and a fourth antenna, that is, supports the transmission of ultra-short-range frames. Therefore, other electronic devices outside the preset safe distance cannot receive the first message sent by the mobile phone 200, and there is still a confirmation operation on the mobile phone 100, so the security of communication can be guaranteed.
  • the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch the add group member control, move the mobile phone 100 close to or touch the mobile phone 200 of a friend, and confirm the operation to complete the group.
  • the user of the mobile phone 200 does not need any operation; or, the user of the mobile phone 100 does not need to actively search, the user of the mobile phone 100 only needs to touch the add group member control and confirm the operation, and the user of the mobile phone 200 only needs to move the mobile phone 200 close Or just touch the mobile phone 100; in this way, the number of operations performed by the user is effectively reduced, and the user experience is improved.
  • Scenario 2 can also be further elaborated through Embodiment 7.
  • the mobile phone 200 randomly generates a key, sends the key to the mobile phone 100 through the fourth antenna, and the mobile phone 100 sends the encrypted group to the mobile phone 200 through the second antenna. account, after obtaining the encrypted group account, the mobile phone 200 requests to be added to the group.
  • the mobile phone 100 may include a first antenna and a second antenna, and the mobile phone 200 may include a third antenna and a fourth antenna.
  • Embodiment 7 relates to FIGS. 14A and 14B .
  • FIG. 14A shows the interaction flow of another method for adding group members in the second scenario. As shown in Figure 14A, the method specifically includes the following steps:
  • S1400a to S1401a respectively the same as S1300 to S1301, please refer to the description of S1300 to S1301, and details are not repeated here.
  • the mobile phone 200 after receiving the service message of adding group members, the mobile phone 200 randomly generates a key, and obtains a first message including the key.
  • the mobile phone 200 switches from the third antenna to the fourth antenna.
  • the mobile phone 200 sends the first message to the mobile phone 100 through the fourth antenna.
  • the mobile phone 200 can switch from the third antenna to the fourth antenna by controlling the radio frequency switch, and then send the first message through the fourth antenna; at this time, the first message belongs to the ultra-short-range frame; in this way, the first message sent by the mobile phone 200 is The message will not be received by the electronic device beyond the preset safe distance from the mobile phone 200 .
  • the first message may be a Wi-Fi awareness frame or a beacon frame.
  • the Wi-Fi aware frame is a publish (Publish) frame, a follow-up (Follow-up) frame or a subscribe (Subscribe) frame. If the first message is a Follow-up frame, the key of user Alisa's mobile phone 200 may be carried in the payload field of the Follow-up frame.
  • Wi-Fi awareness frames are based on Wi-Fi awareness technology.
  • the Wi-Fi perception technology can support point-to-point communication in the scenario where the mobile phone 100 and the mobile phone 200 are not connected to the same router, and can also support the point-to-point communication in the scenario where the mobile phone 100 and the mobile phone 200 are connected to the same router.
  • the mobile phone 200 sends the first message through the fourth antenna, and the success rate of sending data and receiving data may be reduced, so the mobile phone 200 can repeatedly send the key.
  • the mobile phone 100 receives the first message, and obtains the key from the first message.
  • the mobile phone 100 After the distance between the mobile phone 200 and the mobile phone 100 is less than or equal to the transmission distance of the fourth antenna, the mobile phone 100 receives the first message, and then obtains the key of the mobile phone 200 from the first message.
  • the mobile phone 100 uses the key to encrypt the group identifier of the group corresponding to the operation on the social application in the mobile phone 100, and obtains a second message, where the second message includes the encrypted group identifier.
  • the operation in S1400a corresponds to a group, and the group identifier (eg, group name, group account, etc.) of the group is encrypted with a key, and a second message is obtained, and the second message includes the encrypted data.
  • the group identifier eg, group name, group account, etc.
  • the group identifier is an identifier that uniquely identifies the group.
  • the directory of the group on the mobile phone 100 can also be a group identifier.
  • the mobile phone 100 switches from the first antenna to the second antenna.
  • the mobile phone 100 sends the second message to the mobile phone 200 through the second antenna.
  • the mobile phone 100 includes a first antenna and a second antenna, and the mobile phone 100 can switch from the first antenna to the second antenna by controlling the radio frequency switch, and then send the second message through the second antenna.
  • the second message at this time belongs to the ultra-short-range frame, and the electronic device that is far away from the mobile phone 100 beyond the preset safe distance cannot receive the second message.
  • the second message may be a Wi-Fi awareness frame or a beacon frame.
  • the Wi-Fi aware frame is a Publish frame, a Follow-up frame or a Subscribe frame. If the second message is a Follow-up frame, the encrypted S1400a operates the group corresponding to the group on the social application.
  • the identifier can be carried in the payload field of the Follow-up frame.
  • the mobile phone 200 after receiving the second message, the mobile phone 200 sends a confirmation message through the fourth antenna.
  • the mobile phone 200 decrypts using the key to obtain the above-mentioned group identifier; the mobile phone 200 obtains the user account of the mobile phone 200 on the social application.
  • the mobile phone 200 switches from the fourth antenna to the third antenna.
  • the mobile phone 200 includes a third antenna and a fourth antenna, and the mobile phone 200 can be switched from the fourth antenna to the third antenna by controlling the radio frequency switch.
  • the mobile phone 200 sends a request message to the application server, where the request message is used to request to add the user account of the mobile phone 200 on the social application to the group corresponding to the above-mentioned group identifier.
  • the request message includes the user account of the mobile phone 200 on the social networking application and the above-mentioned group identification.
  • the request message further includes the user account of the mobile phone 100 on the social networking application.
  • the second message in S1408a is required to include the user account of the mobile phone 100 on the social application encrypted with the key; in S1411a, the key is decrypted to obtain the user account of the mobile phone 100 on the social application.
  • the application server sends a response message of the request message to the mobile phone 200.
  • the application server sends a response message of the request message to the mobile phone 100.
  • S1414a and S1415a are not limited in this application.
  • the mobile phone 100 displays a prompt message that the group member is successfully added.
  • the reason why S1408a uses a weak antenna for transmission is to improve security. Because in this embodiment, it needs to be considered that although the illegal electronic device (attack device) is not in the vicinity of the mobile phone 100, the illegal electronic device (attack device) can simulate the mobile phone 200 by means of an external amplifier or the like, that is, the “send” of S1404a First Message", which may be simulated by illegal electronic devices.
  • the illegal electronic device may receive the second message; and the "send first message" in the previous S1404a is also The illegal electronic device (attack device) executes it, so in S1411a, the illegal electronic device (attack device) can decrypt it with its own key previously generated, and obtain the group that operates the corresponding group on the social application in S1400a logo. Further, the subsequent S1413a may be executed, and the application server will execute the subsequent S1414a and S1415a; the mobile phone 100 will receive the message that the stranger is added to the group, which will affect the use of the mobile phone 100 on social applications and bring inconvenience to the user.
  • the subsequent S1413a may be executed, and the application server will execute the subsequent S1414a and S1415a; the mobile phone 100 will receive the message that the stranger is added to the group, which will affect the use of the mobile phone 100 on social applications and bring inconvenience to the user.
  • the mobile phone 100 may display the user interface 1140 shown in FIG. 11D .
  • Interface 1140 is displayed with a notification.
  • the notification can include: You invited Lucas to join the group chat.
  • the mobile phone 100 executes S1400a, the user account of the mobile phone 200 on the social application does not belong to the group corresponding to the "Add group member" control on the social application on the mobile phone 100 If a member of the group is identified, the response message may indicate that the user account of the mobile phone 200 on the social application has been successfully added, or the addition has failed.
  • the user account of the mobile phone 200 on the social application already belongs to the group corresponding to the "Add group member” control on the mobile phone 100 on the social application. If the member of the group is identified, the application server sends a response message to the mobile phone 100 to prompt the user to add repeatedly, or to prompt the mobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of the mobile phone 100
  • the members of the group where the corresponding group ID is located do not need to be added repeatedly.
  • the mobile phone 100 uses the first antenna by default until the mobile phone 100 switches to the second antenna. After the mobile phone 100 switches to the second antenna, the mobile phone 100 sends messages through the second antenna until the mobile phone 100 switches to the second antenna.
  • the mobile phone 200 uses the third antenna by default until the mobile phone 200 switches to the fourth antenna. After the mobile phone 200 switches to the fourth antenna, the mobile phone 200 sends messages through the fourth antenna until the mobile phone 200 switches to the third antenna.
  • a Wi-Fi sensing channel can be established between the mobile phone 100 and the mobile phone 200 through the Wi-Fi sensing technology, so the mobile phone 100 and the mobile phone 200 do not need to be connected to the same router.
  • the mobile phone 200 includes a third antenna and a fourth antenna, that is, supports the transmission of ultra-short-range frames. Therefore, other electronic devices outside the preset safe distance cannot receive the first message sent by the mobile phone 200, and there is still a confirmation operation on the mobile phone 100, so the security of communication can be guaranteed.
  • the user of the mobile phone 100 does not need to actively search, and the user of the mobile phone 100 only needs to touch the add group member control, and then the mobile phone 100 is close to or touches the mobile phone 200 to complete the group member addition, and the mobile phone 200
  • the user of the mobile phone 100 does not need any operation; or the user of the mobile phone 100 does not need to actively search, the user of the mobile phone 100 only needs to touch the add group member control, and the user of the mobile phone 200 only needs to bring the mobile phone 200 close to or touch the mobile phone 100; In this way, the number of operations performed by the user is effectively reduced, and the user experience is improved.
  • FIG. 14B shows the interaction flow of another method of adding friends in the second scenario. As shown in Figure 14B, the method specifically includes the following steps:
  • S1400b to S1401b respectively the same as S8700 to S8701, please refer to the description of S8700 to S8701, and will not be repeated here.
  • the mobile phone 200 after receiving the message of adding a friend service, the mobile phone 200 randomly generates a key, and obtains a first message including the key.
  • the mobile phone 200 switches from the third antenna to the fourth antenna.
  • the mobile phone 200 sends the first message to the mobile phone 100 through the fourth antenna.
  • the mobile phone 200 can switch from the third antenna to the fourth antenna by controlling the radio frequency switch, and then send the first message through the fourth antenna; at this time, the first message belongs to the ultra-short-range frame; in this way, the first message sent by the mobile phone 200 is The message will not be received by the electronic device beyond the preset safe distance from the mobile phone 200 .
  • the first message may be a Wi-Fi awareness frame or a beacon frame.
  • the Wi-Fi aware frame is a publish (Publish) frame, a follow-up (Follow-up) frame or a subscribe (Subscribe) frame. If the first message is a Follow-up frame, the key of user Alisa's mobile phone 200 may be carried in the payload field of the Follow-up frame.
  • Wi-Fi awareness frames are based on Wi-Fi awareness technology.
  • the Wi-Fi perception technology can support point-to-point communication in the scenario where the mobile phone 100 and the mobile phone 200 are not connected to the same router, and can also support the point-to-point communication in the scenario where the mobile phone 100 and the mobile phone 200 are connected to the same router.
  • the mobile phone 200 sends the first message through the fourth antenna, and the success rate of sending data and receiving data may be reduced, so the mobile phone 200 can repeatedly send the key.
  • the mobile phone 100 receives the first message, and obtains the key from the first message.
  • the mobile phone 100 After the distance between the mobile phone 200 and the mobile phone 100 is less than or equal to the transmission distance of the fourth antenna, the mobile phone 100 receives the first message, and then obtains the key of the mobile phone 200 from the first message.
  • the mobile phone 100 uses the key to encrypt the user account of the mobile phone 100 on the social networking application, and obtains a second message, where the second message includes the encrypted user account.
  • the mobile phone 100 switches from the first antenna to the second antenna.
  • the mobile phone 100 sends the second message to the mobile phone 200 through the second antenna.
  • the mobile phone 100 includes a first antenna and a second antenna, and the mobile phone 100 can switch from the first antenna to the second antenna by controlling the radio frequency switch, and then send the second message through the second antenna.
  • the second message at this time belongs to the ultra-short-range frame, and the electronic device that is far away from the mobile phone 100 beyond the preset safe distance cannot receive the second message.
  • the mobile phone 200 after receiving the second message, the mobile phone 200 sends the second message through the second antenna.
  • the mobile phone 200 receives the second message, decrypts it with the key, and obtains the user account of the mobile phone 100 on the social application; the mobile phone 200 obtains the user account of the mobile phone 200 on the social application.
  • the mobile phone 200 switches from the fourth antenna to the third antenna.
  • the mobile phone 200 includes a third antenna and a fourth antenna, and the mobile phone 200 can be switched from the fourth antenna to the third antenna by controlling the radio frequency switch.
  • the mobile phone 200 sends a request message to the application server, where the request message is used to request to add the user account of the mobile phone 100 on the social application as a friend.
  • the request message further includes the user account of the mobile phone 200 on the social networking application.
  • the application server sends a response message of the request message to the mobile phone 200.
  • the application server sends a response message of the request message to the mobile phone 100.
  • S1414b and S1415b are not limited in this application.
  • the mobile phone 100 displays a prompt message that the friend is successfully added.
  • the reason why S1408b uses a weak antenna for transmission is to improve security. Because in this embodiment, it needs to be considered that although the illegal electronic device (attack device) is not in the vicinity of the mobile phone 100, the illegal electronic device (attack device) can simulate the mobile phone 200 by means of an external amplifier or the like, that is, the “send” of S1404b First Message", which may be simulated by illegal electronic devices.
  • the illegal electronic device may receive the second message; and the "send first message" in the previous S1404b is also It is executed by an illegal electronic device (attack device), so in S1409b, the illegal electronic device (attack device) can decrypt it with its own previously generated key, and obtain the user account of the mobile phone 100 on the social application in S1400b.
  • first antenna under the first transmission power and “the first antenna under the second transmission power” are the logically first antenna and the logically second antenna; the above-mentioned “third antenna under the third transmission power” “Antenna” and “The third antenna under the fourth transmit power” are the third antenna logically and the fourth antenna logically.
  • the logically first antenna and the logically second antenna can be implemented by adjusting the transmit power through registers inside the chip.
  • the logical third antenna and the logical fourth antenna can be implemented by adjusting the transmit power through registers inside the chip.
  • the electronic device 100 and the electronic device 200 involved in the above embodiments of the present application interact with each other through Wi-Fi signals (Wi-Fi perception), short-range wireless communication methods such as Bluetooth and ZigBee
  • Wi-Fi signals Wi-Fi perception
  • short-range wireless communication methods such as Bluetooth and ZigBee
  • the technical solutions of the above-mentioned embodiments are also applicable, that is, the electronic device 100 and the electronic device 200 in the above-mentioned embodiments of the present application can also communicate and interact with each other by means of short-range wireless communication such as Bluetooth and ZigBee in combination with an antenna.
  • the method for adding group members or friends provided by the embodiments of the present application is applicable to the following electronic devices and systems.
  • FIG. 15 shows an electronic device 1500 provided by the present application.
  • the electronic device 1500 may be the electronic device 100 (the first electronic device) in the foregoing embodiment, or may be the electronic device 200 (the second electronic device) in the foregoing embodiment.
  • electronic device 1500 includes at least one processor 1510 , memory 1520 and display screen 1530 .
  • the processor 1510 is coupled with the memory 1520 and the display screen 1530, and the coupling in this embodiment of the present application may be a communication connection, an electrical connection, or other forms.
  • the memory 1520 is used to store program instructions.
  • Display screen 1530 is used to display a user interface.
  • the processor 1510 is configured to invoke the program instructions stored in the memory 1520, so that the electronic device 1500 executes the steps performed by the first electronic device or the second electronic device in the method for adding group members or friends provided in the embodiments of the present application. It should be understood that the electronic device 1500 can be used to implement the method for adding group members or friends provided by the embodiments of the present application, and the relevant features can be referred to above, and details are not repeated here.
  • the display screen when the display screen has a touch function, the display screen is also referred to as a touch display screen.
  • the operation on the touch screen can be realized by virtual keys.
  • the display When the display does not have a touch function, the display is also called a non-touch display. Operations on the non-touch display can be achieved through physical buttons.
  • the electronic device 1500 may contain more or fewer components than those shown in FIG. 15 , or combine some components, or separate some components, or a different arrangement of components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the combination/connection relationship between the components in FIG. 15 can also be adjusted and modified.
  • the present application provides a computer program product that, when the computer program product runs on a first electronic device, enables the first electronic device to execute the method for adding group members or friends provided by the embodiments of the present application. The steps performed by the electronic device.
  • the present application provides a computer-readable storage medium, including a computer program, which, when the computer program runs on a first electronic device, enables the first electronic device to perform the adding of group members or friends provided by the embodiments of the present application The steps of the method performed by the first electronic device.
  • the present application provides a computer program product that, when the computer program product runs on a second electronic device, enables the second electronic device to execute the method for adding group members or friends provided by the embodiments of the present application. The steps performed by the electronic device.
  • the present application provides a computer-readable storage medium, including a computer program, which, when the computer program runs on a second electronic device, enables the second electronic device to perform the addition of group members or friends provided by the embodiments of the present application Steps of the method performed by the second electronic device.
  • the embodiments of the present application may be implemented in hardware, or in a manner of hardware and software.
  • the above-described functions can be stored in a computer-readable medium.
  • the medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
  • FIG. 16 shows a schematic block diagram of a communication system provided by an embodiment of the present application.
  • the communication system may include a server 1601 and one or more electronic devices.
  • FIG. 16 exemplarily shows the first electronic device 1602 and the second electronic device 1603 .
  • the server 1601 may be the application server in the foregoing method embodiments.
  • the first electronic device 1602 may be the electronic device 100 in the foregoing method embodiments, and the second electronic device 1603 may be the electronic device 200 in the foregoing method embodiments.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the methods in the foregoing method embodiments.
  • the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Abstract

本申请涉及一种群组成员或好友添加方法及电子设备。该方法用于运行社交应用的电子设备,电子设备包括的第一天线和第二天线的发射距离分别为第一距离和第二距离,第一距离大于预设的安全距离,第二距离小于等于预设的安全距离。该方法包括:电子设备接收到用户输入,通过第二天线发送包含随机密钥的第一消息;接收到第二消息,用随机密钥解密,获取到社交应用上的一个用户帐号;向社交应用的应用服务器发送包含用户帐号的请求消息;请求消息还包括用户输入对应的群组标识或电子设备在社交应用上的用户帐号;接收到应用服务器的响应消息,提示群组添加群组成员成功,或添加好友成功。本申请保证通信安全,减少用户操作,提高用户体验。

Description

一种群组成员或好友的添加方法、电子设备
相关申请的交叉引用
本申请要求在2021年01月29日提交中国专利局、申请号为202110129143.2、申请名称为“一种群组成员或好友的添加方法、电子设备和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种群组成员或好友的添加方法、电子设备。
背景技术
社交类应用具有添加好友、群组成员的功能。例如,在社交类应用中,通过搜索用户帐号、二维码扫一扫等方式,用户就可以添加为好友、添加群组成员。不过,这些方式仍需要用户打开社交类应用,多次手动操作,才能完成。如此,导致用户之间添加好友、群组成员的操作繁琐,耗时较长,不利于社交类应用的推广,尤其不利于新上市的社交类应用的推广,用户体验较差。
发明内容
为了解决上述的技术问题,本申请提供一种群组成员或好友的添加方法、电子设备。本申请提供的技术方案,可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验。
第一方面,本申请实施例提供了一种群组成员或好友的添加方法。该方法可以应用于第一电子设备,第一电子设备运行有第一社交应用。第一电子设备包括:第一天线,第一天线的发射距离为第一距离,第一距离大于预设的第一安全距离;第二天线,第二天线的发射距离为第二距离,第二距离小于或等于预设的第一安全距离;其中,第一天线和第二天线为不同的天线。所述方法包括:接收到第一用户输入;第一电子设备生成随机密钥;第一电子设备通过第二天线发送第一消息,第一消息包括随机密钥;接收到来自第二电子设备的第二消息;第一电子设备使用随机密钥解密所述第二消息,获取到第一社交应用上的一个用户帐号;第一电子设备通过第一社交应用和第一天线,向第一社交应用的应用服务器发送请求消息;请求消息包括用户帐号;请求消息还包括第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
上述方法中,一方面,第一电子设备使用第二天线发送第一消息,处于预设距离外的其它电子设备无法接收到该第一消息,所以可以保证通信的安全性。另一方面,第一电子设备的使用用户不需要经过复杂的操作,只需确保第一电子设备和第二电子设备之间的距离小于或者等于预设的第一安全距离,以使第二电子设备可以接收到第一消息即可添加好 友或添加群组成员,有效地减少了繁琐的手动操作。该方法在保证通信安全的基础上,有助于降低用户之间添加好友或群组成员的难度,提升沟通效率。
在一种可能的设计中,第一电子设备通过第二天线发送第一消息;包括:第一电子设备通过所述第二天线,以蓝牙或者ZigBee的无线通信方式,发送第一消息;第一电子设备接收到来自第二电子设备的第二消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自所述第二电子设备的第二消息。该方法中以蓝牙或者ZigBee的无线通信方式提升通信的效率,节省蜂窝流量。
在一种可能的设计中,响应于第一用户输入,第一电子设备生成随机密钥;包括:响应于第一用户输入,第一电子设备通过第一天线,以无线保真(wireless fidelity,Wi-Fi)感知的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;第一电子设备以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的响应消息;响应于响应消息,第一电子设备生成随机密钥。
该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。
在一种可能的设计中,第一电子设备通过第二天线发送第一消息;包括:第一电子设备通过第二天线,以Wi-Fi感知的无线通信方式,发送第一消息;第一电子设备接收到来自第二电子设备的第二消息;包括:以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的第二消息。
该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。
在一种可能的设计中,第一电子设备接收到来自所述第二电子设备的第二消息;包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第二消息;所述预设的第二安全距离与所述第二电子设备相关联。预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。该方法中,处于预设的第二安全距离外的其它电子设备无法接收到该第二消息,所以可以保证通信的安全性。
在一种可能的设计中,所述接收到来自第二电子设备的第二消息;包括:在第一电子设备与第二电子设备之间的距离大于预设的第二安全距离后,接收到来自所述第二电子设备的第二消息;预设的第二安全距离与第二电子设备相关联。
该方法中,第二电子设备也可以采用第一天线发送第二消息。该方法可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,提高用户体验。
在一种可能的设计中,第一电子设备向第一社交应用的应用服务器发送请求消息;包括:通过第一社交应用的加密机制,第一电子设备向第一社交应用的应用服务器发送请求消息;第一电子设备接收到来自应用服务器的第一响应消息;包括:接收到来自应用服务器的第一响应消息,并通过第一社交应用的解密机制,获取到解密后的第一响应消息。
该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。
第二方面,本申请实施例提供了一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用。所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备通过第一天线,发布添加群组成员服务消息或添加好友服务消 息;在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;从第一消息中获取到第一社交应用上的一个用户帐号,并提示对用户帐号进行确认;接收到用于确认添加的第二用户输入;响应于第二用户输入,第一电子设备通过第一天线和第一社交应用,向第一社交应用的应用服务器发送请求消息;请求消息包括用户帐号;请求消息还包括第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
该方法中,可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验,该方法通过接收用户的第二用户输入,可以避免添加非法用户的用户帐号或避免添加至非法用户的群组帐号,进一步提高安全。
在一种可能的设计中,第一电子设备通过所述第一天线,发布添加群组成员服务消息或添加好友服务消息;包括:所述第一电子设备通过所述第一天线,以Wi-Fi感知、蓝牙或ZigBee的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;所述接收到来自第二电子设备的第一消息;包括:以Wi-Fi感知、蓝牙或ZigBee的无线通信方式,接收到来自所述第二电子设备的第一消息。该方法中以Wi-Fi感知、蓝牙或者ZigBee的无线通信方式提升通信的效率,节省蜂窝流量。
在一种可能的设计中,第一电子设备向第一社交应用的应用服务器发送请求消息;包括:通过第一社交应用的加密机制,第一电子设备向第一社交应用的应用服务器发送请求消息;
第一电子设备接收到来自所述应用服务器的第一响应消息;包括:第一电子设备接收到来自应用服务器的第一响应消息,并通过第一社交应用的解密机制,获取到解密后的第一响应消息。该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。
第三方面,本申请实施例提供了一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用;第一电子设备包括:第一天线,第一天线的发射距离为第一距离,第一距离大于预设的第一安全距离;第二天线,第二天线的发射距离为第二距离,第二距离小于或等于预设的第一安全距离;其中,第一天线和第二天线为不同的天线。所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备通过第一天线,发布添加群组成员服务消息或添加好友服务消息;在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的安全距离;响应于第一消息,从第一消息中获取到一个随机密钥,使用随机密钥加密第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;第一电子设备通过第二天线,发送第二消息;第二消息包括加密后的群组标识或用户帐号;接收到来自第一社交应用的应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离;预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密 信息的一个安全距离。
上述方法中可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验,第二电子设备使用第二天线发送第一消息,处于预设的第二安全距离外的其它电子设备无法接收到该第一消息,所以可以保证通信的安全性。
在一种可能的设计中,第一电子设备接收到来自第一社交应用的应用服务器的第一响应消息;包括:接收到来自所述第一社交应用的应用服务器的第一响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第一响应消息。该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。
在一种可能的设计中,第一天线与所述第二天线连接同一个无线通信模块;所述无线通信模块包括Wi-Fi芯片、蓝牙芯片和ZigBee芯片中的一种。
在一种可能的设计中,Wi-Fi芯片、蓝牙芯片或ZigBee芯片,在所述无线通信模块中的数量为一个,所述第一天线和所述第二天线连接所述Wi-Fi芯片、所述蓝牙芯片或所述ZigBee芯片。
第四方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用,第一电子设备包括:第一天线,第一天线在第一发射功率下的发射距离为第一距离,第一天线在第二发射功率下的发射距离为第二距离,第一距离大于预设的第一安全距离,第二距离小于或等于预设的第一安全距离。所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备生成随机密钥;第一电子设备通过第二发射功率下的第一天线发送第一消息,第一消息包括随机密钥;接收到来自第二电子设备的第二消息;响应于第二消息,第一电子设备使用随机密钥解密第二消息,获取到第一社交应用上的一个用户帐号;第一电子设备向第一社交应用的应用服务器发送请求消息;请求消息包括用户帐号;请求消息还包括第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
在一种可能的设计中,第一电子设备通过所述第二发射功率下的所述第一天线发送第一消息;包括:所述第一电子设备通过所述第二发射功率下的所述第一天线,以蓝牙或者ZigBee的无线通信方式,发送第一消息;所述接收到来自第二电子设备的第二消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自所述第二电子设备的第二消息。
在一种可能的设计中,响应于所述第一用户输入,所述第一电子设备生成随机密钥;包括:响应于所述第一用户输入,所述第一电子设备通过所述第一发射功率下的所述第一天线,以Wi-Fi感知的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的响应消息;响应于所述响应消息,所述第一电子设备生成随机密钥。
在一种可能的设计中,所述第一电子设备通过所述第二发射功率下的所述第一天线发送第一消息;包括:所述第一电子设备通过所述第二发射功率下的所述第一天线,以Wi-Fi感知的无线通信方式,发送第一消息;所述接收到来自第二电子设备的第二消息;包括:以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的第二消息。
在一种可能的设计中,所述接收到来自所述第二电子设备的第二消息;包括:在所述 第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自所述第二电子设备的第二消息;所述预设的第二安全距离与所述第二电子设备相关联。
在一种可能的设计中,第一电子设备接收到来自第二电子设备的第二消息;包括:在所述第一电子设备与第二电子设备之间的距离大于预设的第二安全距离后,接收到来自所述第二电子设备的第二消息;所述预设的第二安全距离与所述第二电子设备相关联。
在一种可能的设计中,所述第一电子设备向所述第一社交应用的应用服务器发送请求消息;包括:通过所述第一社交应用的加密机制,所述第一电子设备向所述第一社交应用的应用服务器发送请求消息;所述接收到来自所述应用服务器的第一响应消息;包括:接收到来自所述应用服务器的第一响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第一响应消息。
第四方面中的各个实施例的有益消息可以参见上述第一方面,在此不再重复赘述。
第五方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用,第一电子设备包括:第一天线,第一天线在第一发射功率下的发射距离为第一距离,第一天线在第二发射功率下的发射距离为第二距离,第一距离大于预设的第一安全距离,第二距离小于或等于预设的第一安全距离;所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备通过第一发射功率下的第一天线,发布添加群组成员服务消息或添加好友服务消息;在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;响应于第一消息,从第一消息中获取到一个随机密钥,使用随机密钥加密第一用户输入对应的群组标识;第一电子设备通过第二发射功率下的第一天线,发布第二消息;第二消息包括加密后的群组标识;接收到来自第一社交应用的应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离;预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
第五方面中的各个实施例的有益消息可以参见上述第二方面,在此不再重复赘述。
第六方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线;所述方法包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;响应于第一消息,从第一消息中获取到随机密钥,并获取到第二电子设备在第一社交应用上的用户帐号,使用随机密钥加密用户帐号;第二电子设备通过第四天线发送第二消息,第二消息包括加密后的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
该方法可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验,该方法中第一电子设备使用第二天线发送第一消息,处于预设距离外的其它电子设备无法接收到该第一消息,所以可以保证通信的安全性。
在一种可能的设计中,接收到来自第一电子设备的第一消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自第一电子设备的第一消息;第二电子设备通过所述第四天线发送第二消息;包括:所述第二电子设备通过所述第四天线,以蓝牙或者ZigBee的无线通信方式,发送第二消息。该方法中以蓝牙或者ZigBee的无线通信方式提升通信的效率,节省蜂窝流量。
在一种可能的设计中,在接收到来自第一电子设备的第一消息之前,所述方法还包括:所述第二电子设备,以Wi-Fi感知的无线通信方式,接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于所述添加群组成员服务消息或所述添加好友服务消息,所述第二电子设备通过所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送响应消息。
该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。
在一种可能的设计中,第一电子设备接收到来自第一电子设备的第一消息;包括:以Wi-Fi感知的无线通信方式,接收到来自第一电子设备的第一消息;所述第二电子设备通过第四天线发送第二消息;包括:第二电子设备通过第四天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送第二消息。该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。
在一种可能的设计中,第一电子设备接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:第一电子设备接收到来自第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。
第七方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备,第二电子设备运行有第一社交应用;所述方法包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;响应于第一消息,从第一消息中获取到随机密钥,并获取到第二电子设备在第一社交应用上的用户帐号,使用随机密钥加密用户帐号;第二电子设备通过第三天线发送第二消息,第二消息包括加密后的用户帐号;接收到来自第一社交应用的应用服务器的请求消息;接收到用于确认添加的第一用户操作;响应于第一用户操作,第二电子设备向应用服务器发送回复消息;回复消息用于指示确认添加;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
该方法可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验,该方法中第二电子设备接收到用于确认添加的第一用户操作才向所述应用服务器发送回复消息,可以避免添加非法用户的用户帐号或避免添加至非法用户的群组帐号,进一步提高安全。
在一种可能的设计中,第二电子设备接收到来自第一电子设备的第一消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自第一电子设备的第一消息;
所述第二电子设备通过所述第四天线发送第二消息;包括:所述第二电子设备通过所述第四天线,以蓝牙或者ZigBee的无线通信方式,发送第二消息。
在一种可能的设计中,第二电子设备在接收到来自第一电子设备的第一消息之前,所 述方法还包括:
所述第二电子设备,以Wi-Fi感知的无线通信方式,接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;
响应于所述添加群组成员服务消息或所述添加好友服务消息,所述第二电子设备通过所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送响应消息。该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。
在一种可能的设计中,第二电子设备接收到来自第一电子设备的第一消息;包括:以Wi-Fi感知的无线通信方式,接收到来自第一电子设备的第一消息;
所述第二电子设备通过所述第四天线发送第二消息;包括:所述第二电子设备通过所述第四天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送第二消息。该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。
在一种可能的设计中,第二电子设备接收到来自所述第一社交应用的应用服务器的请求消息;包括:接收到来自所述第一社交应用的应用服务器的请求消息,并通过所述第一社交应用的解密机制,获取到解密后的请求消息;
第二电子设备向所述应用服务器发送回复消息;包括:通过所述第一社交应用的加密机制,所述第一电子设备向所述应用服务器发送回复消息。该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。
第八方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线;所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第四天线,向第一电子设备发送第一消息;第一消息包括第二电子设备在第一社交应用上的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
在一种可能的设计中,第二电子设备所述接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:接收到来自所述第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。
在一种可能的设计中,在所述第二电子设备提示后,所述方法还包括:所述第二电子设备切换至所述第三天线。
第八方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。
第九方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四 距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线;所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,第二电子设备生成随机密钥;第二电子设备通过第四天线发送第一消息;第一消息包括随机密钥;在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,第二电子设备接收到来自第一电子设备的第二消息,使用随机密钥解密所述第二消息,获取到第一社交应用上的一个群组标识,或者第一电子设备在所述第一社交应用上的用户帐号,并获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第三天线和第一社交应用,向第一社交应用的应用服务器发送请求消息;请求消息包括群组标识或者第一电子设备在第一社交应用上的用户帐号,以及第二电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
在一种可能的设计中,第二电子设备接收到来自所述应用服务器的第二响应消息;包括:接收到来自所述应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。
在一种可能的设计中,第一电子设备与所述第二电子设备之间的无线通信方式为Wi-Fi感知、蓝牙和ZigBee中的一种。
第九方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。
第十方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三天线在第四发射功率下的发射距离为第四距离,第三距离大于预设的第二安全距离,第四距离小于或等于预设的第二安全距离;所述方法包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;响应于第一消息,从第一消息中获取到随机密钥,并获取到第二电子设备在第一社交应用上的用户帐号,使用随机密钥加密用户帐号;第二电子设备通过第四发射功率下的第三天线发送第二消息,第二消息包括加密后的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
在一种可能的设计中,第二电子设备接收到来自第一电子设备的第一消息,包括:以蓝牙或者ZigBee的无线通信方式,接收到来自第一电子设备的第一消息;
所述第二电子设备通过所述第四发射功率下的所述第三天线发送第二消息;包括:所述第二电子设备通过所述第四发射功率下的所述第三天线,以蓝牙或者ZigBee的无线通信方式,发送第二消息。
在一种可能的设计中,第二电子设备在接收到来自第一电子设备的第一消息之前,所述方法还包括:
所述第二电子设备,以Wi-Fi感知的无线通信方式,接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;
响应于所述添加群组成员服务消息或所述添加好友服务消息,所述第二电子设备通过所述第四发射功率下的所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送响应消息。
在一种可能的设计中,第二电子设备所述接收到来自第一电子设备的第一消息;包括:以Wi-Fi感知的无线通信方式,接收到来自第一电子设备的第一消息;
所述第二电子设备通过所述第四发射功率下的所述第三天线发送第二消息;包括:所述第二电子设备通过所述第四发射功率下的所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送第二消息。
在一种可能的设计中,第二电子设备接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:接收到来自所述第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。
第十方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。
第十一方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三天线在第四发射功率下的发射距离为第四距离,第三距离大于预设的第二安全距离,第四距离小于或等于预设的第二安全距离。所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第四发射功率下的第三天线,向第一电子设备发送第一消息;第一消息包括第二电子设备在第一社交应用上的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
在一种可能的设计中,第二电子设备接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:接收到来自所述第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。
在一种可能的设计中,在所述第二电子设备提示后,所述方法还包括:所述第二电子设备将所述第三天线的发射功率调整为第三发射功率。
第十一方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。
第十二方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三天线在第四发射功率下的发射距离为第四距离,第三距离大于预设的第二安全距离,第四距离小于或等于预设的第二安全距离。所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,第二电子设备生成随机密钥;第二电子设备通过第四发射功率下的第三天线发送第一消息;第一消息包括随机密钥;在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,第二电子设备接收到来自第一电子设备的第二消息,使用随机密钥解密第二消息,获取到第一社交应用上的一个群组 标识,或者第一电子设备在第一社交应用上的用户帐号,并获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第三发射功率下的第三天线和第一社交应用,向第一社交应用的应用服务器发送请求消息;请求消息包括群组标识或者第一电子设备在第一社交应用上的用户帐号,以及第二电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
在一种可能的设计中,第二电子设备接收到来自所述应用服务器的第二响应消息;包括:接收到来自所述应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。
在一种可能的设计中,第一电子设备与所述第二电子设备之间的无线通信方式为Wi-Fi感知、蓝牙和ZigBee中的一种。
第十二方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。
第十三方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第一电子设备和第二电子设备。第一电子设备运行有第一社交应用,第一电子设备包括:第一天线,第一天线的发射距离为第一距离,第一距离大于预设的第一安全距离;第二天线,第二天线的发射距离为第二距离,第二距离小于或等于预设的第一安全距离;其中,第一天线和第二天线为不同的天线;第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线。所述方法包括:
第一电子设备接收到第一用户输入,第一电子设备生成随机密钥;第一电子设备通过第二天线发送第一消息,第一消息包括随机密钥;在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,第二电子设备接收到来自第一电子设备的第一消息;响应于第一消息,第二电子设备从第一消息中获取到随机密钥,并获取到第二电子设备在第一社交应用上的用户帐号,第二电子设备使用随机密钥加密用户帐号;第二电子设备通过第四天线发送第二消息,第二消息包括加密后的用户帐号;第一电子设备接收到来自第二电子设备的第二消息;第一电子设备使用随机密钥解密第二消息,获取到第一社交应用上的一个用户帐号;第一电子设备通过第一社交应用和第一天线,向第一社交应用的应用服务器发送请求消息;请求消息包括用户帐号;请求消息还包括第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;第一电子设备接收到来自应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;第二电子设备接收到来自所述第一社交应用的应用服务器的第二响应消息;响应于所述第二响应消息,所述第二电子设备提示,所述用户帐号被添加群组成功,或者,所述用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。
第十三方面中的各个实施例的有益消息可以参见上述第一方面和第六方面,在此不再重复赘述。
第十四方面,本申请实施例提供一种通信系统,该通信系统可以包括如第一方面所述的第一电子设备和如第六方面所示的第二电子设备,或如第二方面所示的第一电子设备和如第七方面所示的第二电子设备,或如第三方面所示的第一电子设备和如第八方面所示的第二电子设备,或如第四方面所示的第一电子设备和如第十方面所示的第二电子设备,或如第五方面所示的第一电子设备和如第十一方面所示的第二电子设备。
第十五方面,本申请实施例提供一种第一电子设备,包括处理器和存储器。其中,存储器用于存储一个或多个计算机程序;当存储器存储的一个或多个计算机程序被处理器执行时,使得该第一电子设备能够实现上述第一电子设备所执行的任意方面及任意方面下的任意一种可能的设计的方法。
第十六方面,本申请实施例提供一种第二电子设备,包括处理器和存储器。其中,存储器用于存储一个或多个计算机程序;当存储器存储的一个或多个计算机程序被处理器执行时,使得该第二电子设备能够实现上述第二电子设备所执行的任意方面及任意方面下的任意一种可能的设计的方法。
第十七方面,本申请实施例还提供一种装置,该装置包括执行上述任一方面的任意一种可能的设计的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第十八方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在第一电子设备上运行时,使得所述第一电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。
第十九方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在第二电子设备上运行时,使得所述第二电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。
第二十方面,本申请实施例还提供一种包含计算机程序产品,当所述计算机程序产品在第一电子设备上运行时,使得所述第一电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。
第二十一方面,本申请实施例还提供一种包含计算机程序产品,当所述计算机程序产品在第二电子设备上运行时,使得所述第二电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。
第二十二方面,本申请实施例还提供一种芯片或芯片系统,所述芯片或芯片系统与存储器耦合,用于执行所述存储器中存储的计算机程序,以执行上述任意方面及任意方面的任意一种可能的设计的方法。
以上第十四方面至第二十二方面中任一方面中的各种设计可以达到的技术效果,请参照上述第一方面至第十三方面中各个设计分别可以达到的技术效果描述,这里不再重复赘述。
附图说明
图1A至图1D为一种一组好友添加方法的界面示意图;
图2为本申请实施例提供的一种群组成员或好友的添加方法的场景示意图;
图3A为本申请实施例提供的电子设备的硬件结构示意图;
图3B为本申请实施例提供的电子设备的软件结构示意图;
图4A为本申请实施例提供的无线通信模块及天线的一种原理示意图;
图4B为本申请实施例提供的无线通信模块及天线的另一种原理示意图;
图5A至图5C为本申请实施例提供的无线通信模块及天线的三种具体结构示意图;
图6为本申请实施例提供的无线通信模块及天线的发射距离的示意图;
图7为本申请实施例提供的一种群组或好友添加方法中用户操作的示意图;
图8A至图8C为本申请实施例一提供的一种好友添加方法示意图;
图9A至图9B为本申请实施例二提供的一种好友添加方法示意图;
图10A至图10B为本申请实施例三提供的一种好友添加方法示意图;
图11A至图11D为本申请实施例四提供的一种群组成员添加方法示意图;
图12A至图12B为本申请实施例五提供的一种群组成员添加方法示意图;
图13为本申请实施例六提供的一种群组成员添加方法的流程示意图;
图14A为本申请实施例七提供的一种群组成员添加方法的流程示意图;
图14B为本申请实施例七提供的一种好友添加方法的流程示意图;
图15为本申请实施例提供的一种电子设备的结构组成示意图;
图16为本申请实施例提供的一种通信系统的结构组成示意图。
具体实施方式
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。
Figure PCTCN2021141790-appb-000001
应用下的添加好友为例,通过用户的操作及图形用户界面(graphical user interface,GUI)的显示及切换,对图1A至图1D进行介绍。为了介绍方便,在后续介绍 时,以移动设备为手机为例。在图1A的(a)中,用户Alisa点击其手机的用户界面100上的
Figure PCTCN2021141790-appb-000002
应用图标101,之后图1A的(a)中的用户界面101切换为图1A的(b)中的用户界面110。在图1A的(b)中,用户Alisa点击其手机的用户界面110上的控件111,弹出窗口1100。当用户Alisa点击添加好友控件1101的操作后,手机可以进行好友的添加。
示例性地,当用户Alisa点击添加好友控件1101的操作后,手机显示如图1A中的(c)所示的用户界面120。用户Alisa可以在用户界面120中的搜索输入框控件121中,输入需要添加的好友的微信号或者好友的手机号等,来查找需要添加的好友。假设,用户Alisa在用户界面120中的搜索输入框控件121中,输入了好友的手机号,手机显示如图1A中的(d)所示的用户界面130。当手机检测到作用于搜索控件131的操作后,手机向
Figure PCTCN2021141790-appb-000003
应用的应用服务器发送搜索请求,以及手机从
Figure PCTCN2021141790-appb-000004
应用的应用服务器获取搜索结果。
假设手机从
Figure PCTCN2021141790-appb-000005
应用的应用服务器成功获取好友的账户信息,参见图1B中的(e)所示的用户界面140。用户界面140包括待添加好友Lucas的微信帐号信息。当用户Alisa作用于添加到通讯录控件141的操作后,手机显示如图1B中的(f)所示的用户界面150。用户Alisa可以在用户界面150输入用于对方进行验证的信息,以及对权限进行设置等。用户Alisa设置完成后,点击发送控件151,用户Alisa的手机100向
Figure PCTCN2021141790-appb-000006
应用的应用服务器发送好友添加请求。
进一步地,当用户Lucas收到来自用户Alisa的好友添加请求后,用户Lucas的手机可以显示如图1C中的(g)所示的用户界面160。用户界面160为好友添加请求的界面,包括对方用户Alisa发送的验证信息和用户Alisa的微信帐号信息。当用户Lucas点击用户界面160中的前往验证控件161的操作后,显示如图1C中的(h)所示的用户界面170。若用户Lucas同意该添加请求,则用户Lucas可以点击用户界面170中的完成控件171,手机向应用服务器发送好友添加请求通过消息。
进一步地,用户Alisa的手机100接收来自应用服务器的好友添加请求通过消息,然后手机显示如图1D中的(i)所示的用户界面180。在用户Alisa作用于用户界面180中的Lucas好友控件181的点击操作后,手机显示如图1D中的(j)所示的用户界面190。用户界面190包括用于提示用户Alisa的手机100验证通过的消息,用户Alisa可以在用户界面190中向对方发送即时消息和接收来自对方的即时消息。
可见,在上述用户Alisa添加好友Lucas的过程中,用户Alisa打开
Figure PCTCN2021141790-appb-000007
应用之后需要经过多次手动操作,才能够完成好友添加,用户操作繁琐,耗时较长,用户体验较差,不利于社交类应用的推广,尤其不利于新上市的社交类应用的推广。
为了解决上述的技术问题,本申请提出了一种群组或好友添加方法,该方法可以通过超短距帧以及Wi-Fi网络感知技术添加群组成员或添加好友,因为超短距帧仅能与发送方在预设的安全距离之内的电子设备接收,可保证通信的安全性。此外,该方法在保证信息安全的基础上,降低用户之间添加好友的复杂度,改善用户体验,提高沟通效率。
本申请实施例提供的好友添加方法可以适用于如图2所示的通信系统架构中。如图2所示,多个电子设备(包含但不限于电子设备100、电子设备200…)中的至少一个电子设备能够支持发送超短距帧。比如,电子设备100能够发送超短距帧。在电子设备100和电子设备200之间的距离小于或者等于预设的安全距离时,电子设备200能够接收到来自电子设备100的超短距帧。这样可以保证超短距帧中的内容不被其它电子设备获取,电子设备200从超短距帧中获取用户帐号或群组帐号,然后可以进行好友添加或群组成员添加。
可以理解地,上述电子设备100和电子设备200在图2中均以手机为例进行示意性举例。电子设备100和电子设备200还可以为诸如智能音箱、智能手表、智能手环、智能电视(也称为智慧屏)、智能家居设备等任意电子设备。图2所示的系统还可以包括其它电子设备。本申请实施例对此不作限制。
图2中各电子设备可以通过通信网络进行通信,也可以通过通信网络与服务器相互通信。该通信网络可以是局域网,也可以是通过中继(relay)设备转接的广域网,或者由局域网和广域网组成的混合组网等。
其中,当该通信网络为局域网时,示例性的,该通信网络可以是Wi-Fi热点网络、Wi-Fi点到点(peer to peer,P2P)网络、蓝牙网络、Zigbee网络或近场通信(near field communication,NFC)网络等近距离通信网络。当该通信网络为广域网时,示例性的,该通信网络可以是第三代移动通信技术(3rd-generation wireless telephone technology,3G)网络、第四代移动通信技术(4th generation mobile communication technology,4G)网络、第五代移动通信技术(5th-generation mobile communication technology,5G)网络、未来演进的公共陆地移动网络(public land mobile network,PLMN)、因特网等。在图2所示的场景中,不同电子设备通过通信网络交互的数据,包括但不限于:用户帐号或群组帐号、图片、文本、视频,或者电子设备对图片、文本或视频等对象处理后的结果中的至少一种。
以下介绍本申请实施例提供的电子设备、用于这样的电子设备的用户界面、以及用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是诸如智能手机、平板电脑、膝上型计算机(Laptop)、具备无线通讯功能的可穿戴电子设备(比如,智能手表)等便携式电子设备。应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是固定式电子设备(比如,台式计算机等)。在一些实施例中,电子设备可以是智能家居设备,诸如智能音箱等。
示例性地,图3A示出了电子设备100的硬件结构。如图3A所示,电子设备100包括处理器310、外部存储器接口320、内部存储器321、通用串行总线(universal serial bus,USB)接口330、充电管理模块340、电源管理模块341,电池342、天线1、天线2、移动通信模块350、无线通信模块360、音频模块370、扬声器370A、受话器370B、麦克风370C、耳机接口370D、传感器模块380、按键390、马达391、指示器392、摄像头393、显示屏394、以及用户标识模块(subscriber identification module,SIM)卡接口395等。其中传感器模块380可以包括压力传感器380A、陀螺仪传感器380B、气压传感器380C、磁传感器380D、加速度传感器380E、距离传感器380F、接近光传感器380G、指纹传感器380H、温度传感器380J、触摸传感器380K、环境光传感器380L、骨传导传感器380M等。
处理器310可以包括一个或多个处理单元。例如:处理器310可以包括应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
电子设备通过GPU,显示屏394,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏394和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器310可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
电子设备可以通过ISP、摄像头393、视频编解码器、GPU、显示屏394以及应用处理器等实现拍摄功能。
SIM卡接口395用于连接SIM卡。SIM卡可以通过插入SIM卡接口395,或从SIM卡接口395拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口395可以支持Nano SIM卡、Micro SIM卡、SIM卡等。同一个SIM卡接口395可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口395也可以兼容不同类型的SIM卡。SIM卡接口395也可以兼容外部存储卡。电子设备通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备采用eSIM,即:嵌入式SIM卡。
电子设备的无线通信功能可以通过天线1、天线2、移动通信模块350、无线通信模块360、调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块350可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块350可以包括至少一个滤波器、开关、功率放大器、低噪声放大器(low noise amplifier,LNA)等。移动通信模块350可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块350还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块350的至少部分功能模块可以被设置于处理器310中。在一些实施例中,移动通信模块350的至少部分功能模块可以与处理器310的至少部分模块被设置在同一个器件中。
无线通信模块360可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(bluetooth,BT)、全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外线(infrared radiation,IR)技术等无线通信的解决方案。无线通信模块360可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块360经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器310。无线通信模块360还可以从处理器310接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备的天线1和移动通信模块350耦合,天线2和无线通信模块360耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址接入(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、时分码分多址(time-division code division multiple access,TD-SCDMA)、长期演进(long term evolution,LTE)、BT、GNSS、WLAN、NFC、FM、和/或IR技术等。
可以理解的是,图3A所示的部件并不构成对电子设备的具体限定,电子设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。此外,图3A中的部件之 间的组合/连接关系也是可以调整修改的。
图3B为本申请实施例提供的电子设备100的软件结构框图。分层架构将软件分成若干层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在本申请实施例中,软件系统分为三层,从上至下分别为应用程序层,服务层、操作系统(operating system,OS)层。应用程序层可以包括一系列应用程序。如图3B所示,应用程序层可以包括社交应用,联系人,日历,短信等程序。
服务层包括但不限于超短距服务等多种服务。应用程序层中的应用可以向服务层的超短距服务发起注册,然后就能够接收到来自超短距服务的超短距事件通知。其中,超短距服务包括超短距事件注册、超短距事件通知、收发超短距包等服务。超短距服务是为了能够给支持超短距服务的应用提供使用超短距的能力,以及为了让未启动的应用依旧能够接收到订阅的超短距包,所以该软件结构在服务层设有超短距服务。示例性地,社交应用向超短距服务注册自己所关注的超短距包的特征,比如使用Wi-Fi感知(NAN)的服务名(service name)和包的特征值(某个字段值为多少)。超短距包可以是比如Wi-Fi感知(NAN)的服务发现帧(service discovery frame,SDF),也可以是蓝牙的广播信标(beacon)帧,当然也可以不限于上述两种帧。
操作系统层包括协议栈和驱动。其中,协议栈包括BLE协议栈、Wi-Fi协议栈、NAN协议栈。驱动包括超短距模式管控、超短距传输控制、超短距占空比控制、Wi-Fi驱动、蓝牙驱动和超短距包收发等。
在本申请实施例中,电子设备100可以包括Wi-Fi芯片、蓝牙芯片和Zigbee芯片等中的至少一种。当Wi-Fi、蓝牙芯片或Zigbee芯片等任一芯片接收到超短距帧后,会通过操作系统层传递给服务层中的超短距服务,超短距服务匹配超短距包的特征,再传递给应用程序层中的社交应用。如果社交应用未启动,超短距服务还能够通过超短距事件通知调用社交应用,然后再将超短距包传递给社交应用。而当社交应用需要发送超短距包时,可以使用超短距服务提供的接口发送超短距包,经由操作系统层通过Wi-Fi或者蓝牙芯片发出。
在一种示例中,图4A示出了本申请实施例提供的电子设备100中的无线通信模块及天线的一种原理结构。如图4A所示,电子设备100可以包括处理器310,无线通信模块360,第一天线和第二天线。
其中,第一天线和第二天线用于发射和接收电磁波。进一步的,无线通信模块360将从第一天线或第二天线接收的电磁波转换为信号,并将信号发送至处理器310进行处理;或者无线通信模块360从处理器310接收待发送的信号,经由第一天线或第二天线转为电磁波辐射出去。
本申请实施例中,第一天线工作时的无线发射距离大于第二天线工作时的无线发射距离。第一天线发射信号的第一发射距离大于预设的安全距离,第二天线发射信号的第二发射距离小于或等于预设的安全距离。例如,第一天线的第一发射距离的取值范围可以是(4米,20米),第二天线的第二发射距离的取值范围可以是(3cm,2米)。第一发射距离的取值范围可以根据第一天线工作时的无线发射功率覆盖的最小距离和最大距离确定的,也可以是开发人员预先设定的;第二发射距离的取值范围可以是根据第二天线工作时的无线发射功率覆盖的最小距离和最大距离确定的,也可以是开发人员预先设定的。其中,预设的安全距离为电子设备之间交互秘密信息的安全距离。预设的安全距离可以是根据第二天线工作时的无线发射功率覆盖的最大距离确定的,也可以是开发人员预先设定的距离。比 如,预设的安全距离可为10cm、5cm等。示例性地,预设的安全距离的取值范围可以为(0cm,30cm)。这样,在电子设备100与电子设备200之间的距离小于或等于预设的安全距离时,电子设备200能够接收到电子设备100发送的秘密信息。这样,降低了安全风险。
在一些实施例中,处理器310可控制第一天线与第二天线的切换。当电子设备100采用第一天线时,在电子设备100与电子设备200之间的距离小于第一发射距离时,电子设备100能够接收到电子设备200发送的消息;当电子设备200采用第二天线时,在电子设备100与另一电子设备200之间的距离小于第二发射距离,电子设备100能够接收到电子设备200发送的消息。在一些实施例中,第一发射距离和第二发射距离也可分别称为第一距离和第二距离。
在另一种示例中,图4B示出了本申请实施例提供的电子设备100中的无线通信模块及天线的另一种原理结构。如图4B所示,电子设备100可以包括处理器310,无线通信模块360和第一天线;其中,无线通信模块360包括无线模块3601和可变阻抗电路模块3602。第一天线用于发射和接收无线信号。示例性地,可变阻抗电路模块3602可为由可变阻抗组成的电路或者集成线路等。处理器310通过控制调整可变阻抗电路模块3602的阻抗值,调节加载于第一天线的无线发射功率,从而控制第一天线发射无线信号时的发射距离。示例性地,可变阻抗电路模块3602的阻抗值为第一阻抗值时,第一天线的发射功率为第一发射功率,此时第一天线发射无线信号的距离为第一发射距离(实现图4A中“第一天线”的功能);可变阻抗电路模块3602的阻抗值为第二阻抗值时,第一天线的发射功率为第二发射功率,此时第一天线发射无线信号的距离为第二发射距离(实现图4A中“第二天线”的功能)。其中,第一发射功率大于第二发射功率;第一发射距离大于预设的安全距离,第二发射距离小于或等于预设的安全距离。在一些实施例中,第一发射距离和第二发射距离可分别称为第一距离和第二距离。
可以理解的是,图4A对应的一种示例和图4B对应的另一种示例中示意的原理结构并不构成对电子设备100中的无线通信模块360及天线的具体限定。在另一些实施例中,电子设备100中的无线通信模块360及天线的结构可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
应理解,图4A所示的无线通信模块360可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片,也可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片及与其匹配的电路。图4B所示的无线模块3601可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片,图4B所示的无线通信模块360可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片及与其匹配的电路。
示例性地,图5A-图5C示出了图4A中第二天线的三种实现方式。如图5A-图5C所示,第一天线和第二天线可以共用一部分走线。其中,第一天线也可称为真天线或强天线,第二天线也可称为假天线或弱天线。
本申请实施例中电子设备的第一天线和第二天线可以通过射频开关进行切换。物理上可以将第二天线与射频开关(如图5A-图5C中虚线框中所示为第二天线)都置于屏蔽罩内或者将第二天线置于芯片内。
本申请实施例中的第二天线的目的就是要尽可能减小发射距离。构造第二天线的原理可以是:
(1)减小天线长度,从而减小辐射到空气中的电磁波;
(2)减小辐射效率,通过阻抗将一部分的电磁波辐射转化为热能消耗掉;
(3)降低回波损耗,将部分射频能量反射回芯片内部等。
第二天线具体的实现可以采用:
(i)将天线变短;
(ii)将真天线路径中某点断开,或者在该点通过电阻、电感或者电容接地;
(iii)使用屏蔽罩等。
应理解,上述第二天线具体的实现(i)和(ii)可以在PCB板上或者芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)内部实现。
还应理解,上述屏蔽罩的作用是减小对外辐射信号的强度,以达到削弱辐射的目的。
还应理解,上述将天线变短是指第二天线相比于第一天线来说,第二天线更短。图5A至图5C所示的三种第二天线的结构,第二天线如图5A至图5C的虚线框中的结构所示。图5A至图5C中第一天线的结构都是通过射频输入输出(radio frequency input/output,RFIO)引脚连接滤波电路(例如,π型电路)、匹配电路(例如,π型电路)以及匹配电路外的天线体(例如,该天线体可以是一段金属走线)。图5A中虚线框所示的第二天线a、图5B中虚线框所示的第二天线b以及图5C中虚线框所示的第二天线c的长度不同,但是相比于第一天线都更短。滤波电路的作用是防止干扰,匹配电路是用来与第一天线匹配。
示例性的,如图5A所示,第二天线a可以位于屏蔽罩内。其中,第二天线a可以包括屏蔽罩内芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)的RFIO引脚和2路开关中的第一路开关(第一路开关不连接任何器件)。有时,第二天线a还可包括在RFIO引脚和第一路开关之间的走线。其中,2路开关指的是走线或RFIO引脚与滤波电路之间的开关。通过该2路开关可以将走线或RFIO引脚,与滤波电路连通或者断开。第一路开关为图5A所示的与RFIO引脚或走线相连、且与滤波电路之间断开的开关。应理解,本申请实施例中的2路开关可以是单刀双掷开关。
示例性的,如图5B所示,第二天线b可以位于屏蔽罩内。其中,第二天线b可以包括屏蔽罩内芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)的RFIO引脚、2路开关的第一路开关(第一路开关连接电阻)和匹配器件。有时,第二天线b还可包括在RFIO引脚和第一路开关之间的第一走线。有时,第二天线b还可包括匹配器件与地之间的第二走线。匹配器件可以为电阻。通过电阻接地可以将一部分的电磁波辐射转化为热能消耗掉,从而减小了第二天线b的辐射效率。其中,所述2路开关指的是RFIO引脚或第一走线与电阻、滤波电路之间的开关,通过该开关,可以将RFIO引脚或第一走线与电阻相连、与滤波电路断开,或者可以将RFIO引脚或第一走线与电阻断开、而与滤波电路相连通。所述的第一路开关为所述2路开关中与匹配器件相连、且与滤波电路断开的开关。
示例性的,如图5C所示,第二天线c可以位于屏蔽罩内。其中,经由芯片匹配的滤波电路后接匹配器件(例如,电阻)到地。第二天线c可以包括屏蔽罩内芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)的RFIO引脚、滤波电路、2路开关的第一路开关(第一路开关连接电阻)和匹配器件(比如,电阻)。有时,第二天线c还可以包括RFIO引脚与滤波电路之间的第一走线。有时,第二天线c还可以包括滤波电路与匹配器件之间的第二走线。通过匹配器件(比如,电阻)接地可以将一部分的电磁波辐射转化为热能消耗掉,从而减小了第二天线c的辐射效率。其中,所述2路开关指的是屏蔽罩内的滤波电路与匹配器件、屏蔽罩外的匹配电路之间的开关。通过该2路开关,可以将屏蔽罩内的滤波电路 与匹配器件相连、与屏蔽罩外的匹配电路断开;或者,可以将屏蔽罩内的滤波电路与匹配器件断开、而与屏蔽罩外的匹配电路相连通。所述的第一路开关为用于连接屏蔽罩内的滤波电路与匹配器件的开关。
应理解,上述图5A至图5B中的第一天线可以包括RFIO引脚、2路开关中的第二路开关,滤波电路、匹配电路以及匹配电路外连接的天线体。有时,图5A至图5B中的第一天线还可以包括RFIO引脚与所述2路开关中的第二路开关之间的走线。所述第二路开关为用于连接RFIO引脚与滤波电路的开关。
上述图5C中的第一天线可以包括RFIO引脚、滤波电路、2路开关中的第二路开关、匹配电路以及匹配电路外连接的天线体。有时,图5C中的第一天线还可以包括RFIO引脚与滤波电路之间的走线。所述第二路开关为用于连接屏蔽罩内的滤波电路与屏蔽罩外的匹配电路的开关。
应理解,上述图5A至5C为物理上的第一天线和第二天线,本申请实施例中电子设备也可以物理上只有一根天线,但是逻辑上包括第一天线和第二天线。例如,电子设备可以通过调节寄存器的值来屏蔽芯片内部的多级放大器,从而使得物理上的天线的发射功率为第一发射功率,此时可以认为是逻辑上的第一天线;电子设备也可以通过调节寄存器的值从而使得物理上的天线的发射功率为第二发射功率,此时可以认为是逻辑上的第二天线;其中,第一发射功率大于第二发射功率。
本申请实施例中,电子设备通过芯片内部寄存器的值来切换逻辑上的第一天线和第二天线,与通过射频开关来切换物理上的第一天线和第二天线,可以达到相同的效果。
以上不同的第二天线结构配合Wi-Fi芯片、蓝牙芯片或者ZigBee芯片的不同发射功率(Tx power)的设置,可以达到不同的超短距通讯的要求(例如,从10cm到2m)。
示例性的,表1示出了几种不同的第二天线结构配合Wi-Fi芯片的不同发射功率的通讯距离。
表1
Figure PCTCN2021141790-appb-000008
示例性的,表2示出了几种不同的第二天线结构配合蓝牙芯片时不同发射功率的通讯距离。
表2
Figure PCTCN2021141790-appb-000009
示例性的,表3示出了几种不同的第二天线结构配合ZigBee芯片时不同发射功率的通讯距离。
表3
Figure PCTCN2021141790-appb-000010
由于芯片内物理器件的特性,天线最大发射功率和最小发射功率之差是相关联的。如果把电子设备的最小发射功率降得很低,则最大发射功率也会被降低,这样就不满足正常工作时的距离要求。由于不同的电子设备的结构不同以及对电子设备的安全性能要求不同,所以电子设备的生产厂商可以采用不同的第二天线结构以及发射功率来保证电子设备的通讯距离。示例性的,对于不同的电子设备生产厂商,其电子设备外壳的厚度可能不同,那么在第二天线结构相同以及发射功率相同的情况下,电子设备能够被发现的通讯距离也可能不同。不同的电子设备生产厂商可以根据其电子设备本身的结构,配合第二天线的结构以及一定的发射功率,从而结合测试,得出对应安全距离的发射功率。用户可根据实际采用的Wi-Fi芯片、蓝牙芯片、ZigBee芯片,参考表1、表2和表3,对三种第二天线(第二天线a、第二天线b和第二天线c)设置发射功率,并结合测试结果,调整发射功率,使得第二天线在发射时达到对应的安全距离。
结合上述示例,如图6所示,下文以位于位置0的电子设备100,以及位于位置1或位置2的电子设备200,第一发射距离是5米,第二发射距离是3cm为例。
当电子设备100在位置0通过第一天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离小于第一发射距离,电子设备200可接收到电子设备100发射的无线信号。当电子设备100在位置0通过第二天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离大于第二发射距离,电子设备200无法接收到电子设备100发射的无线信号;而在电子设备200位于位置2,此时电子设备100与电子设备200之间的距离小于第二发射距离,电子设备200可以接收到电子设备100发射的无线信号。第一发射距离、第二发射距离可分别为第一距离、第二距离。
相应地,当电子设备100在位置0通过第一发射功率下的第一天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离小于第一发射距离,电子设备200可接收到电子设备100发射的无线信号。当电子设备100在位置0通过第二发射功率下的第一天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离大于第二发射距离,电子设备200无法接收到电子设备100发射的无线信号;而在电子设备200位于位置2,此时电子设备100与电子设备200之间的距离小于第二发射距离,电子设备200可以接收到电子设备100发射的无线信号。第一发射距离、第二发射距离可分别为第一距离、第二距离。
应理解,在上述实施例中所提到的预设的安全距离(比如,30cm)内,即使使用抓包器连错误包也无法抓到。实际中,电子设备100与电子设备200之间实际的距离可能比预设的安全距离还要小。比如,预设的安全距离为30cm;在电子设备100发送的超短距帧被电子设备200接收到时,电子设备100与电子设备200之间的实际距离小于30cm。
具体地,可以通过设置发射功率的大小来设置不同的发射距离。比如,要求对应于第一天线的无线发射功率,比对应于第二天线的无线发射功率,要多至少一定的功率。
另外,对于第二天线的无线发射功率,可以要求产品表面含外置天线任一点无线发射功率不超过预设的功率(比如,-65dBm等),以满足预设的安全距离的要求。
以下结合附图,具体介绍本申请实施例提供的一种群组成员或好友的添加方法。图7为本申请实施例提供的一种应用场景示意图。如图7所示,Alisa的电子设备为电子设备100,Lucas的电子设备为电子设备200。Alisa和Lucas为用户的示意性举例。电子设备100和电子设备200碰一碰或相互靠近一下,即可加入群组或添加好友。其中,电子设备100可以包括第一天线和第二天线,电子设备200可以包括第三天线和第四天线。需要指出的是,第三天线与第一天线属于同一种天线,第四天线和第二天线属于同一种天线。
对于电子设备200来说,第四天线属于电子设备200的“第二天线”。这是为了避免出现“第二天线”在使用上的混淆,使用“第四天线”来表达。相应地,第三天线属于电子设备200的“第一天线”。也是出于避免混淆的原因,使用“第三天线”来表达。也就是说,使用“第四天线”来表达,不是说电子设备200至少包括四条天线;而是为了避免表达上的混淆。即电子设备200可以包括“第三天线”和“第四天线”两条天线,并不要求移动设备具有四条天线。
可替换地,电子设备100可以包括第一天线;电子设备200包括第三天线。电子设备100的第一天线,按照图4B所示的机制,分别以第一发射功率和第二发射功率来发射信号,以分别实现强天线或弱天线的功能。
可选地,电子设备200的第三天线,也可以按照图4B所示的机制,分别以第三发射功率和第四发射功率来发射信号,以分别实现强天线或弱天线的功能。此时,对于电子设备200来说,第四发射功率属于电子设备200的“第二发射功率”。这是为了避免出现“第二发射功率”在使用上的混淆,使用“第四发射功率”来表达。相应地,第三发射功率属于电子设备200的“第一发射功率”。也是出于避免混淆的原因,使用“第三发射功率”来表达。也就是说,使用“第四发射功率”来表达,不是说电子设备200包括的天线有四个发射功率;而是为了避免表达上的混淆。即电子设备200可以使用“第三发射功率”和“第四发射功率”的天线,并不要求电子设备200的天线具有四个发射功率。
为了更为清楚地阐述,下面分为场景一和场景二分别阐述,并将电子设备100和电子设备200分别具体为手机100和手机200。其中,场景一示例性地阐述了Alisa和Lucas在社交应用上互相添加好友的过程;场景二示例性地阐述了在社交应用上,Lucas经Alisa介绍加入群组的过程。需要指出的是,本申请实施例是以非全面屏为示例进行描述,本申请实施例也适用于全面屏,本申请实施例对此不作限定。
场景一
下面通过实施例一至实施例三来具体阐述场景一下的好友添加方法的交互流程。
实施例一涉及图8A至图8C。图8A示出了场景一下好友添加方法的交互流程图。如图8A所示,该方法具体包括以下步骤:
S8700,手机100接收到用户的操作,该操作用于添加好友。
该用户的操作可以是触控操作,也可以语音操作,本申请实施例对此不作限定。
示例性地,参见图8B中的(a),该用户界面800为用户Alisa的手机100的桌面。其中,用户Alisa的手机100桌面上包括时钟、图库、
Figure PCTCN2021141790-appb-000011
相册、天气、浏览器、设置以及社交应用等应用程序。当检测到点击社交应用的控件801的操作后,手机100可以显示如图8B中的(b)所示的用户界面810。
参见图8B中的(b),用户界面810为社交应用的显示界面,用户界面810显示有用 户Alisa的目前已有的联系人的信息。示例性地,该社交应用的用户界面810上包括扩展控件811,当手机100检测到点击扩展控件811的操作后,显示弹出框8100。当检测到点击添加好友控件8101的操作后,手机100就会通过第一天线发布添加好友服务。
另外,当检测到点击添加好友控件8101的操作后,手机100还可以进一步提示用户Alisa碰一碰用户Lucas的手机200,即手机100显示如图8B的(c)示出的界面820。界面820包括提示用户与好友设备碰一碰的提示框。在收到提示后,用户Alisa可以将手机100靠近或碰触用户Lucas的手机200。
S8701,手机100通过第一天线发布添加好友服务消息。
示例性地,当用户Alisa打开手机100的社交应用801中的“添加好友”控件8101,手机100就会发布添加好友服务消息,用于发现周围订阅了该服务的电子设备。
示例性地,S8701中的“发布”是以广播的形式。该添加好友服务消息包括手机100的IP地址或MAC地址等唯一标识地址。可选地,该好友添加服务消息还包括社交应用801的标识。通过该标识可唯一识别社交应用801。可选地,该好友添加服务消息还包括用户Alisa在该社交应用上的用户帐号。
S8702,手机200通过第三天线发送响应消息(例如确认(acknowledge,ACK)信息),该响应消息用于通知手机100已经接收到该服务。
需要说明的是,手机200预先已订阅添加好友服务。示例性地,用户Lucas的手机200在打开社交应用时就自动订阅添加好友服务,或者是社交应用作为常驻后台的应用启动时自动订阅添加好友服务。
示例性地,在手机200接收到添加来自手机100的好友服务消息后,获取到手机100的IP地址或MAC地址等唯一标识地址以及社交应用801的标识。
可选地,该响应消息包括手机200的IP地址或MAC地址等唯一标识地址。
需要指出的是,通过上述S8701和S8702,手机100可以获取手机200的IP地址或MAC地址等唯一标识地址,手机200也可以获取手机100的IP地址或MAC地址等唯一标识地址以及社交应用801的标识,后续手机100和手机200之间可以根据上述的唯一标识地址,通过同一社交应用向对方发送消息。
S8703,手机100收到响应消息后,随机生成密钥,获取到包含密钥的第一消息。
S8704,手机100从第一天线切换至第二天线。
S8705,手机100通过第二天线发送第一消息。
示例性地,当手机100收到响应消息之后,手机100可以通过控制射频开关从第一天线切换至第二天线,然后通过第二天线发送第一消息;此时第一消息属于超短距帧;这样,手机100发送的第一消息不会被距手机100预设安全距离之外的电子设备接收到。
本实施例中,第一消息可以是Wi-Fi感知帧或信标帧。Wi-Fi感知帧为发布(Publish)帧、跟踪(Follow-up)帧或者订阅(Subscribe)帧。若第一消息为Follow-up帧,那么用户Alisa的手机100的密钥可以携带在Follow-up帧的payload(负载)字段中。Wi-Fi感知帧基于Wi-Fi感知技术。Wi-Fi感知技术既可以支持手机100和手机200在未接入同一个路由器场景下的点到点通信,也可以支持手机100和手机200接入同一个路由器场景下的点到点通信。
在一种可能的实施方式中,手机100通过第二天线发送第一消息,其发送数据和接收数据的成功率有可能会降低,那么手机100可以重复多次发送密钥。
S8706,在手机200距手机100第二距离内,手机200接收到第一消息,从第一消息中获取到密钥。
示例性地,在手机200与手机100之间的距离小于预设的安全距离后,手机200可以接收到该第一消息,从中获取密钥。
S8707,手机200获取手机200中社交应用的用户帐号。
示例性地,手机200的使用用户Lucas打开社交应用,手机200可以从运行的社交应用获取使用用户Lucas的用户帐号。手机200的社交应用与手机100的社交应用相同。
示例性地,S8707中的“社交应用的用户帐号”包括上一次登录该社交应用的用户帐号。
S8708,手机200使用该密钥加密手机200中社交应用的用户帐号,生成第二消息,第二消息包括加密后的用户帐号。
示例性地,手机200获取手机200的社交应用的用户帐号,由于手机200为用户Lucas的手机,故一般来说,获取到的手机200的社交应用的用户帐号为Lucas在该社交应用上的用户帐号,使用该密钥加密Lucas在该社交应用上的用户帐号。
示例性地,若用户Lucas同意用户Alisa添加好友,则用户Lucas会将手机200靠近用户Alisa的手机100;或者说,用户Lucas同意用户Alisa的手机100主动靠近自己的手机200;这样,手机200与手机100之间的距离就小于或等于预设的安全距离(如30cm),手机200就可以接收到来自手机100的密钥,然后手机200使用该密钥加密用户Lucas的用户帐号。
需要说明的是,本实施例并不限定手机200和手机100靠近的时长或碰在一起的时长。
在一种实施方式中,用户Alisa点击添加好友控件8101的操作后,靠近或碰一下用户Lucas的手机200之后,用户Alisa就可以移走手机100。
在一种实施方式中,用户Alisa点击添加好友控件8101的操作后,靠近或碰一下用户Lucas的手机200之后,当用户Alisa的手机收到S8716所示的响应消息,和/或用户Lucas的手机收到S8714所示的响应消息,用户Alisa就可以移走手机100。
S8709,手机200将第三天线切换至第四天线。
S8710,手机200通过第四天线向手机100发送第二消息。
也就是说,当用户Lucas的手机200收到第一消息之后,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第二消息;此时第二消息属于超短距帧;这样手机200发送的第二消息不会被预设安全距离之外的电子设备100接收到。
本实施例中,该第二消息可以是Wi-Fi感知帧或信标帧。Wi-Fi感知帧为发布(Publish)帧、Follow-up帧或者订阅(Subscribe)帧,若第二消息为Follow-up帧,那么加密后的Lucas在社交应用上的用户帐号可以携带在Follow-up帧的payload(负载)字段中。
S8711,手机100接收来自手机200的第二消息之后,手机100将第二天线切换至第一天线。
示例性地,在手机200与手机100之间的距离小于或等于预设的安全距离时,用户Alisa的手机100可以接收来自手机200的第二消息。
示例性地,当用户Alisa的手机100收到第二消息后,手机100可以通过控制射频开关从第二天线切换至第一天线。
S8712,手机100通过第一天线向手机200发送确认消息。
S8713,接收到确认消息后,手机200从第四天线切换至第三天线。
也就是说,当用户Lucas的手机200收到确认消息后,手机200可以通过控制射频开关从第四天线切换至第三天线。
S8714,手机100使用密钥解密第二消息,得到用户帐号。
手机100在S8703中随机生成密钥后,本地保存该密钥,此时手机100可以使用密钥解密第二消息,获取到用户Lucas在该社交应用上的用户帐号。
对于S8714与S8713的前后顺序,本申请不作限定。
S8715,手机100通过第一天线向社交应用的应用服务器发送请求消息,该请求消息包括双方在社交应用上的用户帐号。
示例性地,手机100向社交应用的应用服务器发送的请求消息包括用户Lucas在社交应用上的用户帐号和用户Alisa在社交应用上的用户帐号。该请求消息用于请求用户Alisa在社交应用上的用户帐号与用户Lucas在社交应用上的用户帐号互相加为好友。
与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200即可获取好友帐号,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了界面操作次数,提升了用户体验。
S8716,应用服务器向手机200发送该请求消息的响应消息。
示例性地,在该步骤中,手机200接收该请求消息的响应消息之后,手机200还可以显示接收到好友添加成功的提示消息,用于提示用户好友添加成功。
该步骤中,用户Lucas不需要再手动确认,即可收到来自应用服务的添加好友成功的消息。应理解,在用户Lucas同意用户Alisa添加好友情况下,手机100和手机200的距离才会小于预设的反射距离(如30cm),所以手机200才能接收到来自手机100的密钥,相当于用户Lucas已经主动授权用户Alisa可以添加其为好友,所以无需用户Lucas的手动确认操作。
示例性地,手机200还可以仅显示接收到好友添加成功的提示消息。例如,如图8C所示的用户界面830,界面830显示来自社交应用的提示消息,用于通知用户Lucas已经添加了一个新的好友。
可替换地,手机200还可以仅发出接收到好友添加成功的提示消息的提示音。
可替换地,手机200还可以既发出接收到好友添加成功的提示消息的提示音,又显示接收到好友添加成功的提示消息。
S8717,应用服务器向手机100发送该请求消息的响应消息。
虽然在图8A中S8717位于S8716之后,但实际中应用服务器可以并行地执行S8717和S8716,也可以先执行S8717后执行S8716,还可以先执行S8716后执行S8717。
S8718,手机100接收该请求消息的响应消息后,手机100显示好友添加成功的提示消息。
可替换地,手机100接收该请求消息的响应消息后,手机100可以仅发出接收到好友添加成功的提示消息的提示音。
可选地,手机100接收该请求消息的响应消息后,手机100可以既发出接收到好友添加成功的提示消息的提示音,又显示接收到好友添加成功的提示消息。
可选地,手机100接收该请求消息的响应消息后,手机100可以仅显示接收到好友添 加成功的提示消息。
当手机100接收该好友添加成功的提示消息后,用户Alisa和用户Lucas可以进行即时通信;具体可参见图1D所示的示例,此处不再赘述。
在图8A示出的流程中,S8710之所以都采用弱天线来发送,是为了提高安全性。因为在该实施例中,需要考虑到非法的电子设备(攻击设备)虽然不在手机200的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机100,即S8700至S8701、S8703、S8705中的“发送第一消息”、S8711至S8712、S8714、S8718等中的全部或部分,均可能被非法的电子设备来模拟。即使非法的电子设备(攻击设备)模拟了手机100,执行了S8700至S8701、S8703、S8705中的“发送第一消息”、S8711至S8712、S8714、S8718等中的全部或部分,但由于S8710中手机200通过弱天线发送第二消息,所以非法的电子设备(攻击设备)就无法在S8711接收到第二消息,从而无法利用自身生成的密钥解密,也就无法获取到用户Lucas在社交应用上的用户帐号。这样,就避免了用户Lucas在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来较好的体验。
而在S8710中,若手机200通过第三天线(即强天线)发送第二消息,非法的电子设备(攻击设备)可能接收到第二消息;而之前的S8700至S8701、S8703至S8705中的“发送第一消息”也是非法的电子设备(攻击设备)执行的,故在S8714中,非法的电子设备(攻击设备)可以用自身先前生成的密钥来解密,获取到手机200在社交应用上的用户帐号。进而,可以执行后续的S8715和S8718,应用服务器会执行后续的S8716和S8717;手机100就会收到被陌生人添加好友的消息,进而影响手机100在社交应用上的使用,给用户带来不便。
需要说明的是,S8715、S8716和S8717涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。
需要说明的是,S8701和S8702是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S8701和S8702。
需要指出的是,在一种可能的情况下,若手机200在社交应用上的用户帐号在执行S8700之前,与手机100在社交应用上的用户帐号并未添加好友,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机200在社交应用上的用户帐号在执行S8700之前,已经与手机100在社交应用上的用户帐号为好友,则应用服务器向手机100发送请求消息的响应消息用于提示重复添加,或者响应消息用于提示手机200在社交应用上的用户帐号已经与手机100在社交应用上的用户帐号为好友,不用添加。
需要说明的是,该实施例中,手机100默认通过第一天线,直至手机100切换至第二天线,手机100切换至第二天线之后,手机100均通过第二天线发送消息,直至手机100切换至第一天线。同样地,手机200默认通过第三天线,直至手机200切换至第四天线。手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。
本申请实施例是以用户Alisa和用户Lucas为例,示例性地说明好友添加的过程。应理解,该好友添加方式同样适用于其它用户之间的好友添加,本申请对此不作限制。
本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,手机200包括第三天线和第四天线,即手机100和手机200均支持超短距帧的收发。因此,处于预设的安全距离之外的其它电子设备无法接收到该超短距帧,所以可以保证通信的安全性。
与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。
与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200即可获取好友帐号,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了界面操作次数,提升了用户体验。
场景一还可通过实施例二进一步阐述。实施例二与实施例一的主要区别在于,在实施例二中手机200并不通过第四天线发送第二消息,而是通过第三天线发送第二消息;因此在实施例二所示的好友添加过程中,为了提高好友添加结果的安全性和可靠性,需要手机200的使用用户参与确认。
实施例二涉及图9A至图9B。在实施例二中,手机100可以包括第一天线和第二天线,手机200可以包括第三天线;此处的第三天线相当于强天线或真天线。图9A示出了场景一下好友添加方法的交互流程图。如图9A所示,该方法具体包括以下步骤:
S9700至S9708:分别与S8700至S8708相同,请参见S8700至S8708的描述,此处不再赘述。
S9709,手机200通过第三天线向手机100发送第二消息。
需要说明的是,S9709与S8710的区别在于,手机200是通过第三天线发送的第二消息。也就是说,本实施例并不要求手机200支持超短距帧的发送,只需要手机100支持超短距帧的发送即可。
S9710至S9712:分别与S8711至S8713相同,请参见S8711至S8713的描述,此处不再赘述。
S9713,应用服务器接收到请求消息后,向手机200转发该请求消息。
S9714,在接收到来自应用服务器的请求消息后,手机200接收到用户的操作,该操作用于确认同意或拒绝被添加为好友。
之所以需要应用服务器执行S9713和手机200执行S9714以及S9715,是因为在该实施例中需要考虑到非法的电子设备(攻击设备)虽然不在手机200的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机100,即S9700至S9701、S9703、S9705中的“发送第一消息”、S9711至S9712、S9717等的全部或部分,均可能被非法的电子设备来模拟。这样,非法的电子设备(攻击设备)在S9709可以接收到第二消息,从而利用自身生成的密钥解密,进而获取到用户Lucas在社交应用上的用户帐号。这样,就使得用户Lucas在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来不好的体验。
为了避免出现上述情形,应用服务器需要执行S9713,手机200需要执行S9714以及 S9715,这样S9714就提供给了手机200的用户Lucas进一步确认的步骤。若手机200接收到的操作用于确认同意,则表明用户Lucas确认请求添加的是用户Lucas确认的用户(比如,Alisa);若手机200接收到的操作用于拒绝被添加为好友,则表明用户Lucas获悉请求添加的不是用户Lucas确认的用户(比如,Alisa以外的陌生人)。即通过手机200的用户Lucas进一步确认,来起到安全保护的作用。
示例性地,手机200接收到应用服务器转发的请求消息后,手机200显示如图9B所示的界面940。界面940显示新的朋友的用户帐号,甚至还显示用户图像信息。
在一种实施方式中,此时用户Lucas可以辨析确认是否是希望添加的用户帐号(比如,Alisa);若是,用户Lucas可以触摸同意控件941;否则,用户Lucas可以触摸拒绝控件942。
在另一种实施方式中,此时用户Lucas可以向用户Alisa展示手机200上所显示的用户头像或用户帐号等信息;若用户Alisa确认是自己的帐号和头像,则会向用户Lucas作出肯定的回应(比如,在二人对话中回答用户Lucas“是我的帐号,没错”)。当用户Alisa向用户Lucas确认界面上显示的头像或用户帐号无误后,用户Lucas才点击操作图9B所示的同意控件941。假设,当用户Alisa确认界面上显示的头像并非用户Alisa的头像时,用户Alisa会告知用户Lucas,这样用户Lucas就会点击操作图9B所示的拒绝控件942,就可以避免被非法用户添加为好友。
假设,当用户Lucas确认界面上显示的头像并非用户Alisa的头像时,或者,当用户Lucas经与用户Alisa协商后,确认界面上显示的头像并非用户Alisa的头像时,用户Lucas点击操作图9B中所示的拒绝控件942,就可以避免添加非法用户为好友。
S9714,手机200接收到用户的操作,该操作用于指示用户同意或拒绝被添加为好友。
S9715,手机200向应用服务器发送回复消息,该回复消息用于通知好友添加结果。
S9716,应用服务器向手机100发送请求消息的响应消息。
S9717,在手机100接收该请求消息的响应消息后,若响应消息指示好友添加成功,则手机100显示好友添加成功的提示消息;若响应消息指示好友添加失败,则手机100显示好友添加失败的提示消息。
示例性地,当手机100接收该好友添加成功的响应消息后,手机100可以显示如图1D中的(j)所示的用户界面190。用户界面190包括用于提示用户Alisa的手机100验证通过的消息,用户Alisa可以在用户界面190中向对方发送即时消息和接收来自对方的即时消息。
需要说明的是,S9712、S9713、S9715和S9716等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。
需要说明的是,S9701和S9702是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S9701和S9702。
需要指出的是,在一种可能的情况下,若手机200在执行S9700之前,手机200在社交应用上的用户帐号,与手机100在社交应用上的用户帐号并未添加为好友,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机200在执行S9700之前,手机200在社交应用上的用户帐号,已经与手机100在社交应用上的用户帐号为好友,则应用服务器向手机 100发送好友添加请求的响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号已经与手机100在社交应用上的用户帐号为好友,不用重复添加。
需要说明的是,手机100默认通过第一天线,直至该实施例中手机100切换至第二天线,手机100切换至第二天线之后,手机100通过第二天线发送消息,直至手机100切换至第一天线。手机200一直通过第三天线发送消息。
本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,即支持超短距帧的收发。手机200包括第三天线,即支持长距通信,不支持超短距帧的发送,或者,即使支持超短距帧的发送,但不使用。因此,处于预设的安全距离之外的其它电子设备无法接收到手机100所发送的超短距帧,并且还有手机200的确认操作,所以可以保证通信的安全性。
与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。
与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200即可获取好友帐号,手机200的用户只需确认操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,手机200的用户只需将手机200靠近或碰触手机100,以及确认操作即可;这样,有效地减少了界面操作次数,提升了用户体验。
需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例二的相关内容均与实施例一的相关内容相同。
场景一还可通过实施例三进一步阐述。实施例三与实施例一及实施例二的主要区别在于:在实施例三中手机100并不随机生成及发送密钥,手机200向手机100直接发送手机200在社交应用上的用户帐号;因此在该实施例所示的好友添加过程中,为提高好友添加结果的安全性和可靠性,需要手机100的使用用户参与确认。实施例三中,手机100可以包括第一天线;手机200可以包括第三天线和第四天线;此处的第一天线相当于强天线或真天线。
实施例三涉及图10A至图10B。图10A示出了场景一下另一种好友添加方法的交互流程。如图10A所示,该方法具体包括以下步骤:
S1000至S1001:分别与S9700至S9701相同,请参见S9700至S9701的描述,此处不再赘述。
S1002,手机200获取手机200在社交应用上的用户帐号,生成第一消息20,该第一消息20包括手机200在社交应用上的用户帐号。
需要说明的是,用户Lucas的手机200预先已订阅添加好友服务,所以可以接收到手机100所发布的添加好友服务。示例性地,手机200在运行社交应用时就自动订阅添加好友服务,或者是社交应用作为常驻后台的服务启动时订阅添加好友服务。
示例性地,手机200的使用用户Lucas打开社交应用,手机200可以从运行的社交应用获取使用用户Lucas的用户帐号。手机200的社交应用与手机100的社交应用相同。
示例性地,S1002中的“社交应用的用户帐号”包括上一次登录该社交应用的用户帐号。
S1003,手机200从第三天线切换至第四天线。
S1004,手机200通过第四天线向手机100发送第一消息20。
示例性地,用户Lucas的手机200收到手机发布的好友添加服务消息之后,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息20,这时第一消息20属于超短距帧,使得手机200发送的第一消息20不会被安全距离之外的手机接收到。
S1005,手机100接收到第一消息20,通过第一天线发送确认消息;
S1006,手机100获取到手机200在社交应用上的用户帐号并显示。
示例性地,在手机200与手机100之间的距离小于预设的安全距离后,手机100可以接收到第一消息20,然后从第一消息20中获取到手机200在社交应用上的用户帐号。
也就是说,若用户Lucas同意用户Alisa添加好友,则用户Lucas会将手机200靠近用户Alisa的手机100,或者说,用户Lucas同意用户Alisa的手机100靠近自己的手机200,这样,手机100与手机200之间的距离就小于或等于预设的安全距离(如30cm),手机100就可以接收到第一消息。
在获取到手机200在社交应用上的用户帐号后,手机100显示该用户帐号。
S1007,手机200接收到确认消息后,切换至第三天线。
也就是说,在手机200收到请求消息的响应消息后,手机200可以通过控制射频开关从第二天线切换至第一天线。
S1008,手机100接收到用户的操作,该操作用于确认同意或拒绝添加好友。
具体地,当接收到用户的操作用于确认同意添加好友,则执行后续步骤;否则,流程结束,不再执行后续步骤。
示例性地,在用户Alisa点击同意控件后,则继续执行后续步骤;在用户Alisa点击拒绝控件后,则结束流程。
如果不设置S1008,则非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1002、S1004中的“发送第一消息”等的全部或部分,均可能均被非法的电子设备(攻击设备)执行。这样,就会出现,虽然用户Alisa在社交应用上的用户帐号想添加用户Lucas在社交应用上的用户帐号为好友,但实际上用户Alisa在社交应用上的用户帐号添加了非法的电子设备(攻击设备)在社交应用上的用户帐号为好友。这显然给用户带来了不好的体验,导致用户不便。
为了避免出现上述情形,手机100需要执行S1008。这样,S1008就提供给了手机100的用户Alisa进一步确认的步骤。若手机100接收到的操作用于确认同意,则表明用户Alisa确认是在添加手机200在社交应用上的用户帐号(比如,用户Lucas在社交应用上的用户帐号);若手机100接收到的操作用于拒绝,则表明用户Alisa确认不是在添加手机200在社交应用上的用户帐号,而是在添加一个陌生人的用户帐号(比如,用户Lucas以外的陌生人在社交应用上的用户帐号)。这样,通过手机100的用户Alisa进一步确认,来起到安全保护的作用。
示例性地,手机100接收来自手机200的第一消息后,手机100可以显示如图10B所示的界面1020。界面1020显示新的朋友的用户帐号,甚至还显示对应的用户图像信息。
在一种实施方式中,此时用户Alisa可以辨析确认是否是希望添加的用户帐号(比如, Lucas);若是,用户Alisa可以触摸同意控件1021;否则,用户Alisa可以触摸拒绝控件1022。
在另一种实施方式中,此时用户Alisa可以向用户Lucas展示手机100上所显示的用户头像或用户帐号等信息;若用户Lucas确认是自己的帐号和头像,则会向用户Alisa作出肯定的回应(比如,在二人对话中回答用户Alisa“是我的帐号,没错”)。当用户Lucas向用户Alisa确认界面上显示的头像或用户帐号无误后,用户Alisa才点击操作图10B所示的同意控件1021。假设,当用户Lucas确认界面上显示的头像并非用户Alisa的头像时,用户Lucas会告知用户Alisa,这样用户Alisa就会点击操作图10B所示的拒绝控件1022,就可以避免被非法用户添加为好友。
进一步地,当用户Alisa点击同意控件1021后,手机200还可以显示如图8C所示的界面830,提醒用户Lucas已经添加了一个新的好友。手机100也可以显示类似的界面。
S1009,当手机100接收到用户的操作用于确认同意添加好友,手机100向应用服务器发送请求消息,该请求消息用于请求添加好友,该请求消息包括双方在社交应用上的用户帐号。
示例性地,该请求消息包括手机200在社交应用上的用户帐号和手机100在社交应用上的用户帐号。
S1010,在接收到请求消息后,应用服务器向手机200发送请求消息的响应消息。
示例性地,该步骤中,在手机200接收到请求消息的响应消息后,手机200还可以显示接收到好友添加成功的提示消息,用于提示用户好友添加成功。
可替换地,还可以通过诸如语音的音频等进行提示。
可替换地,还可以通过诸如语音的音频等和显示的提示消息,共同提示。
S1011,应用服务器向手机100发送请求消息的响应消息。
需要指出的是,在一种可能的情况下,若手机200在执行S1000之前,手机200在社交应用上的用户帐号,与手机100在社交应用上的用户帐号并未添加为好友,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机200在执行S1000之前,手机200在社交应用上的用户帐号,已经与手机100在社交应用上的用户帐号为好友,则应用服务器向手机100发送好友添加请求的响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号已经与手机100在社交应用上的用户帐号为好友,不用重复添加。
S1012,手机100接收到请求消息的响应消息后,手机100显示好友添加成功的提示消息。
示例性地,当手机100接收到请求消息的响应消息后,用户Alisa和用户Lucas可以进行即时通信。即时通信的具体界面可参见图1D所示的界面,此处不再赘述。
需要说明的是,S1009、S1010和S1011等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。
需要指出的是,该实施例中,手机100默认通过第一天线;手机200默认通过第三天线,直至手机200切换至第四天线,手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。
本实施例中,手机200是通过第四天线发送的第一消息。也就是说,本实施例并不要 求手机100支持超短距帧的发送,只需要手机200支持超短距帧的发送即可。手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机200包括第三天线和第四天线,即支持超短距帧的发送。因此,处于预设的安全距离之外的其它电子设备无法接收到手机200发送的第一消息,并且还有手机100上的确认操作,所以可以保证通信的安全性。
与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。
与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200以及确认操作,即可获取好友帐号,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101以及确认操作,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了界面操作次数,提升了用户体验。
需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例三的相关内容均与实施例二的相关内容相同。
需要指出的是,虽然在实施例一至实施例三中,是以手机100、手机200举例,但本领域技术人员明了的是,只要安装有同一社交应用的电子设备100、电子设备200均可适用于上述实施例一至实施例三的方法。
需要说明的是,虽然在实施例一至实施例三中,是以“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分进行说明,但本领域技术人员明了的是,也可将“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分分别替换为“第一发射功率下的第一天线”、“第二发射功率下的第一天线”、“第三发射功率下的第三天线”、“第四发射功率下的第三天线”。上述“第一发射功率下的第一天线”、“第二发射功率下的第一天线”即为逻辑上的第一天线和逻辑上的第二天线;上述“第三发射功率下的第三天线”、“第四发射功率下的第三天线”即为逻辑上的第三天线和逻辑上的第四天线。逻辑上的第一天线和逻辑上的第二天线可通过芯片内部的寄存器来调整发射功率来实现。逻辑上的第三天线和逻辑上的第四天线可通过芯片内部的寄存器来调整发射功率来实现。
场景二
下面通过实施例四至实施例六来具体阐述场景二下的群组成员添加方法的交互流程。
实施例四涉及图11A至图11D。实施例四中,手机100可以包括第一天线和第二天线,手机200可以包括第三天线和第四天线。图11A示出了场景二下添加群组成员的方法流程。如图11A所示,该方法具体包括以下步骤:
S1100,手机100接收到用户的操作,该操作用于添加群组成员。
该操作可以是触控操作,也可以是语音操作,本申请实施例对此不作限定。该操作作用于社交应用的群组中的控件(即进入某个群组后,才有的控件),而非群组之外的控件。
示例性地,当用户Alisa打开手机100上的社交应用,在诸如家人群组界面的界面上选择添加群组成员时,手机100发布添加群组成员服务。参见图11B中的(a),该用户界面11500为社交应用的显示界面,用户界面11500显示已有的联系人的信息。示例性地,该社交应用的用户界面11500包括家人群组控件11501。当手机100检测到针对家人群组 控件11501的操作后,手机100显示如图11B的(b)所示界面11510。界面11510包括扩展控件11511。当手机100检测到针对扩展控件11511的操作后,手机100显示如界面11510所示的弹出框,弹出框包括添加群组成员控件11512。当手机100检测到针对添加群组成员控件11512的操作后,手机100就会通过第一天线发布添加群组成员服务消息。
进一步地,当手机检测到针对添加群组成员控件11512的操作后,手机100还可以通过其界面(比如,手机100显示界面11520),提示用户Alisa碰一碰用户Lucas的手机200。界面11520包括提示用户与好友设备碰一碰的提示框;提示框显示提示消息。用户Alisa在看到提示消息后,可以将手机100靠近或碰触用户Lucas的手机200。
S1101,手机100通过第一天线发布添加群组成员服务消息。
示例性地,当用户Alisa打开手机100的社交应用中的“添加群组成员”控件11512,手机100就会发布添加群组成员服务消息,用于发现周围订阅了添加群组成员服务的电子设备。
示例性地,S1101中的“发布”是以广播的形式。该添加群组成员服务消息包括手机100的IP地址或MAC地址等唯一标识地址。可选地,该添加群组成员服务消息还包括社交应用的标识。通过该标识可唯一识别社交应用。可选地,该添加群组成员服务消息还包括用户Alisa在该社交应用上的用户帐号。
S1102,手机200在接收到添加群组成员服务消息后,手机200向手机100发送响应消息(例如确认(acknowledge,ACK)信息),该响应消息用于指示手机100已经接收到添加群组成员服务消息。
需要说明的是,用户Lucas的手机200预先已订阅添加群组成员服务。示例性地,手机200在下载安装社交应用时就自动订阅添加群组成员服务,或者是社交应用作为常驻后台的服务均被系统设置为自动订阅添加群组成员服务。
S1103至S1114:分别与S8703至S8714相同,请参见S8703至S8714的描述,此处不再赘述。
应理解,在S1110后,在用户Lucas同意用户Alisa将其添加至群组成员的情况下,手机100与手机200之间的距离才会小于预设的安全距离(比如,30cm等),所以手机200才能接收到来自手机100的密钥。也就是说,用户Lucas已经主动授权用户Alisa可以添加其为群组成员,所以无需用户Lucas的手动确认操作。
S1115,手机100向社交应用的应用服务器发送请求消息,该请求消息用于请求添加群组成员。
示例性地,该请求消息包括手机200在社交应用上的用户帐号、手机100在社交应用上“添加群组成员”控件对应的群组标识以及手机100在社交应用上的用户帐号,该请求消息请求将手机200在社交应用上的用户帐号,加入手机100在社交应用上“添加群组成员”控件对应的群组标识所在的群组中。以该群组为“家人群组”为例,手机100在获取到手机200在社交应用上的用户帐号后,就可以请求将其添加至“家人群组”中。
S1116,应用服务器向手机200发送请求消息的响应消息。
在该步骤中,用户Lucas不需要手动确认,即可收到来自应用服务器的响应消息。
示例性地,手机200还可以显示接收到添加群组成员的提示消息。如图11C所示,用户界面1130显示来自社交应用的提示消息。该提示消息用于通知用户Lucas已经添加入了一个新的群组。
示例性地,在该步骤中,手机200接收该请求消息的响应消息之后,手机200还可以显示接收到添加群组成员成功的提示消息,用于提示群组成员添加成功。
S1117,应用服务器向手机100发送请求消息的响应消息。
对于S1116与S1117的先后顺序,本申请不作限定。
S1118,手机100接收到响应消息后,手机100显示群组成员添加成功的提示消息。
示例性地,当手机100接收到群组成员添加成功的响应消息后,用户Alisa的手机100可以显示如图11D所示的用户界面1140。界面1140显示有通知。通知的内容可以包括:你邀请Lucas加入了群聊。
需要说明的是,S1115、S1116和S1117等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。
需要说明的是,S1101和S1102是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S1101和S1102。
需要指出的是,在一种可能的情况下,若手机200在执行S1100之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机200在执行S1100之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。
需要指出的是,该实施例中,手机100通过第一天线,直至手机100切换至第二天线,手机100切换至第二天线之后,手机100通过第二天线发送消息,直至手机100切换至第一天线。同样地,手机200默认通过第三天线,直至手机200切换至第四天线。手机200切换至第四天线后,手机200通过第四天线发送消息,直至手机200切换至第三天线。
本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,手机200包括第三天线和第四天线,即手机100和手机200均支持超短距帧的收发。因此,处于预设的安全距离之外的其它电子设备无法接收到该超短距帧,所以可以保证通信的安全性。本申请实施例中,用户只需要触控添加群组成员控件,将手机100靠近或碰触好友的手机200即可获取好友帐号,并自动实现群组成员的添加,有效地减少了用户的操作次数。
需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例四的相关内容均与实施例一的相关内容相同。
场景二还可通过实施例五进一步阐述。实施例五与实施例四的主要区别在于:在实施例五中手机200并不通过第四天线发送第二消息,而是通过第三天线发送第二消息;因此在实施例五所示的群组成员添加过程中,为了提高群组成员添加结果的安全性和可靠性, 需要手机200的使用用户参与确认。实施例五中,手机100可以包括第一天线;手机200可以包括第三天线和第四天线;此处的第一天线相当于强天线或真天线。
实施例五涉及图12A和图12B。图12A示出了场景二下添加群组成员的方法的交互流程。如图12A所示,该方法具体包括以下步骤:
S1200至S1208:分别与S1100至S1108相同,请参见S1100至S1108的描述,此处不再赘述。
S1209,手机200通过第三天线向手机100发送第二消息。
需要说明的是,S1209与上述S1110的区别在于,手机200是通过第三天线发送的第二消息。也就是说,本实施例并不要求手机200支持超短距帧的发送,只需要手机100支持超短距帧的发送即可。
S1210至S1212:分别与S1111至S1113相同,请参见S1111至S1113的描述,此处不再赘述。
S1213,应用服务器向手机200发送请求消息,该请求消息用于请求添加群组成员。
S1214,在接收到来自应用服务器的请求消息后,手机200接收到用户的操作,该操作用于确认同意或拒绝被添加为群组成员。
之所以需要应用服务器执行S1213和手机200执行S1214以及S1215,是因为在该实施例中需要考虑到非法的电子设备(攻击设备)虽然不在手机200的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机100,即S1200至S1201、S1203、S1205中的“发送第一消息”、S1211至S1212、S1217等的全部或部分,均可能被非法的电子设备来模拟。这样,非法的电子设备(攻击设备)在S1209可以接收到第二消息,从而利用自身生成的密钥解密,进而获取到用户Lucas在社交应用上的用户帐号。这样,就使得用户Lucas在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来不好的体验。
为了避免出现上述情形,应用服务器需要执行S1213,手机200需要执行S1214以及S1215,这样S1214就提供给了手机200的用户Lucas进一步确认的步骤。若手机200接收到的操作用于确认同意,则表明用户Lucas确认请求添加的是用户Lucas确认的群组(比如,手机100在社交应用上的家人群组);若手机200接收到的操作用于拒绝被添加为群组成员,则表明用户Lucas获悉请求添加的不是用户Lucas确认的群组(比如,手机100在社交应用上的家人群组以外的群组)。即通过手机200的用户Lucas进一步确认,来起到安全保护的作用。
S1215,手机200向应用服务器发送请求消息的回复消息,该回复消息用于通知群组成员添加结果。
S1216,应用服务器向手机100发送响应消息。
需要指出的是,在一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示 手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。
S1217,手机100接收到响应消息,若响应消息指示群组成员添加成功,则手机100显示群组成员添加成功的提示消息;若响应消息指示群组成员添加失败,则手机100显示群组成员添加失败的提示消息。
示例性地,当手机100接收群组成员添加成功的响应消息后,用户Alisa的手机100可以显示如图11D所示的用户界面1140。界面1140显示有通知。该通知的内容可以包括:你邀请Lucas加入了群聊。
需要说明的是,S1212、S1213、S1215和S1216等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。
需要说明的是,S1201和S1202是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S1201和S1202。
需要指出的是,在一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。
需要说明的是,手机100默认通过第一天线,直至该实施例中手机100切换至第二天线,手机100切换至第二天线之后,手机100通过第二天线发送消息,直至手机100切换至第一天线。手机200一直通过第三天线发送消息。
本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,即支持超短距帧的收发。手机200包括第三天线,即支持长距通信,不支持超短距帧的发送,或者,即使支持超短距帧的发送,但不使用。因此,处于预设的安全距离之外的其它电子设备无法接收到手机100所发送的超短距帧,并且还有手机200的确认操作,所以可以保证通信的安全性。
与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。
与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,将手机100靠近或碰触手机200即可获取手机200在社交应用上的用户帐号,手机200的用户只需确认操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,手机200的用户只需将手机200靠近或碰触手机100,以及确认操作即可;这样,有效地减少了用户的操作次数,提升了用户体验。
需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例五的相关内容均与实施例四的相关内容相同。
场景二还可通过实施例六进一步阐述。实施例六与实施例五及实施例四的主要区别在于:在实施例六中手机100并不随机生成及发送密钥,手机200向手机100直接发送手机200在社交应用上的用户帐号;因此在该实施例所示的群组成员添加过程中,为提高群组成员添加结果的安全性和可靠性,需要手机100的使用用户参与确认。实施例六中,手机100可以包括第一天线;手机200可以包括第三天线和第四天线;此处的第一天线相当于强天线或真天线。
实施例六涉及图13。图13示出了场景二下另一种添加群组成员的方法的交互流程。如图13所示,该方法流程具体包括以下步骤:
S1300至S1301:分别与S1200至S1201相同,请参见S1200至S1201的描述,此处不再赘述。
S1302,手机200获取手机200在社交应用上的用户帐号,生成第一消息30,该第一消息30包括手机200在社交应用上的用户帐号。
需要说明的是,用户Lucas的手机200预先已订阅添加群组成员服务,所以可以接收到手机100所发布的添加群组成员服务消息。示例性地,手机200在运行社交应用时就自动订阅添加群组成员服务消息,或者是社交应用作为常驻后台的服务启动时订阅添加群组成员服务消息。
示例性地,手机200的使用用户Lucas打开社交应用,手机200可以从运行的社交应用获取使用用户Lucas的用户帐号。手机200的社交应用与手机100的社交应用相同。
示例性地,S1302中的“社交应用的用户帐号”包括上一次登录该社交应用的用户帐号。
S1303,手机200从第三天线切换至第四天线。
S1304,手机200通过第四天线向手机100发送第一消息30。
示例性地,用户Lucas的手机200收到手机发布的群组成员添加服务消息之后,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息30,这时第一消息30属于超短距帧,使得手机200发送的第一消息30不会被安全距离之外的手机接收到。
S1305,手机100接收到第一消息30,通过第一天线发送确认消息。
S1306,手机100从第一消息30中获取到手机200在社交应用上的用户帐号并显示。
示例性地,在手机200与手机100之间的距离小于预设的安全距离后,手机100可以接收到第一消息30,然后从第一消息30中获取到手机200在社交应用上的用户帐号。
也就是说,若用户Lucas同意用户Alisa添加用户Lucas为一个群组的群组成员,则用户Lucas会将手机200靠近用户Alisa的手机100,或者说,用户Lucas同意用户Alisa的手机100靠近自己的手机200,这样,手机100与手机200之间的距离就小于或等于预设的安全距离(如30cm),手机100就可以接收到第一消息。
在获取到手机200在社交应用上的用户帐号后,手机100显示该用户帐号。
S1307,手机200接收到确认消息后,切换至第三天线。
也就是说,在手机200收到确认消息后,手机200可以通过控制射频开关从第四天线切换至第三天线。
S1308,手机100接收到用户的操作,该操作用于确认同意或拒绝手机200在社交应用上的用户账号为群组成员。
具体地,当接收到用户的操作用于确认同意添加该用户帐号为群组成员,则执行后续步骤;否则,流程结束,不再执行后续步骤。
示例性地,在点击手机100上的同意控件后,则继续执行后续步骤;在点击手机100上的拒绝控件后,则结束流程。
如果不设置S1308,则非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1302、S1304中的“发送第一消息”等的全部或部分,均可能均被非法的电子设备(攻击设备)执行。这样,就会出现,虽然用户Alisa在社交应用上的用户帐号想添加用户Lucas在社交应用上的用户帐号为一个群组的群组成员,但实际上用户Alisa在社交应用上的用户帐号添加了非法的电子设备(攻击设备)在社交应用上的用户帐号为上述群组的群组成员。这显然给用户带来了不好的体验,导致用户不便。
为了避免出现上述情形,手机100需要执行S1308。这样,S1308就提供给了手机100的用户Alisa进一步确认的步骤。若手机100接收到的操作用于确认同意,则表明用户Alisa确认是在添加手机200在社交应用上的用户帐号(比如,用户Lucas在社交应用上的用户帐号)为群组成员;若手机100接收到的操作用于拒绝,则表明用户Alisa确认不是在添加手机200在社交应用上的用户帐号为群组成员,而是在添加一个陌生人的用户帐号(比如,用户Lucas以外的陌生人在社交应用上的用户帐号)为群组成员。这样,通过手机100的用户Alisa进一步确认,来起到安全保护的作用。
示例性地,手机100接收到来自手机200的第一消息后,手机100显示的界面显示新的朋友的用户帐号,甚至还显示对应的用户图像信息。
在一种实施方式中,此时用户Alisa可以辨析确认是否是希望添加的用户帐号(比如,Lucas);若是,用户Alisa可以触摸同意控件1021;否则,用户Alisa可以触摸拒绝控件1022。
在另一种实施方式中,此时用户Alisa可以向用户Lucas展示手机100上所显示的用户头像或用户帐号等信息;若用户Lucas确认是自己的帐号和头像,则会向用户Alisa作出肯定的回应(比如,在二人对话中回答用户Alisa“是我的帐号,没错”)。当用户Lucas向用户Alisa确认界面上显示的头像或用户帐号无误后,用户Alisa才点击操作手机100上的同意控件1021。假设,当用户Lucas确认界面上显示的头像并非用户Alisa的头像时,用户Lucas会告知用户Alisa,这样用户Alisa就会点击操作手机100上的拒绝控件1022,就可以避免被非法用户添加为群组成员。
进一步地,当用户Alisa点击同意控件1021后,手机200还可以显示一个界面,提醒用户Lucas已经添加为一个群组的群组成员。手机100也可以显示类似的界面。
S1309,当手机100接收到用于确认同意添加该用户帐号为群组成员的操作后,手机100向应用服务器发送请求消息,该请求消息用于请求添加手机200在社交应用上的用户帐号为群组成员。
示例性地,该请求消息包括手机200在社交应用上的用户帐号、手机100在社交应用上“添加群组成员”控件对应的群组标识以及手机100在社交应用上的用户帐号,该请求消息请求将手机200在社交应用上的用户帐号,加入手机100在社交应用上“添加群组成员” 控件对应的群组标识所在的群组中。以该群组为“家人群组”为例,手机100在获取到手机200在社交应用上的用户帐号后,就可以请求将其添加至“家人群组”中。
S1310,在接收到请求消息后,应用服务器向手机200发送请求消息的响应消息。
示例性地,手机200还可以显示接收到添加群组成员的提示消息。如图11C所示,用户界面1130显示来自社交应用的提示消息。该提示消息用于通知用户Lucas已经添加入了一个新的群组。
示例性地,在该步骤中,手机200接收该请求消息的响应消息之后,手机200还可以显示接收到添加群组成员成功的提示消息,用于提示群组成员添加成功。
可替换地,还可以通过诸如语音的音频等进行提示。
可替换地,还可以通过诸如语音的音频等和显示的提示消息,共同提示。
S1311,应用服务器向手机100发送请求消息的响应消息。
对于S1310与S1311的先后顺序,本申请不作限定。
S1312,手机100接收到响应消息后,手机100显示群组成员添加成功的提示消息。
示例性地,当手机100接收到群组成员添加成功的响应消息后,用户Alisa的手机100可以显示如图11D所示的用户界面1140。界面1140显示有通知。通知的内容可以包括:你邀请Lucas加入了群聊。
需要说明的是,S1309、S1310和S1311等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。
需要指出的是,在一种可能的情况下,若手机200在执行S1300之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机200在执行S1300之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。
需要指出的是,该实施例中,手机100默认通过第一天线;手机200默认通过第三天线,直至手机200切换至第四天线,手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。
本实施例中,手机200是通过第四天线发送的第一消息。也就是说,本实施例并不要求手机100支持超短距帧的发送,只需要手机200支持超短距帧的发送即可。手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机200包括第三天线和第四天线,即支持超短距帧的发送。因此,处于预设的安全距离之外的其它电子设备无法接收到手机200发送的第一消息,并且还有手机100上的确认操作,所以可以保证通信的安全性。
本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,将手机100靠近或碰触好友的手机200以及确认操作,即可完成群组成员添加,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机 100的用户只需要触控添加群组成员控件以及确认操作,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了用户的操作次数,提升了用户体验。
需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例六的相关内容均与实施例五的相关内容相同。
场景二还可通过实施例七进一步阐述。实施例七与前述实施例的主要区别在于,在实施例七中手机200随机生成密钥,通过第四天线向手机100发送密钥,手机100通过第二天线向手机200发送加密后的群组帐号,手机200获取到加密后的群组帐号后,请求添加至群组。实施例七中,手机100可以包括第一天线和第二天线,手机200可以包括第三天线和第四天线。实施例七涉及图14A和图14B。
图14A示出了场景二下另一种添加群组成员方法的交互流程。如图14A所示,该方法具体包括以下步骤:
S1400a至S1401a:分别与S1300至S1301相同,请参见S1300至S1301的描述,此处不再赘述。
S1402a,手机200在接收到添加群组成员服务消息后,随机生成密钥,获取到包括密钥的第一消息。
S1403a,手机200从第三天线切换至第四天线。
S1404a,手机200通过第四天线向手机100发送第一消息。
示例性地,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息;此时第一消息属于超短距帧;这样,手机200发送的第一消息不会被距手机200预设安全距离之外的电子设备接收到。
本实施例中,第一消息可以是Wi-Fi感知帧或信标帧。Wi-Fi感知帧为发布(Publish)帧、跟踪(Follow-up)帧或者订阅(Subscribe)帧。若第一消息为Follow-up帧,那么用户Alisa的手机200的密钥可以携带在Follow-up帧的payload(负载)字段中。Wi-Fi感知帧基于Wi-Fi感知技术。Wi-Fi感知技术既可以支持手机100和手机200在未接入同一个路由器场景下的点到点通信,也可以支持手机100和手机200接入同一个路由器场景下的点到点通信。
在一种可能的实施方式中,手机200通过第四天线发送第一消息,其发送数据和接收数据的成功率有可能会降低,那么手机200可以重复多次发送密钥。
S1405a,手机100接收到第一消息,从第一消息中获取密钥。
在手机200与手机100之间的距离小于或等于第四天线的发射距离后,手机100接收到该第一消息,然后从第一消息中获取手机200的密钥。
S1406a,手机100使用密钥加密手机100中该操作在社交应用上对应群组的群组标识,获取到第二消息,第二消息包括加密后的上述群组标识。
示例性地,S1400a中的操作对应于一个群组,将该群组的群组标识(比如,群组名、群组帐号等)使用密钥加密,获取到第二消息,第二消息包括加密后的上述群组标识。
可选地,群组标识为唯一标识群组的标识。该群组在手机100上的目录也可为群组标识。
S1407a,手机100从第一天线切换至第二天线。
S1408a,手机100通过第二天线向手机200发送第二消息。
示例性的,手机100包括第一天线和第二天线,手机100可以通过控制射频开关从第一天线切换至第二天线,然后通过第二天线发送第二消息。此时的第二消息属于超短距帧,与手机100相距距离在预设的安全距离之外的电子设备无法接收到第二消息。
本实施例中,该第二消息可以是Wi-Fi感知帧或信标帧。Wi-Fi感知帧为发布(Publish)帧、Follow-up帧或者订阅(Subscribe)帧,若第二消息为Follow-up帧,那么加密后的S1400a中操作在社交应用上对应群组的群组标识可以携带在Follow-up帧的payload(负载)字段中。
S1409a,接收到第二消息后,手机200通过第四天线发送确认消息。
S1410a,接收到确认消息后,手机100从第二天线切换至第一天线。
S1411a,手机200使用密钥解密,获取到上述群组标识;手机200获取到手机200在社交应用上的用户帐号。
S1412a,手机200从第四天线切换至第三天线。
示例性的,手机200包括第三天线和第四天线,手机200可以通过控制射频开关从第四天线切换至第三天线。
S1413a,手机200向应用服务器发送包括请求消息,该请求消息用于请求将手机200在社交应用上的用户帐号添加至上述群组标识对应的群组中。
示例性,该请求消息包括手机200在社交应用上的用户帐号和上述群组标识。
可选地,该请求消息还包括手机100在社交应用上的用户帐号。这样,就要求S1408a中的第二消息包括使用密钥加密后的手机100在社交应用上的用户帐号;S1411a中使用密钥解密,获取到手机100在社交应用上的用户帐号。
S1414a,应用服务器向手机200发送请求消息的响应消息。
S1415a,应用服务器向手机100发送请求消息的响应消息。
对于S1414a与S1415a的先后顺序,本申请不作限定。
S1416a,手机100显示群组成员添加成功的提示消息。
在图14A示出的流程中,S1408a之所以采用弱天线来发送,是为了提高安全性。因为在该实施例中,需要考虑到非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1404a的“发送第一消息”,可能被非法的电子设备来模拟。即使非法的电子设备(攻击设备)模拟了手机200,执行了S1404a的“发送第一消息”,但由于S1408a中手机100通过弱天线发送第二消息,所以非法的电子设备(攻击设备)就无法接收到第二消息,从而无法利用自身生成的密钥解密,也就无法获取到S1400a中操作在社交应用上对应群组的群组标识。这样,就避免了用于添加群组成员的群组标识被非法的电子设备(攻击设备)获取,给用户带来较好的体验。
而在S1408a中,若手机100通过第一天线(即强天线)发送第二消息,非法的电子设备(攻击设备)可能接收到第二消息;而之前的S1404a中的“发送第一消息”也是非法的电子设备(攻击设备)执行的,故在S1411a中,非法的电子设备(攻击设备)可以用自身先前生成的密钥来解密,获取到S1400a中操作在社交应用上对应群组的群组标识。进而,可以执行后续的S1413a,应用服务器会执行后续的S1414a和S1415a;手机100就会收到陌生人添加至群组的消息,进而影响手机100在社交应用上的使用,给用户带来不便。
示例性地,当手机100接收到群组成员添加成功的响应消息后,手机100可以显示如 图11D所示的用户界面1140。界面1140显示有通知。通知的内容可以包括:你邀请Lucas加入了群聊。
需要指出的是,在一种可能的情况下,若手机100在执行S1400a之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。
可选地,在另一种可能的情况下,若手机100在执行S1400a之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。
需要指出的是,该实施例中,手机100默认通过第一天线,直至手机100切换至第二天线,手机100切换至第二天线之后,手机100均通过第二天线发送消息,直至手机100切换至第一天线;手机200默认通过第三天线,直至手机200切换至第四天线,手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。
本实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机200包括第三天线和第四天线,即支持超短距帧的发送。因此,处于预设的安全距离之外的其它电子设备无法接收到手机200发送的第一消息,并且还有手机100上的确认操作,所以可以保证通信的安全性。
本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,将手机100靠近或碰触手机200,即可完成群组成员添加,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了用户的操作次数,提升了用户体验。
图14B示出了场景一下另一种添加好友方法的交互流程。如图14B所示,该方法具体包括以下步骤:
S1400b至S1401b:分别与S8700至S8701相同,请参见S8700至S8701的描述,此处不再赘述。
S1402b,手机200在接收到添加好友服务消息后,随机生成密钥,获取到包括密钥的第一消息。
S1403b,手机200从第三天线切换至第四天线。
S1404b,手机200通过第四天线向手机100发送第一消息。
示例性地,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息;此时第一消息属于超短距帧;这样,手机200发送的第一消息不会被距手机200预设安全距离之外的电子设备接收到。
本实施例中,第一消息可以是Wi-Fi感知帧或信标帧。Wi-Fi感知帧为发布(Publish)帧、跟踪(Follow-up)帧或者订阅(Subscribe)帧。若第一消息为Follow-up帧,那么用户Alisa的手机200的密钥可以携带在Follow-up帧的payload(负载)字段中。Wi-Fi感知帧基于Wi-Fi感知技术。Wi-Fi感知技术既可以支持手机100和手机200在未接入同一个路 由器场景下的点到点通信,也可以支持手机100和手机200接入同一个路由器场景下的点到点通信。
在一种可能的实施方式中,手机200通过第四天线发送第一消息,其发送数据和接收数据的成功率有可能会降低,那么手机200可以重复多次发送密钥。
S1405b,手机100接收到第一消息,从第一消息中获取密钥。
在手机200与手机100之间的距离小于或等于第四天线的发射距离后,手机100接收到该第一消息,然后从第一消息中获取手机200的密钥。
S1406b,手机100使用密钥加密手机100在社交应用上的用户帐号,获取到第二消息,第二消息包括加密后的上述用户帐号。
S1407b,手机100从第一天线切换至第二天线。
S1408b,手机100通过第二天线向手机200发送第二消息。
示例性的,手机100包括第一天线和第二天线,手机100可以通过控制射频开关从第一天线切换至第二天线,然后通过第二天线发送第二消息。此时的第二消息属于超短距帧,与手机100相距距离在预设的安全距离之外的电子设备无法接收到第二消息。
S1409b,接收到第二消息后,手机200通过第二天线发送第二消息。
S1410b,接收到确认消息后,手机100切换至第一天线。
S1411b,手机200接收到第二消息,使用密钥解密,获取到上述手机100在社交应用上的用户帐号;手机200获取到手机200在社交应用上的用户帐号。
S1412b,手机200从第四天线切换至第三天线。
示例性的,手机200包括第三天线和第四天线,手机200可以通过控制射频开关从第四天线切换至第三天线。
S1413b,手机200向应用服务器发送请求消息,该请求消息用于请求将手机100在社交应用上的用户帐号添加为好友。
可选地,该请求消息还包括手机200在社交应用上的用户帐号。
S1414b,应用服务器向手机200发送请求消息的响应消息。
S1415b,应用服务器向手机100发送请求消息的响应消息。
对于S1414b和S1415b的先后顺序,本申请不作限定。
S1416b,手机100显示好友添加成功的提示消息。
在图14B示出的流程中,S1408b之所以采用弱天线来发送,是为了提高安全性。因为在该实施例中,需要考虑到非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1404b的“发送第一消息”,可能被非法的电子设备来模拟。即使非法的电子设备(攻击设备)模拟了手机200,执行了S1404b的“发送第一消息”,但由于S1408b中手机100通过弱天线发送第二消息,所以非法的电子设备(攻击设备)就无法在S1409b接收到第二消息,从而无法利用自身生成的密钥解密,也就无法获取到S1400b中手机100在社交应用上的用户帐号。这样,就避免了手机100在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来较好的体验。
而在S1408b中,若手机100通过第一天线(即强天线)发送第二消息,非法的电子设备(攻击设备)可能接收到第二消息;而之前的S1404b中的“发送第一消息”也是非法的电子设备(攻击设备)执行的,故在S1409b中,非法的电子设备(攻击设备)可以用自 身先前生成的密钥来解密,获取到S1400b中手机100在社交应用上的用户帐号。
需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例七的相关内容均与实施例六的相关内容相同。
需要指出的是,虽然在实施例四至实施例七中,是以手机100、手机200举例,但本领域技术人员明了的是,只要安装有同一社交应用的电子设备100、电子设备200均可适用于上述实施例四至实施例七的方法。
需要说明的是,虽然在实施例四至实施例七中,是以“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分进行说明,但本领域技术人员明了的是,也可将“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分分别替换为“第一发射功率下的第一天线”、“第二发射功率下的第一天线”、“第三发射功率下的第三天线”、“第四发射功率下的第三天线”。上述“第一发射功率下的第一天线”、“第二发射功率下的第一天线”即为逻辑上的第一天线和逻辑上的第二天线;上述“第三发射功率下的第三天线”、“第四发射功率下的第三天线”即为逻辑上的第三天线和逻辑上的第四天线。逻辑上的第一天线和逻辑上的第二天线可通过芯片内部的寄存器来调整发射功率来实现。逻辑上的第三天线和逻辑上的第四天线可通过芯片内部的寄存器来调整发射功率来实现。
需要说明的是,本申请上述实施例涉及到的电子设备100、电子设备200之间虽然是以Wi-Fi信号(Wi-Fi感知)进行交互的,但诸如蓝牙、ZigBee等短距无线通信方式也适用于上述实施例的技术方案,即本申请上述实施例中的电子设备100和电子设备200之间,也可以蓝牙、ZigBee等短距无线通信方式,结合天线进行通信交互的。
需要说明的是,本申请提供的上述各个实施例的全部或部分,均可以自由地、任意地相互组合。
本申请实施例提供的群组成员或好友的添加方法适用于以下的电子设备和系统。
图15所示为本申请提供的一种电子设备1500。电子设备1500可以为上述实施例中的电子设备100(第一电子设备),也可以为上述实施例中的电子设备200(第二电子设备)。示例性地,电子设备1500包括至少一个处理器1510、存储器1520和显示屏1530。其中,处理器1510与存储器1520和显示屏1530耦合,本申请实施例中的耦合可以是通信连接,可以是电性,或其它的形式。具体的,存储器1520用于存储程序指令。显示屏1530用于显示用户界面。处理器1510用于调用存储器1520中存储的程序指令,使得电子设备1500执行本申请实施例提供的群组成员或好友的添加方法中由第一电子设备或第二电子设备所执行的步骤。应理解,该电子设备1500可以用于实现本申请实施例提供的群组成员或好友的添加方法,相关特征可以参照上文,此处不再赘述。
在一些实施例中,在显示屏具有触摸功能时,显示屏又称为触摸显示屏。在触摸显示屏上的操作可以通过虚拟按键实现。在显示屏不具有触摸功能时,显示屏又称为非触摸显示屏。在非触摸显示屏上的操作可以通过物理按键实现。
可选地,电子设备1500可以包含比图15所示的部件更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。此外,图15中的部件之间的组合/连接关系也是可以调整修改的。
本申请提供一种计算机程序产品,当所述计算机程序产品在第一电子设备上运行时, 使得所述第一电子设备执行本申请实施例提供的群组成员或好友的添加方法中由第一电子设备所执行的步骤。
本申请提供一种计算机可读存储介质,包括计算机程序,当所述计算机程序在第一电子设备上运行时,使得所述第一电子设备执行本申请实施例提供的群组成员或好友的添加方法中由第一电子设备所执行的步骤。
本申请提供一种计算机程序产品,当所述计算机程序产品在第二电子设备上运行时,使得所述第二电子设备执行本申请实施例提供的群组成员或好友的添加方法中由第二电子设备所执行的步骤。
本申请提供一种计算机可读存储介质,包括计算机程序,当所述计算机程序在第二电子设备上运行时,使得所述第二电子设备执行本申请实施例提供的群组成员或好友的添加方法中由第二电子设备所执行的步骤。
所属领域的技术人员可以清楚地了解到本申请实施例可以用硬件实现,或硬件与软件的方式实现。当使用硬件与软件实现,可以将上述功能存储在计算机可读介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
图16示出了本申请实施例提供的通信系统的示意性框图。该通信系统可以包括服务器1601和一个或多个电子设备。图16示例性地示出了第一电子设备1602和第二电子设备1603。其中,服务器1601可以为上述方法实施例中的应用服务器。第一电子设备1602可以为上述方法实施例中的电子设备100,第二电子设备1603可以为上述方法实施例中的电子设备200。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的方法。
其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合 或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (30)

  1. 一种群组成员或好友的添加方法,应用于第一电子设备,所述第一电子设备运行有第一社交应用,所述第一电子设备包括:第一天线,所述第一天线的发射距离为第一距离,所述第一距离大于预设的第一安全距离;第二天线,所述第二天线的发射距离为第二距离,所述第二距离小于或等于所述预设的第一安全距离;其中,所述第一天线和所述第二天线为不同的天线;其特征在于,所述方法包括:
    接收到第一用户输入;
    所述第一电子设备生成随机密钥;
    所述第一电子设备通过所述第二天线发送第一消息,所述第一消息包括所述随机密钥;
    接收到来自第二电子设备的第二消息;
    所述第一电子设备使用所述随机密钥解密所述第二消息,获取到所述第一社交应用上的一个用户帐号;
    所述第一电子设备通过所述第一社交应用和所述第一天线,向所述第一社交应用的应用服务器发送请求消息;所述请求消息包括所述用户帐号;所述请求消息还包括所述第一用户输入对应的群组标识或所述第一电子设备在所述第一社交应用上的用户帐号;
    接收到来自所述应用服务器的第一响应消息;
    响应于所述第一响应消息,所述第一电子设备提示,所述第一用户输入对应的群组添加群组成员成功,或者,所述第一电子设备在所述第一社交应用上的用户帐号添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  2. 根据权利要求1所述的方法,其特征在于,
    所述第一电子设备通过所述第二天线发送第一消息;包括:所述第一电子设备通过所述第二天线,以蓝牙或者ZigBee的无线通信方式,发送第一消息;
    所述接收到来自第二电子设备的第二消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自所述第二电子设备的第二消息。
  3. 根据权利要求1所述的方法,其特征在于,所述第一电子设备生成随机密钥;包括:
    所述第一电子设备通过所述第一天线,以无线保真Wi-Fi感知的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;
    以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的响应消息;
    响应于所述响应消息,所述第一电子设备生成随机密钥。
  4. 根据权利要求3所述的方法,其特征在于,所述第一电子设备通过所述第二天线发送第一消息;包括:所述第一电子设备通过所述第二天线,以Wi-Fi感知的无线通信方式,发送第一消息;
    所述接收到来自第二电子设备的第二消息;包括:以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的第二消息。
  5. 根据权利要求1-4中任意一项所述的方法,其特征在于,所述接收到来自所述第二电子设备的第二消息;包括:
    在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后, 或者,在所述第一电子设备与第二电子设备之间的距离大于预设的第二安全距离后,
    接收到来自所述第二电子设备的第二消息;
    其中,所述预设的第二安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  6. 根据权利要求5所述的方法,其特征在于,在所述接收到来自第二电子设备的第二消息之后,所述方法还包括:
    所述第一电子设备通过所述第一天线向所述第二电子设备发送确认消息。
  7. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述第一天线与所述第二天线连接同一个无线通信模块;所述无线通信模块包括Wi-Fi芯片、蓝牙芯片和ZigBee芯片中的一种;所述Wi-Fi芯片、所述蓝牙芯片或所述ZigBee芯片,在所述无线通信模块中的数量为一个;所述第一天线和所述第二天线连接所述Wi-Fi芯片、所述蓝牙芯片或所述ZigBee芯片。
  8. 一种群组成员或好友的添加方法,应用于第一电子设备,所述第一电子设备运行有第一社交应用;其特征在于,所述方法包括:
    接收到第一用户输入;
    响应于所述第一用户输入,所述第一电子设备通过第一天线,发布添加群组成员服务消息或添加好友服务消息;
    在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;
    从所述第一消息中获取到所述第一社交应用上的一个用户帐号,并提示对所述用户帐号进行确认;
    接收到用于确认添加的第二用户输入;
    响应于所述第二用户输入,所述第一电子设备通过所述第一天线和所述第一社交应用,向所述第一社交应用的应用服务器发送请求消息;所述请求消息包括所述用户帐号;所述请求消息还包括所述第一用户输入对应的群组标识或所述第一电子设备在所述第一社交应用上的用户帐号;
    接收到来自所述应用服务器的第一响应消息;
    响应于所述第一响应消息,所述第一电子设备提示,所述第一用户输入对应的群组添加群组成员成功,或者,所述第一电子设备在所述第一社交应用上的用户帐号添加好友成功;
    其中,所述预设的第二安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  9. 根据权利要求8所述的方法,其特征在于,
    所述第一电子设备通过所述第一天线,发布添加群组成员服务消息或添加好友服务消息;包括:所述第一电子设备通过所述第一天线,以Wi-Fi感知、蓝牙或ZigBee的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;
    所述接收到来自第二电子设备的第一消息;包括:以Wi-Fi感知、蓝牙或ZigBee的无线通信方式,接收到来自所述第二电子设备的第一消息。
  10. 根据权利要求8或9所述的方法,其特征在于,在所述接收到来自第二电子设备的第一消息之后,所述方法还包括:
    所述第一电子设备通过所述第一天线向所述第二电子设备发送确认消息。
  11. 一种群组成员或好友的添加方法,应用于第一电子设备,所述第一电子设备运行有第一社交应用;所述第一电子设备包括:第一天线,所述第一天线的发射距离为第一距离,所述第一距离大于预设的第一安全距离;第二天线,所述第二天线的发射距离为第二距离,所述第二距离小于或等于所述预设的第一安全距离;其中,所述第一天线和所述第二天线为不同的天线;其特征在于,所述方法包括:
    接收到第一用户输入;
    响应于所述第一用户输入,所述第一电子设备通过所述第一天线,发布添加群组成员服务消息或添加好友服务消息;
    在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;所述预设的第二安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的安全距离;
    响应于所述第一消息,从所述第一消息中获取到一个随机密钥,使用所述随机密钥加密所述第一用户输入对应的群组标识或所述第一电子设备在所述第一社交应用上的用户帐号;
    所述第一电子设备通过所述第二天线,发送第二消息;所述第二消息包括加密后的所述群组标识或所述用户帐号;
    接收到来自所述第一社交应用的应用服务器的第一响应消息;
    响应于所述第一响应消息,所述第一电子设备提示,所述第一用户输入对应的群组添加群组成员成功,或者,所述第一电子设备在所述第一社交应用上的用户帐号添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离;所述预设的第二安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  12. 一种群组成员或好友的添加方法,应用于第一电子设备,所述第一电子设备运行有第一社交应用,所述第一电子设备包括:第一天线,所述第一天线在第一发射功率下的发射距离为第一距离,所述第一天线在第二发射功率下的发射距离为第二距离,所述第一距离大于预设的第一安全距离,所述第二距离小于或等于所述预设的第一安全距离;其特征在于,所述方法包括:
    接收到第一用户输入;
    响应于所述第一用户输入,所述第一电子设备生成随机密钥;
    所述第一电子设备通过所述第二发射功率下的所述第一天线发送第一消息,所述第一消息包括所述随机密钥;
    接收到来自第二电子设备的第二消息;
    响应于所述第二消息,所述第一电子设备使用所述随机密钥解密所述第二消息,获取到所述第一社交应用上的一个用户帐号;
    所述第一电子设备向所述第一社交应用的应用服务器发送请求消息;所述请求消息包括所述用户帐号;所述请求消息还包括所述第一用户输入对应的群组标识或所述第一电子设备在所述第一社交应用上的用户帐号;
    接收到来自所述应用服务器的第一响应消息;
    响应于所述第一响应消息,所述第一电子设备提示,所述第一用户输入对应的群组添加群组成员成功,或者,所述第一电子设备在所述第一社交应用上的用户帐号添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  13. 一种群组成员或好友的添加方法,应用于第一电子设备,所述第一电子设备运行有第一社交应用,所述第一电子设备包括:第一天线,所述第一天线在第一发射功率下的发射距离为第一距离,所述第一天线在第二发射功率下的发射距离为第二距离,所述第一距离大于预设的第一安全距离,所述第二距离小于或等于所述预设的第一安全距离;其特征在于,所述方法包括:
    接收到第一用户输入;
    响应于所述第一用户输入,所述第一电子设备通过所述第一发射功率下的所述第一天线,发布添加群组成员服务消息或添加好友服务消息;
    在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;
    响应于所述第一消息,从所述第一消息中获取到一个随机密钥,使用所述随机密钥加密所述第一用户输入对应的群组标识;
    所述第一电子设备通过所述第二发射功率下的所述第一天线,发布第二消息;所述第二消息包括加密后的所述群组标识;
    接收到来自所述第一社交应用的应用服务器的第一响应消息;
    响应于所述第一响应消息,所述第一电子设备提示,所述第一用户输入对应的群组添加群组成员成功,或者,所述第一电子设备在所述第一社交应用上的用户帐号添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离;所述预设的第二安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  14. 一种群组成员或好友的添加方法,应用于第二电子设备,所述第二电子设备运行有第一社交应用,所述第二电子设备包括:第三天线,所述第三天线的发射距离为第三距离,所述第三距离大于预设的第二安全距离;第四天线,所述第四天线的发射距离为第四距离,所述第四距离小于或等于所述预设的第二安全距离;其中,所述第三天线和所述第四天线为不同的天线;其特征在于,所述方法包括:
    在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;
    响应于所述第一消息,从所述第一消息中获取到随机密钥,并获取到所述第二电子设备在所述第一社交应用上的用户帐号,使用所述随机密钥加密所述用户帐号;
    所述第二电子设备通过所述第四天线发送第二消息,所述第二消息包括加密后的所述用户帐号;
    接收到来自所述第一社交应用的应用服务器的第二响应消息;
    响应于所述第二响应消息,所述第二电子设备提示,所述用户帐号被添加群组成功,或者,所述用户帐号被添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  15. 根据权利要求14所述的方法,其特征在于,在所述接收到来自所述第一社交应用的应用服务器的第二响应消息之前,所述方法还包括:
    接收到来自所述第一电子设备的确认消息;
    响应于所述确认消息,所述第二电子设备切换至所述第三天线。
  16. 根据权利要求14或15所述的方法,其特征在于,在所述接收到来自第一电子设备的第一消息之前,所述方法还包括:
    以Wi-Fi感知的无线通信方式,接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;
    响应于所述添加群组成员服务消息或所述添加好友服务消息,所述第二电子设备通过所述第三天线,以Wi-Fi感知的无线通信方式,发送响应消息。
  17. 根据权利要求14或15所述的方法,其特征在于,
    所述接收到来自第一电子设备的第一消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自第一电子设备的第一消息;
    所述第二电子设备通过所述第四天线发送第二消息;包括:所述第二电子设备通过所述第四天线,以蓝牙或者ZigBee的无线通信方式,发送第二消息。
  18. 一种群组成员或好友的添加方法,应用于第二电子设备,所述第二电子设备运行有第一社交应用;其特征在于,所述方法包括:
    在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;
    响应于所述第一消息,从所述第一消息中获取到随机密钥,并获取到所述第二电子设备在所述第一社交应用上的用户帐号,使用所述随机密钥加密所述用户帐号;
    所述第二电子设备通过所述第三天线发送第二消息,所述第二消息包括加密后的所述用户帐号;
    接收到来自所述第一社交应用的应用服务器的请求消息;
    接收到用于确认添加的第一用户操作;
    响应于所述第一用户操作,所述第二电子设备向所述应用服务器发送回复消息;所述回复消息用于指示确认添加;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  19. 一种群组成员或好友的添加方法,应用于第二电子设备,所述第二电子设备运行有第一社交应用,所述第二电子设备包括:第三天线,所述第三天线的发射距离为第三距离,所述第三距离大于预设的第二安全距离;第四天线,所述第四天线的发射距离为第四距离,所述第四距离小于或等于所述预设的第二安全距离;其中,所述第三天线和所述第四天线为不同的天线;其特征在于,所述方法包括:
    接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;
    响应于所述添加群组成员服务消息或添加好友服务消息,获取到所述第二电子设备在所述第一社交应用上的用户帐号;
    所述第二电子设备通过所述第四天线,向所述第一电子设备发送第一消息;所述第一 消息包括所述第二电子设备在所述第一社交应用上的用户帐号;
    接收到来自所述第一社交应用的应用服务器的第二响应消息;
    响应于所述第二响应消息,所述第二电子设备提示,所述用户帐号被添加群组成功,或者,所述用户帐号被添加好友成功;
    其中,所述预设的第二安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  20. 根据权利要求19所述的方法,其特征在于,在所述接收到来自所述第一社交应用的应用服务器的第二响应消息之前,所述方法还包括:
    接收到来自所述第一电子设备的确认消息;
    响应于所述确认消息,所述第二电子设备切换至所述第三天线。
  21. 一种群组成员或好友的添加方法,应用于第二电子设备,所述第二电子设备运行有第一社交应用,所述第二电子设备包括:第三天线,所述第三天线的发射距离为第三距离,所述第三距离大于预设的第二安全距离;第四天线,所述第四天线的发射距离为第四距离,所述第四距离小于或等于所述预设的第二安全距离;其中,所述第三天线和所述第四天线为不同的天线;其特征在于,所述方法包括:
    接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;
    响应于所述添加群组成员服务消息或添加好友服务消息,所述第二电子设备生成随机密钥;
    所述第二电子设备通过所述第四天线发送第一消息;所述第一消息包括所述随机密钥;
    在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,所述第二电子设备接收到来自所述第一电子设备的第二消息,使用所述随机密钥解密所述第二消息,获取到所述第一社交应用上的一个群组标识,或者所述第一电子设备在所述第一社交应用上的用户帐号,并获取到所述第二电子设备在所述第一社交应用上的用户帐号;
    所述第二电子设备通过所述第三天线和所述第一社交应用,向所述第一社交应用的应用服务器发送请求消息;所述请求消息包括所述群组标识或者所述第一电子设备在所述第一社交应用上的用户帐号,以及所述第二电子设备在所述第一社交应用上的用户帐号;
    接收到来自所述应用服务器的第二响应消息;
    响应于所述第二响应消息,所述第二电子设备提示,所述用户帐号被添加群组成功,或者,所述用户帐号被添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  22. 根据权利要求21所述的方法,其特征在于,在所述第二电子设备接收到来自所述第一电子设备的第二消息之后,所述方法还包括:
    所述第二电子设备通过所述第四天线发送确认消息。
  23. 一种群组成员或好友的添加方法,应用于第二电子设备,所述第二电子设备运行有第一社交应用,所述第二电子设备包括:第三天线,所述第三天线在第三发射功率下的发射距离为第三距离,所述第三天线在第四发射功率下的发射距离为第四距离,所述第三距离大于预设的第二安全距离,所述第四距离小于或等于所述预设的第二安全距离;其特征在于,所述方法包括:
    在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后, 接收到来自第一电子设备的第一消息;
    响应于所述第一消息,从所述第一消息中获取到随机密钥,并获取到所述第二电子设备在所述第一社交应用上的用户帐号,使用所述随机密钥加密所述用户帐号;
    所述第二电子设备通过所述第四发射功率下的所述第三天线发送第二消息,所述第二消息包括加密后的所述用户帐号;
    接收到来自所述第一社交应用的应用服务器的第二响应消息;
    响应于所述第二响应消息,所述第二电子设备提示,所述用户帐号被添加群组成功,或者,所述用户帐号被添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  24. 一种群组成员或好友的添加方法,应用于第二电子设备,所述第二电子设备运行有第一社交应用,所述第二电子设备包括:第三天线,所述第三天线在第三发射功率下的发射距离为第三距离,所述第三天线在第四发射功率下的发射距离为第四距离,所述第三距离大于预设的第二安全距离,所述第四距离小于或等于所述预设的第二安全距离;其特征在于,所述方法包括:
    接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;
    响应于所述添加群组成员服务消息或添加好友服务消息,获取到所述第二电子设备在所述第一社交应用上的用户帐号;
    所述第二电子设备通过所述第四发射功率下的所述第三天线,向所述第一电子设备发送第一消息;所述第一消息包括所述第二电子设备在所述第一社交应用上的用户帐号;
    接收到来自所述第一社交应用的应用服务器的第二响应消息;
    响应于所述第二响应消息,所述第二电子设备提示,所述用户帐号被添加群组成功,或者,所述用户帐号被添加好友成功;
    其中,所述预设的第二安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  25. 一种群组成员或好友的添加方法,应用于第二电子设备,所述第二电子设备运行有第一社交应用,所述第二电子设备包括:第三天线,所述第三天线在第三发射功率下的发射距离为第三距离,所述第三天线在第四发射功率下的发射距离为第四距离,所述第三距离大于预设的第二安全距离,所述第四距离小于或等于所述预设的第二安全距离;其特征在于,所述方法包括:
    接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;
    响应于所述添加群组成员服务消息或添加好友服务消息,所述第二电子设备生成随机密钥;
    所述第二电子设备通过所述第四发射功率下的所述第三天线发送第一消息;所述第一消息包括所述随机密钥;
    在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,所述第二电子设备接收到来自所述第一电子设备的第二消息,使用所述随机密钥解密所述第二消息,获取到所述第一社交应用上的一个群组标识,或者所述第一电子设备在所述第一社交应用上的用户帐号,并获取到所述第二电子设备在所述第一社交应用上的用户帐号;
    所述第二电子设备通过所述第三发射功率下的所述第三天线和所述第一社交应用,向 所述第一社交应用的应用服务器发送请求消息;所述请求消息包括所述群组标识或者所述第一电子设备在所述第一社交应用上的用户帐号,以及所述第二电子设备在所述第一社交应用上的用户帐号;
    接收到来自所述应用服务器的第二响应消息;
    响应于所述第二响应消息,所述第二电子设备提示,所述用户帐号被添加群组成功,或者,所述用户帐号被添加好友成功;
    其中,所述预设的第一安全距离为所述第一电子设备与所述第二电子设备能够明文交换秘密信息的一个安全距离。
  26. 一种第一电子设备,包括:存储器、处理器以及计算机程序;其中所述计算机程序存储在所述存储器中;其特征在于,当所述计算机程序被所述处理器执行时,使得所述第一电子设备实现如权利要求1-13中任意一项所述的群组成员或好友的添加方法。
  27. 一种第二电子设备,包括:存储器、处理器以及计算机程序;其中所述计算机程序存储在所述存储器中;其特征在于,当所述计算机程序被所述处理器执行时,使得所述第一电子设备实现如权利要求14-25中任意一项所述的群组成员或好友的添加方法。
  28. 一种计算机可读存储介质,包括计算机程序,其特征在于,当所述计算机程序在第一电子设备上运行时,使得所述第一电子设备执行如权利要求1-13中任意一项所述的群组成员或好友的添加方法。
  29. 一种计算机可读存储介质,包括计算机程序,其特征在于,当所述计算机程序在第二电子设备上运行时,使得所述第二电子设备执行如权利要求14-25中任意一项所述的群组成员或好友的添加方法。
  30. 一种计算机程序产品,其特征在于,当所述计算机程序产品在第一电子设备上运行时,使得所述第一电子设备执行如权利要求1-13中任意一项所述的群组成员或好友的添加方法;或者,当所述计算机程序在第二电子设备上运行时,使得所述第二电子设备执行如权利要求14-25中任意一项所述的群组成员或好友的添加方法。
PCT/CN2021/141790 2021-01-29 2021-12-27 一种群组成员或好友的添加方法、电子设备 WO2022161071A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110129143.2 2021-01-29
CN202110129143.2A CN114827059B (zh) 2021-01-29 2021-01-29 一种群组成员或好友的添加方法、电子设备和系统

Publications (1)

Publication Number Publication Date
WO2022161071A1 true WO2022161071A1 (zh) 2022-08-04

Family

ID=82525605

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/141790 WO2022161071A1 (zh) 2021-01-29 2021-12-27 一种群组成员或好友的添加方法、电子设备

Country Status (2)

Country Link
CN (1) CN114827059B (zh)
WO (1) WO2022161071A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116095031A (zh) * 2023-04-10 2023-05-09 科讯嘉联信息技术有限公司 Rpa自动加微系统

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101223710A (zh) * 2005-04-25 2008-07-16 索尼爱立信移动通讯股份有限公司 用于无线通信系统的电子设备和操作用于无线通信系统的电子设备的方法
JP2009087044A (ja) * 2007-09-28 2009-04-23 Ntt Docomo Inc 通信端末装置、コミュニティ管理装置
CN102521743A (zh) * 2011-11-16 2012-06-27 赵启程 基于无线通道的手机安全支付方法及系统
KR101388251B1 (ko) * 2012-11-30 2014-04-24 숭실대학교산학협력단 소셜 네트워크 서비스에서의 미인증 사용자의 인증 방법 및 장치
US20150191150A1 (en) * 2014-01-09 2015-07-09 Ford Global Technologies, Llc Vehicle contents inventory system
WO2016000462A1 (zh) * 2014-07-02 2016-01-07 深圳创维数字技术有限公司 一种用户信息共享的方法、设备及系统
WO2017114444A1 (zh) * 2015-12-30 2017-07-06 腾讯科技(深圳)有限公司 资源数据的共享方法、装置及系统
US20200359204A1 (en) * 2019-05-06 2020-11-12 Apple Inc. Standalone wearable device configuration and interface
CN112153721A (zh) * 2020-08-05 2020-12-29 华为技术有限公司 一种无线路由设备接入方法及无线路由设备

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9525753B2 (en) * 2012-12-12 2016-12-20 Netspective Communications Llc Integration of devices through a social networking platform
CN104426583B (zh) * 2013-08-29 2018-05-29 华为终端(东莞)有限公司 基于近场通信的数据传输方法、装置及近场通信设备
CN105681161B (zh) * 2015-08-20 2017-10-27 腾讯科技(深圳)有限公司 一种添加好友账户的方法、装置和系统
CN105137750A (zh) * 2015-09-24 2015-12-09 北京奇虎科技有限公司 一种实现智能手表的数据传输的方法、装置和智能手表
CN105653909B (zh) * 2016-01-26 2018-09-25 腾讯科技(深圳)有限公司 信息处理方法、第一终端、第二终端、服务器及系统
CN106209604A (zh) * 2016-08-26 2016-12-07 北京小米移动软件有限公司 添加好友的方法及装置
CN106411716A (zh) * 2016-10-28 2017-02-15 珠海市魅族科技有限公司 好友添加方法和装置
CN108900969A (zh) * 2018-06-07 2018-11-27 广东小天才科技有限公司 好友添加方法、装置、设备及存储介质
CN110149269A (zh) * 2019-05-30 2019-08-20 华为技术有限公司 一种通信方法、服务器和通信系统
CN110300053B (zh) * 2019-06-30 2021-08-20 上海连尚网络科技有限公司 一种添加好友的方法与设备
CN111835530B (zh) * 2020-07-10 2022-10-28 Oppo广东移动通信有限公司 群组加入方法及装置

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101223710A (zh) * 2005-04-25 2008-07-16 索尼爱立信移动通讯股份有限公司 用于无线通信系统的电子设备和操作用于无线通信系统的电子设备的方法
JP2009087044A (ja) * 2007-09-28 2009-04-23 Ntt Docomo Inc 通信端末装置、コミュニティ管理装置
CN102521743A (zh) * 2011-11-16 2012-06-27 赵启程 基于无线通道的手机安全支付方法及系统
KR101388251B1 (ko) * 2012-11-30 2014-04-24 숭실대학교산학협력단 소셜 네트워크 서비스에서의 미인증 사용자의 인증 방법 및 장치
US20150191150A1 (en) * 2014-01-09 2015-07-09 Ford Global Technologies, Llc Vehicle contents inventory system
WO2016000462A1 (zh) * 2014-07-02 2016-01-07 深圳创维数字技术有限公司 一种用户信息共享的方法、设备及系统
WO2017114444A1 (zh) * 2015-12-30 2017-07-06 腾讯科技(深圳)有限公司 资源数据的共享方法、装置及系统
US20200359204A1 (en) * 2019-05-06 2020-11-12 Apple Inc. Standalone wearable device configuration and interface
CN112153721A (zh) * 2020-08-05 2020-12-29 华为技术有限公司 一种无线路由设备接入方法及无线路由设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116095031A (zh) * 2023-04-10 2023-05-09 科讯嘉联信息技术有限公司 Rpa自动加微系统
CN116095031B (zh) * 2023-04-10 2023-06-20 科讯嘉联信息技术有限公司 Rpa自动加微系统

Also Published As

Publication number Publication date
CN114827059A (zh) 2022-07-29
CN114827059B (zh) 2023-06-27

Similar Documents

Publication Publication Date Title
CN113163379B (zh) 一种发现及配网的方法和电子设备
WO2021017934A1 (zh) 一种控制设备的方法及终端
WO2021052178A1 (zh) 一种Wi-Fi连接方法及设备
WO2020042119A1 (zh) 一种消息传输方法及设备
KR101914117B1 (ko) 휴대 단말들 간에 무선 랜 링크를 형성하는 방법 및 이를 위한 장치
WO2022143031A1 (zh) 一种身份认证方法、电子设备及计算机可读存储介质
WO2021104448A1 (zh) 一种密钥信息的同步方法、系统及设备
CN114679708A (zh) 通信方法、系统及电子设备
CN113038627B (zh) 一种文件分享方法、移动设备、计算机存储介质
CN114697929A (zh) 连接建立方法及电子设备
WO2022161071A1 (zh) 一种群组成员或好友的添加方法、电子设备
CN114697879A (zh) 蓝牙配对方法、电子设备、芯片和存储介质
WO2022062875A1 (zh) 数据传输方法、系统、电子设备及存储介质
WO2022028333A1 (zh) 一种自动控制方法、电子设备及计算机可读存储介质
WO2022161143A1 (zh) 一种共享通信录的方法、移动设备、电子设备和通信系统
EP4336801A1 (en) Device control method and apparatus
CN112615891B (zh) 配对方法及设备
WO2022057521A1 (zh) 配置设备的方法及设备
CN116133161B (zh) 数据传输方法及电子设备
CN104052783B (zh) 用于网络中的装置的应用程序连接
WO2023051204A1 (zh) 跨设备连接方法、电子设备及存储介质
WO2023005898A1 (zh) 多终端联合会话管理方法、网络侧设备及终端
CN114844732B (zh) 一种会议接入方法及电子设备
WO2023226051A1 (zh) 为个人物联网设备选择认证机制的方法及装置、ue、网络功能及存储介质
WO2023124258A1 (zh) 远程访问用户识别模块sim卡的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21922660

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21922660

Country of ref document: EP

Kind code of ref document: A1