Movatterモバイル変換


[0]ホーム

URL:


CN114827059A - Group member or friend adding method, electronic device and system - Google Patents

Group member or friend adding method, electronic device and system
Download PDF

Info

Publication number
CN114827059A
CN114827059ACN202110129143.2ACN202110129143ACN114827059ACN 114827059 ACN114827059 ACN 114827059ACN 202110129143 ACN202110129143 ACN 202110129143ACN 114827059 ACN114827059 ACN 114827059A
Authority
CN
China
Prior art keywords
electronic device
message
antenna
distance
mobile phone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110129143.2A
Other languages
Chinese (zh)
Other versions
CN114827059B (en
Inventor
时锐
薛清风
杨嘉辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN202110129143.2ApriorityCriticalpatent/CN114827059B/en
Priority to PCT/CN2021/141790prioritypatent/WO2022161071A1/en
Publication of CN114827059ApublicationCriticalpatent/CN114827059A/en
Application grantedgrantedCritical
Publication of CN114827059BpublicationCriticalpatent/CN114827059B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The application relates to a group member or friend adding method and electronic equipment. The method is used for operating the electronic equipment of the social application, the transmitting distances of a first antenna and a second antenna included in the electronic equipment are respectively a first distance and a second distance, the first distance is greater than a preset safety distance, and the second distance is smaller than or equal to the preset safety distance. The method comprises the following steps: the electronic equipment receives user input and sends a first message containing a random key through a second antenna; receiving a second message, decrypting the second message by using a random key, and acquiring a user account on the social application; sending a request message containing a user account to an application server of the social application; the request message also comprises a group identifier corresponding to the user input or a user account of the electronic equipment on the social application; and receiving a response message of the application server, and prompting that the group adds the group members successfully or adds the friends successfully. The method and the device guarantee communication safety, reduce user operation and improve user experience.

Description

Translated fromChinese
一种群组成员或好友的添加方法、电子设备和系统Method, electronic device and system for adding group members or friends

技术领域technical field

本申请涉及终端技术领域,尤其涉及一种群组成员或好友的添加方法、电子设备和系统。The present application relates to the field of terminal technologies, and in particular, to a method, electronic device and system for adding group members or friends.

背景技术Background technique

社交类应用具有添加好友、群组成员的功能。例如,在社交类应用中,通过搜索用户帐号、二维码扫一扫等方式,用户就可以添加为好友、添加群组成员。不过,这些方式仍需要用户打开社交类应用,多次手动操作,才能完成。如此,导致用户之间添加好友、群组成员的操作繁琐,耗时较长,不利于社交类应用的推广,尤其不利于新上市的社交类应用的推广,用户体验较差。Social applications have the function of adding friends and group members. For example, in social applications, users can be added as friends and group members by searching for user accounts, scanning QR codes, etc. However, 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.

发明内容SUMMARY OF THE INVENTION

为了解决上述的技术问题,本申请提供一种好友添加方法、电子设备和系统。本申请提供的技术方案,可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验。In order to solve the above technical problems, the present application provides a friend adding method, electronic device and system. 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.

第一方面,本申请实施例提供了一种群组成员或好友的添加方法。该方法可以应用于第一电子设备,第一电子设备运行有第一社交应用。第一电子设备包括:第一天线,第一天线的发射距离为第一距离,第一距离大于预设的第一安全距离;第二天线,第二天线的发射距离为第二距离,第二距离小于或等于预设的第一安全距离;其中,第一天线和第二天线为不同的天线。所述方法包括:接收到第一用户输入;第一电子设备生成随机密钥;第一电子设备通过第二天线发送第一消息,第一消息包括随机密钥;接收到来自第二电子设备的第二消息;第一电子设备使用随机密钥解密所述第二消息,获取到第一社交应用上的一个用户帐号;第一电子设备通过第一社交应用和第一天线,向第一社交应用的应用服务器发送请求消息;请求消息包括用户帐号;请求消息还包括第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a first aspect, 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 plaintext.

上述方法中,一方面,第一电子设备使用第二天线发送第一消息,处于预设距离外的其它电子设备无法接收到该第一消息,所以可以保证通信的安全性。另一方面,第一电子设备的使用用户不需要经过复杂的操作,只需确保第一电子设备和第二电子设备之间的距离小于或者等于预设的第一安全距离,以使第二电子设备可以接收到第一消息即可添加好友或添加群组成员,有效地减少了繁琐的手动操作。该方法在保证通信安全的基础上,有助于降低用户之间添加好友或群组成员的难度,提升沟通效率。In the above method, on the one hand, 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. On the other hand, 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. On the basis of ensuring communication security, the method helps reduce the difficulty of adding friends or group members between users, and improves communication efficiency.

在一种可能的设计中,第一电子设备通过第二天线发送第一消息;包括:第一电子设备通过所述第二天线,以蓝牙或者ZigBee的无线通信方式,发送第一消息;第一电子设备接收到来自第二电子设备的第二消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自所述第二电子设备的第二消息。该方法中以蓝牙或者ZigBee的无线通信方式提升通信的效率,节省蜂窝流量。In a possible design, 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. In the method, the wireless communication mode of Bluetooth or ZigBee is used to improve communication efficiency and save cellular traffic.

在一种可能的设计中,响应于第一用户输入,第一电子设备生成随机密钥;包括:响应于第一用户输入,第一电子设备通过第一天线,以Wi-Fi感知的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;第一电子设备以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的响应消息;响应于响应消息,第一电子设备生成随机密钥。In a possible design, 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 communicates with Wi-Fi-aware wireless communication through the first antenna method, 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 manner; in response to the response message, the first electronic device The device generates a random key.

该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。In this method, in a scenario where the first electronic device and the second electronic device are not connected to the same router, the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.

在一种可能的设计中,第一电子设备通过第二天线发送第一消息;包括:第一电子设备通过第二天线,以Wi-Fi感知的无线通信方式,发送第一消息;第一电子设备接收到来自第二电子设备的第二消息;包括:以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的第二消息。In a possible design, 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.

该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。In this method, in a scenario where the first electronic device and the second electronic device are not connected to the same router, the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.

在一种可能的设计中,第一电子设备接收到来自所述第二电子设备的第二消息;包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第二消息;所述预设的第二安全距离与所述第二电子设备相关联。预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。该方法中,处于预设的第二安全距离外的其它电子设备无法接收到该第二消息,所以可以保证通信的安全性。In a possible design, 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.

在一种可能的设计中,所述接收到来自第二电子设备的第二消息;包括:在第一电子设备与第二电子设备之间的距离大于预设的第二安全距离后,接收到来自所述第二电子设备的第二消息;预设的第二安全距离与第二电子设备相关联。In a possible design, 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.

该方法中,第二电子设备也可以采用第一天线发送第二消息。该方法可以减少用户之间添加好友、群组成员的操作,缩短耗时时,提高用户体验。In this method, 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 time-consuming, and improve user experience.

在一种可能的设计中,第一电子设备向第一社交应用的应用服务器发送请求消息;包括:通过第一社交应用的加密机制,第一电子设备向第一社交应用的应用服务器发送请求消息;第一电子设备接收到来自应用服务器的第一响应消息;包括:接收到来自应用服务器的第一响应消息,并通过第一社交应用的解密机制,获取到解密后的第一响应消息。In a possible design, 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.

该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。In this method, 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.

第二方面,本申请实施例提供了一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用。所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备通过第一天线,发布添加群组成员服务消息或添加好友服务消息;在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;从第一消息中获取到第一社交应用上的一个用户帐号,并提示对用户帐号进行确认;接收到用于确认添加的第二用户输入;响应于第二用户输入,第一电子设备通过第一天线和第一社交应用,向第一社交应用的应用服务器发送请求消息;请求消息包括用户帐号;请求消息还包括第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a second aspect, 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 first response message , the first electronic device prompts that the first user inputs 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 second safety distance is A safe distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.

该方法中,可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验,该方法通过接收用户的第二用户输入,可以避免添加非法用户的用户帐号或避免添加至非法用户的群组帐号,进一步提高安全。In this method, 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. By receiving the second user input of the user, the method can avoid adding illegal users. account or avoid adding to illegal users' group accounts to further improve security.

在一种可能的设计中,第一电子设备通过所述第一天线,发布添加群组成员服务消息或添加好友服务消息;包括:所述第一电子设备通过所述第一天线,以Wi-Fi感知、蓝牙或ZigBee的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;所述接收到来自第二电子设备的第一消息;包括:以Wi-Fi感知、蓝牙或ZigBee的无线通信方式,接收到来自所述第二电子设备的第一消息。该方法中以Wi-Fi感知、蓝牙或者ZigBee的无线通信方式提升通信的效率,节省蜂窝流量。In a possible design, 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. In this method, the wireless communication modes of Wi-Fi perception, Bluetooth or ZigBee are used to improve communication efficiency and save cellular traffic.

在一种可能的设计中,第一电子设备向第一社交应用的应用服务器发送请求消息;包括:通过第一社交应用的加密机制,第一电子设备向第一社交应用的应用服务器发送请求消息;In a possible design, 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. In this method, 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.

第三方面,本申请实施例提供了一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用;第一电子设备包括:第一天线,第一天线的发射距离为第一距离,第一距离大于预设的第一安全距离;第二天线,第二天线的发射距离为第二距离,第二距离小于或等于预设的第一安全距离;其中,第一天线和第二天线为不同的天线。所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备通过第一天线,发布添加群组成员服务消息或添加好友服务消息;在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的安全距离;响应于第一消息,从第一消息中获取到一个随机密钥,使用随机密钥加密第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;第一电子设备通过第二天线,发送第二消息;第二消息包括加密后的群组标识或用户帐号;接收到来自第一社交应用的应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离;预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a third aspect, 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 preset first security The distance is a safe distance where the first electronic device and the second electronic device can exchange secret information in plaintext; the preset second security distance is a safe distance where the first electronic device and the second electronic device can exchange secret information in plaintext.

上述方法中可以减少用户之间添加好友、群组成员的操作,缩短耗时时长,方便用户的使用,提高用户体验,第二电子设备使用第二天线发送第一消息,处于预设的第二安全距离外的其它电子设备无法接收到该第一消息,所以可以保证通信的安全性。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.

在一种可能的设计中,第一电子设备接收到来自第一社交应用的应用服务器的第一响应消息;包括:接收到来自所述第一社交应用的应用服务器的第一响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第一响应消息。该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。In a possible design, 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. In this method, 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.

在一种可能的设计中,第一天线与所述第二天线连接同一个无线通信模块;所述无线通信模块包括Wi-Fi芯片、蓝牙芯片和ZigBee芯片中的一种。In a possible design, 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.

在一种可能的设计中,Wi-Fi芯片、蓝牙芯片或ZigBee芯片,在所述无线通信模块中的数量为一个,所述第一天线和所述第二天线连接所述Wi-Fi芯片、所述蓝牙芯片或所述ZigBee芯片。In a possible design, 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.

第四方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用,第一电子设备包括:第一天线,第一天线在第一发射功率下的发射距离为第一距离,第一天线在第二发射功率下的发射距离为第二距离,第一距离大于预设的第一安全距离,第二距离小于或等于预设的第一安全距离。所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备生成随机密钥;第一电子设备通过第二发射功率下的第一天线发送第一消息,第一消息包括随机密钥;接收到来自第二电子设备的第二消息;响应于第二消息,第一电子设备使用随机密钥解密第二消息,获取到第一社交应用上的一个用户帐号;第一电子设备向第一社交应用的应用服务器发送请求消息;请求消息包括用户帐号;请求消息还包括第一用户输入对应的群组标识或第一电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a fourth aspect, 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 second electronic device can exchange secret information in plaintext.

在一种可能的设计中,第一电子设备通过所述第二发射功率下的所述第一天线发送第一消息;包括:所述第一电子设备通过所述第二发射功率下的所述第一天线,以蓝牙或者ZigBee的无线通信方式,发送第一消息;所述接收到来自第二电子设备的第二消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自所述第二电子设备的第二消息。In a possible design, 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.

在一种可能的设计中,响应于所述第一用户输入,所述第一电子设备生成随机密钥;包括:响应于所述第一用户输入,所述第一电子设备通过所述第一发射功率下的所述第一天线,以Wi-Fi感知的无线通信方式,发布添加群组成员服务消息或添加好友服务消息;以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的响应消息;响应于所述响应消息,所述第一电子设备生成随机密钥。In a possible design, 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.

在一种可能的设计中,所述第一电子设备通过所述第二发射功率下的所述第一天线发送第一消息;包括:所述第一电子设备通过所述第二发射功率下的所述第一天线,以Wi-Fi感知的无线通信方式,发送第一消息;所述接收到来自第二电子设备的第二消息;包括:以Wi-Fi感知的无线通信方式,接收到来自所述第二电子设备的第二消息。In a possible design, 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.

在一种可能的设计中,所述接收到来自所述第二电子设备的第二消息;包括:在所述第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自所述第二电子设备的第二消息;所述预设的第二安全距离与所述第二电子设备相关联。In a possible design, 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.

在一种可能的设计中,第一电子设备接收到来自第二电子设备的第二消息;包括:在所述第一电子设备与第二电子设备之间的距离大于预设的第二安全距离后,接收到来自所述第二电子设备的第二消息;所述预设的第二安全距离与所述第二电子设备相关联。In a possible design, 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.

在一种可能的设计中,所述第一电子设备向所述第一社交应用的应用服务器发送请求消息;包括:通过所述第一社交应用的加密机制,所述第一电子设备向所述第一社交应用的应用服务器发送请求消息;所述接收到来自所述应用服务器的第一响应消息;包括:接收到来自所述应用服务器的第一响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第一响应消息。In a possible design, 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.

第四方面中的各个实施例的有益消息可以参见上述第一方面,在此不再重复赘述。For the beneficial information of the various embodiments in the fourth aspect, reference may be made to the above-mentioned first aspect, which will not be repeated here.

第五方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第一电子设备。第一电子设备运行有第一社交应用,第一电子设备包括:第一天线,第一天线在第一发射功率下的发射距离为第一距离,第一天线在第二发射功率下的发射距离为第二距离,第一距离大于预设的第一安全距离,第二距离小于或等于预设的第一安全距离;所述方法包括:接收到第一用户输入;响应于第一用户输入,第一电子设备通过第一发射功率下的第一天线,发布添加群组成员服务消息或添加好友服务消息;在第一电子设备与第二电子设备之间的距离小于或等于预设的第二安全距离后,接收到来自第二电子设备的第一消息;响应于第一消息,从第一消息中获取到一个随机密钥,使用随机密钥加密第一用户输入对应的群组标识;第一电子设备通过第二发射功率下的第一天线,发布第二消息;第二消息包括加密后的群组标识;接收到来自第一社交应用的应用服务器的第一响应消息;响应于第一响应消息,第一电子设备提示,第一用户输入对应的群组添加群组成员成功,或者,第一电子设备在第一社交应用上的用户帐号添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离;预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a fifth aspect, 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 publishes a second message through the first antenna under the second transmit power; the second message includes the encrypted group identifier; receives the first response message from the application server of the first social application; 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 preset first security The distance is a safe distance where the first electronic device and the second electronic device can exchange secret information in plaintext; the preset second security distance is a safe distance where the first electronic device and the second electronic device can exchange secret information in plaintext.

第五方面中的各个实施例的有益消息可以参见上述第二方面,在此不再重复赘述。For the beneficial information of the various embodiments in the fifth aspect, reference may be made to the above-mentioned second aspect, which will not be repeated here.

第六方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线;所述方法包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;响应于第一消息,从第一消息中获取到随机密钥,并获取到第二电子设备在第一社交应用上的用户帐号,使用随机密钥加密用户帐号;第二电子设备通过第四天线发送第二消息,第二消息包括加密后的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a sixth aspect, 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 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 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. In this method, 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.

在一种可能的设计中,接收到来自第一电子设备的第一消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自第一电子设备的第一消息;第二电子设备通过所述第四天线发送第二消息;包括:所述第二电子设备通过所述第四天线,以蓝牙或者ZigBee的无线通信方式,发送第二消息。该方法中以蓝牙或者ZigBee的无线通信方式提升通信的效率,节省蜂窝流量。In a possible design, 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. In the method, the wireless communication mode of Bluetooth or ZigBee is used to improve communication efficiency and save cellular traffic.

在一种可能的设计中,在接收到来自第一电子设备的第一消息之前,所述方法还包括:所述第二电子设备,以Wi-Fi感知的无线通信方式,接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于所述添加群组成员服务消息或所述添加好友服务消息,所述第二电子设备通过所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送响应消息。In a possible design, 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.

该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。In this method, in a scenario where the first electronic device and the second electronic device are not connected to the same router, the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.

在一种可能的设计中,第一电子设备接收到来自第一电子设备的第一消息;包括:以Wi-Fi感知的无线通信方式,接收到来自第一电子设备的第一消息;所述第二电子设备通过第四天线发送第二消息;包括:第二电子设备通过第四天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送第二消息。该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。In a possible design, 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. In this method, in a scenario where the first electronic device and the second electronic device are not connected to the same router, the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.

在一种可能的设计中,第一电子设备接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:第一电子设备接收到来自第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。该方法中,第一电子设备和第一社交应用的应用服务器之间是通过加解密机制进行通信的,可以保证通信的安全。In a possible design, 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. In this method, 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.

第七方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备,第二电子设备运行有第一社交应用;所述方法包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;响应于第一消息,从第一消息中获取到随机密钥,并获取到第二电子设备在第一社交应用上的用户帐号,使用随机密钥加密用户帐号;第二电子设备通过第三天线发送第二消息,第二消息包括加密后的用户帐号;接收到来自第一社交应用的应用服务器的请求消息;接收到用于确认添加的第一用户操作;响应于第一用户操作,第二电子设备向应用服务器发送回复消息;回复消息用于指示确认添加;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a seventh aspect, 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.

在一种可能的设计中,第二电子设备接收到来自第一电子设备的第一消息;包括:以蓝牙或者ZigBee的无线通信方式,接收到来自第一电子设备的第一消息;In a possible design, 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;

所述第二电子设备通过所述第四天线发送第二消息;包括:所述第二电子设备通过所述第四天线,以蓝牙或者ZigBee的无线通信方式,发送第二消息。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.

在一种可能的设计中,第二电子设备在接收到来自第一电子设备的第一消息之前,所述方法还包括:In a possible design, before the second electronic device receives the first message from the first electronic device, the method further includes:

所述第二电子设备,以Wi-Fi感知的无线通信方式,接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;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;

响应于所述添加群组成员服务消息或所述添加好友服务消息,所述第二电子设备通过所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送响应消息。该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。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. In this method, in a scenario where the first electronic device and the second electronic device are not connected to the same router, the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.

在一种可能的设计中,第二电子设备接收到来自第一电子设备的第一消息;包括:以Wi-Fi感知的无线通信方式,接收到来自第一电子设备的第一消息;In a possible design, 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;

所述第二电子设备通过所述第四天线发送第二消息;包括:所述第二电子设备通过所述第四天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送第二消息。该方法中,第一电子设备和第二电子设备未接入同一个路由器的场景下,两个电子设备也可以以Wi-Fi感知的无线通信方式实现通信。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. In this method, in a scenario where the first electronic device and the second electronic device are not connected to the same router, the two electronic devices can also communicate in a Wi-Fi-aware wireless communication manner.

在一种可能的设计中,第二电子设备接收到来自所述第一社交应用的应用服务器的请求消息;包括:接收到来自所述第一社交应用的应用服务器的请求消息,并通过所述第一社交应用的解密机制,获取到解密后的请求消息;In a possible design, 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. In this method, 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.

第八方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线;所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第四天线,向第一电子设备发送第一消息;第一消息包括第二电子设备在第一社交应用上的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In an eighth aspect, 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.

在一种可能的设计中,第二电子设备所述接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:接收到来自所述第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。In a possible design, 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.

在一种可能的设计中,在所述第二电子设备提示后,所述方法还包括:所述第二电子设备切换至所述第三天线。In a possible design, after the second electronic device prompts, the method further includes: switching the second electronic device to the third antenna.

第八方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。For the beneficial information of the various embodiments in the eighth aspect, reference may be made to the sixth aspect or the seventh aspect, which will not be repeated here.

第九方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线;所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,第二电子设备生成随机密钥;第二电子设备通过第四天线发送第一消息;第一消息包括随机密钥;在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,第二电子设备接收到来自第一电子设备的第二消息,使用随机密钥解密所述第二消息,获取到第一社交应用上的一个群组标识,或者第一电子设备在所述第一社交应用上的用户帐号,并获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第三天线和第一社交应用,向第一社交应用的应用服务器发送请求消息;请求消息包括群组标识或者第一电子设备在第一社交应用上的用户帐号,以及第二电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a ninth aspect, 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.

在一种可能的设计中,第二电子设备接收到来自所述应用服务器的第二响应消息;包括:接收到来自所述应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。In a possible design, 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.

在一种可能的设计中,第一电子设备与所述第二电子设备之间的无线通信方式为Wi-Fi感知、蓝牙和ZigBee中的一种。In a possible design, the wireless communication mode between the first electronic device and the second electronic device is one of Wi-Fi awareness, Bluetooth and ZigBee.

第九方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。For the beneficial information of the various embodiments in the ninth aspect, reference may be made to the sixth aspect or the seventh aspect, which will not be repeated here.

第十方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三天线在第四发射功率下的发射距离为第四距离,第三距离大于预设的第二安全距离,第四距离小于或等于预设的第二安全距离;所述方法包括:在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,接收到来自第一电子设备的第一消息;响应于第一消息,从第一消息中获取到随机密钥,并获取到第二电子设备在第一社交应用上的用户帐号,使用随机密钥加密用户帐号;第二电子设备通过第四发射功率下的第三天线发送第二消息,第二消息包括加密后的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a tenth aspect, 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 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.

在一种可能的设计中,第二电子设备接收到来自第一电子设备的第一消息,包括:以蓝牙或者ZigBee的无线通信方式,接收到来自第一电子设备的第一消息;In a possible design, 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;

所述第二电子设备通过所述第四发射功率下的所述第三天线发送第二消息;包括:所述第二电子设备通过所述第四发射功率下的所述第三天线,以蓝牙或者ZigBee的无线通信方式,发送第二消息。Sending, by the second electronic device, a second message through the third antenna under the fourth transmission power; including: the second electronic device using the third antenna under the fourth transmission power to send a Bluetooth Or the wireless communication mode of ZigBee, sending the second message.

在一种可能的设计中,第二电子设备在接收到来自第一电子设备的第一消息之前,所述方法还包括:In a possible design, before the second electronic device receives the first message from the first electronic device, the method further includes:

所述第二电子设备,以Wi-Fi感知的无线通信方式,接收到来自所述第一电子设备的添加群组成员服务消息或添加好友服务消息;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;

响应于所述添加群组成员服务消息或所述添加好友服务消息,所述第二电子设备通过所述第四发射功率下的所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送响应消息。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.

在一种可能的设计中,第二电子设备所述接收到来自第一电子设备的第一消息;包括:以Wi-Fi感知的无线通信方式,接收到来自第一电子设备的第一消息;In a possible design, 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;

所述第二电子设备通过所述第四发射功率下的所述第三天线发送第二消息;包括:所述第二电子设备通过所述第四发射功率下的所述第三天线,以Wi-Fi感知的无线通信方式,向所述第一电子设备发送第二消息。Sending the second message by the second electronic device through the third antenna under the fourth transmission power; including: the second electronic device using the third antenna under the fourth transmission power to send a Wi-Fi -Fi-aware wireless communication mode, sending a second message to the first electronic device.

在一种可能的设计中,第二电子设备接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:接收到来自所述第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。In a possible design, 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.

第十方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。For the beneficial information of each embodiment in the tenth aspect, reference may be made to the sixth aspect or the seventh aspect, which will not be repeated here.

第十一方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三天线在第四发射功率下的发射距离为第四距离,第三距离大于预设的第二安全距离,第四距离小于或等于预设的第二安全距离。所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第四发射功率下的第三天线,向第一电子设备发送第一消息;第一消息包括第二电子设备在第一社交应用上的用户帐号;接收到来自第一社交应用的应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第二安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In an eleventh aspect, 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 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.

在一种可能的设计中,第二电子设备接收到来自所述第一社交应用的应用服务器的第二响应消息;包括:接收到来自所述第一社交应用的应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。In a possible design, 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.

在一种可能的设计中,在所述第二电子设备提示后,所述方法还包括:所述第二电子设备将所述第三天线的发射功率调整为第三发射功率。In a possible design, after the second electronic device prompts, the method further includes: the second electronic device adjusts the transmit power of the third antenna to a third transmit power.

第十一方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。For the beneficial information of each embodiment in the eleventh aspect, reference may be made to the sixth aspect or the seventh aspect, which will not be repeated here.

第十二方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第二电子设备。第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三天线在第四发射功率下的发射距离为第四距离,第三距离大于预设的第二安全距离,第四距离小于或等于预设的第二安全距离。所述方法包括:接收到来自第一电子设备的添加群组成员服务消息或添加好友服务消息;响应于添加群组成员服务消息或添加好友服务消息,第二电子设备生成随机密钥;第二电子设备通过第四发射功率下的第三天线发送第一消息;第一消息包括随机密钥;在第一电子设备与第二电子设备之间的距离小于或等于预设的第一安全距离后,第二电子设备接收到来自第一电子设备的第二消息,使用随机密钥解密第二消息,获取到第一社交应用上的一个群组标识,或者第一电子设备在第一社交应用上的用户帐号,并获取到第二电子设备在第一社交应用上的用户帐号;第二电子设备通过第三发射功率下的第三天线和第一社交应用,向第一社交应用的应用服务器发送请求消息;请求消息包括群组标识或者第一电子设备在第一社交应用上的用户帐号,以及第二电子设备在第一社交应用上的用户帐号;接收到来自应用服务器的第二响应消息;响应于第二响应消息,第二电子设备提示,用户帐号被添加群组成功,或者,用户帐号被添加好友成功;其中,预设的第一安全距离为第一电子设备与第二电子设备能够明文交换秘密信息的一个安全距离。In a twelfth aspect, 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 account of the second electronic device on the first social networking application; a second response message from the application server is received; In response to the second response message, the second electronic device prompts that the user account is successfully added to the group, or the user account is successfully added to a friend; wherein, the preset first safety distance is that the first electronic device and the second electronic device can A safe distance for exchanging secret information in plaintext.

在一种可能的设计中,第二电子设备接收到来自所述应用服务器的第二响应消息;包括:接收到来自所述应用服务器的第二响应消息,并通过所述第一社交应用的解密机制,获取到解密后的第二响应消息。In a possible design, 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.

在一种可能的设计中,第一电子设备与所述第二电子设备之间的无线通信方式为Wi-Fi感知、蓝牙和ZigBee中的一种。In a possible design, the wireless communication mode between the first electronic device and the second electronic device is one of Wi-Fi awareness, Bluetooth and ZigBee.

第十二方面中的各个实施例的有益消息可以参见上述第六方面或第七方面,在此不再重复赘述。For the beneficial information of each embodiment in the twelfth aspect, reference may be made to the sixth aspect or the seventh aspect, which will not be repeated here.

第十三方面,本申请实施例提供一种群组成员或好友的添加方法,应用于第一电子设备和第二电子设备。第一电子设备运行有第一社交应用,第一电子设备包括:第一天线,第一天线的发射距离为第一距离,第一距离大于预设的第一安全距离;第二天线,第二天线的发射距离为第二距离,第二距离小于或等于预设的第一安全距离;其中,第一天线和第二天线为不同的天线;第二电子设备运行有第一社交应用,第二电子设备包括:第三天线,第三天线的发射距离为第三距离,第三距离大于预设的第二安全距离;第四天线,第四天线的发射距离为第四距离,第四距离小于或等于预设的第二安全距离;其中,第三天线和第四天线为不同的天线。所述方法包括:In a thirteenth aspect, 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, and 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 includes the corresponding group identifier input by the first user or the first electronic device in the first A user account on a social application; the first electronic device receives a 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 account of the first electronic device on the first social application is successfully added as a friend; the second electronic device receives a second response message from the application server of the first social application; in response to the second response message, all 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 is that the first electronic device and the second electronic device can exchange clear text A safe distance for secret information.

第十三方面中的各个实施例的有益消息可以参见上述第一方面和第六方面,在此不再重复赘述。For the beneficial information of the various embodiments in the thirteenth aspect, reference may be made to the first aspect and the sixth aspect, which will not be repeated here.

第十四方面,本申请实施例提供一种通信系统,该通信系统可以包括如第一方面所述的第一电子设备和如第六方面所示的第二电子设备,或如第二方面所示的第一电子设备和如第七方面所示的第二电子设备,或如第三方面所示的第一电子设备和如第八方面所示的第二电子设备,或如第四方面所示的第一电子设备和如第十方面所示的第二电子设备,或如第五方面所示的第一电子设备和如第十一方面所示的第二电子设备。In a fourteenth aspect, 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 The first electronic device shown in the seventh aspect and the second electronic device shown in the seventh aspect, or the first electronic device shown in the third aspect and the second electronic device shown in the eighth aspect, or the fourth aspect. The first electronic device shown in the tenth aspect and the second electronic device shown in the tenth aspect, or the first electronic device shown in the fifth aspect and the second electronic device shown in the eleventh aspect.

第十五方面,本申请实施例提供一种第一电子设备,包括处理器和存储器。其中,存储器用于存储一个或多个计算机程序;当存储器存储的一个或多个计算机程序被处理器执行时,使得该第一电子设备能够实现上述第一电子设备所执行的任意方面及任意方面下的任意一种可能的设计的方法。In a fifteenth aspect, an embodiment of the present application provides a first electronic device, including a processor and a memory. Wherein, 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.

第十六方面,本申请实施例提供一种第二电子设备,包括处理器和存储器。其中,存储器用于存储一个或多个计算机程序;当存储器存储的一个或多个计算机程序被处理器执行时,使得该第二电子设备能够实现上述第二电子设备所执行的任意方面及任意方面下的任意一种可能的设计的方法。In a sixteenth aspect, an embodiment of the present application provides a second electronic device, including a processor and a memory. Wherein, 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.

第十七方面,本申请实施例还提供一种装置,该装置包括执行上述任一方面的任意一种可能的设计的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。In a seventeenth aspect, 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.

第十八方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在第一电子设备上运行时,使得所述第一电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。In an eighteenth aspect, 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.

第十九方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在第二电子设备上运行时,使得所述第二电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。In a nineteenth aspect, 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.

第二十方面,本申请实施例还提供一种包含计算机程序产品,当所述计算机程序产品在第一电子设备上运行时,使得所述第一电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。In a twentieth aspect, 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.

第二十一方面,本申请实施例还提供一种包含计算机程序产品,当所述计算机程序产品在第二电子设备上运行时,使得所述第二电子设备执行上述任意方面及任意方面的任意一种可能的设计的方法。In a twenty-first aspect, 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. A possible design approach.

第二十三方面,本申请实施例还提供一种芯片或芯片系统,所述芯片或芯片系统与存储器耦合,用于执行所述存储器中存储的计算机程序,以执行上述任意方面及任意方面的任意一种可能的设计的方法。In a twenty-third aspect, 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.

以上第十四方面至第二十三方面中任一方面中的各种设计可以达到的技术效果,请参照上述第一方面至第十三方面中各个设计分别可以达到的技术效果描述,这里不再重复赘述。For the technical effects that can be achieved by the various designs in any of the fourteenth to twenty-third aspects above, please refer to the description of the technical effects that can be achieved by the designs in the above-mentioned first to thirteenth aspects. Repeat again.

附图说明Description of drawings

图1A至图1D为提供的一组好友添加方法的界面示意图;1A to 1D are interface schematic diagrams of a provided method for adding a group of friends;

图2为本申请实施例提供的一种群组成员或好友的添加方法的场景示意图;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为本申请实施例提供的电子设备的硬件结构示意图;3A is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;

图3B为本申请实施例提供的电子设备的软件结构示意图;3B is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application;

图4A为本申请实施例提供的无线通信模块及天线的一种原理示意图;4A is a schematic diagram of a principle of a wireless communication module and an antenna provided by an embodiment of the present application;

图4B为本申请实施例提供的无线通信模块及天线的另一种原理示意图;FIG. 4B is another schematic schematic diagram of a wireless communication module and an antenna provided by an embodiment of the present application;

图5A至图5C为本申请实施例提供的无线通信模块及天线的三种具体结构示意图;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;

图6为本申请实施例提供的无线通信模块及天线的发射距离的示意图;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;

图7为本申请实施例提供的一种群组或好友添加方法中用户操作的示意图;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;

图8A至图8C为本申请实施例一提供的一种好友添加方法示意图;8A to 8C are schematic diagrams of a method for adding friends according to Embodiment 1 of the present application;

图9A至图9B为本申请实施例二提供的一种好友添加方法示意图;9A to 9B are schematic diagrams of a method for adding friends according toEmbodiment 2 of the present application;

图10A至图10B为本申请实施例三提供的一种好友添加方法示意图;10A to 10B are schematic diagrams of a method for adding friends according toEmbodiment 3 of the present application;

图11A至图11D为本申请实施例四提供的一种群组成员添加方法示意图;11A to 11D are schematic diagrams of a method for adding group members according toEmbodiment 4 of the present application;

图12A至图12B为本申请实施例五提供的一种群组成员添加方法示意图;12A to 12B are schematic diagrams of a method for adding group members according toEmbodiment 5 of the present application;

图13为本申请实施例六提供的一种群组成员添加方法的流程示意图;13 is a schematic flowchart of a method for adding group members according toEmbodiment 6 of the present application;

图14A为本申请实施例七提供的一种群组成员添加方法的流程示意图;14A is a schematic flowchart of a method for adding group members according toEmbodiment 7 of the present application;

图14B为本申请实施例七提供的一种好友添加方法的流程示意图;14B is a schematic flowchart of a method for adding friends according toEmbodiment 7 of the present application;

图15为本申请实施例提供的一种电子设备的结构组成示意图;FIG. 15 is a schematic structural composition diagram of an electronic device provided by an embodiment of the application;

图16为本申请实施例提供的一种通信系统的结构组成示意图。FIG. 16 is a schematic structural composition diagram of a communication system provided by an embodiment of the present application.

具体实施方式Detailed ways

下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations of the present application. As used in the specification of this application and the appended claims, the singular expressions "a," "the," "above," "the," and "the" are intended to also include, for example, "a" or more" this expression unless the context clearly dictates otherwise. It should also be understood that, in the following embodiments of the present application, "at least one" and "one or more" refer to one or more than two (including two). The term "and/or", used to describe the association relationship of related objects, indicates that there can be three kinds of relationships; for example, A and/or B, can indicate: A alone exists, A and B exist at the same time, and B exists alone, A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship.

在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。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. Thus, 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.

在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, 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.

Figure BDA0002924900840000131
应用下的添加好友为例,通过用户的操作及图形用户界面(graphicaluser interface,GUI)的显示及切换,对图1A至图1D进行介绍。为了介绍方便,在后续介绍时,以移动设备为手机为例。在图1A的(a)中,用户Alisa点击其手机的用户界面100上的
Figure BDA0002924900840000132
Figure BDA0002924900840000133
应用图标101,之后图1A的(a)中的用户界面101切换为图1A的(b)中的用户界面110。在图1A的(b)中,用户Alisa点击其手机的用户界面110上的控件111,弹出窗口1100。当用户Alisa点击添加好友控件1101的操作后,手机可以进行好友的添加。by
Figure BDA0002924900840000131
Taking adding a friend under the application as an example, FIG. 1A to FIG. 1D are introduced through the user's operation and the display and switching of a graphical user interface (GUI). For the convenience of introduction, in the subsequent introduction, the mobile device is taken as an example of a mobile phone. In (a) of FIG. 1A, user Alisa clicks on theuser interface 100 of her mobile phone
Figure BDA0002924900840000132
Figure BDA0002924900840000133
Theicon 101 is applied, and then theuser interface 101 in (a) of FIG. 1A is switched to theuser interface 110 in (b) of FIG. 1A . In (b) of FIG. 1A , user Alisa clicks the control 111 on theuser interface 110 of his mobile phone, and awindow 1100 pops up. After the user Alisa clicks the operation of adding a friend control 1101, the mobile phone can add a friend.

示例性地,当用户Alisa点击添加好友控件1101的操作后,手机显示如图1A中的(c)所示的用户界面120。用户Alisa可以在用户界面120中的搜索输入框控件121中,输入需要添加的好友的微信号或者好友的手机号等,来查找需要添加的好友。假设,用户Alisa在用户界面120中的搜索输入框控件121中,输入了好友的手机号,手机显示如图1A中的(d)所示的用户界面130。当手机检测到作用于搜索控件131的操作后,手机向

Figure BDA0002924900840000134
应用的应用服务器发送搜索请求,以及手机从
Figure BDA0002924900840000135
应用的应用服务器获取搜索结果。Exemplarily, after the user Alisa clicks the operation of adding a friend control 1101, the mobile phone displays theuser interface 120 as shown in (c) of FIG. 1A . The user Alisa can enter the WeChat ID of the friend to be added or the mobile phone number of the friend in the searchinput box control 121 in theuser interface 120 to search for the friend to be added. It is assumed that the user Alisa inputs the mobile phone number of a friend in the searchinput box control 121 in theuser interface 120, and the mobile phone displays theuser interface 130 as shown in (d) of FIG. 1A. After the mobile phone detects the operation acting on thesearch control 131, the mobile phone sends the
Figure BDA0002924900840000134
The app's app server sends the search request, and the phone
Figure BDA0002924900840000135
The application's application server fetches the search results.

假设手机从

Figure BDA0002924900840000136
应用的应用服务器成功获取好友的账户信息,参见图1B中的(e)所示的用户界面140。用户界面140包括待添加好友Lucas的微信帐号信息。当用户Alisa作用于添加到通讯录控件141的操作后,手机显示如图1B中的(f)所示的用户界面150。用户Alisa可以在用户界面150输入用于对方进行验证的信息,以及对权限进行设置等。用户Alisa设置完成后,点击发送控件151,用户Alisa的手机100向
Figure BDA0002924900840000137
应用的应用服务器发送好友添加请求。Suppose the phone is from
Figure BDA0002924900840000136
The application server of the application successfully obtains the friend's account information, see theuser interface 140 shown in (e) of FIG. 1B . Theuser interface 140 includes the WeChat account information of the friend Lucas to be added. After the user Alisa acts on the operation of adding to theaddress book control 141, the mobile phone displays theuser interface 150 as shown in (f) of FIG. 1B. The user Alisa can input information for the authentication of the other party on theuser interface 150, and set permissions and so on. After the user Alisa completes the setting, click thesend control 151, and the user Alisa'smobile phone 100 sends the
Figure BDA0002924900840000137
The application server of the application sends a friend addition request.

进一步地,当用户Lucas收到来自用户Alisa的好友添加请求后,用户Lucas的手机可以显示如图1C中的(g)所示的用户界面160。用户界面160为好友添加请求的界面,包括对方用户Alisa发送的验证信息和用户Alisa的微信帐号信息。当用户Lucas点击用户界面160中的前往验证控件161的操作后,显示如图1C中的(h)所示的用户界面170。若用户Lucas同意该添加请求,则用户Lucas可以点击用户界面170中的完成控件171,手机向应用服务器发送好友添加请求通过消息。Further, after the user Lucas receives the friend adding request from the user Alisa, the mobile phone of the user Lucas may display theuser interface 160 as shown in (g) in FIG. 1C . Theuser 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. When the user Lucas clicks the operation of going to theverification control 161 in theuser interface 160, theuser 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 thecompletion control 171 in theuser interface 170, and the mobile phone sends a friend adding request through message to the application server.

进一步地,用户Alisa的手机100接收来自应用服务器的好友添加请求通过消息,然后手机显示如图1D中的(i)所示的用户界面180。在用户Alisa作用于用户界面180中的Lucas好友控件181的点击操作后,手机显示如图1D中的(j)所示的用户界面190。用户界面190包括用于提示用户Alisa的手机100验证通过的消息,用户Alisa可以在用户界面190中向对方发送即时消息和接收来自对方的即时消息。Further, themobile phone 100 of the user Alisa receives the friend adding request pass message from the application server, and then the mobile phone displays theuser interface 180 as shown in (i) in FIG. 1D . After the user Alisa acts on the click operation of theLucas friend control 181 in theuser interface 180, the mobile phone displays theuser interface 190 as shown in (j) in FIG. 1D. Theuser interface 190 includes a message for prompting the user Alisa'smobile 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 theuser interface 190 .

可见,在上述用户Alisa添加好友Lucas的过程中,用户Alisa打开

Figure BDA0002924900840000138
应用之后需要经过多次手动操作,才能够完成好友添加,导致用户操作繁琐,耗时较长,用户体验较差,不利于社交类应用的推广,尤其不利于新上市的社交类应用的推广。It can be seen that in the process of the above-mentioned user Alisa adding his friend Lucas, the user Alisa opened the
Figure BDA0002924900840000138
After the application, many manual operations are required to complete the addition of friends, which leads to cumbersome user operations, time-consuming, and poor user experience, which is not conducive to the promotion of social applications, especially the promotion of newly launched social applications.

为了解决上述的技术问题,本申请提出了一种群组或好友添加方法,该方法可以通过超短距帧以及无线保真(wireless fidelity,Wi-Fi)网络感知技术添加群组成员或添加好友,因为超短距帧仅能与发送方在预设的安全距离之内的电子设备接收,可保证通信的安全性。此外,该方法在保证信息安全的基础上,降低用户之间添加好友的复杂度,改善用户体验,提高沟通效率。In order to solve the above technical problems, the present application proposes a group or friend adding method, which can add group members or add friends through ultra-short-range frames and wireless fidelity (wireless fidelity, Wi-Fi) network awareness technology , because the ultra-short-range frame can only be received by electronic devices within a preset safe distance of the sender, which can ensure the security of communication. In addition, on the basis of ensuring information security, the method reduces the complexity of adding friends between users, improves user experience, and improves communication efficiency.

本申请实施例提供的好友添加方法可以适用于如图2所示的通信系统架构中。如图2所示,多个电子设备(包含但不限于电子设备100、电子设备200…)中的至少一个电子设备能够支持发送超短距帧。比如,电子设备100能够发送超短距帧。在电子设备100和电子设备200之间的距离小于或者等于预设的安全距离时,电子设备200能够接收到来自电子设备100的超短距帧。这样可以保证超短距帧中的内容不被其它电子设备获取,电子设备200从超短距帧中获取用户帐号或群组帐号,然后可以进行好友添加或群组成员添加。The friend adding method provided by the embodiment of the present application may be applicable to the communication system architecture as shown in FIG. 2 . As shown in FIG. 2 , at least one electronic device among the plurality of electronic devices (including but not limited to theelectronic device 100 , theelectronic device 200 . . . ) can support the transmission of ultra-short-range frames. For example, theelectronic device 100 can transmit ultra-short-range frames. When the distance between theelectronic device 100 and theelectronic device 200 is less than or equal to the preset safety distance, theelectronic device 200 can receive the ultra-short-range frame from theelectronic device 100 . This ensures that the content in the ultra-short-range frame is not acquired by other electronic devices, and theelectronic device 200 obtains the user account or group account from the ultra-short-range frame, and then can add friends or group members.

可以理解地,上述电子设备100和电子设备200在图2中均以手机为例进行示意性举例。电子设备100和电子设备200还可以为诸如智能音箱、智能手表、智能手环、智能电视(也称为智慧屏)、智能家居设备等任意电子设备。图2所示的系统还可以包括其它电子设备。本申请实施例对此不作限制。It can be understood that the above-mentionedelectronic device 100 andelectronic device 200 are both illustrated by taking a mobile phone as an example in FIG. 2 . Theelectronic device 100 and theelectronic 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 Figure 2 may also include other electronic devices. This embodiment of the present application does not limit this.

图2中各电子设备可以通过通信网络进行通信,也可以通过通信网络与服务器相互通信。该通信网络可以是局域网,也可以是通过中继(relay)设备转接的广域网,或者由局域网和广域网组成的混合组网等。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.

其中,当该通信网络为局域网时,示例性的,该通信网络可以是Wi-Fi热点网络、Wi-Fi点到点(peer to peer,P2P)网络、蓝牙网络、Zigbee网络或近场通信(near fieldcommunication,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所示的场景中,不同电子设备通过通信网络交互的数据,包括但不限于:用户帐号或群组帐号、图片、文本、视频,或者电子设备对图片、文本或视频等对象处理后的结果中的至少一种。Wherein, 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. 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 evolved public land mobile network (PLMN), Internet, etc. In the scenario shown in FIG. 2, 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.

以下介绍本申请实施例提供的电子设备、用于这样的电子设备的用户界面、以及用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是诸如智能手机、平板电脑、膝上型计算机(Laptop)、具备无线通讯功能的可穿戴电子设备(比如,智能手表)等便携式电子设备。应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是固定式电子设备(比如,台式计算机等)。在一些实施例中,电子设备可以是智能家居设备,诸如智能音箱等。The electronic device provided by the embodiments of the present application, a user interface for such an electronic device, and an embodiment for using such an electronic device are described below. In some embodiments, 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.

示例性地,图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等。Exemplarily, FIG. 3A shows the hardware structure of theelectronic device 100 . As shown in FIG. 3A, theelectronic device 100 includes aprocessor 310, anexternal memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, acharging 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, A display screen 394, a subscriber identification module (SIM)card interface 395, and the like. 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. Sensor 380L,bone conduction sensor 380M, etc.

处理器310可以包括一个或多个处理单元。例如:处理器310可以包括应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processingunit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。Processor 310 may include one or more processing units. For example, theprocessor 310 may include an application processor (AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (ISP), a controller, a video encoder A decoder, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

电子设备通过GPU,显示屏394,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏394和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器310可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。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.

电子设备可以通过ISP、摄像头393、视频编解码器、GPU、显示屏394以及应用处理器等实现拍摄功能。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.

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卡。TheSIM card interface 395 is used to connect a SIM card. The SIM card can be inserted into theSIM card interface 395 or pulled out from theSIM 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. TheSIM card interface 395 can support Nano SIM card, Micro SIM card, SIM card and so on. The sameSIM card interface 395 can insert multiple cards at the same time. The types of the plurality of cards may be the same or different. TheSIM card interface 395 can also be compatible with different types of SIM cards. TheSIM 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. In some embodiments, the electronic device employs an eSIM, ie: an embedded SIM card.

电子设备的无线通信功能可以通过天线1、天线2、移动通信模块350、无线通信模块360、调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the electronic device may be implemented by the antenna 1, theantenna 2, themobile communication module 350, thewireless communication module 360, the modulation and demodulation processor, the baseband processor, and the like. Antenna 1 andAntenna 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. For example, 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.

移动通信模块350可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块350可以包括至少一个滤波器、开关、功率放大器、低噪声放大器(low noise amplifier,LNA)等。移动通信模块350可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块350还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块350的至少部分功能模块可以被设置于处理器310中。在一些实施例中,移动通信模块350的至少部分功能模块可以与处理器310的至少部分模块被设置在同一个器件中。Themobile communication module 350 can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the electronic device. Themobile communication module 350 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. Themobile 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. Themobile 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 . In some embodiments, at least part of the functional modules of themobile communication module 350 may be provided in theprocessor 310 . In some embodiments, at least part of the functional modules of themobile communication module 350 may be provided in the same device as at least part of the modules of theprocessor 310 .

无线通信模块360可以提供应用在电子设备上的包括无线局域网(wirelesslocal 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转为电磁波辐射出去。Thewireless communication module 360 can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite systems ( global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared (infrared radiation, IR) technology and other wireless communication solutions. Thewireless communication module 360 may be one or more devices integrating at least one communication processing module. Thewireless communication module 360 receives electromagnetic waves via theantenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to theprocessor 310 . Thewireless communication module 360 can also receive the signal to be sent from theprocessor 310 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through theantenna 2 .

在一些实施例中,电子设备的天线1和移动通信模块350耦合,天线2和无线通信模块360耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址接入(code divisionmultiple 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技术等。In some embodiments, the antenna 1 of the electronic device is coupled with themobile communication module 350, and theantenna 2 is coupled with thewireless communication module 360, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code Wideband 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.

可以理解的是,图3A所示的部件并不构成对电子设备的具体限定,电子设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。此外,图3A中的部件之间的组合/连接关系也是可以调整修改的。It can be understood that the components shown in 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. In addition, the combination/connection relationship between the components in FIG. 3A can also be adjusted and modified.

图3B为本申请实施例提供的电子设备100的软件结构框图。分层架构将软件分成若干层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在本申请实施例中,软件系统分为三层,从上至下分别为应用程序层,服务层、操作系统(operatingsystem,OS)层。应用程序层可以包括一系列应用程序。如图3B所示,应用程序层可以包括社交应用,联系人,日历,短信等程序。FIG. 3B is a block diagram of the software structure of theelectronic 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. In the embodiment of the present application, 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.

服务层包括但不限于超短距服务等多种服务。应用程序层中的应用可以向服务层的超短距服务发起注册,然后就能够接收到来自超短距服务的超短距事件通知。其中,超短距服务包括超短距事件注册、超短距事件通知、收发超短距包等服务。超短距服务是为了能够给支持超短距服务的应用提供使用超短距的能力,以及为了让未启动的应用依旧能够接收到订阅的超短距包,所以该软件结构在服务层设有超短距服务。示例性地,社交应用向超短距服务注册自己所关注的超短距包的特征,比如使用Wi-Fi感知(NAN)的服务名(servicename)和包的特征值(某个字段值为多少)。超短距包可以是比如Wi-Fi感知(NAN)的服务发现帧(service discovery frame,SDF),也可以是蓝牙的广播信标(beacon)帧,当然也可以不限于上述两种帧。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. Among them, 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 it is concerned about with the ultra-short-distance service, such as the service name (servicename) using Wi-Fi awareness (NAN) and the characteristic value of the packet (what is the value of a certain field? ). 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, which is of course not limited to the above two frames.

操作系统层包括协议栈和驱动。其中,协议栈包括BLE协议栈、Wi-Fi协议栈、NAN协议栈。驱动包括超短距模式管控、超短距传输控制、超短距占空比控制、Wi-Fi驱动、蓝牙驱动和超短距包收发等。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.

在本申请实施例中,电子设备100可以包括Wi-Fi芯片、蓝牙芯片和Zigbee芯片等中的至少一种。当Wi-Fi、蓝牙芯片或Zigbee芯片等任一芯片接收到超短距帧后,会通过操作系统层传递给服务层中的超短距服务,超短距服务匹配超短距包的特征,再传递给应用程序层中的社交应用。如果社交应用未启动,超短距服务还能够通过超短距事件通知调用社交应用,然后再将超短距包传递给社交应用。而当社交应用需要发送超短距包时,可以使用超短距服务提供的接口发送超短距包,经由操作系统层通过Wi-Fi或者蓝牙芯片发出。In this embodiment of the present application, theelectronic device 100 may include at least one of a Wi-Fi chip, a Bluetooth chip, a Zigbee chip, and the like. When 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. When 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.

在一种示例中,图4A示出了本申请实施例提供的电子设备100中的无线通信模块及天线的一种原理结构。如图4A所示,电子设备100可以包括处理器310,无线通信模块360,第一天线和第二天线。In an example, FIG. 4A shows a principle structure of a wireless communication module and an antenna in anelectronic device 100 provided by an embodiment of the present application. As shown in FIG. 4A , theelectronic device 100 may include aprocessor 310, awireless communication module 360, a first antenna and a second antenna.

其中,第一天线和第二天线用于发射和接收电磁波。进一步的,无线通信模块360将从第一天线或第二天线接收的电磁波转换为信号,并将信号发送至处理器310进行处理;或者无线通信模块360从处理器310接收待发送的信号,经由第一天线或第二天线转为电磁波辐射出去。Among them, the first antenna and the second antenna are used for transmitting and receiving electromagnetic waves. Further, thewireless communication module 360 converts the electromagnetic wave received from the first antenna or the second antenna into a signal, and sends the signal to theprocessor 310 for processing; or thewireless communication module 360 receives the signal to be sent from theprocessor 310, via The first antenna or the second antenna is converted into electromagnetic waves and radiated out.

本申请实施例中,第一天线工作时的无线发射距离大于第二天线工作时的无线发射距离。第一天线发射信号的第一发射距离大于预设的安全距离,第二天线发射信号的第二发射距离小于或等于预设的安全距离。例如,第一天线的第一发射距离的取值范围可以是(4米,20米),第二天线的第二发射距离的取值范围可以是(3cm,2米)。第一发射距离的取值范围可以根据第一天线工作时的无线发射功率覆盖的最小距离和最大距离确定的,也可以是开发人员预先设定的;第二发射距离的取值范围可以是根据第二天线工作时的无线发射功率覆盖的最小距离和最大距离确定的,也可以是开发人员预先设定的。其中,预设的安全距离为电子设备之间交互秘密信息的安全距离。预设的安全距离可以是根据第二天线工作时的无线发射功率覆盖的最大距离确定的,也可以是开发人员预先设定的距离。比如,预设的安全距离可为10cm、5cm等。示例性地,预设的安全距离的取值范围可以为(0cm,30cm)。这样,在电子设备100与电子设备200之间的距离小于或等于预设的安全距离时,电子设备200能够接收到电子设备100发送的秘密信息。这样,降低了安全风险。In the embodiment of the present application, 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, and the second transmission distance of the signal transmitted by the second antenna is less than or equal to the preset safety distance. For example, the value range of the first transmission distance of the first antenna may be (4 meters, 20 meters), and 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. For example, the preset safety distance may be 10 cm, 5 cm, or the like. Exemplarily, the value range of the preset safety distance may be (0 cm, 30 cm). In this way, when the distance between theelectronic device 100 and theelectronic device 200 is less than or equal to the preset safe distance, theelectronic device 200 can receive the secret information sent by theelectronic device 100 . In this way, security risks are reduced.

在一些实施例中,处理器310可控制第一天线与第二天线的切换。当电子设备100采用第一天线时,在电子设备100与电子设备200之间的距离小于第一发射距离时,电子设备100能够接收到电子设备200发送的消息;当电子设备200采用第二天线时,在电子设备100与另一电子设备200之间的距离小于第二发射距离,电子设备100能够接收到电子设备200发送的消息。在一些实施例中,第一发射距离和第二发射距离也可分别称为第一距离和第二距离。In some embodiments, theprocessor 310 may control the switching of the first antenna and the second antenna. When theelectronic device 100 adopts the first antenna, when the distance between theelectronic device 100 and theelectronic device 200 is less than the first transmission distance, theelectronic device 100 can receive the message sent by theelectronic device 200; when theelectronic device 200 adopts the second antenna When the distance between theelectronic device 100 and anotherelectronic device 200 is smaller than the second transmission distance, theelectronic device 100 can receive the message sent by theelectronic device 200 . In some embodiments, the first transmission distance and the second transmission distance may also be referred to as the first distance and the second distance, respectively.

在另一种示例中,图4B示出了本申请实施例提供的电子设备100中的无线通信模块及天线的另一种原理结构。如图4B所示,电子设备100可以包括处理器310,无线通信模块360和第一天线;其中,无线通信模块360包括无线模块3601和可变阻抗电路模块3602。第一天线用于发射和接收无线信号。示例性地,可变阻抗电路模块3602可为由可变阻抗组成的电路或者集成线路等。处理器310通过控制调整可变阻抗电路模块3602的阻抗值,调节加载于第一天线的无线发射功率,从而控制第一天线发射无线信号时的发射距离。示例性地,可变阻抗电路模块3602的阻抗值为第一阻抗值时,第一天线的发射功率为第一发射功率,此时第一天线发射无线信号的距离为第一发射距离(实现图4A中“第一天线”的功能);可变阻抗电路模块3602的阻抗值为第二阻抗值时,第一天线的发射功率为第二发射功率,此时第一天线发射无线信号的距离为第二发射距离(实现图4A中“第二天线”的功能)。其中,第一发射功率大于第二发射功率;第一发射距离大于预设的安全距离,第二发射距离小于或等于预设的安全距离。在一些实施例中,第一发射距离和第二发射距离可分别称为第一距离和第二距离。In another example, FIG. 4B shows another principle structure of the wireless communication module and the antenna in theelectronic device 100 provided by the embodiment of the present application. As shown in FIG. 4B , theelectronic device 100 may include aprocessor 310 , awireless communication module 360 and a first antenna; wherein thewireless communication module 360 includes awireless module 3601 and a variableimpedance circuit module 3602 . The first antenna is used to transmit and receive wireless signals. Exemplarily, the variableimpedance circuit module 3602 may be a circuit composed of variable impedances, an integrated circuit, or the like. Theprocessor 310 controls and adjusts the impedance value of the variableimpedance 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. Exemplarily, when the impedance value of the variableimpedance circuit module 3602 is the first impedance value, the transmit power of the first antenna is the first transmit power, and the distance at which the first antenna transmits the wireless signal is the first transmit distance (implementation diagram). 4A); when the impedance value of the variableimpedance circuit module 3602 is the second impedance value, the transmit power of the first antenna is the second transmit power, and 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 ). Wherein, the first transmit power is greater than the second transmit power; the first transmit distance is greater than a preset safe distance, and the second transmit distance is less than or equal to the preset safe distance. In some embodiments, the first transmission distance and the second transmission distance may be referred to as a first distance and a second distance, respectively.

可以理解的是,图4A对应的一种示例和图4B对应的另一种示例中示意的原理结构并不构成对电子设备100中的无线通信模块360及天线的具体限定。在另一些实施例中,电子设备100中的无线通信模块360及天线的结构可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the principle structures illustrated in one example corresponding to FIG. 4A and another example corresponding to FIG. 4B do not constitute specific limitations on thewireless communication module 360 and the antenna in theelectronic device 100 . In other embodiments, the structure of thewireless communication module 360 and the antenna in theelectronic 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.

应理解,图4A所示的无线通信模块360可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片,也可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片及与其匹配的电路。图4B所示的无线模块3601可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片,图4B所示的无线通信模块360可以是Wi-Fi芯片、蓝牙芯片或者ZigBee芯片及与其匹配的电路。It should be understood that thewireless 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. Thewireless module 3601 shown in FIG. 4B may be a Wi-Fi chip, a Bluetooth chip or a ZigBee chip, and thewireless 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.

示例性地,图5A-图5C示出了图4A中第二天线的三种实现方式。如图5A-图5C所示,第一天线和第二天线可以共用一部分走线。其中,第一天线也可称为真天线或强天线,第二天线也可称为假天线或弱天线。Exemplarily, Figures 5A-5C show three implementations of the second antenna in Figure 4A. As shown in FIGS. 5A-5C , 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, and the second antenna may also be called a false antenna or a weak antenna.

本申请实施例中电子设备的第一天线和第二天线可以通过射频开关进行切换。物理上可以将第二天线与射频开关(如图5A-图5C中虚线框中所示为第二天线)都置于屏蔽罩内或者将第二天线置于芯片内。In the embodiment of the present application, the first antenna and the second antenna of the electronic device may be switched by a radio frequency switch. Physically, 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:

(1)减小天线长度,从而减小辐射到空气中的电磁波;(1) Reduce the length of the antenna, thereby reducing the electromagnetic waves radiated into the air;

(2)减小辐射效率,通过阻抗将一部分的电磁波辐射转化为热能消耗掉;(2) Reduce the radiation efficiency, and convert a part of the electromagnetic wave radiation into heat energy and consume it through impedance;

(3)降低回波损耗,将部分射频能量反射回芯片内部等。(3) Reduce the return loss, reflect part of the radio frequency energy back into the chip, etc.

第二天线具体的实现可以采用:The specific implementation of the second antenna can be as follows:

(i)将天线变短;(i) shorten the antenna;

(ii)将真天线路径中某点断开,或者在该点通过电阻、电感或者电容接地;(ii) disconnect a point in the true antenna path, or at that point through a resistor, inductor, or capacitor to ground;

(iii)使用屏蔽罩等。(iii) Use a shielding case or the like.

应理解,上述第二天线具体的实现(i)和(ii)可以在PCB板上或者芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)内部实现。It should be understood that 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).

还应理解,上述屏蔽罩的作用是减小对外辐射信号的强度,以达到削弱辐射的目的。It should also be understood that 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.

还应理解,上述将天线变短是指第二天线相比于第一天线来说,第二天线更短。图5A至图5C所示的三种第二天线的结构,第二天线如图5A至图5C的虚线框中的结构所示。图5A至图5C中第一天线的结构都是通过射频输入输出(radio frequency input/output,RFIO)引脚连接滤波电路(例如,π型电路)、匹配电路(例如,π型电路)以及匹配电路外的天线体(例如,该天线体可以是一段金属走线)。图5A中虚线框所示的第二天线a、图5B中虚线框所示的第二天线b以及图5C中虚线框所示的第二天线c的长度不同,但是相比于第一天线都更短。滤波电路的作用是防止干扰,匹配电路是用来与第一天线匹配。It should also be understood that 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. An antenna body outside the circuit (eg, the antenna body may 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.

示例性的,如图5A所示,第二天线a可以位于屏蔽罩内。其中,第二天线a可以包括屏蔽罩内芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)的RFIO引脚和2路开关中的第一路开关(第一路开关不连接任何器件)。有时,第二天线a还可包括在RFIO引脚和第一路开关之间的走线。其中,2路开关指的是走线或RFIO引脚与滤波电路之间的开关。通过该2路开关可以将走线或RFIO引脚,与滤波电路连通或者断开。第一路开关为图5A所示的与RFIO引脚或走线相连、且与滤波电路之间断开的开关。应理解,本申请实施例中的2路开关可以是单刀双掷开关。Exemplarily, as shown in FIG. 5A , the second antenna a may be located in the shielding case. Wherein, 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). Sometimes, the second antenna a may also include a trace between the RFIO pin and the first switch. Among them, 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.

示例性的,如图5B所示,第二天线b可以位于屏蔽罩内。其中,第二天线b可以包括屏蔽罩内芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)的RFIO引脚、2路开关的第一路开关(第一路开关连接电阻)和匹配器件。有时,第二天线b还可包括在RFIO引脚和第一路开关之间的第一走线。有时,第二天线b还可包括匹配器件与地之间的第二走线。匹配器件可以为电阻。通过电阻接地可以将一部分的电磁波辐射转化为热能消耗掉,从而减小了第二天线b的辐射效率。其中,所述2路开关指的是RFIO引脚或第一走线与电阻、滤波电路之间的开关,通过该开关,可以将RFIO引脚或第一走线与电阻相连、与滤波电路断开,或者可以将RFIO引脚或第一走线与电阻断开、而与滤波电路相连通。所述的第一路开关为所述2路开关中与匹配器件相连、且与滤波电路断开的开关。Exemplarily, as shown in FIG. 5B , the second antenna b may be located in the shielding case. Wherein, 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. Sometimes, the second antenna b may also include a first trace between the RFIO pin and the first switch. Sometimes, 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.

