Method and device for adding friends, computer equipment and storage medium
By using ultrasonic scanning module and confirmation interface on smart devices, the process of adding friends is simplified, the problem of complexity of adding friends face-to-face in the existing technology is solved, and the convenience of adding friends in social media software is improved.
Patent Information
- Application Number
- CN202410837893.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-11-01
AI Technical Summary
Existing methods of adding friends in person are complex in social media software, including scan and radar scan, adding to the complexity of the steps.
By displaying the scanning dynamic page on the smart device, triggering the ultrasonic scanning module, and after receiving the ultrasonic request signal sent by the second smart device, the user can confirm the addition of friends on the interface and directly add the friend name information to the friend in the list.
Simplifies the process of adding friends, reduces the complexity of user operations, and improves the convenience of adding friends in social media software.
Smart Images

Figure CN118890334A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of Internet, and specifically to a method, apparatus, computer device and storage medium for adding friends. Background Art
[0002] Currently, when users can use social media software to share information with each other, they need to add the other party as a friend first. The existing face-to-face method of adding friends can use the scanning method, that is, using the camera to scan the QR code representing the other party's social media account to add friends. You can also use the radar scanning method, which may require determining whether each mobile phone is in the same wifi, or determining whether each mobile phone can detect the other party's Bluetooth signal. The above two face-to-face methods of adding friends have increased the complexity of the steps of adding friends in social media software to a certain extent. Summary of the invention
[0003] In view of this, multiple embodiments of this specification are dedicated to providing a method, apparatus, computer device and storage medium for adding friends, so as to improve the convenience of adding friends in social media software to a certain extent.
[0004] The implementation mode of this specification proposes a method for adding friends, which is applied to a first smart device, and the method includes: displaying a scanning dynamic page; the scanning dynamic page is used to trigger the ultrasonic scanning module of the first smart device; when the ultrasonic request signal sent by the second smart device meets the preset conditions, a friend adding confirmation interface pops up; wherein the friend adding confirmation interface includes friend name information and a confirmation control for whether to add a friend; wherein the friend name information is obtained based on the analysis of the ultrasonic request signal; when the user triggers the confirmation control, the friend represented by the friend name information is added to the friend list.
[0005] The implementation mode of this specification proposes a device for adding friends, which is applied to a first smart device, and the device for adding friends includes: an ultrasonic scanning unit, which is used to display a scanning dynamic page; the scanning dynamic page is used to trigger the ultrasonic scanning module of the first smart device; an adding confirmation unit, which is used to pop up an adding friend confirmation interface when an ultrasonic request signal sent by a second smart device is received and meets a preset condition; wherein the adding friend confirmation interface includes friend name information and a confirmation control for whether to add a friend; wherein the friend name information is obtained based on the analysis of the ultrasonic request signal; a friend adding unit, which is used to add the friend represented by the friend name information to a friend list when the user triggers the confirmation control.
[0006] An embodiment of the present specification provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the above embodiment when executing the computer program.
[0007] The embodiments of this specification provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in the above embodiments is implemented.
[0008] The embodiments of this specification provide a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the method described in the above embodiments.
[0009] The implementation method of this specification is that the user opens the ultrasonic friend adding interface of the social media software. At this time, the microphone of the first smart device receives the ultrasonic signal sent by other smart devices, and dynamically displays the scanning status on the interface of the first smart device. When the ultrasonic request signal sent by the second smart device is received, the friend adding confirmation interface pops up. At this time, the user can choose to confirm the addition on the confirmation interface, and the friend represented by the ultrasonic signal can be added to the friend list, so that the user does not need to repeat the search confirmation operation multiple times, thereby improving the convenience of adding friends in the social media software to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 Shown is a flowchart of a method for adding friends provided in one embodiment.
[0011] Figure 2 Shown is a schematic diagram of a dynamic scanning interface for adding friends provided by an implementation method.
[0012] Figure 3 Shown is a schematic diagram of a friend confirmation interface for adding a friend provided by an implementation method.
[0013] Figure 4 Shown is a schematic diagram of a reminder interface for failure to add a friend provided by an implementation method.
[0014] Figure 5 The figure is a schematic diagram of a process flow of an unlocking device for a smart device provided in one embodiment.
[0015] Figure 6 Shown is a schematic diagram of a computer device provided by an embodiment. DETAILED DESCRIPTION
[0016] In order to enable those skilled in the art to better understand the solution of this specification, the technical solution in the implementation of this specification will be clearly and completely described below in conjunction with the drawings in the implementation of this specification. Obviously, the described implementation is only a part of the implementation of this specification, not all of the implementations. Based on the implementation in this specification, all other implementations obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0017] Currently, when users can use social media software to share information with each other, they need to add the other party as a friend first. The existing face-to-face method of adding friends can use the scanning method, that is, using the camera to scan the QR code representing the other party's social media account to add friends. You can also use the radar scanning method, which may require determining whether each mobile phone is in the same wifi, or determining whether each mobile phone can detect the other party's Bluetooth signal. The above two face-to-face methods of adding friends have increased the complexity of the steps of adding friends in social media software to a certain extent.
[0018] Therefore, the implementation manner of this specification proposes a method for adding friends, which improves the convenience of adding friends in social media software to a certain extent.
[0019] See also Figure 1 The embodiment of this specification provides a method for adding a friend. The method for adding a friend may include the following steps.
[0020] Step S110: displaying a scanning dynamic page; the scanning dynamic page is used to trigger the ultrasonic scanning module of the first smart device.
[0021] In this embodiment, the user can first open a page for adding friends using ultrasound in the first smart device (eg, Figure 2 At this time, the first smart device can search for the ultrasonic signal emitted by the second smart device. Currently, the user can bring the earpiece of the first smart device close to the earpiece of the second smart device and touch them together to complete the interactive operation of adding friends between the first smart device and the second smart device.
[0022] In this embodiment, the ultrasonic scanning module may be a built-in earpiece of the first smart device. Generally, the earpiece of the first smart device is located directly above the screen, and the earpiece of the second smart device is also located directly above the screen. Therefore, the ultrasonic information can be transmitted based on a "head-to-head" operation.
[0023] In this embodiment, the first smart device may be a mobile terminal such as a mobile phone, a tablet computer, a smart watch, etc. The device type of the second smart device is the same as or similar to the device type of the first smart device.
[0024] Step S120: When the ultrasonic request signal sent by the second smart device meets the preset conditions, a friend adding confirmation interface pops up; wherein the friend adding confirmation interface includes friend name information and a confirmation control for whether to add a friend; wherein the friend name information is obtained based on the analysis of the ultrasonic request signal.
[0025] In this embodiment, if the preset interaction action, i.e., the "head-to-head" operation, is completed between the first smart device and the second smart device, a friend adding confirmation interface (such as Figure 3 The confirmation interface may include friend name information, and the user may ask whether the holder of the second smart device is the friend name information. It should be noted that the confirmation interface only needs to include the above content to fall within the scope of protection of the implementation mode of this specification, and the specific layout of the friend information and the confirmation control is not limited here.
[0026] In this embodiment, the preset condition may be to determine whether the strength of the ultrasonic signal has reached a preset threshold value based on the ultrasonic request signal received from the second smart device. If the preset threshold value is reached, it means that the two have performed a "head-to-head" operation. The preset condition may also include posture data fed back by the built-in inertial measurement unit (IMU) of the first smart device and the second smart device to determine whether the two have performed a "head-to-head" operation. The specific preset conditions are not limited in the embodiments of this specification.
[0027] In this embodiment, the ultrasonic request signal is an ultrasonic signal obtained after the second intelligent device compiles the user information in the second intelligent device. First, the user information (including user identification and user name) is converted into a digital form, such as a digital signal generated by a computer or other data source. Then, the digital signal is converted into an analog signal suitable for ultrasonic transmission. A common method is to use modulation techniques, such as frequency shift keying modulation (FSK) or phase shift keying modulation (PSK), to convert digital data into an analog signal. Subsequently, an appropriate ultrasonic generator or ultrasonic sensor is used to generate an ultrasonic signal with a suitable frequency and amplitude. Ultrasonic waves are generally defined as sound waves with a frequency exceeding 20kHz, typically in the range of 20kHz to 1GHz. Finally, the generated ultrasonic request signal is transmitted to the first intelligent device through the air.
[0028] In this embodiment, after receiving the ultrasonic request signal, the first intelligent device needs to parse it into friend name information. The received electrical signal may be amplified, filtered and other signal processing steps to ensure effective signal parsing. If modulation technology (such as frequency shift keying modulation or phase shift keying modulation) is used during transmission, a demodulation operation is required. The purpose of demodulation is to convert the received analog signal back into a digital signal form. Once the signal is demodulated into digital form, it can be further processed and parsed. This includes methods for detecting and recovering the original data to ensure accuracy and integrity. Finally, according to the encoding method used during transmission (such as FSK or PSK), the digital signal is decoded into the original information. The decoding process needs to restore the correct order and content of the data according to a pre-agreed protocol or algorithm, that is, the friend name information including the user ID and user name can be obtained.
[0029] Step S130: When the user triggers the confirmation control, the friend represented by the friend name information is added to the friend list.
[0030] In this embodiment, when the user holding the first smart device triggers the confirmation control, it means that he agrees to add the friend to his address book. At this time, the friend can be added to his friend list. It should be noted that the method of adding friends can also be used to add friends in social media. After adding friends, the friend information can be stored in the friend list under the account, and messages can be sent to the friend through the account. The method of adding friends can also add friends in the user's mobile phone address book. At this time, the user information is stored in the memory of the first smart device or the cloud account.
[0031] In some embodiments, the method for adding a friend may further include: receiving an ultrasonic request signal sent by a second smart device; based on the ultrasonic request signal, determining whether the first smart device and the second smart device perform a preset interaction action; when the first smart device and the second smart device perform a preset interaction action, parsing the ultrasonic request signal to obtain the friend name information; wherein the friend name information includes a user nickname and a user ID.
[0032] In this embodiment, the general method of adding friends at close range between two devices requires one party to open the QR code representing his / her identity, and the other party to scan it with a camera, and then send a friend application. Only when one party agrees can the friend be successfully added, which makes the process of adding friends at close range more cumbersome. Therefore, in the embodiment of this specification, it is proposed to determine whether the second smart device has performed a preset interactive action based on the ultrasonic request signal. If the second smart device has performed the preset interactive action, it means that the response operation of adding friends has been performed between the first smart device and the second smart device. After confirming the identity of the other party, the friend can be added to one's friend list.
[0033] In this embodiment, after the ultrasonic wave propagates through the transmission medium, it is received by the ultrasonic receiver or microphone. The received ultrasonic signal is amplified and filtered to remove noise, and demodulated to convert the ultrasonic signal back to a digital signal. Decoding and restoration: Finally, the received digital signal is decoded and converted into a serial code form. This may involve a reverse encoding process to convert the digital signal into the original friend name information.
[0034] In some embodiments, based on the ultrasonic request signal, determining whether the first smart device and the second smart device perform a preset interaction action may include: determining whether the signal strength of the ultrasonic request signal reaches a preset threshold; accordingly, when the signal strength of the ultrasonic request signal is greater than or equal to the preset threshold, parsing the ultrasonic request signal.
[0035] In this embodiment, the preset interaction action is to touch the earpieces of the first smart device and the second smart device (i.e., a "head-to-head" operation), and then a judgment can be made based on the signal strength of the ultrasonic request signal. When the signal strength reaches a preset threshold, it indicates that the speakers and microphones of the two devices have been touched. Therefore, when the signal strength of the ultrasonic request signal is greater than or equal to the preset threshold, the ultrasonic request signal can be parsed. The specific method of parsing the ultrasonic request signal is not repeated here.
[0036] In some embodiments, determining whether the signal strength of the ultrasonic request signal reaches a preset threshold may include: calculating the ratio of the power of the useful signal to the power of the noise signal in the ultrasonic request signal to obtain a target signal-to-noise ratio; determining whether the signal strength of the ultrasonic request signal reaches a preset threshold based on the target signal-to-noise ratio; and correspondingly, when the target signal-to-noise ratio is greater than or equal to the preset threshold, parsing the ultrasonic request signal.
[0037] In this embodiment, the signal-to-noise ratio of the ultrasonic signal refers to the ratio of the power of the useful signal to the power of the noise signal in the ultrasonic signal. When the two devices are close enough, the power of the useful signal received by the first intelligent device will increase, while the noise will decrease. Yes, the ratio of the power of the useful signal to the power of the noise signal can be used as the target signal-to-noise ratio to determine whether the ultrasonic receiving module of the first intelligent device and the ultrasonic transmitting module of the second intelligent device are in a close relationship with each other. When the target signal-to-noise ratio reaches a preset threshold, it means that the first intelligent device and the second intelligent device have performed a preset action, and then the ultrasonic request signal can be parsed.
[0038] In some embodiments, the method for adding a friend may further include: when the signal strength of the ultrasonic request signal is greater than or equal to a preset threshold, receiving orientation information fed back by the second smart device; when the orientation information is the same as the orientation of the first smart device, parsing the ultrasonic request signal.
[0039] In this embodiment, if the judgment is made based only on the strength of the ultrasonic request signal, the two mobile phones can use the "face-to-face" module, that is, the handsets of the two mobile phones are placed together, and the operation can also be achieved, so it may cause interaction errors. Therefore, in order to achieve proximity authentication between two mobile phones, the orientation of the second smart device can also be verified, and the data of the inertial measurement unit (IMU) sensor can be broadcast through Bluetooth, WiFi, etc. by the second smart device, so that the first smart device can make a judgment when receiving the orientation information, so that when the strength of the ultrasonic request signal and the orientation of the second smart device meet the preset conditions, the ultrasonic request signal is parsed to obtain the device identification information of the second smart device.
[0040] In some embodiments, the method for adding friends may also include: compiling user name information into an ultrasonic broadcast signal; wherein the user name information includes the user name and user identification information of the first smart device; sending an ultrasonic broadcast signal so that the second smart device can receive the user information of the first smart device.
[0041] In this embodiment, in addition to the first smart device receiving the ultrasonic request signal sent by the second smart device, it is also necessary to send an ultrasonic broadcast signal to send its own account information to the second smart device. The process of compiling the account information in the first smart device into the ultrasonic broadcast signal is the same as the process of compiling the friend name signal in the second smart device into the ultrasonic request signal described in the above embodiment. Then, the ultrasonic broadcast signal can be sent out so that after receiving the ultrasonic broadcast signal, the second smart device can also parse the account information in the first smart device based on the ultrasonic broadcast signal.
[0042] In some embodiments, the method for adding a friend may further include: if an ultrasonic request signal meeting a preset condition sent by the second smart device is not searched within a preset time range, displaying a prompt message indicating that the friend has not been found on the screen of the first smart device.
[0043] In this embodiment, in some cases, the distance between the earpieces of the two devices may be far apart due to the user holding the mobile phone for the "head-to-head" operation, resulting in the ultrasonic request signal sent by the second smart device received by the first smart device not reaching the predetermined signal-to-noise ratio, resulting in failure to add friends. It is also possible that the first smart device and the second smart device do not perform the "head-to-head" operation according to the established standard steps, resulting in the acquired IMU data not meeting the predetermined conditions. At this time, the mobile phone cannot be kept in the dynamic process of searching for ultrasonic request signals. Therefore, within the preset time range (for example, 15s), a prompt message (such as "No friend found") may be displayed on the screen of the first smart device. Figure 4 As shown), the interface may also prompt the user to search again, so that the user can adjust the action of adding friends in time.
[0044] See also Figure 5 In some embodiments, a device for adding a friend may be provided, and the device for adding a friend may include: an ultrasound scanning unit, an adding confirmation unit, and a friend adding unit.
[0045] The ultrasonic scanning unit is used to display a scanning dynamic page; the scanning dynamic page is used to trigger the ultrasonic scanning module of the first smart device.
[0046] An adding confirmation unit is used to pop up an adding friend confirmation interface when the ultrasonic request signal sent by the second smart device meets the preset conditions; wherein the adding friend confirmation interface includes the friend name information and a confirmation control for whether to add the friend; wherein the friend name information is obtained based on the analysis of the ultrasonic request signal.
[0047] The friend adding unit is used to add the friend represented by the friend name information to the friend list when the user triggers the confirmation control.
[0048] Regarding the specific functions and effects achieved by the device for adding friends, please refer to other embodiments of this specification for comparison and explanation, and will not be repeated here. The various modules in the device for adding friends can be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0049] See also Figure 6 In some implementations, a computer device may be provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method steps in the implementation are implemented.
[0050] In some embodiments, a computer-readable storage medium may be provided, on which a computer program is stored. When the computer program is executed by a processor, the method steps in the embodiments are implemented.
[0051] In some embodiments, a computer program product may be provided, comprising computer instructions, wherein the computer instructions are used to cause a computer to execute the method steps in the embodiments.
[0052] Those of ordinary skill in the art can understand that all or part of the processes in the implementation method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the implementation methods of the methods described. Among them, any reference to memory, storage, database or other media used in the various implementations provided in this specification may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0053] It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0054] The descriptions of the various embodiments of this specification are made in a progressive manner. Different embodiments focus on describing the parts that are different from other embodiments. After reading this specification, a person skilled in the art can know that the various embodiments in this specification, as well as the various technical features disclosed in the embodiments, can be combined in more ways. To make the description concise, not all possible combinations of the various technical features in the embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0055] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0056] The multiple embodiments in this specification emphasize the parts that are different from other embodiments, and the various embodiments can be explained in comparison with each other. Any combination of the multiple embodiments in this specification by technicians in the relevant field based on general technical knowledge is included in the disclosure scope of this specification.
[0057] The above description is only an implementation method of this case and is not intended to limit the scope of protection of the claims of this case. For those skilled in the art, this case may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this case should be included in the scope of the claims of this case.
Claims
1. A method for adding a friend, characterized in that: The method is applied to a first smart device, and the method includes: Displaying a scanning dynamic page; the scanning dynamic page is used to trigger an ultrasonic scanning module of the first smart device; When the ultrasonic request signal sent by the second smart device meets the preset conditions, a friend adding confirmation interface pops up; wherein the friend adding confirmation interface includes friend name information and a confirmation control for whether to add a friend; wherein the friend name information is obtained based on the analysis of the ultrasonic request signal; When the user triggers the confirmation control, the friend represented by the friend name information is added to the friend list.
2. The method according to claim 1, characterized in that The method further comprises: receiving an ultrasonic request signal sent by a second smart device; Based on the ultrasonic request signal, determining whether the first smart device and the second smart device perform a preset interaction action; When the first smart device and the second smart device perform a preset interactive action, the ultrasonic request signal is parsed to obtain the friend name information; wherein the friend name information includes a user nickname and a user identifier.
3. The method according to claim 2, characterized in that Based on the ultrasonic request signal, determining whether the first smart device and the second smart device perform a preset interaction action includes: Determining whether the signal strength of the ultrasonic request signal reaches a preset threshold; Correspondingly, when the signal strength of the ultrasonic request signal is greater than or equal to a preset threshold, the ultrasonic request signal is analyzed.
4. The method according to claim 3, characterized in that Determining whether the signal strength of the ultrasonic request signal reaches a preset threshold includes: Calculating the ratio of the power of the useful signal to the power of the noise signal in the ultrasonic request signal to obtain a target signal-to-noise ratio; Determining whether the signal strength of the ultrasonic request signal reaches a preset threshold based on the target signal-to-noise ratio; Correspondingly, when the target signal-to-noise ratio is greater than or equal to a preset threshold, the ultrasonic request signal is analyzed.
5. The method according to claim 3, characterized in that: The method further comprises: When the signal strength of the ultrasonic request signal is greater than or equal to a preset threshold, receiving the orientation information fed back by the second smart device; When the orientation information is the same as the orientation of the first smart device, the ultrasonic request signal is parsed.
6. The method according to claim 1, characterized in that The method further comprises: Compiling user name information into an ultrasonic broadcast signal; wherein the user name information includes a user name and user identification information of the first smart device; An ultrasonic broadcast signal is sent so that the second smart device can receive the user information of the first smart device.
7. The method according to claim 1, characterized in that The method further comprises: When the ultrasonic request signal sent by the second smart device is not found within a preset time range, a prompt message indicating that the friend has not been found is displayed on the screen of the first smart device.
8. A device for adding friends, characterized in that: The device for adding a friend is applied to a first smart device, and the device for adding a friend includes: An ultrasonic scanning unit, used to display a scanning dynamic page; the scanning dynamic page is used to trigger an ultrasonic scanning module of the first smart device; An adding confirmation unit, configured to pop up an adding friend confirmation interface when the ultrasonic request signal sent by the second smart device meets a preset condition; wherein the adding friend confirmation interface includes friend name information and a confirmation control for whether to add a friend; wherein the friend name information is obtained based on the analysis of the ultrasonic request signal; The friend adding unit is used to add the friend represented by the friend name information to the friend list when the user triggers the confirmation control.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 7.