示例性的,如图5C所示,第二天线c可以位于屏蔽罩内。其中,经由芯片匹配的滤波电路后接匹配器件(例如,电阻)到地。第二天线c可以包括屏蔽罩内芯片(Wi-Fi芯片、蓝牙芯片或者ZigBee芯片)的RFIO引脚、滤波电路、2路开关的第一路开关(第一路开关连接电阻)和匹配器件(比如,电阻)。有时,第二天线c还可以包括RFIO引脚与滤波电路之间的第一走线。有时,第二天线c还可以包括滤波电路与匹配器件之间的第二走线。通过匹配器件(比如,电阻)接地可以将一部分的电磁波辐射转化为热能消耗掉,从而减小了第二天线c的辐射效率。其中,所述2路开关指的是屏蔽罩内的滤波电路与匹配器件、屏蔽罩外的匹配电路之间的开关。通过该2路开关,可以将屏蔽罩内的滤波电路与匹配器件相连、与屏蔽罩外的匹配电路断开;或者,可以将屏蔽罩内的滤波电路与匹配器件断开、而与屏蔽罩外的匹配电路相连通。所述的第一路开关为用于连接屏蔽罩内的滤波电路与匹配器件的开关。Exemplarily, as shown in FIG. 5C , the second antenna c may be located in the shielding case. Wherein, 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). Sometimes, the second antenna c may also include a first trace between the RFIO pin and the filter circuit. Sometimes, the second antenna c may further include a second wire between the filter circuit and the matching device. Part of the electromagnetic wave radiation can be converted into heat energy and consumed by grounding a matching device (eg, a resistor), thereby reducing the radiation efficiency of the second antenna c. Wherein, 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. Through the 2-way switch, the filter circuit in the shield can be connected to the matching device and disconnected from the matching circuit outside the shield; connected to the matching circuit. The first switch is a switch used to connect the filter circuit and the matching device in the shield.

应理解,上述图5A至图5B中的第一天线可以包括RFIO引脚、2路开关中的第二路开关,滤波电路、匹配电路以及匹配电路外连接的天线体。有时,图5A至图5B中的第一天线还可以包括RFIO引脚与所述2路开关中的第二路开关之间的走线。所述第二路开关为用于连接RFIO引脚与滤波电路的开关。It should be understood that 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. Sometimes, 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.

上述图5C中的第一天线可以包括RFIO引脚、滤波电路、2路开关中的第二路开关、匹配电路以及匹配电路外连接的天线体。有时,图5C中的第一天线还可以包括RFIO引脚与滤波电路之间的走线。所述第二路开关为用于连接屏蔽罩内的滤波电路与屏蔽罩外的匹配电路的开关。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. Sometimes, 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.

应理解,上述图5A至5C为物理上的第一天线和第二天线,本申请实施例中电子设备也可以物理上只有一根天线,但是逻辑上包括第一天线和第二天线。例如,电子设备可以通过调节寄存器的值来屏蔽芯片内部的多级放大器,从而使得物理上的天线的发射功率为第一发射功率,此时可以认为是逻辑上的第一天线;电子设备也可以通过调节寄存器的值从而使得物理上的天线的发射功率为第二发射功率,此时可以认为是逻辑上的第二天线;其中,第一发射功率大于第二发射功率。It should be understood that the above-mentioned FIGS. 5A to 5C are the physical first antenna and the second antenna. In the embodiment of the present application, the electronic device may also have only one antenna physically, but logically includes the first antenna and the second antenna. For example, 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.

本申请实施例中,电子设备通过芯片内部寄存器的值来切换逻辑上的第一天线和第二天线,与通过射频开关来切换物理上的第一天线和第二天线,可以达到相同的效果。In the embodiment of the present application, 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.

以上不同的第二天线结构配合Wi-Fi芯片、蓝牙芯片或者ZigBee芯片的不同发射功率(Tx power)的设置,可以达到不同的超短距通讯的要求(例如,从10cm到2m)。The above different second antenna structures can meet different ultra-short-range communication requirements (eg, from 10cm to 2m) in combination with different Tx power settings of the Wi-Fi chip, Bluetooth chip or ZigBee chip.

示例性的,表1示出了几种不同的第二天线结构配合Wi-Fi芯片的不同发射功率的通讯距离。Exemplarily, Table 1 shows the communication distances of several different second antenna structures with different transmit powers of the Wi-Fi chip.

表1Table 1

Figure BDA0002924900840000191
Figure BDA0002924900840000191

示例性的,表2示出了几种不同的第二天线结构配合蓝牙芯片时不同发射功率的通讯距离。Exemplarily, Table 2 shows the communication distances of different transmit powers when several different second antenna structures cooperate with the Bluetooth chip.

表2Table 2

Figure BDA0002924900840000201
Figure BDA0002924900840000201

示例性的,表3示出了几种不同的第二天线结构配合ZigBee芯片时不同发射功率的通讯距离。Exemplarily, Table 3 shows the communication distances of different transmit powers when several different second antenna structures cooperate with the ZigBee chip.

表3table 3

Figure BDA0002924900840000202
Figure BDA0002924900840000202

由于芯片内物理器件的特性,天线最大发射功率和最小发射功率之差是相关联的。如果把电子设备的最小发射功率降得很低,则最大发射功率也会被降低,这样就不满足正常工作时的距离要求。由于不同的电子设备的结构不同以及对电子设备的安全性能要求不同,所以电子设备的生产厂商可以采用不同的第二天线结构以及发射功率来保证电子设备的通讯距离。示例性的,对于不同的电子设备生产厂商,其电子设备外壳的厚度可能不同,那么在第二天线结构相同以及发射功率相同的情况下,电子设备能够被发现的通讯距离也可能不同。不同的电子设备生产厂商可以根据其电子设备本身的结构,配合第二天线的结构以及一定的发射功率,从而结合测试,得出对应安全距离的发射功率。用户可根据实际采用的Wi-Fi芯片、蓝牙芯片、ZigBee芯片,参考表1、表2和表3,对三种第二天线(第二天线a、第二天线b和第二天线c)设置发射功率,并结合测试结果,调整发射功率,使得第二天线在发射时达到对应的安全距离。Due to the characteristics of the physical device on the 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.

结合上述示例,如图6所示,下文以位于位置0的电子设备100,以及位于位置1或位置2的电子设备200,第一发射距离是5米,第二发射距离是3cm为例。In combination with the above examples, as shown in FIG. 6 , the following takes theelectronic device 100 at position 0 and theelectronic device 200 at position 1 orposition 2, the first emission distance is 5 meters, and the second emission distance is 3 cm as an example.

当电子设备100在位置0通过第一天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离小于第一发射距离,电子设备200可接收到电子设备100发射的无线信号。当电子设备100在位置0通过第二天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离大于第二发射距离,电子设备200无法接收到电子设备100发射的无线信号;而在电子设备200位于位置2,此时电子设备100与电子设备200之间的距离小于第二发射距离,电子设备200可以接收到电子设备100发射的无线信号。第一发射距离、第二发射距离可分别为第一距离、第二距离。When theelectronic device 100 transmits a signal through the first antenna at position 0, theelectronic device 200 is at position 1, and the distance between theelectronic device 100 and theelectronic device 200 is smaller than the first transmission distance, and theelectronic device 200 can receive theelectronic device 100 transmitted wireless signal. When theelectronic device 100 transmits a signal through the second antenna at position 0, theelectronic device 200 is at position 1, and the distance between theelectronic device 100 and theelectronic device 200 is greater than the second transmission distance, and theelectronic device 200 cannot receive theelectronic device 100. When theelectronic device 200 is located atposition 2, and the distance between theelectronic device 100 and theelectronic device 200 is smaller than the second transmission distance, theelectronic device 200 can receive the wireless signal transmitted by theelectronic device 100. The first transmission distance and the second transmission distance may be the first distance and the second distance, respectively.

相应地,当电子设备100在位置0通过第一发射功率下的第一天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离小于第一发射距离,电子设备200可接收到电子设备100发射的无线信号。当电子设备100在位置0通过第二发射功率下的第一天线发射信号时,电子设备200位于位置1,此时电子设备100与电子设备200之间的距离大于第二发射距离,电子设备200无法接收到电子设备100发射的无线信号;而在电子设备200位于位置2,此时电子设备100与电子设备200之间的距离小于第二发射距离,电子设备200可以接收到电子设备100发射的无线信号。第一发射距离、第二发射距离可分别为第一距离、第二距离。Correspondingly, when theelectronic device 100 transmits a signal at the position 0 through the first antenna under the first transmit power, theelectronic device 200 is located at the position 1, and the distance between theelectronic device 100 and theelectronic device 200 is smaller than the first transmission distance at this time, Theelectronic device 200 may receive the wireless signal transmitted by theelectronic device 100 . When theelectronic device 100 transmits a signal through the first antenna under the second transmit power at the position 0, theelectronic device 200 is located at the position 1, and the distance between theelectronic device 100 and theelectronic device 200 is greater than the second transmission distance, and theelectronic device 200 The wireless signal transmitted by theelectronic device 100 cannot be received; however, when theelectronic device 200 is located atposition 2, and the distance between theelectronic device 100 and theelectronic device 200 is smaller than the second transmission distance, theelectronic device 200 can receive the signal transmitted by theelectronic device 100. wireless signal. The first transmission distance and the second transmission distance may be the first distance and the second distance, respectively.

应理解,在上述实施例中所提到的预设的安全距离(比如,30cm)内,即使使用抓包器连错误包也无法抓到。实际中,电子设备100与电子设备200之间实际的距离可能比预设的安全距离还要小。比如,预设的安全距离为30cm;在电子设备100发送的超短距帧被电子设备200接收到时,电子设备100与电子设备200之间的实际距离小于30cm。It should be understood that within the preset safe distance (for example, 30 cm) mentioned in the above-mentioned embodiment, even if a packet grabber is used, even the wrong packet cannot be captured. In practice, the actual distance between theelectronic device 100 and theelectronic device 200 may be smaller than the preset safety distance. For example, the preset safe distance is 30 cm; when the ultra-short-range frame sent by theelectronic device 100 is received by theelectronic device 200, the actual distance between theelectronic device 100 and theelectronic device 200 is less than 30 cm.

具体地,可以通过设置发射功率的大小来设置不同的发射距离。比如,要求对应于第一天线的无线发射功率,比对应于第二天线的无线发射功率,要多至少一定的功率。Specifically, different transmission distances can be set by setting the size of the transmission power. For example, 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.

另外,对于第二天线的无线发射功率,可以要求产品表面含外置天线任一点无线发射功率不超过预设的功率(比如,-65dBm等),以满足预设的安全距离的要求。In addition, for the wireless transmission power of 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.

以下结合附图,具体介绍本申请实施例提供的一种群组成员或好友的添加方法。图7为本申请实施例提供的一种应用场景示意图。如图7所示,Alisa的电子设备为电子设备100,Lucas的电子设备为电子设备200。Alisa和Lucas为用户的示意性举例。电子设备100和电子设备200碰一碰或相互靠近一下,即可加入群组或添加好友。其中,电子设备100可以包括第一天线和第二天线,电子设备200可以包括第三天线和第四天线。需要指出的是,第三天线与第一天线属于同一种天线,第四天线和第二天线属于同一种天线。A method for adding group members or friends provided by an embodiment of the present application will be described in detail below with reference to the accompanying drawings. FIG. 7 is a schematic diagram of an application scenario provided by an embodiment of the present application. As shown in FIG. 7 , the electronic device of Alisa is theelectronic device 100 , and the electronic device of Lucas is theelectronic device 200 . Alisa and Lucas are illustrative examples for users. When theelectronic device 100 and theelectronic device 200 touch or get close to each other, they can join a group or add friends. Theelectronic device 100 may include a first antenna and a second antenna, and theelectronic 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.

对于电子设备200来说,第四天线属于电子设备200的“第二天线”。这是为了避免出现“第二天线”在使用上的混淆,使用“第四天线”来表达。相应地,第三天线属于电子设备200的“第一天线”。也是出于避免混淆的原因,使用“第三天线”来表达。也就是说,使用“第四天线”来表达,不是说电子设备200至少包括四条天线;而是为了避免表达上的混淆。即电子设备200可以包括“第三天线”和“第四天线”两条天线,并不要求移动设备具有四条天线。For theelectronic device 200 , the fourth antenna belongs to the “second antenna” of theelectronic device 200 . This is to avoid confusion in the use of the "second antenna", and use the "fourth antenna" to express. Accordingly, the third antenna belongs to the "first antenna" of theelectronic device 200 . Also for reasons of avoiding confusion, the expression "third antenna" is used. That is to say, the expression "fourth antenna" does not mean that theelectronic device 200 includes at least four antennas; it is to avoid confusion in expression. That is, theelectronic device 200 may include two antennas, the "third antenna" and the "fourth antenna", and the mobile device is not required to have four antennas.

可替换地,电子设备100可以包括第一天线;电子设备200包括第三天线。电子设备100的第一天线,按照图4B所示的机制,分别以第一发射功率和第二发射功率来发射信号,以分别实现强天线或弱天线的功能。Alternatively, theelectronic device 100 may include the first antenna; theelectronic device 200 may include the third antenna. According to the mechanism shown in FIG. 4B , the first antenna of theelectronic 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.

可选地,电子设备200的第三天线,也可以按照图4B所示的机制,分别以第三发射功率和第四发射功率来发射信号,以分别实现强天线或弱天线的功能。此时,对于电子设备200来说,第四发射功率属于电子设备200的“第二发射功率”。这是为了避免出现“第二发射功率”在使用上的混淆,使用“第四发射功率”来表达。相应地,第三发射功率属于电子设备200的“第一发射功率”。也是出于避免混淆的原因,使用“第三发射功率”来表达。也就是说,使用“第四发射功率”来表达,不是说电子设备200包括的天线有四个发射功率;而是为了避免表达上的混淆。即电子设备200可以使用“第三发射功率”和“第四发射功率”的天线,并不要求电子设备200的天线具有四个发射功率。Optionally, the third antenna of theelectronic 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. At this time, for theelectronic device 200 , the fourth transmission power belongs to the “second transmission power” of theelectronic device 200 . This is to avoid confusion in the use of "second transmit power", and use "fourth transmit power" to express. Accordingly, the third transmission power belongs to the "first transmission power" of theelectronic device 200 . Also for reasons of avoiding confusion, 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 theelectronic device 200 has four transmission powers; it is to avoid confusion in expression. That is, theelectronic device 200 can use the antennas of the "third transmit power" and the "fourth transmit power", and the antenna of theelectronic device 200 is not required to have four transmit powers.

为了更为清楚地阐述,下面分为场景一和场景二分别阐述,并将电子设备100和电子设备200分别具体为手机100和手机200。其中,场景一示例性地阐述了Alisa和Lucas在社交应用上互相添加好友的过程;场景二示例性地阐述了在社交应用上,Lucas经Alisa介绍加入群组的过程。需要指出的是,本申请实施例是以非全面屏为示例进行描述,本申请实施例也适用于全面屏,本申请实施例对此不作限定。In order to explain more clearly, the following description is divided into scenario 1 andscenario 2, respectively, and theelectronic device 100 and theelectronic device 200 are specifically themobile phone 100 and themobile phone 200 respectively. 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. It should be noted that 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.

场景一scene one

下面通过实施例一至实施例三来具体阐述场景一下的好友添加方法的交互流程。The following describes the interaction flow of the method for adding friends in the first scenario through the first embodiment to the third embodiment.

实施例一涉及图8A至图8C。图8A示出了场景一下好友添加方法的交互流程图。如图8A所示,该方法具体包括以下步骤: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:

S8700,手机100接收到用户的操作,该操作用于添加好友。S8700, themobile 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.

示例性地,参见图8B中的(a),该用户界面800为用户Alisa的手机100的桌面。其中,用户Alisa的手机100桌面上包括时钟、图库、

Figure BDA0002924900840000221
相册、天气、浏览器、设置以及社交应用等应用程序。当检测到点击社交应用的控件801的操作后,手机100可以显示如图8B中的(b)所示的用户界面810。Illustratively, see (a) in FIG. 8B , theuser interface 800 is the desktop of themobile phone 100 of the user Alisa. Among them, the desktop of user Alisa'smobile phone 100 includes a clock, a gallery,
Figure BDA0002924900840000221
Apps like Photos, Weather, Browser, Settings, and Social Apps. After detecting the operation of clicking thecontrol 801 of the social application, themobile phone 100 may display theuser interface 810 as shown in (b) of FIG. 8B .

参见图8B中的(b),用户界面810为社交应用的显示界面,用户界面810显示有用户Alisa的目前已有的联系人的信息。示例性地,该社交应用的用户界面810上包括扩展控件811,当手机100检测到点击扩展控件811的操作后,显示弹出框8100。当检测到点击添加好友控件8101的操作后,手机100就会通过第一天线发布添加好友服务。Referring to (b) in FIG. 8B , theuser interface 810 is a display interface of a social application, and theuser interface 810 displays the information of the existing contacts of the user Alisa. Exemplarily, theuser interface 810 of the social application includes anextension control 811, and when themobile phone 100 detects an operation of clicking theextension control 811, a pop-up box 8100 is displayed. After detecting the operation of clicking the add friend control 8101, themobile phone 100 will issue the add friend service through the first antenna.

另外,当检测到点击添加好友控件8101的操作后,手机100还可以进一步提示用户Alisa碰一碰用户Lucas的手机200,即手机100显示如图8B的(c)示出的界面820。界面820包括提示用户与好友设备碰一碰的提示框。在收到提示后,用户Alisa可以将手机100靠近或碰触用户Lucas的手机200。In addition, after detecting the operation of clicking the add friend control 8101, themobile phone 100 may further prompt the user Alisa to touch themobile phone 200 of the user Lucas, that is, themobile phone 100 displays theinterface 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 themobile phone 100 close to or touch themobile phone 200 of the user Lucas.

S8701,手机100通过第一天线发布添加好友服务消息。S8701, themobile phone 100 publishes a friend adding service message through the first antenna.

示例性地,当用户Alisa打开手机100的社交应用801中的“添加好友”控件8101,手机100就会发布添加好友服务消息,用于发现周围订阅了该服务的电子设备。Exemplarily, when the user Alisa opens the "add friend" control 8101 in thesocial networking application 801 of themobile phone 100, themobile phone 100 will issue a message of adding a friend service, which is used to discover the surrounding electronic devices subscribed to the service.

示例性地,S8701中的“发布”是以广播的形式。该添加好友服务消息包括手机100的IP地址或MAC地址等唯一标识地址。可选地,该好友添加服务消息还包括社交应用801的标识。通过该标识可唯一识别社交应用801。可选地,该好友添加服务消息还包括用户Alisa在该社交应用上的用户帐号。Exemplarily, "publish" in S8701 is in the form of broadcasting. The friend adding service message includes a unique identification address such as an IP address or a MAC address of themobile phone 100 . Optionally, the friend adding service message further includes the identification of thesocial networking application 801 . Thesocial application 801 can be uniquely identified by this identification. Optionally, the friend adding service message further includes the user account of the user Alisa on the social networking application.

S8702,手机200通过第三天线发送响应消息(例如确认(acknowledge,ACK)信息),该响应消息用于通知手机100已经接收到该服务。S8702, themobile phone 200 sends a response message (eg, acknowledgement (ACK) information) through the third antenna, where the response message is used to notify themobile phone 100 that the service has been received.

需要说明的是,手机200预先已订阅添加好友服务。示例性地,用户Lucas的手机200在打开社交应用时就自动订阅添加好友服务,或者是社交应用作为常驻后台的应用启动时自动订阅添加好友服务。It should be noted that themobile phone 200 has subscribed to the friend adding service in advance. Exemplarily, themobile 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.

示例性地,在手机200接收到添加来自手机100的好友服务消息后,获取到手机100的IP地址或MAC地址等唯一标识地址以及社交应用801的标识。Exemplarily, after themobile phone 200 receives the message of adding a friend service from themobile phone 100 , it acquires the unique identification address such as the IP address or MAC address of themobile phone 100 and the identification of thesocial application 801 .

可选地,该响应消息包括手机200的IP地址或MAC地址等唯一标识地址。Optionally, the response message includes a unique identification address such as an IP address or a MAC address of themobile phone 200 .

需要指出的是,通过上述S8701和S8702,手机100可以获取手机200的IP地址或MAC地址等唯一标识地址,手机200也可以获取手机100的IP地址或MAC地址等唯一标识地址以及社交应用801的标识,后续手机100和手机200之间可以根据上述的唯一标识地址,通过同一社交应用向对方发送消息。It should be pointed out that, through the above S8701 and S8702, themobile phone 100 can obtain the unique identification address such as the IP address or MAC address of themobile phone 200, and themobile phone 200 can also obtain the unique identification address such as the IP address or MAC address of themobile phone 100 and the unique identification address of thesocial application 801. identification, themobile phone 100 and themobile phone 200 can subsequently send messages to each other through the same social application according to the above-mentioned unique identification address.

S8703,手机100收到响应消息后,随机生成密钥,获取到包含密钥的第一消息。S8703, after receiving the response message, themobile phone 100 randomly generates a key, and obtains a first message including the key.

S8704,手机100从第一天线切换至第二天线。S8704, themobile phone 100 switches from the first antenna to the second antenna.

S8705,手机100通过第二天线发送第一消息。S8705, themobile phone 100 sends the first message through the second antenna.

示例性地,当手机100收到响应消息之后,手机100可以通过控制射频开关从第一天线切换至第二天线,然后通过第二天线发送第一消息;此时第一消息属于超短距帧;这样,手机100发送的第一消息不会被距手机100预设安全距离之外的电子设备接收到。Exemplarily, after themobile phone 100 receives the response message, themobile 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 themobile phone 100 will not be received by the electronic device beyond the preset safe distance from themobile phone 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接入同一个路由器场景下的点到点通信。In this embodiment, 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'smobile 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 themobile phone 100 and themobile phone 200 are not connected to the same router, and can also support the point-to-point communication in the scenario where themobile phone 100 and themobile phone 200 are connected to the same router.

在一种可能的实施方式中,手机100通过第二天线发送第一消息,其发送数据和接收数据的成功率有可能会降低,那么手机100可以重复多次发送密钥。In a possible implementation manner, themobile phone 100 sends the first message through the second antenna, and the success rate of sending data and receiving data may be reduced, so themobile phone 100 can repeatedly send the key multiple times.

S8706,在手机200距手机100第二距离内,手机200接收到第一消息,从第一消息中获取到密钥。S8706, within the second distance between themobile phone 200 and themobile phone 100, themobile phone 200 receives the first message, and obtains the key from the first message.

示例性地,在手机200与手机100之间的距离小于预设的安全距离后,手机200可以接收到该第一消息,从中获取密钥。Exemplarily, after the distance between themobile phone 200 and themobile phone 100 is smaller than the preset safe distance, themobile phone 200 may receive the first message and obtain the key therefrom.

S8707,手机200获取手机200中社交应用的用户帐号。S8707, themobile phone 200 acquires the user account of the social application in themobile phone 200.

示例性地,手机200的使用用户Lucas打开社交应用,手机200可以从运行的社交应用获取使用用户Lucas的用户帐号。手机200的社交应用与手机100的社交应用相同。Exemplarily, the user Lucas of themobile phone 200 opens a social application, and themobile phone 200 can obtain the user account of the user Lucas from the running social application. The social application of themobile phone 200 is the same as the social application of themobile phone 100 .

示例性地,S8707中的“社交应用的用户帐号”包括上一次登录该社交应用的用户帐号。Exemplarily, the "user account of the social application" in S8707 includes the user account of the last login to the social application.

S8708,手机200使用该密钥加密手机200中社交应用的用户帐号,生成第二消息,第二消息包括加密后的用户帐号。S8708, themobile phone 200 uses the key to encrypt the user account of the social networking application in themobile phone 200 to generate a second message, where the second message includes the encrypted user account.

示例性地,手机200获取手机200的社交应用的用户帐号,由于手机200为用户Lucas的手机,故一般来说,获取到的手机200的社交应用的用户帐号为Lucas在该社交应用上的用户帐号,使用该密钥加密Lucas在该社交应用上的用户帐号。Exemplarily, themobile phone 200 acquires the user account of the social application of themobile phone 200. Since themobile phone 200 is the mobile phone of the user Lucas, generally speaking, the acquired user account of the social application of themobile phone 200 is the user of Lucas on the social application. Account, use this key to encrypt Lucas' user account on the social app.

示例性地,若用户Lucas同意用户Alisa添加好友,则用户Lucas会将手机200靠近用户Alisa的手机100;或者说,用户Lucas同意用户Alisa的手机100主动靠近自己的手机200;这样,手机200与手机100之间的距离就小于或等于预设的安全距离(如30cm),手机200就可以接收到来自手机100的密钥,然后手机200使用该密钥加密用户Lucas的用户帐号。Exemplarily, if the user Lucas agrees that the user Alisa can add friends, the user Lucas will bring themobile phone 200 close to the user Alisa'smobile phone 100; The distance between themobile phones 100 is less than or equal to the preset safe distance (eg 30cm), themobile phone 200 can receive the key from themobile phone 100, and then themobile phone 200 uses the key to encrypt the user account of the user Lucas.

需要说明的是,本实施例并不限定手机200和手机100靠近的时长或碰在一起的时长。It should be noted that, the present embodiment does not limit the length of time that themobile phone 200 and themobile phone 100 are close to each other or the length of time that they touch each other.

在一种实施方式中,用户Alisa点击添加好友控件8101的操作后,靠近或碰一下用户Lucas的手机200之后,用户Alisa就可以移走手机100。In one embodiment, after the user Alisa clicks the operation of adding a friend control 8101, and then approaches or touches themobile phone 200 of the user Lucas, the user Alisa can remove themobile phone 100.

在一种实施方式中,用户Alisa点击添加好友控件8101的操作后,靠近或碰一下用户Lucas的手机200之后,当用户Alisa的手机收到S8716所示的响应消息,和/或用户Lucas的手机收到S8714所示的响应消息,用户Alisa就可以移走手机100。In one embodiment, after the user Alisa clicks the operation of adding a friend control 8101, and then approaches or touches themobile 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 themobile phone 100.

S8709,手机200将第三天线切换至第四天线。S8709, themobile phone 200 switches the third antenna to the fourth antenna.

S8710,手机200通过第四天线向手机100发送第二消息。S8710, themobile phone 200 sends the second message to themobile phone 100 through the fourth antenna.

也就是说,当用户Lucas的手机200收到第一消息之后,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第二消息;此时第二消息属于超短距帧;这样手机200发送的第二消息不会被预设安全距离之外的电子设备100接收到。That is to say, after themobile phone 200 of the user Lucas receives the first message, themobile phone 200 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 themobile phone 200 will not be received by theelectronic device 100 outside the preset safe distance.

本实施例中,该第二消息可以是Wi-Fi感知帧或信标帧。Wi-Fi感知帧为发布(Publish)帧、Follow-up帧或者订阅(Subscribe)帧,若第二消息为Follow-up帧,那么加密后的Lucas在社交应用上的用户帐号可以携带在Follow-up帧的payload(负载)字段中。In this embodiment, the second message may be a Wi-Fi awareness frame or a beacon frame. The Wi-Fi perception 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.

S8711,手机100接收来自手机200的第二消息之后,手机100将第二天线切换至第一天线。S8711, after themobile phone 100 receives the second message from themobile phone 200, themobile phone 100 switches the second antenna to the first antenna.

示例性地,在手机200与手机100之间的距离小于或等于预设的安全距离时,用户Alisa的手机100可以接收来自手机200的第二消息。Exemplarily, when the distance between themobile phone 200 and themobile phone 100 is less than or equal to a preset safe distance, themobile phone 100 of the user Alisa may receive the second message from themobile phone 200 .

示例性地,当用户Alisa的手机100收到第二消息后,手机100可以通过控制射频开关从第二天线切换至第一天线。Exemplarily, after themobile phone 100 of the user Alisa receives the second message, themobile phone 100 can switch from the second antenna to the first antenna by controlling the radio frequency switch.

S8712,手机100通过第一天线向手机200发送确认消息。S8712, themobile phone 100 sends a confirmation message to themobile phone 200 through the first antenna.

S8713,接收到确认消息后,手机200从第四天线切换至第三天线。S8713, after receiving the confirmation message, themobile phone 200 switches from the fourth antenna to the third antenna.

也就是说,当用户Lucas的手机200收到确认消息后,手机200可以通过控制射频开关从第四天线切换至第三天线。That is, after themobile phone 200 of the user Lucas receives the confirmation message, themobile phone 200 can switch from the fourth antenna to the third antenna by controlling the radio frequency switch.

S8714,手机100使用密钥解密第二消息,得到用户帐号。S8714, themobile phone 100 decrypts the second message using the key to obtain the user account.

手机100在S8703中随机生成密钥后,本地保存该密钥,此时手机100可以使用密钥解密第二消息,获取到用户Lucas在该社交应用上的用户帐号。After themobile phone 100 randomly generates the key in S8703, the key is stored locally. At this time, themobile phone 100 can use the key to decrypt the second message and obtain the user account of the user Lucas on the social application.

对于S8714与S8713的前后顺序,本申请不作限定。The sequence of S8714 and S8713 is not limited in this application.

S8715,手机100通过第一天线向社交应用的应用服务器发送请求消息,该请求消息包括双方在社交应用上的用户帐号。S8715, themobile 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.

示例性地,手机100向社交应用的应用服务器发送的请求消息包括用户Lucas在社交应用上的用户帐号和用户Alisa在社交应用上的用户帐号。该请求消息用于请求用户Alisa在社交应用上的用户帐号与用户Lucas在社交应用上的用户帐号互相加为好友。Exemplarily, the request message sent by themobile 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.

与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200即可获取好友帐号,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了界面操作次数,提升了用户体验。Compared with the friend adding process shown in FIG. 1A to FIG. 1D , in the embodiment of the present application, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add friend control 8101 to move themobile phone 100 close to or touch it. The user of themobile phone 200 does not need any operation to obtain the friend account by touching themobile phone 200 of the friend; or, the user of themobile phone 100 does not need to actively search, the user of themobile phone 100 only needs to touch the add friend control 8101, and the user of themobile phone 200 only needs to Themobile phone 200 can be brought close to or touched by themobile phone 100; in this way, the number of interface operations is effectively reduced, and the user experience is improved.

S8716,应用服务器向手机200发送该请求消息的响应消息。S8716, the application server sends a response message to the request message to themobile phone 200.

示例性地,在该步骤中,手机200接收该请求消息的响应消息之后,手机200还可以显示接收到好友添加成功的提示消息,用于提示用户好友添加成功。Exemplarily, in this step, after themobile phone 200 receives the response message to the request message, themobile 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.

该步骤中,用户Lucas不需要再手动确认,即可收到来自应用服务的添加好友成功的消息。应理解,在用户Lucas同意用户Alisa添加好友情况下,手机100和手机200的距离才会小于预设的反射距离(如30cm),所以手机200才能接收到来自手机100的密钥,相当于用户Lucas已经主动授权用户Alisa可以添加其为好友,所以无需用户Lucas的手动确认操作。In this step, the user Lucas does not need to manually confirm, and can receive the message of the success of adding friends from the application service. It should be understood that when the user Lucas agrees with the user Alisa to add friends, the distance between themobile phone 100 and themobile phone 200 will be less than the preset reflection distance (eg 30cm), so themobile phone 200 can receive the key from themobile 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.

示例性地,手机200还可以仅显示接收到好友添加成功的提示消息。例如,如图8C所示的用户界面830,界面830显示来自社交应用的提示消息,用于通知用户Lucas已经添加了一个新的好友。Exemplarily, themobile phone 200 may also only display a prompt message that a friend has been successfully added. For example, as shown in theuser interface 830 of FIG. 8C, theinterface 830 displays a prompt message from the social application for notifying the user that Lucas has added a new friend.

可替换地,手机200还可以仅发出接收到好友添加成功的提示消息的提示音。Alternatively, themobile phone 200 may only send out a prompt tone for receiving a prompt message that the friend has been successfully added.

可替换地,手机200还可以既发出接收到好友添加成功的提示消息的提示音,又显示接收到好友添加成功的提示消息。Alternatively, themobile 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.

S8717,应用服务器向手机100发送该请求消息的响应消息。S8717, the application server sends a response message to the request message to themobile phone 100.

虽然在图8A中S8717位于S8716之后,但实际中应用服务器可以并行地执行S8717和S8716,也可以先执行S8717后执行S8716,还可以先执行S8716后执行S8717。Although 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.

S8718,手机100接收该请求消息的响应消息后,手机100显示好友添加成功的提示消息。S8718, after themobile phone 100 receives the response message of the request message, themobile phone 100 displays a prompt message that the friend is successfully added.

可替换地,手机100接收该请求消息的响应消息后,手机100可以仅发出接收到好友添加成功的提示消息的提示音。Alternatively, after themobile phone 100 receives the response message to the request message, themobile phone 100 may only send out a prompt tone for the prompt message that the friend has been successfully added.

可选地,手机100接收该请求消息的响应消息后,手机100可以既发出接收到好友添加成功的提示消息的提示音,又显示接收到好友添加成功的提示消息。Optionally, after themobile phone 100 receives the response message of the request message, themobile 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.

可选地,手机100接收该请求消息的响应消息后,手机100可以仅显示接收到好友添加成功的提示消息。Optionally, after themobile phone 100 receives the response message to the request message, themobile phone 100 may only display a prompt message that the friend has been successfully added.

当手机100接收该好友添加成功的提示消息后,用户Alisa和用户Lucas可以进行即时通信;具体可参见图1D所示的示例,此处不再赘述。After themobile 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.

在图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在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来较好的体验。In the flow shown in FIG. 8A , 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 themobile phone 200, the illegal electronic device (attack device) can simulate themobile 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. Even if the illegal electronic device (attack device) simulates themobile phone 100 and executes all or part of "send the first message" in S8700 to S8701, S8703, S8705, S8711 to S8712, S8714, S8718, etc. Themobile 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. In this way, 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.

而在S8710中,若手机200通过第三天线(即强天线)发送第二消息,非法的电子设备(攻击设备)可能接收到第二消息;而之前的S8700至S8701、S8703至S8705中的“发送第一消息”也是非法的电子设备(攻击设备)执行的,故在S8714中,非法的电子设备(攻击设备)可以用自身先前生成的密钥来解密,获取到手机200在社交应用上的用户帐号。进而,可以执行后续的S8715和S8718,应用服务器会执行后续的S8716和S8717;手机100就会收到被陌生人添加好友的消息,进而影响手机100在社交应用上的使用,给用户带来不便。In S8710, if themobile phone 200 sends the second message through the third antenna (ie, a strong antenna), the illegal electronic device (attack 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 themobile phone 200 on the social application user account. Further, the subsequent S8715 and S8718 may be executed, and the application server will execute the subsequent S8716 and S8717; themobile phone 100 will receive a message that a stranger has been added as a friend, which will affect the use of themobile phone 100 in social applications and bring inconvenience to the user .

需要说明的是,S8715、S8716和S8717涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。It should be noted that S8715, S8716 and S8717 involve the communication interaction between themobile phone 100, themobile 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.

需要说明的是,S8701和S8702是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S8701和S8702。It should be noted that the S8701 and the S8702 are only required on the premise that themobile phone 100 and themobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If themobile phone 100 and themobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S8701 and S8702 may not be set.

需要指出的是,在一种可能的情况下,若手机200在社交应用上的用户帐号在执行S8700之前,与手机100在社交应用上的用户帐号并未添加好友,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, if the user account of themobile phone 200 on the social application does not add friends with the user account of themobile phone 100 on the social application before S8700 is executed, the response message may be themobile phone 200 User accounts on social apps were successfully added, or failed to be added.

可选地,在另一种可能的情况下,若手机200在社交应用上的用户帐号在执行S8700之前,已经与手机100在社交应用上的用户帐号为好友,则应用服务器向手机100发送请求消息的响应消息用于提示重复添加,或者响应消息用于提示手机200在社交应用上的用户帐号已经与手机100在社交应用上的用户帐号为好友,不用添加。Optionally, in another possible situation, if the user account of themobile phone 200 on the social application has been friends with the user account of themobile phone 100 on the social application before S8700 is executed, the application server sends a request to themobile 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 themobile phone 200 on the social application has been friends with the user account of themobile phone 100 on the social application, and does not need to be added.

需要说明的是,该实施例中,手机100默认通过第一天线,直至手机100切换至第二天线,手机100切换至第二天线之后,手机100均通过第二天线发送消息,直至手机100切换至第一天线。同样地,手机200默认通过第三天线,直至手机200切换至第四天线。手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。It should be noted that, in this embodiment, themobile phone 100 uses the first antenna by default until themobile phone 100 switches to the second antenna. After themobile phone 100 switches to the second antenna, themobile phone 100 sends messages through the second antenna until themobile phone 100 switches to the second antenna. to the first antenna. Likewise, themobile phone 200 passes through the third antenna by default until themobile phone 200 switches to the fourth antenna. After themobile phone 200 is switched to the fourth antenna, themobile phone 200 sends messages through the fourth antenna until themobile phone 200 is switched to the third antenna.

本申请实施例是以用户Alisa和用户Lucas为例,示例性地说明好友添加的过程。应理解,该好友添加方式同样适用于其它用户之间的好友添加,本申请对此不作限制。In the embodiment of the present application, 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.

本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,手机200包括第三天线和第四天线,即手机100和手机200均支持超短距帧的收发。因此,处于预设的安全距离之外的其它电子设备无法接收到该超短距帧,所以可以保证通信的安全性。In this embodiment of the present application, a Wi-Fi sensing channel may be established between themobile phone 100 and themobile phone 200 through the Wi-Fi sensing technology, so themobile phone 100 and themobile phone 200 do not need to access the same router. Themobile phone 100 includes a first antenna and a second antenna, and themobile phone 200 includes a third antenna and a fourth antenna, that is, both themobile phone 100 and themobile 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.

与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。Compared with the way of adding friends by touching the children's watch, the children's watch adopts long-distance communication, which can easily lead to the leakage of user information. Therefore, in comparison, the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.

与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200即可获取好友帐号,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了界面操作次数,提升了用户体验。Compared with the friend adding process shown in FIG. 1A to FIG. 1D , in the embodiment of the present application, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add friend control 8101 to move themobile phone 100 close to or touch it. The user of themobile phone 200 does not need any operation to obtain the friend account by touching themobile phone 200 of the friend; or, the user of themobile phone 100 does not need to actively search, the user of themobile phone 100 only needs to touch the add friend control 8101, and the user of themobile phone 200 only needs to Themobile phone 200 can be brought close to or touched by themobile phone 100; in this way, the number of interface operations is effectively reduced, and the user experience is improved.

场景一还可通过实施例二进一步阐述。实施例二与实施例一的主要区别在于,在实施例二中手机200并不通过第四天线发送第二消息,而是通过第三天线发送第二消息;因此在实施例二所示的好友添加过程中,为了提高好友添加结果的安全性和可靠性,需要手机200的使用用户参与确认。Scenario 1 can also be further described throughEmbodiment 2. The main difference between the second embodiment and the first embodiment is that in the second embodiment, themobile 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 themobile phone 200 needs to participate in the confirmation.

实施例二涉及图9A至图9B。在实施例二中,手机100可以包括第一天线和第二天线,手机200可以包括第三天线;此处的第三天线相当于强天线或真天线。图9A示出了场景一下好友添加方法的交互流程图。如图9A所示,该方法具体包括以下步骤:The second embodiment relates to FIGS. 9A to 9B . In the second embodiment, themobile phone 100 may include a first antenna and a second antenna, and themobile 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至S9708:分别与S8700至S8708相同,请参见S8700至S8708的描述,此处不再赘述。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.

S9709,手机200通过第三天线向手机100发送第二消息。S9709, themobile phone 200 sends the second message to themobile phone 100 through the third antenna.

需要说明的是,S9709与S8710的区别在于,手机200是通过第三天线发送的第二消息。也就是说,本实施例并不要求手机200支持超短距帧的发送,只需要手机100支持超短距帧的发送即可。It should be noted that the difference between the S9709 and the S8710 is that themobile phone 200 sends the second message through the third antenna. That is to say, this embodiment does not require themobile phone 200 to support the transmission of ultra-short-range frames, but only requires themobile phone 100 to support the transmission of ultra-short-range frames.

S9710至S9712:分别与S8711至S8713相同,请参见S8711至S8713的描述,此处不再赘述。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.

S9713,应用服务器接收到请求消息后,向手机200转发该请求消息。S9713, after receiving the request message, the application server forwards the request message to themobile phone 200.

S9714,在接收到来自应用服务器的请求消息后,手机200接收到用户的操作,该操作用于确认同意或拒绝被添加为好友。S9714, after receiving the request message from the application server, themobile phone 200 receives an operation from the user, and the operation is used for confirming approval or refusal to be added as a friend.

之所以需要应用服务器执行S9713和手机200执行S9714以及S9715,是因为在该实施例中需要考虑到非法的电子设备(攻击设备)虽然不在手机200的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机100,即S9700至S9701、S9703、S9705中的“发送第一消息”、S9711至S9712、S9717等的全部或部分,均可能被非法的电子设备来模拟。这样,非法的电子设备(攻击设备)在S9709可以接收到第二消息,从而利用自身生成的密钥解密,进而获取到用户Lucas在社交应用上的用户帐号。这样,就使得用户Lucas在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来不好的体验。The reason why the application server needs to execute S9713 and themobile 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 themobile phone 200, the illegal electronic device (attack device) can Themobile 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. In this way, 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. In this way, 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.

为了避免出现上述情形,应用服务器需要执行S9713,手机200需要执行S9714以及S9715,这样S9714就提供给了手机200的用户Lucas进一步确认的步骤。若手机200接收到的操作用于确认同意,则表明用户Lucas确认请求添加的是用户Lucas确认的用户(比如,Alisa);若手机200接收到的操作用于拒绝被添加为好友,则表明用户Lucas获悉请求添加的不是用户Lucas确认的用户(比如,Alisa以外的陌生人)。即通过手机200的用户Lucas进一步确认,来起到安全保护的作用。In order to avoid the above situation, the application server needs to execute S9713, and themobile phone 200 needs to execute S9714 and S9715, so that S9714 is provided to the user Lucas of themobile phone 200 for further confirmation steps. If the operation received by themobile 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 themobile 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 themobile phone 200 further confirms to play a role of security protection.

示例性地,手机200接收到应用服务器转发的请求消息后,手机200显示如图9B所示的界面940。界面940显示新的朋友的用户帐号,甚至还显示用户图像信息。Exemplarily, after themobile phone 200 receives the request message forwarded by the application server, themobile phone 200 displays theinterface 940 shown in FIG. 9B .Interface 940 displays the new friend's user account and even displays user image information.

在一种实施方式中,此时用户Lucas可以辨析确认是否是希望添加的用户帐号(比如,Alisa);若是,用户Lucas可以触摸同意控件941;否则,用户Lucas可以触摸拒绝控件942。In one embodiment, 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 theconsent control 941 ;

在另一种实施方式中,此时用户Lucas可以向用户Alisa展示手机200上所显示的用户头像或用户帐号等信息;若用户Alisa确认是自己的帐号和头像,则会向用户Lucas作出肯定的回应(比如,在二人对话中回答用户Lucas“是我的帐号,没错”)。当用户Alisa向用户Lucas确认界面上显示的头像或用户帐号无误后,用户Lucas才点击操作图9B所示的同意控件941。假设,当用户Alisa确认界面上显示的头像并非用户Alisa的头像时,用户Alisa会告知用户Lucas,这样用户Lucas就会点击操作图9B所示的拒绝控件942,就可以避免被非法用户添加为好友。In another implementation manner, the user Lucas can show the user avatar or user account information displayed on themobile 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, 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 theconsent control 941 shown in FIG. 9B . Suppose, 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 therejection control 942 shown in FIG. 9B, so as to avoid being added as a friend by an illegal user .

假设,当用户Lucas确认界面上显示的头像并非用户Alisa的头像时,或者,当用户Lucas经与用户Alisa协商后,确认界面上显示的头像并非用户Alisa的头像时,用户Lucas点击操作图9B中所示的拒绝控件942,就可以避免添加非法用户为好友。Suppose, 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 thereject control 942, it is possible to avoid adding illegal users as friends.

S9714,手机200接收到用户的操作,该操作用于指示用户同意或拒绝被添加为好友。S9714, themobile phone 200 receives an operation from the user, and the operation is used to indicate that the user agrees or refuses to be added as a friend.

S9715,手机200向应用服务器发送回复消息,该回复消息用于通知好友添加结果。S9715, themobile phone 200 sends a reply message to the application server, where the reply message is used to notify the friend addition result.

S9716,应用服务器向手机100发送请求消息的响应消息。S9716, the application server sends a response message of the request message to themobile phone 100.

S9717,在手机100接收该请求消息的响应消息后,若响应消息指示好友添加成功,则手机100显示好友添加成功的提示消息;若响应消息指示好友添加失败,则手机100显示好友添加失败的提示消息。S9717, after themobile phone 100 receives the response message of the request message, if the response message indicates that the friend was added successfully, themobile phone 100 displays a prompt message that the friend was added successfully; if the response message indicates that the friend was added unsuccessfully, themobile phone 100 displays the prompt that the friend was added successfully information.

示例性地,当手机100接收该好友添加成功的响应消息后,手机100可以显示如图1D中的(j)所示的用户界面190。用户界面190包括用于提示用户Alisa的手机100验证通过的消息,用户Alisa可以在用户界面190中向对方发送即时消息和接收来自对方的即时消息。Exemplarily, after themobile phone 100 receives the response message that the friend is successfully added, themobile phone 100 may display theuser interface 190 as shown in (j) in FIG. 1D . Theuser interface 190 includes a message for prompting the user Alisa'smobile 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 theuser interface 190 .

需要说明的是,S9712、S9713、S9715和S9716等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。It should be noted that S9712, S9713, S9715, and S9716 involve the communication interaction between themobile phone 100, themobile 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和S9702是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S9701和S9702。It should be noted that S9701 and S9702 are only required on the premise that themobile phone 100 and themobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If themobile phone 100 and themobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S9701 and S9702 may not be set.

需要指出的是,在一种可能的情况下,若手机200在执行S9700之前,手机200在社交应用上的用户帐号,与手机100在社交应用上的用户帐号并未添加为好友,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, if the user account of themobile phone 200 on the social application and the user account of themobile phone 100 on the social application are not added as friends before themobile phone 200 executes S9700, the response The message may be that the user account of themobile phone 200 on the social application has been successfully added, or the addition has failed.

可选地,在另一种可能的情况下,若手机200在执行S9700之前,手机200在社交应用上的用户帐号,已经与手机100在社交应用上的用户帐号为好友,则应用服务器向手机100发送好友添加请求的响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号已经与手机100在社交应用上的用户帐号为好友,不用重复添加。Optionally, in another possible situation, if the user account of themobile phone 200 on the social application is already friends with the user account of themobile phone 100 on the social application before themobile phone 200 executes S9700, 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 themobile phone 200 on the social application is already friends with the user account of themobile phone 100 on the social application, and no repeated addition is required.

需要说明的是,手机100默认通过第一天线,直至该实施例中手机100切换至第二天线,手机100切换至第二天线之后,手机100通过第二天线发送消息,直至手机100切换至第一天线。手机200一直通过第三天线发送消息。It should be noted that themobile phone 100 uses the first antenna by default until themobile phone 100 switches to the second antenna in this embodiment. After themobile phone 100 switches to the second antenna, themobile phone 100 sends messages through the second antenna until themobile phone 100 switches to the second antenna. an antenna. Thecell phone 200 is always sending messages through the third antenna.

本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,即支持超短距帧的收发。手机200包括第三天线,即支持长距通信,不支持超短距帧的发送,或者,即使支持超短距帧的发送,但不使用。因此,处于预设的安全距离之外的其它电子设备无法接收到手机100所发送的超短距帧,并且还有手机200的确认操作,所以可以保证通信的安全性。In this embodiment of the present application, a Wi-Fi sensing channel may be established between themobile phone 100 and themobile phone 200 through the Wi-Fi sensing technology, so themobile phone 100 and themobile phone 200 do not need to access the same router. Themobile phone 100 includes a first antenna and a second antenna, that is, supports the transmission and reception of ultra-short-range frames. Themobile 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 themobile phone 100, and there is still a confirmation operation by themobile phone 200, so the security of communication can be guaranteed.

与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。Compared with the way of adding friends by touching the children's watch, the children's watch adopts long-distance communication, which can easily lead to the leakage of user information. Therefore, in comparison, the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.

与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200即可获取好友帐号,手机200的用户只需确认操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,手机200的用户只需将手机200靠近或碰触手机100,以及确认操作即可;这样,有效地减少了界面操作次数,提升了用户体验。Compared with the friend adding process shown in FIG. 1A to FIG. 1D , in the embodiment of the present application, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add friend control 8101 to move themobile phone 100 close to or touch it. The user of themobile phone 200 only needs to confirm the operation; or, the user of themobile phone 100 does not need to actively search, the user of themobile phone 100 only needs to touch the add friend control 8101, and the user of themobile phone 200 only needs to touch It is only necessary to bring themobile phone 200 close to or touch themobile phone 100 and confirm the operation; in this way, the number of interface operations is effectively reduced, and the user experience is improved.

需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例二的相关内容均与实施例一的相关内容相同。It should be noted that, unless otherwise specified and no contradiction occurs, the relevant content of the second embodiment is the same as the relevant content of the first embodiment.

场景一还可通过实施例三进一步阐述。实施例三与实施例一及实施例二的主要区别在于:在实施例三中手机100并不随机生成及发送密钥,手机200向手机100直接发送手机200在社交应用上的用户帐号;因此在该实施例所示的好友添加过程中,为提高好友添加结果的安全性和可靠性,需要手机100的使用用户参与确认。实施例三中,手机100可以包括第一天线;手机200可以包括第三天线和第四天线;此处的第一天线相当于强天线或真天线。Scenario 1 can also be further described throughEmbodiment 3. The main difference betweenEmbodiment 3 and Embodiment 1 andEmbodiment 2 is that inEmbodiment 3, themobile phone 100 does not randomly generate and send the key, and themobile phone 200 directly sends themobile phone 100 the user account of themobile 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 themobile phone 100 needs to participate in the confirmation. In the third embodiment, themobile phone 100 may include a first antenna; themobile 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.

实施例三涉及图10A至图10B。图10A示出了场景一下另一种好友添加方法的交互流程。如图10A所示,该方法具体包括以下步骤:The third embodiment relates to FIGS. 10A to 10B . 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至S1001:分别与S9700至S9701相同,请参见S9700至S9701的描述,此处不再赘述。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.

S1002,手机200获取手机200在社交应用上的用户帐号,生成第一消息20,该第一消息20包括手机200在社交应用上的用户帐号。S1002, themobile phone 200 acquires the user account of themobile phone 200 on the social application, and generates a first message 20, where the first message 20 includes the user account of themobile phone 200 on the social application.

需要说明的是,用户Lucas的手机200预先已订阅添加好友服务,所以可以接收到手机100所发布的添加好友服务。示例性地,手机200在运行社交应用时就自动订阅添加好友服务,或者是社交应用作为常驻后台的服务启动时订阅添加好友服务。It should be noted that themobile 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 themobile phone 100 . Exemplarily, themobile 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.

示例性地,手机200的使用用户Lucas打开社交应用,手机200可以从运行的社交应用获取使用用户Lucas的用户帐号。手机200的社交应用与手机100的社交应用相同。Exemplarily, the user Lucas of themobile phone 200 opens a social application, and themobile phone 200 can obtain the user account of the user Lucas from the running social application. The social application of themobile phone 200 is the same as the social application of themobile phone 100 .

示例性地,S1002中的“社交应用的用户帐号”包括上一次登录该社交应用的用户帐号。Exemplarily, the "user account of the social application" in S1002 includes the user account that logged in the social application last time.

S1003,手机200从第三天线切换至第四天线。S1003, themobile phone 200 switches from the third antenna to the fourth antenna.

S1004,手机200通过第四天线向手机100发送第一消息20。S1004, themobile phone 200 sends the first message 20 to themobile phone 100 through the fourth antenna.

示例性地,用户Lucas的手机200收到手机发布的好友添加服务消息之后,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息20,这时第一消息20属于超短距帧,使得手机200发送的第一消息20不会被安全距离之外的手机接收到。Exemplarily, after themobile phone 200 of the user Lucas receives the friend adding service message published by the mobile phone, themobile 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 themobile phone 200 will not be received by the mobile phone outside the safe distance.

S1005,手机100接收到第一消息20,通过第一天线发送确认消息;S1005, themobile phone 100 receives the first message 20, and sends a confirmation message through the first antenna;

S1006,手机100获取到手机200在社交应用上的用户帐号并显示。S1006, themobile phone 100 acquires and displays the user account of themobile phone 200 on the social application.

示例性地,在手机200与手机100之间的距离小于预设的安全距离后,手机100可以接收到第一消息20,然后从第一消息20中获取到手机200在社交应用上的用户帐号。Exemplarily, after the distance between themobile phone 200 and themobile phone 100 is smaller than the preset safe distance, themobile phone 100 may receive the first message 20 , and then obtain the user account of themobile phone 200 on the social application from the first message 20 . .

也就是说,若用户Lucas同意用户Alisa添加好友,则用户Lucas会将手机200靠近用户Alisa的手机100,或者说,用户Lucas同意用户Alisa的手机100靠近自己的手机200,这样,手机100与手机200之间的距离就小于或等于预设的安全距离(如30cm),手机100就可以接收到第一消息。That is to say, if the user Lucas agrees that the user Alisa can be added as a friend, the user Lucas will bring themobile phone 200 close to themobile phone 100 of the user Alisa. The distance between 200 is less than or equal to a preset safe distance (eg, 30 cm), and themobile phone 100 can receive the first message.

在获取到手机200在社交应用上的用户帐号后,手机100显示该用户帐号。After acquiring the user account of themobile phone 200 on the social application, themobile phone 100 displays the user account.

S1007,手机200接收到确认消息后,切换至第三天线。S1007, after receiving the confirmation message, themobile phone 200 switches to the third antenna.

也就是说,在手机200收到请求消息的响应消息后,手机200可以通过控制射频开关从第二天线切换至第一天线。That is, after themobile phone 200 receives the response message of the request message, themobile phone 200 can switch from the second antenna to the first antenna by controlling the radio frequency switch.

S1008,手机100接收到用户的操作,该操作用于确认同意或拒绝添加好友。S1008 , themobile phone 100 receives an operation from the user, and the operation is used for confirming approval or refusal to add a friend.

具体地,当接收到用户的操作用于确认同意添加好友,则执行后续步骤;否则,流程结束,不再执行后续步骤。Specifically, when the user's operation is received to confirm that the friend is agreed to be added, the subsequent steps are performed; otherwise, the process ends, and the subsequent steps are not performed.

示例性地,在用户Alisa点击同意控件后,则继续执行后续步骤;在用户Alisa点击拒绝控件后,则结束流程。Exemplarily, after the user Alisa clicks the consent control, the subsequent steps are continued; after the user Alisa clicks the reject control, the process ends.

如果不设置S1008,则非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1002、S1004中的“发送第一消息”等的全部或部分,均可能均被非法的电子设备(攻击设备)执行。这样,就会出现,虽然用户Alisa在社交应用上的用户帐号想添加用户Lucas在社交应用上的用户帐号为好友,但实际上用户Alisa在社交应用上的用户帐号添加了非法的电子设备(攻击设备)在社交应用上的用户帐号为好友。这显然给用户带来了不好的体验,导致用户不便。If S1008 is not set, although the illegal electronic device (attack device) is not in the vicinity of themobile phone 100, the illegal electronic device (attack device) can simulate themobile 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). In this way, it will appear that although 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.

为了避免出现上述情形,手机100需要执行S1008。这样,S1008就提供给了手机100的用户Alisa进一步确认的步骤。若手机100接收到的操作用于确认同意,则表明用户Alisa确认是在添加手机200在社交应用上的用户帐号(比如,用户Lucas在社交应用上的用户帐号);若手机100接收到的操作用于拒绝,则表明用户Alisa确认不是在添加手机200在社交应用上的用户帐号,而是在添加一个陌生人的用户帐号(比如,用户Lucas以外的陌生人在社交应用上的用户帐号)。这样,通过手机100的用户Alisa进一步确认,来起到安全保护的作用。In order to avoid the above situation, themobile phone 100 needs to execute S1008. In this way, S1008 provides further confirmation steps to Alisa, the user of themobile phone 100 . If the operation received by themobile phone 100 is used to confirm the consent, it means that the user Alisa confirms that he is adding the user account of themobile phone 200 on the social application (for example, the user account of the user Lucas on the social application); if the operation received by themobile phone 100 If it is used to reject, it means that the user Alisa confirms that he is not adding the user account of themobile 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 themobile phone 100 plays a role of security protection.

示例性地,手机100接收来自手机200的第一消息后,手机100可以显示如图10B所示的界面1020。界面1020显示新的朋友的用户帐号,甚至还显示对应的用户图像信息。Exemplarily, after themobile phone 100 receives the first message from themobile phone 200, themobile phone 100 may display theinterface 1020 as shown in FIG. 10B . Theinterface 1020 displays the new friend's user account and even displays the corresponding user image information.

在一种实施方式中,此时用户Alisa可以辨析确认是否是希望添加的用户帐号(比如,Lucas);若是,用户Alisa可以触摸同意控件1021;否则,用户Alisa可以触摸拒绝控件1022。In one embodiment, 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 theconsent control 1021 ; otherwise, the user Alisa can touch thereject control 1022 .

在另一种实施方式中,此时用户Alisa可以向用户Lucas展示手机100上所显示的用户头像或用户帐号等信息;若用户Lucas确认是自己的帐号和头像,则会向用户Alisa作出肯定的回应(比如,在二人对话中回答用户Alisa“是我的帐号,没错”)。当用户Lucas向用户Alisa确认界面上显示的头像或用户帐号无误后,用户Alisa才点击操作图10B所示的同意控件1021。假设,当用户Lucas确认界面上显示的头像并非用户Alisa的头像时,用户Lucas会告知用户Alisa,这样用户Alisa就会点击操作图10B所示的拒绝控件1022,就可以避免被非法用户添加为好友。In another implementation manner, the user Alisa can show the user avatar or user account information displayed on themobile 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 theconsent control 1021 shown in FIG. 10B . Suppose, 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 thereject control 1022 shown in FIG. 10B, so as to avoid being added as a friend by an illegal user .

进一步地,当用户Alisa点击同意控件1021后,手机200还可以显示如图8C所示的界面830,提醒用户Lucas已经添加了一个新的好友。手机100也可以显示类似的界面。Further, after the user Alisa clicks theconsent control 1021, themobile phone 200 may also display theinterface 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.

S1009,当手机100接收到用户的操作用于确认同意添加好友,手机100向应用服务器发送请求消息,该请求消息用于请求添加好友,该请求消息包括双方在社交应用上的用户帐号。S1009 , when themobile phone 100 receives the user's operation to confirm the agreement to add friends, themobile 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.

示例性地,该请求消息包括手机200在社交应用上的用户帐号和手机100在社交应用上的用户帐号。Exemplarily, the request message includes the user account of themobile phone 200 on the social application and the user account of themobile phone 100 on the social application.

S1010,在接收到请求消息后,应用服务器向手机200发送请求消息的响应消息。S1010 , after receiving the request message, the application server sends a response message of the request message to themobile phone 200 .

示例性地,该步骤中,在手机200接收到请求消息的响应消息后,手机200还可以显示接收到好友添加成功的提示消息,用于提示用户好友添加成功。Exemplarily, in this step, after themobile phone 200 receives the response message to the request message, themobile 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.

可替换地,还可以通过诸如语音的音频等进行提示。Alternatively, prompting may also be provided by audio such as voice.

可替换地,还可以通过诸如语音的音频等和显示的提示消息,共同提示。Alternatively, it is also possible to jointly prompt through audio such as voice and the displayed prompt message.

S1011,应用服务器向手机100发送请求消息的响应消息。S1011 , the application server sends a response message of the request message to themobile phone 100 .

需要指出的是,在一种可能的情况下,若手机200在执行S1000之前,手机200在社交应用上的用户帐号,与手机100在社交应用上的用户帐号并未添加为好友,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, if the user account of themobile phone 200 on the social application and the user account of themobile phone 100 on the social application are not added as friends before themobile phone 200 executes S1000, the response The message may be that the user account of themobile phone 200 on the social application has been successfully added, or the addition has failed.

可选地,在另一种可能的情况下,若手机200在执行S1000之前,手机200在社交应用上的用户帐号,已经与手机100在社交应用上的用户帐号为好友,则应用服务器向手机100发送好友添加请求的响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号已经与手机100在社交应用上的用户帐号为好友,不用重复添加。Optionally, in another possible situation, if the user account of themobile phone 200 on the social application is already friends with the user account of themobile phone 100 on the social application before themobile phone 200 executes S1000, 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 themobile phone 200 on the social application is already friends with the user account of themobile phone 100 on the social application, and no repeated addition is required.

S1012,手机100接收到请求消息的响应消息后,手机100显示好友添加成功的提示消息。S1012 , after themobile phone 100 receives the response message of the request message, themobile phone 100 displays a prompt message that the friend is successfully added.

示例性地,当手机100接收到请求消息的响应消息后,用户Alisa和用户Lucas可以进行即时通信。即时通信的具体界面可参见图1D所示的界面,此处不再赘述。Exemplarily, after themobile phone 100 receives the response message of the request message, the user Alisa and the user Lucas can communicate instantly. For 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等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。It should be noted that S1009, S1010, S1011, etc. involve the communication interaction between themobile phone 100, themobile 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.

需要指出的是,该实施例中,手机100默认通过第一天线;手机200默认通过第三天线,直至手机200切换至第四天线,手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。It should be noted that, in this embodiment, themobile phone 100 passes the first antenna by default; themobile phone 200 passes the third antenna by default, until themobile phone 200 switches to the fourth antenna, and after themobile phone 200 switches to the fourth antenna, themobile phone 200 passes the fourth antenna The antenna sends the message until thehandset 200 switches to the third antenna.

本实施例中,手机200是通过第四天线发送的第一消息。也就是说,本实施例并不要求手机100支持超短距帧的发送,只需要手机200支持超短距帧的发送即可。手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机200包括第三天线和第四天线,即支持超短距帧的发送。因此,处于预设的安全距离之外的其它电子设备无法接收到手机200发送的第一消息,并且还有手机100上的确认操作,所以可以保证通信的安全性。In this embodiment, themobile phone 200 sends the first message through the fourth antenna. That is to say, this embodiment does not require themobile phone 100 to support the transmission of ultra-short-range frames, but only requires themobile phone 200 to support the transmission of ultra-short-range frames. A Wi-Fi sensing channel can be established between themobile phone 100 and themobile phone 200 through the Wi-Fi sensing technology, so themobile phone 100 and themobile phone 200 do not need to be connected to the same router. Themobile 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 themobile phone 200, and there is still a confirmation operation on themobile phone 100, so the security of communication can be guaranteed.

与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。Compared with the way of adding friends by touching the children's watch, the children's watch adopts long-distance communication, which can easily lead to the leakage of user information. Therefore, in comparison, the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.

与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101,将手机100靠近或碰触好友的手机200以及确认操作,即可获取好友帐号,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加好友控件8101以及确认操作,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了界面操作次数,提升了用户体验。Compared with the friend adding process shown in FIG. 1A to FIG. 1D , in the embodiment of the present application, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add friend control 8101 to move themobile phone 100 close to or touch it. Touch the friend'smobile phone 200 and confirm the operation to obtain the friend's account, and the user of themobile phone 200 does not need any operation; or, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add friend control 8101 and confirm the operation , the user of themobile phone 200 only needs to bring themobile phone 200 close to or touch themobile phone 100 ; in this way, the number of interface operations is effectively reduced, and the user experience is improved.

需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例三的相关内容均与实施例二的相关内容相同。It should be noted that, on the premise that there is no special indication and no contradiction, the relevant content of the third embodiment is the same as the relevant content of the second embodiment.

需要指出的是,虽然在实施例一至实施例三中,是以手机100、手机200举例,但本领域技术人员明了的是,只要安装有同一社交应用的电子设备100、电子设备200均可适用于上述实施例一至实施例三的方法。It should be pointed out that although themobile phone 100 and themobile phone 200 are used as examples in the first to third embodiments, those skilled in the art will understand that as long as theelectronic device 100 and theelectronic device 200 are installed with the same social application, both theelectronic device 100 and theelectronic device 200 are applicable. The method in the above-mentioned Embodiment 1 toEmbodiment 3.

需要说明的是,虽然在实施例一至实施例三中,是以“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分进行说明,但本领域技术人员明了的是,也可将“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分分别替换为“第一发射功率下的第一天线”、“第二发射功率下的第一天线”、“第三发射功率下的第三天线”、“第四发射功率下的第三天线”。上述“第一发射功率下的第一天线”、“第二发射功率下的第一天线”即为逻辑上的第一天线和逻辑上的第二天线;上述“第三发射功率下的第三天线”、“第四发射功率下的第三天线”即为逻辑上的第三天线和逻辑上的第四天线。逻辑上的第一天线和逻辑上的第二天线可通过芯片内部的寄存器来调整发射功率来实现。逻辑上的第三天线和逻辑上的第四天线可通过芯片内部的寄存器来调整发射功率来实现。It should be noted that, although in the first to third embodiments, all or part of the "first antenna", "second antenna", "third antenna", and "fourth antenna" are described in It is clear to the skilled person that all or part of the "first antenna", "second antenna", "third antenna" and "fourth antenna" can also be replaced with "the first antenna under the first transmit power" respectively. , "the first antenna under the second transmit power", "the third antenna under the third transmit power", "the third antenna under the fourth transmit power". The above-mentioned "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.

场景二scene two

下面通过实施例四至实施例六来具体阐述场景二下的群组成员添加方法的交互流程。The following describes the interaction flow of the method for adding group members in the second scenario through the fourth embodiment to the sixth embodiment.

实施例四涉及图11A至图11D。实施例四中,手机100可以包括第一天线和第二天线,手机200可以包括第三天线和第四天线。图11A示出了场景二下添加群组成员的方法流程。如图11A所示,该方法具体包括以下步骤:The fourth embodiment relates to FIGS. 11A to 11D . In the fourth embodiment, themobile phone 100 may include a first antenna and a second antenna, and themobile 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:

S1100,手机100接收到用户的操作,该操作用于添加群组成员。S1100, themobile 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.

示例性地,当用户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就会通过第一天线发布添加群组成员服务消息。Exemplarily, when the user Alisa opens a social application on themobile phone 100 and selects to add a group member on an interface such as a family group interface, themobile phone 100 issues an add group member service. Referring to (a) in FIG. 11B , theuser interface 11500 is a display interface of a social application, and theuser interface 11500 displays information of existing contacts. Illustratively, theuser interface 11500 of the social application includes afamily group control 11501 . After themobile phone 100 detects the operation on thefamily group control 11501, themobile phone 100 displays theinterface 11510 as shown in (b) of FIG. 11B .Interface 11510 includes extension controls 11511 . When themobile phone 100 detects the operation on theextension control 11511 , themobile phone 100 displays a pop-up box as shown in theinterface 11510 , and the pop-up box includes the addgroup member control 11512 . After themobile phone 100 detects the operation on the addgroup member control 11512, themobile phone 100 will publish a service message of adding a group member through the first antenna.

进一步地,当手机检测到针对添加群组成员控件11512的操作后,手机100还可以通过其界面(比如,手机100显示界面11520),提示用户Alisa碰一碰用户Lucas的手机200。界面11520包括提示用户与好友设备碰一碰的提示框;提示框显示提示消息。用户Alisa在看到提示消息后,可以将手机100靠近或碰触用户Lucas的手机200。Further, after the mobile phone detects the operation on the addgroup member control 11512, themobile phone 100 can also prompt the user Alisa to touch themobile phone 200 of the user Lucas through its interface (eg, themobile 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 themobile phone 100 close to or touch themobile phone 200 of the user Lucas.

S1101,手机100通过第一天线发布添加群组成员服务消息。S1101, themobile phone 100 publishes a service message of adding group members through the first antenna.

示例性地,当用户Alisa打开手机100的社交应用中的“添加群组成员”控件11512,手机100就会发布添加群组成员服务消息,用于发现周围订阅了添加群组成员服务的电子设备。Exemplarily, when the user Alisa opens the "Add group member"control 11512 in the social application of themobile phone 100, themobile 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. .

示例性地,S1101中的“发布”是以广播的形式。该添加群组成员服务消息包括手机100的IP地址或MAC地址等唯一标识地址。可选地,该添加群组成员服务消息还包括社交应用的标识。通过该标识可唯一识别社交应用。可选地,该添加群组成员服务消息还包括用户Alisa在该社交应用上的用户帐号。Illustratively, "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 themobile phone 100 . Optionally, the adding group member service message further includes the identification of the social application. The social application can be uniquely identified by this identifier. Optionally, the adding group member service message further includes the user account of the user Alisa on the social networking application.

S1102,手机200在接收到添加群组成员服务消息后,手机200向手机100发送响应消息(例如确认(acknowledge,ACK)信息),该响应消息用于指示手机100已经接收到添加群组成员服务消息。S1102, after themobile phone 200 receives the adding group member service message, themobile phone 200 sends a response message (for example, acknowledgement (ACK) information) to themobile phone 100, and the response message is used to indicate that themobile phone 100 has received the adding group member service information.

需要说明的是,用户Lucas的手机200预先已订阅添加群组成员服务。示例性地,手机200在下载安装社交应用时就自动订阅添加群组成员服务,或者是社交应用作为常驻后台的服务均被系统设置为自动订阅添加群组成员服务。It should be noted that themobile phone 200 of the user Lucas has subscribed to the service of adding group members in advance. Exemplarily, when themobile 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至S1114:分别与S8703至S8714相同,请参见S8703至S8714的描述,此处不再赘述。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.

应理解,在S1110后,在用户Lucas同意用户Alisa将其添加至群组成员的情况下,手机100与手机200之间的距离才会小于预设的安全距离(比如,30cm等),所以手机200才能接收到来自手机100的密钥。也就是说,用户Lucas已经主动授权用户Alisa可以添加其为群组成员,所以无需用户Lucas的手动确认操作。It should be understood that after S1110, the distance between themobile phone 100 and themobile phone 200 will be smaller than the preset safe distance (for example, 30cm, etc.), so themobile phone 200 to receive the key from thephone 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.

S1115,手机100向社交应用的应用服务器发送请求消息,该请求消息用于请求添加群组成员。S1115, themobile 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.

示例性地,该请求消息包括手机200在社交应用上的用户帐号、手机100在社交应用上“添加群组成员”控件对应的群组标识以及手机100在社交应用上的用户帐号,该请求消息请求将手机200在社交应用上的用户帐号,加入手机100在社交应用上“添加群组成员”控件对应的群组标识所在的群组中。以该群组为“家人群组”为例,手机100在获取到手机200在社交应用上的用户帐号后,就可以请求将其添加至“家人群组”中。Exemplarily, the request message includes the user account of themobile phone 200 on the social application, the group identifier corresponding to the "Add group member" control of themobile phone 100 on the social application, and the user account of themobile phone 100 on the social application. It is requested to add the user account of themobile phone 200 in the social application to the group where the group ID corresponding to the "Add group member" control of themobile phone 100 in the social application is located. Taking the group as the "family group" as an example, after acquiring the user account of themobile phone 200 on the social application, themobile phone 100 can request to add it to the "family group".

S1116,应用服务器向手机200发送请求消息的响应消息。S1116, the application server sends a response message of the request message to themobile phone 200.

在该步骤中,用户Lucas不需要手动确认,即可收到来自应用服务器的响应消息。In this step, user Lucas can receive the response message from the application server without manual confirmation.

示例性地,手机200还可以显示接收到添加群组成员的提示消息。如图11C所示,用户界面1130显示来自社交应用的提示消息。该提示消息用于通知用户Lucas已经添加入了一个新的群组。Exemplarily, themobile phone 200 may also display a prompt message of receiving a group member addition. As shown in FIG. 11C,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.

示例性地,在该步骤中,手机200接收该请求消息的响应消息之后,手机200还可以显示接收到添加群组成员成功的提示消息,用于提示群组成员添加成功。Exemplarily, in this step, after themobile phone 200 receives the response message of the request message, themobile phone 200 may further display a prompt message that the group member is successfully added, for prompting that the group member is successfully added.

S1117,应用服务器向手机100发送请求消息的响应消息。S1117 , the application server sends a response message of the request message to themobile phone 100 .

对于S1116与S1117的先后顺序,本申请不作限定。The order of S1116 and S1117 is not limited in this application.

S1118,手机100接收到响应消息后,手机100显示群组成员添加成功的提示消息。S1118, after themobile phone 100 receives the response message, themobile phone 100 displays a prompt message that the group member is successfully added.

示例性地,当手机100接收到群组成员添加成功的响应消息后,用户Alisa的手机100可以显示如图11D所示的用户界面1140。界面1140显示有通知。通知的内容可以包括:你邀请Lucas加入了群聊。Exemplarily, after themobile phone 100 receives the response message that the group member is successfully added, themobile phone 100 of the user Alisa may display theuser 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和S1117等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。It should be noted that S1115 , S1116 , and S1117 involve the communication interaction between themobile phone 100 , themobile 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和S1102是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S1101和S1102。It should be noted that S1101 and S1102 are only required on the premise that themobile phone 100 and themobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If themobile phone 100 and themobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S1101 and S1102 may not be set.

需要指出的是,在一种可能的情况下,若手机200在执行S1100之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, if themobile phone 200 performs S1100, the user account of themobile phone 200 on the social application does not belong to the group corresponding to the "Add group member" control on the social application of themobile phone 100 If a member of the group is identified, the response message may indicate that the user account of themobile phone 200 on the social application has been successfully added, or the addition has failed.

可选地,在另一种可能的情况下,若手机200在执行S1100之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。Optionally, in another possible situation, before themobile phone 200 executes S1100, the user account of themobile phone 200 on the social application already belongs to the group corresponding to the "Add group member" control on themobile phone 100 on the social application. If the member of the group is identified, the application server sends a response message to themobile phone 100 to prompt the user to add repeatedly, or to prompt themobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of themobile phone 100 The members of the group where the corresponding group ID is located do not need to be added repeatedly.

需要指出的是,该实施例中,手机100通过第一天线,直至手机100切换至第二天线,手机100切换至第二天线之后,手机100通过第二天线发送消息,直至手机100切换至第一天线。同样地,手机200默认通过第三天线,直至手机200切换至第四天线。手机200切换至第四天线后,手机200通过第四天线发送消息,直至手机200切换至第三天线。It should be noted that, in this embodiment, themobile phone 100 passes through the first antenna until themobile phone 100 switches to the second antenna. After themobile phone 100 switches to the second antenna, themobile phone 100 sends a message through the second antenna until themobile phone 100 switches to the second antenna. an antenna. Likewise, themobile phone 200 passes through the third antenna by default until themobile phone 200 switches to the fourth antenna. After themobile phone 200 is switched to the fourth antenna, themobile phone 200 sends messages through the fourth antenna until themobile phone 200 is switched to the third antenna.

本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,手机200包括第三天线和第四天线,即手机100和手机200均支持超短距帧的收发。因此,处于预设的安全距离之外的其它电子设备无法接收到该超短距帧,所以可以保证通信的安全性。本申请实施例中,用户只需要触控添加群组成员控件,将手机100靠近或碰触好友的手机200即可获取好友帐号,并自动实现群组成员的添加,有效地减少了用户的操作次数。In this embodiment of the present application, a Wi-Fi sensing channel may be established between themobile phone 100 and themobile phone 200 through the Wi-Fi sensing technology, so themobile phone 100 and themobile phone 200 do not need to access the same router. Themobile phone 100 includes a first antenna and a second antenna, and themobile phone 200 includes a third antenna and a fourth antenna, that is, both themobile phone 100 and themobile 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. In the embodiment of the present application, the user only needs to touch the add group member control, and then themobile phone 100 can be approached or touched by the friend'smobile phone 200 to obtain the friend's account, and the group member can be added automatically, which effectively reduces the user's operation. frequency.

需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例四的相关内容均与实施例一的相关内容相同。It should be noted that, unless otherwise specified and no contradiction occurs, the relevant content of the fourth embodiment is the same as the relevant content of the first embodiment.

场景二还可通过实施例五进一步阐述。实施例五与实施例四的主要区别在于:在实施例五中手机200并不通过第四天线发送第二消息,而是通过第三天线发送第二消息;因此在实施例五所示的群组成员添加过程中,为了提高群组成员添加结果的安全性和可靠性,需要手机200的使用用户参与确认。实施例五中,手机100可以包括第一天线;手机200可以包括第三天线和第四天线;此处的第一天线相当于强天线或真天线。Scenario 2 can also be further described throughEmbodiment 5. The main difference between the fifth embodiment and the fourth embodiment is that in the fifth embodiment, themobile phone 200 does not send the second message through the fourth antenna, but sends the second message through the third antenna; During the group member addition process, in order to improve the security and reliability of the group member addition result, the user of themobile phone 200 needs to participate in the confirmation. In the fifth embodiment, themobile phone 100 may include a first antenna; themobile 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.

实施例五涉及图12A和图12B。图12A示出了场景二下添加群组成员的方法的交互流程。如图12A所示,该方法具体包括以下步骤:The fifth embodiment relates to FIGS. 12A and 12B . 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至S1208:分别与S1100至S1108相同,请参见S1100至S1108的描述,此处不再赘述。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.

S1209,手机200通过第三天线向手机100发送第二消息。S1209, themobile phone 200 sends the second message to themobile phone 100 through the third antenna.

需要说明的是,S1209与上述S1110的区别在于,手机200是通过第三天线发送的第二消息。也就是说,本实施例并不要求手机200支持超短距帧的发送,只需要手机100支持超短距帧的发送即可。It should be noted that the difference between S1209 and the above S1110 is that themobile phone 200 sends the second message through the third antenna. That is to say, this embodiment does not require themobile phone 200 to support the transmission of ultra-short-range frames, but only requires themobile phone 100 to support the transmission of ultra-short-range frames.

S1210至S1212:分别与S1111至S1113相同,请参见S1111至S1113的描述,此处不再赘述。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.

S1213,应用服务器向手机200发送请求消息,该请求消息用于请求添加群组成员。S1213, the application server sends a request message to themobile phone 200, where the request message is used for requesting to add a group member.

S1214,在接收到来自应用服务器的请求消息后,手机200接收到用户的操作,该操作用于确认同意或拒绝被添加为群组成员。S1214 , after receiving the request message from the application server, themobile 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.

之所以需要应用服务器执行S1213和手机200执行S1214以及S1215,是因为在该实施例中需要考虑到非法的电子设备(攻击设备)虽然不在手机200的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机100,即S1200至S1201、S1203、S1205中的“发送第一消息”、S1211至S1212、S1217等的全部或部分,均可能被非法的电子设备来模拟。这样,非法的电子设备(攻击设备)在S1209可以接收到第二消息,从而利用自身生成的密钥解密,进而获取到用户Lucas在社交应用上的用户帐号。这样,就使得用户Lucas在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来不好的体验。The reason why the application server needs to execute S1213 and themobile 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 themobile phone 200, the illegal electronic device (attack device) can Themobile 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. In this way, the illegal electronic device (attacking device) can receive the second message in S1209, and decrypt it by using the key generated by itself, thereby obtaining the user account of the user Lucas on the social application. In this way, 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.

为了避免出现上述情形,应用服务器需要执行S1213,手机200需要执行S1214以及S1215,这样S1214就提供给了手机200的用户Lucas进一步确认的步骤。若手机200接收到的操作用于确认同意,则表明用户Lucas确认请求添加的是用户Lucas确认的群组(比如,手机100在社交应用上的家人群组);若手机200接收到的操作用于拒绝被添加为群组成员,则表明用户Lucas获悉请求添加的不是用户Lucas确认的群组(比如,手机100在社交应用上的家人群组以外的群组)。即通过手机200的用户Lucas进一步确认,来起到安全保护的作用。In order to avoid the above situation, the application server needs to execute S1213, and themobile phone 200 needs to execute S1214 and S1215, so that S1214 is provided to the user Lucas of themobile phone 200 for further confirmation steps. If the operation received by themobile 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 themobile phone 100 on the social application); if the operation received by themobile 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 themobile phone 100 on the social application). That is, the user Lucas of themobile phone 200 further confirms to play a role of security protection.

S1215,手机200向应用服务器发送请求消息的回复消息,该回复消息用于通知群组成员添加结果。S1215, themobile 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.

S1216,应用服务器向手机100发送响应消息。S1216, the application server sends a response message to themobile phone 100.

需要指出的是,在一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, if themobile phone 200 performs S1200, the user account of themobile phone 200 on the social application does not belong to the group corresponding to the "Add group member" control on themobile phone 100 on the social application If a member of the group is identified, the response message may indicate that the user account of themobile phone 200 on the social application has been successfully added, or the addition has failed.

可选地,在另一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。Optionally, in another possible situation, before themobile phone 200 executes S1200, the user account of themobile phone 200 on the social application already belongs to the group corresponding to the "Add group member" control on themobile phone 100 on the social application. If the member of the group is identified, the application server sends a response message to themobile phone 100 to prompt the user to add repeatedly, or to prompt themobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of themobile phone 100 The members of the group where the corresponding group ID is located do not need to be added repeatedly.

S1217,手机100接收到响应消息,若响应消息指示群组成员添加成功,则手机100显示群组成员添加成功的提示消息;若响应消息指示群组成员添加失败,则手机100显示群组成员添加失败的提示消息。S1217, themobile phone 100 receives a response message. If the response message indicates that the group member is added successfully, themobile 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, themobile phone 100 displays the group member added Failed prompt message.

示例性地,当手机100接收群组成员添加成功的响应消息后,用户Alisa的手机100可以显示如图11D所示的用户界面1140。界面1140显示有通知。该通知的内容可以包括:你邀请Lucas加入了群聊。Exemplarily, after themobile phone 100 receives the response message that the group member is successfully added, themobile phone 100 of the user Alisa may display theuser 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和S1216等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。It should be noted that S1212, S1213, S1215, and S1216, etc. involve the communication interaction between themobile phone 100, themobile 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和S1202是在手机100和手机200采用Wi-Fi信号(Wi-Fi感知)进行交互的前提下才需要的。若手机100和手机200采用蓝牙信号、ZigBee信号进行交互,则可以不设置S1201和S1202。It should be noted that S1201 and S1202 are only required on the premise that themobile phone 100 and themobile phone 200 use Wi-Fi signals (Wi-Fi perception) for interaction. If themobile phone 100 and themobile phone 200 use Bluetooth signals and ZigBee signals for interaction, S1201 and S1202 may not be set.

需要指出的是,在一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, if themobile phone 200 performs S1200, the user account of themobile phone 200 on the social application does not belong to the group corresponding to the "Add group member" control on themobile phone 100 on the social application If a member of the group is identified, the response message may indicate that the user account of themobile phone 200 on the social application has been successfully added, or the addition has failed.

可选地,在另一种可能的情况下,若手机200在执行S1200之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。Optionally, in another possible situation, before themobile phone 200 executes S1200, the user account of themobile phone 200 on the social application already belongs to the group corresponding to the "Add group member" control on themobile phone 100 on the social application. If the member of the group is identified, the application server sends a response message to themobile phone 100 to prompt the user to add repeatedly, or to prompt themobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of themobile phone 100 The members of the group where the corresponding group ID is located do not need to be added repeatedly.

需要说明的是,手机100默认通过第一天线,直至该实施例中手机100切换至第二天线,手机100切换至第二天线之后,手机100通过第二天线发送消息,直至手机100切换至第一天线。手机200一直通过第三天线发送消息。It should be noted that themobile phone 100 uses the first antenna by default until themobile phone 100 switches to the second antenna in this embodiment. After themobile phone 100 switches to the second antenna, themobile phone 100 sends messages through the second antenna until themobile phone 100 switches to the second antenna. an antenna. Thecell phone 200 is always sending messages through the third antenna.

本申请实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机100包括第一天线和第二天线,即支持超短距帧的收发。手机200包括第三天线,即支持长距通信,不支持超短距帧的发送,或者,即使支持超短距帧的发送,但不使用。因此,处于预设的安全距离之外的其它电子设备无法接收到手机100所发送的超短距帧,并且还有手机200的确认操作,所以可以保证通信的安全性。In this embodiment of the present application, a Wi-Fi sensing channel may be established between themobile phone 100 and themobile phone 200 through the Wi-Fi sensing technology, so themobile phone 100 and themobile phone 200 do not need to access the same router. Themobile phone 100 includes a first antenna and a second antenna, that is, supports the transmission and reception of ultra-short-range frames. Themobile phone 200 includes a third antenna, that is, supports long-distance communication and does not support transmission of ultra-short-distance frames, or, even if it supports transmission of ultra-short-distance frames, it is not used. Therefore, other electronic devices outside the preset safe distance cannot receive the ultra-short-range frame sent by themobile phone 100, and there is still a confirmation operation by themobile phone 200, so the security of communication can be guaranteed.

与儿童手表的碰一碰加好友的方式相比,儿童手表采用长距通信,很容易造成用户信息的泄露,所以相比而言,本申请实施例基于超短距帧的收发,安全性更高。Compared with the way of adding friends by touching the children's watch, the children's watch adopts long-distance communication, which can easily lead to the leakage of user information. Therefore, in comparison, the embodiment of the present application is based on the transmission and reception of ultra-short-range frames, which is more secure. high.

与图1A至图1D所示的好友添加过程相比,本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,将手机100靠近或碰触手机200即可获取手机200在社交应用上的用户帐号,手机200的用户只需确认操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,手机200的用户只需将手机200靠近或碰触手机100,以及确认操作即可;这样,有效地减少了用户的操作次数,提升了用户体验。Compared with the friend adding process shown in FIGS. 1A to 1D , in the embodiment of the present application, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add group member control, and move themobile phone 100 close to or The user account of themobile phone 200 on the social application can be obtained by touching themobile phone 200, and the user of themobile phone 200 only needs to confirm the operation; or, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch to add a group member Controls, the user of themobile phone 200 only needs to move themobile phone 200 close to or touch themobile phone 100 and confirm the operation; thus, the number of operations by the user is effectively reduced and the user experience is improved.

需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例五的相关内容均与实施例四的相关内容相同。It should be noted that, on the premise that there is no special indication and no contradiction, the relevant content of the fifth embodiment is the same as the relevant content of the fourth embodiment.

场景二还可通过实施例六进一步阐述。实施例六与实施例五及实施例四的主要区别在于:在实施例六中手机100并不随机生成及发送密钥,手机200向手机100直接发送手机200在社交应用上的用户帐号;因此在该实施例所示的群组成员添加过程中,为提高群组成员添加结果的安全性和可靠性,需要手机100的使用用户参与确认。实施例六中,手机100可以包括第一天线;手机200可以包括第三天线和第四天线;此处的第一天线相当于强天线或真天线。Scenario 2 can also be further elaborated throughEmbodiment 6. The main difference between the sixth embodiment and the fifth embodiment and the fourth embodiment is that in the sixth embodiment, themobile phone 100 does not randomly generate and send the key, and themobile phone 200 directly sends themobile phone 100 the user account of themobile 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 themobile phone 100 needs to participate in the confirmation. In the sixth embodiment, themobile phone 100 may include a first antenna; themobile 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.

实施例六涉及图13。图13示出了场景二下另一种添加群组成员的方法的交互流程。如图13所示,该方法流程具体包括以下步骤:The sixth embodiment relates to FIG. 13 . 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至S1301:分别与S1200至S1201相同,请参见S1200至S1201的描述,此处不再赘述。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.

S1302,手机200获取手机200在社交应用上的用户帐号,生成第一消息30,该第一消息30包括手机200在社交应用上的用户帐号。S1302, themobile phone 200 obtains the user account of themobile phone 200 on the social application, and generates a first message 30, where the first message 30 includes the user account of themobile phone 200 on the social application.

需要说明的是,用户Lucas的手机200预先已订阅添加群组成员服务,所以可以接收到手机100所发布的添加群组成员服务消息。示例性地,手机200在运行社交应用时就自动订阅添加群组成员服务消息,或者是社交应用作为常驻后台的服务启动时订阅添加群组成员服务消息。It should be noted that themobile 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 themobile phone 100 . Exemplarily, themobile 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.

示例性地,手机200的使用用户Lucas打开社交应用,手机200可以从运行的社交应用获取使用用户Lucas的用户帐号。手机200的社交应用与手机100的社交应用相同。Exemplarily, the user Lucas of themobile phone 200 opens a social application, and themobile phone 200 can obtain the user account of the user Lucas from the running social application. The social application of themobile phone 200 is the same as the social application of themobile phone 100 .

示例性地,S1302中的“社交应用的用户帐号”包括上一次登录该社交应用的用户帐号。Exemplarily, the "user account of the social application" in S1302 includes the user account that logged in the social application last time.

S1303,手机200从第三天线切换至第四天线。S1303, themobile phone 200 switches from the third antenna to the fourth antenna.

S1304,手机200通过第四天线向手机100发送第一消息30。S1304, themobile phone 200 sends the first message 30 to themobile phone 100 through the fourth antenna.

示例性地,用户Lucas的手机200收到手机发布的群组成员添加服务消息之后,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息30,这时第一消息30属于超短距帧,使得手机200发送的第一消息30不会被安全距离之外的手机接收到。Exemplarily, after themobile phone 200 of the user Lucas receives the group member adding service message published by the mobile phone, themobile 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 themobile phone 200 will not be received by the mobile phone outside the safe distance.

S1305,手机100接收到第一消息30,通过第一天线发送确认消息。S1305, themobile phone 100 receives the first message 30, and sends a confirmation message through the first antenna.

S1306,手机100从第一消息30中获取到手机200在社交应用上的用户帐号并显示。S1306 , themobile phone 100 acquires and displays the user account of themobile phone 200 on the social application from the first message 30 .

示例性地,在手机200与手机100之间的距离小于预设的安全距离后,手机100可以接收到第一消息30,然后从第一消息30中获取到手机200在社交应用上的用户帐号。Exemplarily, after the distance between themobile phone 200 and themobile phone 100 is smaller than the preset safe distance, themobile phone 100 may receive the first message 30 , and then obtain the user account of themobile phone 200 on the social application from the first message 30 . .

也就是说,若用户Lucas同意用户Alisa添加用户Lucas为一个群组的群组成员,则用户Lucas会将手机200靠近用户Alisa的手机100,或者说,用户Lucas同意用户Alisa的手机100靠近自己的手机200,这样,手机100与手机200之间的距离就小于或等于预设的安全距离(如30cm),手机100就可以接收到第一消息。That is to say, if the user Lucas agrees with the user Alisa to add the user Lucas as a group member of a group, the user Lucas will bring themobile phone 200 close to themobile phone 100 of the user Alisa, or in other words, the user Lucas agrees that themobile phone 100 of the user Alisa is close to his own Themobile phone 200, in this way, the distance between themobile phone 100 and themobile phone 200 is less than or equal to a preset safe distance (eg, 30 cm), and themobile phone 100 can receive the first message.

在获取到手机200在社交应用上的用户帐号后,手机100显示该用户帐号。After acquiring the user account of themobile phone 200 on the social application, themobile phone 100 displays the user account.

S1307,手机200接收到确认消息后,切换至第三天线。S1307, after receiving the confirmation message, themobile phone 200 switches to the third antenna.

也就是说,在手机200收到确认消息后,手机200可以通过控制射频开关从第四天线切换至第三天线。That is, after themobile phone 200 receives the confirmation message, themobile phone 200 can switch from the fourth antenna to the third antenna by controlling the radio frequency switch.

S1308,手机100接收到用户的操作,该操作用于确认同意或拒绝手机200在社交应用上的用户账号为群组成员。S1308 , themobile phone 100 receives an operation from the user, and the operation is used to confirm approval or rejection of the user account of themobile phone 200 on the social application as a group member.

具体地,当接收到用户的操作用于确认同意添加该用户帐号为群组成员,则执行后续步骤;否则,流程结束,不再执行后续步骤。Specifically, when the user's operation is received to confirm that the user account is agreed to be added as a group member, the subsequent steps are performed; otherwise, the process ends, and the subsequent steps are not performed.

示例性地,在点击手机100上的同意控件后,则继续执行后续步骤;在点击手机100上的拒绝控件后,则结束流程。Exemplarily, after the consent control on themobile phone 100 is clicked, the subsequent steps are continued; after the rejection control on themobile phone 100 is clicked, the process ends.

如果不设置S1308,则非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1302、S1304中的“发送第一消息”等的全部或部分,均可能均被非法的电子设备(攻击设备)执行。这样,就会出现,虽然用户Alisa在社交应用上的用户帐号想添加用户Lucas在社交应用上的用户帐号为一个群组的群组成员,但实际上用户Alisa在社交应用上的用户帐号添加了非法的电子设备(攻击设备)在社交应用上的用户帐号为上述群组的群组成员。这显然给用户带来了不好的体验,导致用户不便。If S1308 is not set, although the illegal electronic device (attack device) is not in the vicinity of themobile phone 100, the illegal electronic device (attack device) can simulate themobile 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). In this way, it will appear that although 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.

为了避免出现上述情形,手机100需要执行S1308。这样,S1308就提供给了手机100的用户Alisa进一步确认的步骤。若手机100接收到的操作用于确认同意,则表明用户Alisa确认是在添加手机200在社交应用上的用户帐号(比如,用户Lucas在社交应用上的用户帐号)为群组成员;若手机100接收到的操作用于拒绝,则表明用户Alisa确认不是在添加手机200在社交应用上的用户帐号为群组成员,而是在添加一个陌生人的用户帐号(比如,用户Lucas以外的陌生人在社交应用上的用户帐号)为群组成员。这样,通过手机100的用户Alisa进一步确认,来起到安全保护的作用。In order to avoid the above situation, themobile phone 100 needs to execute S1308. In this way, S1308 provides further confirmation steps for Alisa, the user of themobile phone 100 . If the operation received by themobile phone 100 is used to confirm the consent, it means that the user Alisa confirms that he is adding the user account of themobile phone 200 on the social application (for example, the user account of the user Lucas on the social application) as a group member; if themobile 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 themobile 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 themobile phone 100 plays a role of security protection.

示例性地,手机100接收到来自手机200的第一消息后,手机100显示的界面显示新的朋友的用户帐号,甚至还显示对应的用户图像信息。Exemplarily, after themobile phone 100 receives the first message from themobile phone 200, the interface displayed by themobile phone 100 displays the user account of the new friend, and even displays the corresponding user image information.

在一种实施方式中,此时用户Alisa可以辨析确认是否是希望添加的用户帐号(比如,Lucas);若是,用户Alisa可以触摸同意控件1021;否则,用户Alisa可以触摸拒绝控件1022。In one embodiment, 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 theconsent control 1021 ; otherwise, the user Alisa can touch thereject control 1022 .

在另一种实施方式中,此时用户Alisa可以向用户Lucas展示手机100上所显示的用户头像或用户帐号等信息;若用户Lucas确认是自己的帐号和头像,则会向用户Alisa作出肯定的回应(比如,在二人对话中回答用户Alisa“是我的帐号,没错”)。当用户Lucas向用户Alisa确认界面上显示的头像或用户帐号无误后,用户Alisa才点击操作手机100上的同意控件1021。假设,当用户Lucas确认界面上显示的头像并非用户Alisa的头像时,用户Lucas会告知用户Alisa,这样用户Alisa就会点击操作手机100上的拒绝控件1022,就可以避免被非法用户添加为群组成员。In another implementation manner, the user Alisa can show the user avatar or user account information displayed on themobile 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 theconsent control 1021 on themobile phone 100 to operate. Suppose, 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 therejection control 1022 on themobile phone 100 to avoid being added as a group by illegal users member.

进一步地,当用户Alisa点击同意控件1021后,手机200还可以显示一个界面,提醒用户Lucas已经添加为一个群组的群组成员。手机100也可以显示类似的界面。Further, after the user Alisa clicks theconsent control 1021, themobile 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.

S1309,当手机100接收到用于确认同意添加该用户帐号为群组成员的操作后,手机100向应用服务器发送请求消息,该请求消息用于请求添加手机200在社交应用上的用户帐号为群组成员。S1309, after themobile phone 100 receives the operation for confirming that the user account is added as a group member, themobile phone 100 sends a request message to the application server, where the request message is used to request to add the user account of themobile phone 200 on the social application as a group group members.

示例性地,该请求消息包括手机200在社交应用上的用户帐号、手机100在社交应用上“添加群组成员”控件对应的群组标识以及手机100在社交应用上的用户帐号,该请求消息请求将手机200在社交应用上的用户帐号,加入手机100在社交应用上“添加群组成员”控件对应的群组标识所在的群组中。以该群组为“家人群组”为例,手机100在获取到手机200在社交应用上的用户帐号后,就可以请求将其添加至“家人群组”中。Exemplarily, the request message includes the user account of themobile phone 200 on the social application, the group identifier corresponding to the "Add group member" control of themobile phone 100 on the social application, and the user account of themobile phone 100 on the social application. It is requested to add the user account of themobile phone 200 in the social application to the group where the group ID corresponding to the "Add group member" control of themobile phone 100 in the social application is located. Taking the group as the "family group" as an example, after acquiring the user account of themobile phone 200 on the social application, themobile phone 100 can request to add it to the "family group".

S1310,在接收到请求消息后,应用服务器向手机200发送请求消息的响应消息。S1310 , after receiving the request message, the application server sends a response message of the request message to themobile phone 200 .

示例性地,手机200还可以显示接收到添加群组成员的提示消息。如图11C所示,用户界面1130显示来自社交应用的提示消息。该提示消息用于通知用户Lucas已经添加入了一个新的群组。Exemplarily, themobile phone 200 may also display a prompt message that a group member has been added. As shown in FIG. 11C,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.

示例性地,在该步骤中,手机200接收该请求消息的响应消息之后,手机200还可以显示接收到添加群组成员成功的提示消息,用于提示群组成员添加成功。Exemplarily, in this step, after themobile phone 200 receives the response message of the request message, themobile phone 200 may further display a prompt message that the group member is successfully added, for prompting that the group member is successfully added.

可替换地,还可以通过诸如语音的音频等进行提示。Alternatively, prompting may also be provided by audio such as voice.

可替换地,还可以通过诸如语音的音频等和显示的提示消息,共同提示。Alternatively, it is also possible to jointly prompt through audio such as voice and the displayed prompt message.

S1311,应用服务器向手机100发送请求消息的响应消息。S1311 , the application server sends a response message of the request message to themobile phone 100 .

对于S1310与S1311的先后顺序,本申请不作限定。The order of S1310 and S1311 is not limited in this application.

S1312,手机100接收到响应消息后,手机100显示群组成员添加成功的提示消息。S1312, after themobile phone 100 receives the response message, themobile phone 100 displays a prompt message that the group member is successfully added.

示例性地,当手机100接收到群组成员添加成功的响应消息后,用户Alisa的手机100可以显示如图11D所示的用户界面1140。界面1140显示有通知。通知的内容可以包括:你邀请Lucas加入了群聊。Exemplarily, after themobile phone 100 receives the response message that the group member is successfully added, themobile phone 100 of the user Alisa may display theuser 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和S1311等涉及到手机100、手机200与应用服务器之间的通信交互,这种通信交互是通过社交应用自身的加密机制和解密机制,来保证通信安全的。It should be noted that S1309, S1310, and S1311, etc. involve the communication interaction between themobile phone 100, themobile 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.

需要指出的是,在一种可能的情况下,若手机200在执行S1300之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, before themobile phone 200 executes S1300, the user account of themobile phone 200 on the social application does not belong to the group corresponding to the "Add group member" control on the social application of themobile phone 100 If a member of the group is identified, the response message may indicate that the user account of themobile phone 200 on the social application has been successfully added, or the addition has failed.

可选地,在另一种可能的情况下,若手机200在执行S1300之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。Optionally, in another possible situation, before themobile phone 200 executes S1300, the user account of themobile phone 200 on the social application already belongs to the group corresponding to the "Add group member" control on themobile phone 100 on the social application. If a member of the group is identified, the application server sends a response message to themobile phone 100 to prompt the user to add repeatedly, or to prompt themobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of themobile phone 100 The members of the group where the corresponding group ID is located do not need to be added repeatedly.

需要指出的是,该实施例中,手机100默认通过第一天线;手机200默认通过第三天线,直至手机200切换至第四天线,手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。It should be noted that, in this embodiment, themobile phone 100 passes the first antenna by default; themobile phone 200 passes the third antenna by default, until themobile phone 200 switches to the fourth antenna, and after themobile phone 200 switches to the fourth antenna, themobile phone 200 passes the fourth antenna The antenna sends the message until thehandset 200 switches to the third antenna.

本实施例中,手机200是通过第四天线发送的第一消息。也就是说,本实施例并不要求手机100支持超短距帧的发送,只需要手机200支持超短距帧的发送即可。手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机200包括第三天线和第四天线,即支持超短距帧的发送。因此,处于预设的安全距离之外的其它电子设备无法接收到手机200发送的第一消息,并且还有手机100上的确认操作,所以可以保证通信的安全性。In this embodiment, themobile phone 200 sends the first message through the fourth antenna. That is to say, this embodiment does not require themobile phone 100 to support the transmission of ultra-short-range frames, but only requires themobile phone 200 to support the transmission of ultra-short-range frames. A Wi-Fi sensing channel can be established between themobile phone 100 and themobile phone 200 through the Wi-Fi sensing technology, so themobile phone 100 and themobile phone 200 do not need to be connected to the same router. Themobile 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 themobile phone 200, and there is still a confirmation operation on themobile phone 100, so the security of communication can be guaranteed.

本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,将手机100靠近或碰触好友的手机200以及确认操作,即可完成群组成员添加,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件以及确认操作,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了用户的操作次数,提升了用户体验。In the embodiment of the present application, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add group member control, move themobile phone 100 close to or touch themobile phone 200 of a friend, and confirm the operation to complete the group. To add members, the user of themobile phone 200 does not need any operation; or, the user of themobile phone 100 does not need to actively search, the user of themobile phone 100 only needs to touch the add group member control and confirm the operation, and the user of themobile phone 200 only needs to move themobile phone 200 close Or just touch themobile phone 100; in this way, the number of operations performed by the user is effectively reduced, and the user experience is improved.

需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例六的相关内容均与实施例五的相关内容相同。It should be noted that, on the premise that there is no special indication and no contradiction, the relevant content of the sixth embodiment is the same as the relevant content of the fifth embodiment.

场景二还可通过实施例七进一步阐述。实施例七与前述实施例的主要区别在于,在实施例七中手机200随机生成密钥,通过第四天线向手机100发送密钥,手机100通过第二天线向手机200发送加密后的群组帐号,手机200获取到加密后的群组帐号后,请求添加至群组。实施例七中,手机100可以包括第一天线和第二天线,手机200可以包括第三天线和第四天线。实施例七涉及图14A和图14B。Scenario 2 can also be further described throughEmbodiment 7. The main difference between the seventh embodiment and the previous embodiments is that in the seventh embodiment, themobile phone 200 randomly generates a key, sends the key to themobile phone 100 through the fourth antenna, and themobile phone 100 sends the encrypted group to themobile phone 200 through the second antenna. account, after obtaining the encrypted group account, themobile phone 200 requests to be added to the group. In the seventh embodiment, themobile phone 100 may include a first antenna and a second antenna, and themobile phone 200 may include a third antenna and a fourth antenna.Embodiment 7 relates to FIGS. 14A and 14B .

图14A示出了场景二下另一种添加群组成员方法的交互流程。如图14A所示,该方法具体包括以下步骤: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至S1401a:分别与S1300至S1301相同,请参见S1300至S1301的描述,此处不再赘述。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.

S1402a,手机200在接收到添加群组成员服务消息后,随机生成密钥,获取到包括密钥的第一消息。S1402a, after receiving the service message of adding group members, themobile phone 200 randomly generates a key, and obtains a first message including the key.

S1403a,手机200从第三天线切换至第四天线。S1403a, themobile phone 200 switches from the third antenna to the fourth antenna.

S1404a,手机200通过第四天线向手机100发送第一消息。S1404a, themobile phone 200 sends the first message to themobile phone 100 through the fourth antenna.

示例性地,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息;此时第一消息属于超短距帧;这样,手机200发送的第一消息不会被距手机200预设安全距离之外的电子设备接收到。Exemplarily, themobile 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 themobile phone 200 is The message will not be received by the electronic device beyond the preset safe distance from themobile phone 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接入同一个路由器场景下的点到点通信。In this embodiment, 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'smobile 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 themobile phone 100 and themobile phone 200 are not connected to the same router, and can also support the point-to-point communication in the scenario where themobile phone 100 and themobile phone 200 are connected to the same router.

在一种可能的实施方式中,手机200通过第四天线发送第一消息,其发送数据和接收数据的成功率有可能会降低,那么手机200可以重复多次发送密钥。In a possible implementation manner, themobile phone 200 sends the first message through the fourth antenna, and the success rate of sending data and receiving data may be reduced, so themobile phone 200 can repeatedly send the key.

S1405a,手机100接收到第一消息,从第一消息中获取密钥。S1405a, themobile phone 100 receives the first message, and obtains the key from the first message.

在手机200与手机100之间的距离小于或等于第四天线的发射距离后,手机100接收到该第一消息,然后从第一消息中获取手机200的密钥。After the distance between themobile phone 200 and themobile phone 100 is less than or equal to the transmission distance of the fourth antenna, themobile phone 100 receives the first message, and then obtains the key of themobile phone 200 from the first message.

S1406a,手机100使用密钥加密手机100中该操作在社交应用上对应群组的群组标识,获取到第二消息,第二消息包括加密后的上述群组标识。S1406a, themobile phone 100 uses the key to encrypt the group identifier of the group corresponding to the operation on the social application in themobile phone 100, and obtains a second message, where the second message includes the encrypted group identifier.

示例性地,S1400a中的操作对应于一个群组,将该群组的群组标识(比如,群组名、群组帐号等)使用密钥加密,获取到第二消息,第二消息包括加密后的上述群组标识。Exemplarily, 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. After the above group ID.

可选地,群组标识为唯一标识群组的标识。该群组在手机100上的目录也可为群组标识。Optionally, the group identifier is an identifier that uniquely identifies the group. The directory of the group on themobile phone 100 can also be a group identifier.

S1407a,手机100从第一天线切换至第二天线。S1407a, themobile phone 100 switches from the first antenna to the second antenna.

S1408a,手机100通过第二天线向手机200发送第二消息。S1408a, themobile phone 100 sends the second message to themobile phone 200 through the second antenna.

示例性的,手机100包括第一天线和第二天线,手机100可以通过控制射频开关从第一天线切换至第二天线,然后通过第二天线发送第二消息。此时的第二消息属于超短距帧,与手机100相距距离在预设的安全距离之外的电子设备无法接收到第二消息。Exemplarily, themobile phone 100 includes a first antenna and a second antenna, and themobile 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 themobile phone 100 beyond the preset safe distance cannot receive the second message.

本实施例中,该第二消息可以是Wi-Fi感知帧或信标帧。Wi-Fi感知帧为发布(Publish)帧、Follow-up帧或者订阅(Subscribe)帧,若第二消息为Follow-up帧,那么加密后的S1400a中操作在社交应用上对应群组的群组标识可以携带在Follow-up帧的payload(负载)字段中。In this embodiment, 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.

S1409a,接收到第二消息后,手机200通过第四天线发送确认消息。S1409a, after receiving the second message, themobile phone 200 sends a confirmation message through the fourth antenna.

S1410a,接收到确认消息后,手机100从第二天线切换至第一天线。S1410a, after receiving the confirmation message, themobile phone 100 switches from the second antenna to the first antenna.

S1411a,手机200使用密钥解密,获取到上述群组标识;手机200获取到手机200在社交应用上的用户帐号。S1411a, themobile phone 200 decrypts using the key to obtain the above-mentioned group identifier; themobile phone 200 obtains the user account of themobile phone 200 on the social application.

S1412a,手机200从第四天线切换至第三天线。S1412a, themobile phone 200 switches from the fourth antenna to the third antenna.

示例性的,手机200包括第三天线和第四天线,手机200可以通过控制射频开关从第四天线切换至第三天线。Exemplarily, themobile phone 200 includes a third antenna and a fourth antenna, and themobile phone 200 can be switched from the fourth antenna to the third antenna by controlling the radio frequency switch.

S1413a,手机200向应用服务器发送包括请求消息,该请求消息用于请求将手机200在社交应用上的用户帐号添加至上述群组标识对应的群组中。S1413a, themobile phone 200 sends a request message to the application server, where the request message is used to request to add the user account of themobile phone 200 on the social application to the group corresponding to the above-mentioned group identifier.

示例性,该请求消息包括手机200在社交应用上的用户帐号和上述群组标识。Exemplarily, the request message includes the user account of themobile phone 200 on the social networking application and the above-mentioned group identification.

可选地,该请求消息还包括手机100在社交应用上的用户帐号。这样,就要求S1408a中的第二消息包括使用密钥加密后的手机100在社交应用上的用户帐号;S1411a中使用密钥解密,获取到手机100在社交应用上的用户帐号。Optionally, the request message further includes the user account of themobile phone 100 on the social networking application. In this way, the second message in S1408a is required to include the user account of themobile phone 100 on the social application encrypted with the key; in S1411a, the key is decrypted to obtain the user account of themobile phone 100 on the social application.

S1414a,应用服务器向手机200发送请求消息的响应消息。S1414a, the application server sends a response message of the request message to themobile phone 200.

S1415a,应用服务器向手机100发送请求消息的响应消息。S1415a, the application server sends a response message of the request message to themobile phone 100.

对于S1414a与S1415a的先后顺序,本申请不作限定。The order of S1414a and S1415a is not limited in this application.

S1416a,手机100显示群组成员添加成功的提示消息。S1416a, themobile phone 100 displays a prompt message that the group member is successfully added.

在图14A示出的流程中,S1408a之所以采用弱天线来发送,是为了提高安全性。因为在该实施例中,需要考虑到非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1404a的“发送第一消息”,可能被非法的电子设备来模拟。即使非法的电子设备(攻击设备)模拟了手机200,执行了S1404a的“发送第一消息”,但由于S1408a中手机100通过弱天线发送第二消息,所以非法的电子设备(攻击设备)就无法接收到第二消息,从而无法利用自身生成的密钥解密,也就无法获取到S1400a中操作在社交应用上对应群组的群组标识。这样,就避免了用于添加群组成员的群组标识被非法的电子设备(攻击设备)获取,给用户带来较好的体验。In the flow shown in FIG. 14A , 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 themobile phone 100, the illegal electronic device (attack device) can simulate themobile 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. Even if the illegal electronic device (attack device) simulates themobile phone 200 and executes "send the first message" in S1404a, since themobile phone 100 sends the second message through the weak antenna in S1408a, the illegal electronic device (attack device) cannot After the second message is received, the self-generated key cannot be used for decryption, and thus the group identifier of the corresponding group operated on the social application in S1400a cannot be obtained. In this way, the group identification used for adding group members is prevented from being acquired by an illegal electronic device (attack device), which brings a better experience to the user.

而在S1408a中,若手机100通过第一天线(即强天线)发送第二消息,非法的电子设备(攻击设备)可能接收到第二消息;而之前的S1404a中的“发送第一消息”也是非法的电子设备(攻击设备)执行的,故在S1411a中,非法的电子设备(攻击设备)可以用自身先前生成的密钥来解密,获取到S1400a中操作在社交应用上对应群组的群组标识。进而,可以执行后续的S1413a,应用服务器会执行后续的S1414a和S1415a;手机100就会收到陌生人添加至群组的消息,进而影响手机100在社交应用上的使用,给用户带来不便。In S1408a, if themobile phone 100 sends the second message through the first antenna (ie, a strong antenna), the illegal electronic device (attack 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; themobile phone 100 will receive the message that the stranger is added to the group, which will affect the use of themobile phone 100 on social applications and bring inconvenience to the user.

示例性地,当手机100接收到群组成员添加成功的响应消息后,手机100可以显示如图11D所示的用户界面1140。界面1140显示有通知。通知的内容可以包括:你邀请Lucas加入了群聊。Exemplarily, after themobile phone 100 receives a response message that the group member is successfully added, themobile phone 100 may display auser 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.

需要指出的是,在一种可能的情况下,若手机100在执行S1400a之前,手机200在社交应用上的用户帐号,不属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则该响应消息可以是手机200在社交应用上的用户帐号被成功添加,或添加失败。It should be pointed out that, in a possible situation, if themobile phone 100 executes S1400a, the user account of themobile phone 200 on the social application does not belong to the group corresponding to the "Add group member" control on the social application on themobile phone 100 If a member of the group is identified, the response message may indicate that the user account of themobile phone 200 on the social application has been successfully added, or the addition has failed.

可选地,在另一种可能的情况下,若手机100在执行S1400a之前,手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,则应用服务器向手机100发送响应消息用于提示用户重复添加,或者提示手机200在社交应用上的用户帐号,已经属于手机100在社交应用上“添加群组成员”控件对应的群组标识所在群组的成员,不用重复添加。Optionally, in another possible situation, before themobile phone 100 executes S1400a, the user account of themobile phone 200 on the social application already belongs to the group corresponding to the "Add group member" control on themobile phone 100 on the social application. If a member of the group is identified, the application server sends a response message to themobile phone 100 to prompt the user to add repeatedly, or to prompt themobile phone 200 that the user account on the social application already belongs to the “Add group member” control on the social application of themobile phone 100 The members of the group where the corresponding group ID is located do not need to be added repeatedly.

需要指出的是,该实施例中,手机100默认通过第一天线,直至手机100切换至第二天线,手机100切换至第二天线之后,手机100均通过第二天线发送消息,直至手机100切换至第一天线;手机200默认通过第三天线,直至手机200切换至第四天线,手机200切换至第四天线之后,手机200均通过第四天线发送消息,直至手机200切换至第三天线。It should be noted that, in this embodiment, themobile phone 100 uses the first antenna by default until themobile phone 100 switches to the second antenna. After themobile phone 100 switches to the second antenna, themobile phone 100 sends messages through the second antenna until themobile phone 100 switches to the second antenna. Themobile phone 200 uses the third antenna by default until themobile phone 200 switches to the fourth antenna. After themobile phone 200 switches to the fourth antenna, themobile phone 200 sends messages through the fourth antenna until themobile phone 200 switches to the third antenna.

本实施例中,手机100和手机200之间可以通过Wi-Fi感知技术建立了Wi-Fi感知通道,那么手机100和手机200无需接入同一路由器。手机200包括第三天线和第四天线,即支持超短距帧的发送。因此,处于预设的安全距离之外的其它电子设备无法接收到手机200发送的第一消息,并且还有手机100上的确认操作,所以可以保证通信的安全性。In this embodiment, a Wi-Fi sensing channel can be established between themobile phone 100 and themobile phone 200 through the Wi-Fi sensing technology, so themobile phone 100 and themobile phone 200 do not need to be connected to the same router. Themobile 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 themobile phone 200, and there is still a confirmation operation on themobile phone 100, so the security of communication can be guaranteed.

本申请实施例中,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,将手机100靠近或碰触手机200,即可完成群组成员添加,手机200的用户无需任何操作;或者,手机100的用户并不需要主动搜索,手机100的用户只需要触控添加群组成员控件,手机200的用户只需将手机200靠近或碰触手机100即可;这样,有效地减少了用户的操作次数,提升了用户体验。In the embodiment of the present application, the user of themobile phone 100 does not need to actively search, and the user of themobile phone 100 only needs to touch the add group member control, and then themobile phone 100 is close to or touches themobile phone 200 to complete the group member addition, and themobile phone 200 The user of themobile phone 100 does not need any operation; or the user of themobile phone 100 does not need to actively search, the user of themobile phone 100 only needs to touch the add group member control, and the user of themobile phone 200 only needs to bring themobile phone 200 close to or touch themobile phone 100; In this way, the number of operations performed by the user is effectively reduced, and the user experience is improved.

图14B示出了场景一下另一种添加好友方法的交互流程。如图14B所示,该方法具体包括以下步骤: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至S1401b:分别与S8700至S8701相同,请参见S8700至S8701的描述,此处不再赘述。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.

S1402b,手机200在接收到添加好友服务消息后,随机生成密钥,获取到包括密钥的第一消息。S1402b, after receiving the message of adding a friend service, themobile phone 200 randomly generates a key, and obtains a first message including the key.

S1403b,手机200从第三天线切换至第四天线。S1403b, themobile phone 200 switches from the third antenna to the fourth antenna.

S1404b,手机200通过第四天线向手机100发送第一消息。S1404b, themobile phone 200 sends the first message to themobile phone 100 through the fourth antenna.

示例性地,手机200可以通过控制射频开关从第三天线切换至第四天线,然后通过第四天线发送第一消息;此时第一消息属于超短距帧;这样,手机200发送的第一消息不会被距手机200预设安全距离之外的电子设备接收到。Exemplarily, themobile 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 themobile phone 200 is The message will not be received by the electronic device beyond the preset safe distance from themobile phone 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接入同一个路由器场景下的点到点通信。In this embodiment, 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'smobile 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 themobile phone 100 and themobile phone 200 are not connected to the same router, and can also support the point-to-point communication in the scenario where themobile phone 100 and themobile phone 200 are connected to the same router.

在一种可能的实施方式中,手机200通过第四天线发送第一消息,其发送数据和接收数据的成功率有可能会降低,那么手机200可以重复多次发送密钥。In a possible implementation manner, themobile phone 200 sends the first message through the fourth antenna, and the success rate of sending data and receiving data may be reduced, so themobile phone 200 can repeatedly send the key.

S1405b,手机100接收到第一消息,从第一消息中获取密钥。S1405b, themobile phone 100 receives the first message, and obtains the key from the first message.

在手机200与手机100之间的距离小于或等于第四天线的发射距离后,手机100接收到该第一消息,然后从第一消息中获取手机200的密钥。After the distance between themobile phone 200 and themobile phone 100 is less than or equal to the transmission distance of the fourth antenna, themobile phone 100 receives the first message, and then obtains the key of themobile phone 200 from the first message.

S1406b,手机100使用密钥加密手机100在社交应用上的用户帐号,获取到第二消息,第二消息包括加密后的上述用户帐号。S1406b, themobile phone 100 uses the key to encrypt the user account of themobile phone 100 on the social networking application, and obtains a second message, where the second message includes the encrypted user account.

S1407b,手机100从第一天线切换至第二天线。S1407b, themobile phone 100 switches from the first antenna to the second antenna.

S1408b,手机100通过第二天线向手机200发送第二消息。S1408b, themobile phone 100 sends the second message to themobile phone 200 through the second antenna.

示例性的,手机100包括第一天线和第二天线,手机100可以通过控制射频开关从第一天线切换至第二天线,然后通过第二天线发送第二消息。此时的第二消息属于超短距帧,与手机100相距距离在预设的安全距离之外的电子设备无法接收到第二消息。Exemplarily, themobile phone 100 includes a first antenna and a second antenna, and themobile 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 themobile phone 100 beyond the preset safe distance cannot receive the second message.

S1409b,接收到第二消息后,手机200通过第二天线发送第二消息。S1409b, after receiving the second message, themobile phone 200 sends the second message through the second antenna.

S1410b,接收到确认消息后,手机100切换至第一天线。S1410b, after receiving the confirmation message, themobile phone 100 switches to the first antenna.

S1411b,手机200接收到第二消息,使用密钥解密,获取到上述手机100在社交应用上的用户帐号;手机200获取到手机200在社交应用上的用户帐号。S1411b, themobile phone 200 receives the second message, decrypts it with the key, and obtains the user account of themobile phone 100 on the social application; themobile phone 200 obtains the user account of themobile phone 200 on the social application.

S1412b,手机200从第四天线切换至第三天线。S1412b, themobile phone 200 switches from the fourth antenna to the third antenna.

示例性的,手机200包括第三天线和第四天线,手机200可以通过控制射频开关从第四天线切换至第三天线。Exemplarily, themobile phone 200 includes a third antenna and a fourth antenna, and themobile phone 200 can be switched from the fourth antenna to the third antenna by controlling the radio frequency switch.

S1413b,手机200向应用服务器发送请求消息,该请求消息用于请求将手机100在社交应用上的用户帐号添加为好友。S1413b, themobile phone 200 sends a request message to the application server, where the request message is used to request to add the user account of themobile phone 100 on the social application as a friend.

可选地,该请求消息还包括手机200在社交应用上的用户帐号。Optionally, the request message further includes the user account of themobile phone 200 on the social networking application.

S1414b,应用服务器向手机200发送请求消息的响应消息。S1414b, the application server sends a response message of the request message to themobile phone 200.

S1415b,应用服务器向手机100发送请求消息的响应消息。S1415b, the application server sends a response message of the request message to themobile phone 100.

对于S1414b和S1415b的先后顺序,本申请不作限定。The order of S1414b and S1415b is not limited in this application.

S1416b,手机100显示好友添加成功的提示消息。S1416b, themobile phone 100 displays a prompt message that the friend is successfully added.

在图14B示出的流程中,S1408b之所以采用弱天线来发送,是为了提高安全性。因为在该实施例中,需要考虑到非法的电子设备(攻击设备)虽然不在手机100的附近,但非法的电子设备(攻击设备)可以通过外接放大器等方式来模拟手机200,即S1404b的“发送第一消息”,可能被非法的电子设备来模拟。即使非法的电子设备(攻击设备)模拟了手机200,执行了S1404b的“发送第一消息”,但由于S1408b中手机100通过弱天线发送第二消息,所以非法的电子设备(攻击设备)就无法在S1409b接收到第二消息,从而无法利用自身生成的密钥解密,也就无法获取到S1400b中手机100在社交应用上的用户帐号。这样,就避免了手机100在社交应用上的用户帐号被非法的电子设备(攻击设备)获取,给用户带来较好的体验。In the flow shown in FIG. 14B , 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 themobile phone 100, the illegal electronic device (attack device) can simulate themobile 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. Even if the illegal electronic device (attack device) simulates themobile phone 200 and executes "send the first message" in S1404b, since themobile phone 100 sends the second message through the weak antenna in S1408b, the illegal electronic device (attack device) cannot The second message is received in S1409b, so that the self-generated key cannot be used for decryption, and thus the user account of themobile phone 100 on the social application in S1400b cannot be obtained. In this way, the user account of themobile phone 100 on the social application is prevented from being acquired by an illegal electronic device (attack device), which brings a better experience to the user.

而在S1408b中,若手机100通过第一天线(即强天线)发送第二消息,非法的电子设备(攻击设备)可能接收到第二消息;而之前的S1404b中的“发送第一消息”也是非法的电子设备(攻击设备)执行的,故在S1409b中,非法的电子设备(攻击设备)可以用自身先前生成的密钥来解密,获取到S1400b中手机100在社交应用上的用户帐号。In S1408b, if themobile phone 100 sends the second message through the first antenna (ie, a strong antenna), the illegal electronic device (attack 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 themobile phone 100 on the social application in S1400b.

需要说明的是,在没有特别指出以及没有出现矛盾的前提下,实施例七的相关内容均与实施例六的相关内容相同。It should be noted that, unless otherwise specified and no contradiction occurs, the relevant content of the seventh embodiment is the same as the relevant content of the sixth embodiment.

需要指出的是,虽然在实施例四至实施例七中,是以手机100、手机200举例,但本领域技术人员明了的是,只要安装有同一社交应用的电子设备100、电子设备200均可适用于上述实施例四至实施例七的方法。It should be pointed out that although themobile phone 100 and themobile phone 200 are used as examples in the fourth to seventh embodiments, those skilled in the art will understand that as long as theelectronic device 100 and theelectronic device 200 are installed with the same social application, both theelectronic device 100 and theelectronic device 200 are applicable. In the above-mentioned method ofEmbodiment 4 toEmbodiment 7.

需要说明的是,虽然在实施例四至实施例七中,是以“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分进行说明,但本领域技术人员明了的是,也可将“第一天线”、“第二天线”、“第三天线”、“第四天线”的全部或部分分别替换为“第一发射功率下的第一天线”、“第二发射功率下的第一天线”、“第三发射功率下的第三天线”、“第四发射功率下的第三天线”。上述“第一发射功率下的第一天线”、“第二发射功率下的第一天线”即为逻辑上的第一天线和逻辑上的第二天线;上述“第三发射功率下的第三天线”、“第四发射功率下的第三天线”即为逻辑上的第三天线和逻辑上的第四天线。逻辑上的第一天线和逻辑上的第二天线可通过芯片内部的寄存器来调整发射功率来实现。逻辑上的第三天线和逻辑上的第四天线可通过芯片内部的寄存器来调整发射功率来实现。It should be noted that although in the fourth to seventh embodiments, all or part of the "first antenna", "second antenna", "third antenna", and "fourth antenna" are described in the It is clear to the skilled person that all or part of the "first antenna", "second antenna", "third antenna" and "fourth antenna" can also be replaced with "the first antenna under the first transmit power" respectively. , "the first antenna under the second transmit power", "the third antenna under the third transmit power", "the third antenna under the fourth transmit power". The above-mentioned "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.

需要说明的是,本申请上述实施例涉及到的电子设备100、电子设备200之间虽然是以Wi-Fi信号(Wi-Fi感知)进行交互的,但诸如蓝牙、ZigBee等短距无线通信方式也适用于上述实施例的技术方案,即本申请上述实施例中的电子设备100和电子设备200之间,也可以蓝牙、ZigBee等短距无线通信方式,结合天线进行通信交互的。It should be noted that although theelectronic device 100 and theelectronic device 200 involved in the above-mentioned 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 The technical solutions of the above-mentioned embodiments are also applicable, that is, theelectronic device 100 and theelectronic device 200 in the above-mentioned embodiments of the present application can also communicate and interact by means of short-range wireless communication such as Bluetooth and ZigBee in combination with an antenna.

需要说明的是,本申请提供的上述各个实施例的全部或部分,均可以自由地、任意地相互组合。It should be noted that, all or part of the above-mentioned embodiments provided in this application can be freely and arbitrarily combined with each other.

本申请实施例提供的群组成员或好友的添加方法适用于以下的电子设备和系统。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.

图15所示为本申请提供的一种电子设备1500。电子设备1500可以为上述实施例中的电子设备100(第一电子设备),也可以为上述实施例中的电子设备200(第二电子设备)。示例性地,电子设备1500包括至少一个处理器1510、存储器1520和显示屏1530。其中,处理器1510与存储器1520和显示屏1530耦合,本申请实施例中的耦合可以是通信连接,可以是电性,或其它的形式。具体的,存储器1520用于存储程序指令。显示屏1530用于显示用户界面。处理器1510用于调用存储器1520中存储的程序指令,使得电子设备1500执行本申请实施例提供的群组成员或好友的添加方法中由第一电子设备或第二电子设备所执行的步骤。应理解,该电子设备1500可以用于实现本申请实施例提供的群组成员或好友的添加方法,相关特征可以参照上文,此处不再赘述。FIG. 15 shows anelectronic device 1500 provided by the present application. Theelectronic 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. Illustratively,electronic device 1500 includes at least oneprocessor 1510 ,memory 1520 anddisplay screen 1530 . Theprocessor 1510 is coupled with thememory 1520 and thedisplay screen 1530, and the coupling in this embodiment of the present application may be a communication connection, an electrical connection, or other forms. Specifically, thememory 1520 is used to store program instructions.Display screen 1530 is used to display a user interface. Theprocessor 1510 is configured to invoke the program instructions stored in thememory 1520, so that theelectronic 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 theelectronic 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.

在一些实施例中,在显示屏具有触摸功能时,显示屏又称为触摸显示屏。在触摸显示屏上的操作可以通过虚拟按键实现。在显示屏不具有触摸功能时,显示屏又称为非触摸显示屏。在非触摸显示屏上的操作可以通过物理按键实现。In some embodiments, 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. 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.

可选地,电子设备1500可以包含比图15所示的部件更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。此外,图15中的部件之间的组合/连接关系也是可以调整修改的。Optionally, theelectronic 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. In addition, 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.

所属领域的技术人员可以清楚地了解到本申请实施例可以用硬件实现,或硬件与软件的方式实现。当使用硬件与软件实现,可以将上述功能存储在计算机可读介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can clearly understand that the embodiments of the present application may be implemented in hardware, or in a manner of hardware and software. When implemented using hardware and software, the above-described functions can be stored in a computer-readable medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage 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.

图16示出了本申请实施例提供的通信系统的示意性框图。该通信系统可以包括服务器1601和一个或多个电子设备。图16示例性地示出了第一电子设备1602和第二电子设备1603。其中,服务器1601可以为上述方法实施例中的应用服务器。第一电子设备1602可以为上述方法实施例中的电子设备100,第二电子设备1603可以为上述方法实施例中的电子设备200。FIG. 16 shows a schematic block diagram of a communication system provided by an embodiment of the present application. The communication system may include aserver 1601 and one or more electronic devices. FIG. 16 exemplarily shows the firstelectronic device 1602 and the secondelectronic device 1603 . Theserver 1601 may be the application server in the foregoing method embodiments. The firstelectronic device 1602 may be theelectronic device 100 in the foregoing method embodiments, and the secondelectronic device 1603 may be theelectronic device 200 in the foregoing method embodiments.

另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的方法。In addition, 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.

其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, 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.

通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by different The function module is completed, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented. On the other hand, 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.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, 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.

集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。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. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a 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: a U disk, a removable hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and other media that can store program codes.

以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above content is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (30)

1. A group member or friend adding method is applied to first electronic equipment, the first electronic equipment runs a first social application, and the first electronic equipment comprises: the antenna comprises a first antenna, a second antenna and a third antenna, wherein the transmitting distance of the first antenna is a first distance which is greater than a preset first safety distance; the transmitting distance of the second antenna is a second distance which is smaller than or equal to the preset first safety distance; wherein the first antenna and the second antenna are different antennas; characterized in that the method comprises:
receiving a first user input;
the first electronic equipment generates a random key;
the first electronic device sends a first message through the second antenna, wherein the first message comprises the random key;
receiving a second message from a second electronic device;
the first electronic device decrypts the second message by using the random key to obtain a user account on the first social application;
the first electronic device sends a request message to an 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 further comprises 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 first response message, the first electronic device prompts that the first user inputs that the corresponding group is successfully added to the group members, or the first electronic device successfully adds friends to the user account on the first social application;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
2. The method of claim 1,
the first electronic equipment sends a first message through the second antenna; the method comprises the following steps: the first electronic equipment sends a first message in a Bluetooth or ZigBee wireless communication mode through the second antenna;
the receiving comes from a second message of a second electronic device; the method comprises the following steps: and receiving a second message from the second electronic equipment in a Bluetooth or ZigBee wireless communication mode.
3. The method of claim 1, wherein the first electronic device generates a random key; the method comprises the following steps:
the first electronic equipment issues a group member adding service message or a friend adding service message in a Wi-Fi-aware wireless communication mode through the first antenna;
receiving a response message from the second electronic device in a Wi-Fi aware wireless communication manner;
in response to the response message, the first electronic device generates a random key.
4. The method of claim 3, wherein the first electronic device transmits a first message via the second antenna; the method comprises the following steps: the first electronic equipment sends a first message in a Wi-Fi-aware wireless communication mode through the second antenna;
the receiving comes from a second message of a second electronic device; the method comprises the following steps: receiving a second message from the second electronic device in a Wi-Fi aware wireless communication manner.
5. The method of any of claims 1-4, wherein the receiving a second message from the second electronic device; the method comprises the following steps:
after the distance between the first electronic device and the second electronic device is less than or equal to a preset second safety distance, or after the distance between the first electronic device and the second electronic device is greater than the preset second safety distance,
receiving a second message from the second electronic device;
wherein the preset second safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.
6. The method of claim 5, wherein after said receiving a second message from a second electronic device, the method further comprises:
the first electronic device sends an acknowledgement message to the second electronic device through the first antenna.
7. The method according to any of claims 1-6, wherein the first antenna and the second antenna are connected to the same wireless communication module; the wireless communication module comprises one of a Wi-Fi chip, a Bluetooth chip and a ZigBee chip; the number of the Wi-Fi chips, the Bluetooth chips or the ZigBee chips in the wireless communication modules is one; the first antenna and the second antenna are connected with the Wi-Fi chip, the Bluetooth chip or the ZigBee chip.
8. A group member or friend adding method is applied to first electronic equipment, and the first electronic equipment runs a first social application; characterized in that the method comprises:
receiving a first user input;
responding to the first user input, and issuing a group member adding service message or a friend adding service message by the first electronic equipment through a first antenna;
after the distance between the first electronic device and the second electronic device is smaller than or equal to a preset second safety distance, receiving a first message from the second electronic device;
acquiring a user account on the first social application from the first message, and prompting to confirm the user account;
receiving a second user input confirming the addition;
in response to the second user input, the first electronic device sending a request message to an application server of the first social application through the first antenna and the first social application; the request message includes the user account; the request message further comprises 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 first response message, the first electronic device prompts that the first user inputs that the corresponding group is successfully added to the group member, or the first electronic device successfully adds the friend to the user account on the first social application;
wherein the preset second safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.
9. The method of claim 8,
the first electronic equipment issues a group member adding service message or a friend adding service message through the first antenna; the method comprises the following steps: the first electronic equipment issues a group member adding service message or a friend adding service message in a Wi-Fi sensing, Bluetooth or ZigBee wireless communication mode through the first antenna;
the receiving comes from a first message of a second electronic device; the method comprises the following steps: and receiving a first message from the second electronic equipment in a wireless communication mode of Wi-Fi perception, Bluetooth or ZigBee.
10. The method of claim 8 or 9, wherein after said receiving the first message from the second electronic device, the method further comprises:
the first electronic device sends an acknowledgement message to the second electronic device through the first antenna.
11. A group member or friend adding method is applied to first electronic equipment, and the first electronic equipment runs a first social application; the first electronic device includes: the antenna comprises a first antenna, a second antenna and a third antenna, wherein the transmitting distance of the first antenna is a first distance which is greater than a preset first safety distance; the transmitting distance of the second antenna is a second distance which is smaller than or equal to the preset first safety distance; wherein the first antenna and the second antenna are different antennas; characterized in that the method comprises:
receiving a first user input;
in response to the first user input, the first electronic device issues an add group member service message or an add friend service message through the first antenna;
after the distance between the first electronic device and the second electronic device is smaller than or equal to a preset second safety distance, receiving a first message from the second electronic device; the preset second safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext manner;
responding to the first message, acquiring a random key from the first message, and encrypting a group identifier corresponding to the first user input or a user account of the first electronic device on the first social application by using the random key;
the first electronic equipment sends a second message through the second antenna; the second message comprises the encrypted group identifier or the encrypted user account;
receiving a first response message from an application server of the first social application;
responding to the first response message, the first electronic device prompts that the first user inputs that the corresponding group is successfully added to the group member, or the first electronic device successfully adds the friend to the user account on the first social application;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext manner; the preset second safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
12. A group member or friend adding method is applied to first electronic equipment, the first electronic equipment runs a first social application, and the first electronic equipment comprises: the antenna comprises a first antenna, a second antenna and a third antenna, wherein the transmitting distance of the first antenna under first transmitting power is a first distance, the transmitting distance of the first antenna under second transmitting power is a second distance, the first distance is greater than a preset first safety distance, and the second distance is less than or equal to the preset first safety distance; characterized in that the method comprises:
receiving a first user input;
in response to the first user input, the first electronic device generating a random key;
the first electronic device sending a first message through the first antenna at the second transmission power, the first message including the random key;
receiving a second message from a second electronic device;
in response to the second message, the first electronic device decrypts the second message by using the random key to obtain a user account on the first social application;
the first electronic device sends a request message to an application server of the first social application; the request message includes the user account; the request message further comprises 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 first response message, the first electronic device prompts that the first user inputs that the corresponding group is successfully added to the group members, or the first electronic device successfully adds friends to the user account on the first social application;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
13. A group member or friend adding method is applied to first electronic equipment, the first electronic equipment runs a first social application, and the first electronic equipment comprises: the antenna comprises a first antenna, a second antenna and a third antenna, wherein the transmitting distance of the first antenna under first transmitting power is a first distance, the transmitting distance of the first antenna under second transmitting power is a second distance, the first distance is greater than a preset first safety distance, and the second distance is less than or equal to the preset first safety distance; characterized in that the method comprises:
receiving a first user input;
in response to the first user input, the first electronic device issuing an add group member service message or an add buddy service message through the first antenna at the first transmit power;
after the distance between the first electronic device and the second electronic device is smaller than or equal to a preset second safety distance, receiving a first message from the second electronic device;
responding to the first message, acquiring a random key from the first message, and encrypting the group identifier corresponding to the first user input by using the random key;
the first electronic equipment issues a second message through the first antenna under the second transmitting power; the second message comprises the encrypted group identification;
receiving a first response message from an application server of the first social application;
responding to the first response message, the first electronic device prompts that the first user inputs that the corresponding group is successfully added to the group member, or the first electronic device successfully adds the friend to the user account on the first social application;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext manner; the preset second safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
14. A group member or friend adding method is applied to second electronic equipment, the second electronic equipment runs a first social application, and the second electronic equipment comprises: the transmitting distance of the third antenna is a third distance, and the third distance is greater than a preset second safety distance; a transmitting distance of the fourth antenna is a fourth distance, and the fourth distance is smaller than or equal to the preset second safety distance; wherein the third antenna and the fourth antenna are different antennas; characterized in that the method comprises:
receiving a first message from the first electronic device after the distance between the first electronic device and the second electronic device is less than or equal to a preset first safety distance;
responding to the first message, acquiring a random key from the first message, acquiring a user account of the second electronic equipment on the first social application, and encrypting the user account by using the random key;
the second electronic equipment sends a second message through the fourth antenna, wherein the second message comprises the encrypted user account;
receiving a second response message from an application server of the first social application;
responding to the second response message, and prompting by the second electronic equipment that the user account is successfully added to the group, or the user account is successfully added to the friend;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
15. The method of claim 14, wherein prior to the receiving the second response message from the application server of the first social application, the method further comprises:
receiving a confirmation message from the first electronic device;
in response to the acknowledgement message, the second electronic device switches to the third antenna.
16. The method according to claim 14 or 15, wherein prior to said receiving the first message from the first electronic device, the method further comprises:
receiving a group member adding service message or a friend adding service message from the first electronic equipment in a Wi-Fi-aware wireless communication mode;
and responding to the service message of adding the group members or the service message of adding the friends, and sending a response message by the second electronic equipment through the third antenna in a Wi-Fi-aware wireless communication mode.
17. The method according to claim 14 or 15,
the receiving comes from a first message of a first electronic device; the method comprises the following steps: receiving a first message from a first electronic device in a Bluetooth or ZigBee wireless communication mode;
the second electronic device sends a second message through the fourth antenna; the method comprises the following steps: and the second electronic equipment sends a second message in a Bluetooth or ZigBee wireless communication mode through the fourth antenna.
18. A group member or friend adding method is applied to second electronic equipment, and the second electronic equipment runs a first social application; characterized in that the method comprises:
receiving a first message from the first electronic device after the distance between the first electronic device and the second electronic device is less than or equal to a preset first safety distance;
responding to the first message, acquiring a random key from the first message, acquiring a user account of the second electronic equipment on the first social application, and encrypting the user account by using the random key;
the second electronic equipment sends a second message through the third antenna, wherein the second message comprises the encrypted user account;
receiving a request message from an application server of the first social application;
receiving a first user operation for confirming the addition;
responding to the first user operation, and sending a reply message to the application server by the second electronic equipment; the reply message is used for indicating the addition of confirmation;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
19. A group member or friend adding method is applied to second electronic equipment, the second electronic equipment runs a first social application, and the second electronic equipment comprises: the transmitting distance of the third antenna is a third distance, and the third distance is greater than a preset second safety distance; a transmitting distance of the fourth antenna is a fourth distance, and the fourth distance is smaller than or equal to the preset second safety distance; wherein the third antenna and the fourth antenna are different antennas; characterized in that the method comprises:
receiving an adding group member service message or an adding friend service message from a first electronic device;
responding to the group member adding service message or friend adding service message, and acquiring a user account of the second electronic equipment on the first social application;
the second electronic equipment sends a first message to the first electronic equipment through the fourth antenna; the first message comprises a user account of the second electronic device on the first social application;
receiving a second response message from an application server of the first social application;
responding to the second response message, the second electronic device prompts that the user account is successfully added to the group, or the user account is successfully added to the friend;
wherein the preset second safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.
20. The method of claim 19, wherein prior to the receiving the second response message from the application server of the first social application, the method further comprises:
receiving a confirmation message from the first electronic device;
in response to the acknowledgement message, the second electronic device switches to the third antenna.
21. A group member or friend adding method is applied to second electronic equipment, the second electronic equipment runs a first social application, and the second electronic equipment comprises: the transmitting distance of the third antenna is a third distance, and the third distance is greater than a preset second safety distance; a transmitting distance of the fourth antenna is a fourth distance, and the fourth distance is smaller than or equal to the preset second safety distance; wherein the third antenna and the fourth antenna are different antennas; characterized in that the method comprises:
receiving an add group member service message or an add friend service message from the first electronic device;
responding to the adding group member service message or adding friend service message, and generating a random key by the second electronic equipment;
the second electronic equipment sends a first message through the fourth antenna; the first message includes the random key;
after the distance between first electronic equipment and second electronic equipment is smaller than or equal to a preset first safety distance, the second electronic equipment receives a second message from the first electronic equipment, decrypts the second message by using the random key, acquires a group identifier on the first social application, or a user account of the first electronic equipment on the first social application, and acquires a user account of the second electronic equipment on the first social application;
the second electronic device sends a request message to an application server of the first social application through the third antenna and the first social application; the request message comprises the group identification or a user account of the first electronic device on the first social application, and a user account of the second electronic device on the first social application;
receiving a second response message from the application server;
responding to the second response message, the second electronic device prompts that the user account is successfully added to the group, or the user account is successfully added to the friend;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
22. The method of claim 21, wherein after the second electronic device receives the second message from the first electronic device, the method further comprises:
and the second electronic equipment sends a confirmation message through the fourth antenna.
23. A group member or friend adding method is applied to second electronic equipment, the second electronic equipment runs a first social application, and the second electronic equipment comprises: a third antenna, wherein a transmission distance of the third antenna under a third transmission power is a third distance, a transmission distance of the third antenna under a fourth transmission power is a fourth distance, the third distance is greater than a preset second safety distance, and the fourth distance is less than or equal to the preset second safety distance; characterized in that the method comprises:
receiving a first message from the first electronic device after the distance between the first electronic device and the second electronic device is less than or equal to a preset first safety distance;
responding to the first message, acquiring a random key from the first message, acquiring a user account of the second electronic equipment on the first social application, and encrypting the user account by using the random key;
the second electronic device sends a second message through the third antenna under the fourth transmitting power, wherein the second message comprises the encrypted user account;
receiving a second response message from an application server of the first social application;
responding to the second response message, and prompting by the second electronic equipment that the user account is successfully added to the group, or the user account is successfully added to the friend;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
24. A group member or friend adding method is applied to second electronic equipment, the second electronic equipment runs a first social application, and the second electronic equipment comprises: a third antenna, wherein a transmission distance of the third antenna under a third transmission power is a third distance, a transmission distance of the third antenna under a fourth transmission power is a fourth distance, the third distance is greater than a preset second safety distance, and the fourth distance is less than or equal to the preset second safety distance; characterized in that the method comprises:
receiving an adding group member service message or an adding friend service message from a first electronic device;
responding to the group member adding service message or friend adding service message, and acquiring a user account of the second electronic equipment on the first social application;
the second electronic device sends a first message to the first electronic device through the third antenna at the fourth transmission power; the first message comprises a user account of the second electronic device on the first social application;
receiving a second response message from an application server of the first social application;
responding to the second response message, and prompting by the second electronic equipment that the user account is successfully added to the group, or the user account is successfully added to the friend;
wherein the preset second safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in plaintext.
25. A group member or friend adding method is applied to second electronic equipment, the second electronic equipment runs a first social application, and the second electronic equipment comprises: a third antenna, wherein a transmission distance of the third antenna under a third transmission power is a third distance, a transmission distance of the third antenna under a fourth transmission power is a fourth distance, the third distance is greater than a preset second safety distance, and the fourth distance is less than or equal to the preset second safety distance; characterized in that the method comprises:
receiving an add group member service message or an add friend service message from the first electronic device;
responding to the adding group member service message or adding friend service message, and generating a random key by the second electronic equipment;
the second electronic device sends a first message through the third antenna at the fourth transmission power; the first message includes the random key;
after the distance between first electronic equipment and second electronic equipment is smaller than or equal to a preset first safety distance, the second electronic equipment receives a second message from the first electronic equipment, decrypts the second message by using the random key, acquires a group identifier on the first social application, or a user account of the first electronic equipment on the first social application, and acquires a user account of the second electronic equipment on the first social application;
the second electronic device sends a request message to an application server of the first social application through the third antenna and the first social application under the third transmission power; the request message comprises the group identification or a user account of the first electronic device on the first social application, and a user account of the second electronic device on the first social application;
receiving a second response message from the application server;
responding to the second response message, and prompting by the second electronic equipment that the user account is successfully added to the group, or the user account is successfully added to the friend;
the preset first safety distance is a safety distance at which the first electronic device and the second electronic device can exchange secret information in a plaintext mode.
26. A first electronic device, comprising: a memory, a processor, and a computer program; wherein the computer program is stored in the memory; characterized in that the computer program, when executed by the processor, causes the first electronic device to implement the method of adding a group member or buddy according to any of claims 1-13.
27. A second electronic device, comprising: a memory, a processor, and a computer program; wherein the computer program is stored in the memory; characterized in that the computer program, when being executed by the processor, causes the first electronic device to carry out the method of adding a group member or buddy according to any of claims 14-25.
28. A computer-readable storage medium comprising a computer program, which, when run on a first electronic device, causes the first electronic device to perform the method of adding a group member or buddy according to any of claims 1-13.
29. A computer-readable storage medium comprising a computer program, which, when run on a second electronic device, causes the second electronic device to perform the method of adding a group member or buddy according to any of claims 14-25.
30. A computer program product, characterized in that, when run on a first electronic device, it causes the first electronic device to perform the method of adding a group member or buddy according to any of claims 1-13; alternatively, when the computer program is run on a second electronic device, it causes the second electronic device to perform the method of adding a group member or buddy according to any of claims 14-25.
CN202110129143.2A2021-01-292021-01-29Group member or friend adding method, electronic equipment and systemActiveCN114827059B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN202110129143.2ACN114827059B (en)2021-01-292021-01-29Group member or friend adding method, electronic equipment and system
PCT/CN2021/141790WO2022161071A1 (en)2021-01-292021-12-27Group member or friend adding method, and electronic device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110129143.2ACN114827059B (en)2021-01-292021-01-29Group member or friend adding method, electronic equipment and system

Publications (2)

Publication NumberPublication Date
CN114827059Atrue CN114827059A (en)2022-07-29
CN114827059B CN114827059B (en)2023-06-27

Family

ID=82525605

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110129143.2AActiveCN114827059B (en)2021-01-292021-01-29Group member or friend adding method, electronic equipment and system

Country Status (2)

CountryLink
CN (1)CN114827059B (en)
WO (1)WO2022161071A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119210845A (en)*2024-09-242024-12-27北京字跳网络技术有限公司 Method, device, equipment, storage medium and program product for determining association relationship

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116095031B (en)*2023-04-102023-06-20科讯嘉联信息技术有限公司RPA automatic micro-adding system
CN116566757A (en)*2023-05-052023-08-08江苏通付盾科技有限公司Method for adding friends of conference participants by one key of conference system host

Citations (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140164519A1 (en)*2012-12-122014-06-12Netspective Communications LlcIntegration of devices through a social networking platform
WO2015027801A1 (en)*2013-08-292015-03-05华为终端有限公司Near field communication-based data transmission method and apparatus, and near field communication device
CN105137750A (en)*2015-09-242015-12-09北京奇虎科技有限公司Method realizing data transmission of intelligent watch, device and intelligent watch
CN105681161A (en)*2015-08-202016-06-15腾讯科技(深圳)有限公司Method, device and system for adding friend account
CN106411716A (en)*2016-10-282017-02-15珠海市魅族科技有限公司Friend adding method and apparatus
WO2017128870A1 (en)*2016-01-262017-08-03腾讯科技(深圳)有限公司Information processing method, first terminal, second terminal, server and system
US20180061423A1 (en)*2016-08-262018-03-01Beijing Xiaomi Mobile Software Co., Ltd.Friend addition method, device and medium
CN108900969A (en)*2018-06-072018-11-27广东小天才科技有限公司friend adding method, device, equipment and storage medium
CN110149269A (en)*2019-05-302019-08-20华为技术有限公司A kind of communication means, server and communication system
CN111835530A (en)*2020-07-102020-10-27Oppo广东移动通信有限公司 Group joining method and device
CN112153721A (en)*2020-08-052020-12-29华为技术有限公司 A wireless routing device access method and wireless routing device
WO2021000696A1 (en)*2019-06-302021-01-07上海连尚网络科技有限公司Method and device for adding friend

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
DE602005020584D1 (en)*2005-04-252010-05-27Sony Ericsson Mobile Comm Ab Electronic device for a wireless communication system and method for operating an electronic device for a wireless communication system
JP2009087044A (en)*2007-09-282009-04-23Ntt Docomo Inc Communication terminal device, community management device
CN102521743B (en)*2011-11-162014-07-09赵启程Mobile phone safety payment method and system on basis of wireless channel
KR101388251B1 (en)*2012-11-302014-04-24숭실대학교산학협력단Method and apparatus for authentication of unknown user in social network service
US9633496B2 (en)*2014-01-092017-04-25Ford Global Technologies, LlcVehicle contents inventory system
CN104125485B (en)*2014-07-022018-03-16深圳创维数字技术有限公司A kind of user profile shared method, equipment and system
CN105610949B (en)*2015-12-302020-04-07腾讯科技(深圳)有限公司Resource data use permission sharing method, device and system
WO2020227133A1 (en)*2019-05-062020-11-12Apple Inc.Standalone wearable device configuration and interface

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140164519A1 (en)*2012-12-122014-06-12Netspective Communications LlcIntegration of devices through a social networking platform
WO2015027801A1 (en)*2013-08-292015-03-05华为终端有限公司Near field communication-based data transmission method and apparatus, and near field communication device
CN105681161A (en)*2015-08-202016-06-15腾讯科技(深圳)有限公司Method, device and system for adding friend account
CN105137750A (en)*2015-09-242015-12-09北京奇虎科技有限公司Method realizing data transmission of intelligent watch, device and intelligent watch
WO2017128870A1 (en)*2016-01-262017-08-03腾讯科技(深圳)有限公司Information processing method, first terminal, second terminal, server and system
US20180061423A1 (en)*2016-08-262018-03-01Beijing Xiaomi Mobile Software Co., Ltd.Friend addition method, device and medium
CN106411716A (en)*2016-10-282017-02-15珠海市魅族科技有限公司Friend adding method and apparatus
CN108900969A (en)*2018-06-072018-11-27广东小天才科技有限公司friend adding method, device, equipment and storage medium
CN110149269A (en)*2019-05-302019-08-20华为技术有限公司A kind of communication means, server and communication system
WO2021000696A1 (en)*2019-06-302021-01-07上海连尚网络科技有限公司Method and device for adding friend
CN111835530A (en)*2020-07-102020-10-27Oppo广东移动通信有限公司 Group joining method and device
CN112153721A (en)*2020-08-052020-12-29华为技术有限公司 A wireless routing device access method and wireless routing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119210845A (en)*2024-09-242024-12-27北京字跳网络技术有限公司 Method, device, equipment, storage medium and program product for determining association relationship

Also Published As

Publication numberPublication date
CN114827059B (en)2023-06-27
WO2022161071A1 (en)2022-08-04

Similar Documents

PublicationPublication DateTitle
CN113630297B (en)Method and terminal for controlling first equipment
WO2022161071A1 (en)Group member or friend adding method, and electronic device
CN105141568B (en)Secured communication channel method for building up and system, client and server
CN113014483B (en)Multi-path transmission method and equipment
CN113163379A (en)Method for discovering and distributing network and electronic equipment
CN112995990B (en)Method, system and equipment for synchronizing key information
EP4344268A1 (en)Communication method and electronic device
CN113038627B (en)File sharing method, mobile device and computer storage medium
KR101914117B1 (en)Method and apparatus for establishing Wireless Local Network link between portable terminals
CN114697058B (en) An identity authentication method, electronic device, and computer-readable storage medium
CN114079862B (en)Automatic control method, electronic device and computer readable storage medium
CN116634362B (en) Automatic control method, electronic device and computer-readable storage medium
CN115550919A (en)Equipment pairing authentication method and device, sender equipment and receiver equipment
CN116133161B (en)Data transmission method and electronic equipment
CN115412387B (en) Audio playback method, system and electronic device
CN112615891B (en)Pairing method and device
CN117332398A (en)Method, device and system for issuing device certificate
CN114844974B (en)Method for sharing address book, mobile device, electronic device and communication system
EP4336801A1 (en)Device control method and apparatus
EP4203409A1 (en)Method and devices for configuring device
CN114844732B (en) A conference access method and electronic device
CN119277336B (en)Call forwarding setting method, terminal equipment and computer readable storage medium
CN115884140B (en) Cross-device connection method, electronic device, and storage medium
EP4583587A1 (en)Router connecting method and apparatus
CN116491100A (en)Pre-master key generation method and device of data packet transport layer security protocol DTLS

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp