Friend making method and device based on near field communication (NFC) and storage medium
By using the NFC module in children's smart watch to obtain the logo and match the device on the server, the problem of low fault tolerance for Bluetooth pairing and dating function is solved, and higher accuracy and convenience of dating and matching are achieved.
Patent Information
- Application Number
- CN202310797928.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
The fault tolerance rate of using Bluetooth pairing and dating function in children's smart watches on the market has low errors, resulting in low accuracy of dating matching and a certain probability of sexual dating failure.
The dating method based on near field communication NFC is adopted, and the electronic device identification is obtained through the NFC module and sent to the server. The device matching is used to create a friend relationship, and the accuracy and convenience of dating pairing are improved.
It improves the accuracy of dating matching between children's smart watches and other electronic devices, reduces the probability of dating failure, and enhances the convenience of the dating process.
Smart Images

Figure CN119233217A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and storage medium for making friends based on near field communication (NFC). Background Art
[0002] Nowadays, the application of smart electronic devices is becoming more and more extensive. For example, smart watches are very popular among users. Taking children's smart watches as an example, children's smart watches on the market generally have the function of "shake to add friends" or "touch to add friends", which can increase children's interest in adding friends.
[0003] However, the “shake to add friends” or “touch to add friends” functions in children’s smart watches on the market mostly use Bluetooth pairing to make friends. This method has a low fault tolerance rate and there is a certain probability of failure in making friends.
[0004] Therefore, how to improve the accuracy of friendship matching between electronic devices such as children's smart watches has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a dating method, device and storage medium based on NFC, which can improve the accuracy and convenience of dating pairing.
[0006] In a first aspect, the present application provides a method for making friends based on near field communication (NFC), which is applied to a first electronic device, wherein the first electronic device includes an NFC module, and the method includes: obtaining a first identifier of a second electronic device through the NFC module; sending the first identifier to a server, so that the server matches devices according to the first identifier and a preset correspondence to create a friend, wherein the preset correspondence includes a correspondence between electronic devices and identifiers; receiving and outputting a first message from the server, wherein the first message is used to indicate that the first electronic device and the second electronic device have successfully made friends.
[0007] In some embodiments, before acquiring the first identifier of the second electronic device through the NFC module, the method further includes: receiving a first user operation, where the first user operation is used to trigger the first electronic device to request to make friends; and in response to the first user operation, controlling the NFC module to be in a working state.
[0008] In some embodiments, the working state includes the NFC module alternately entering a card reader mode or a card mode, and obtaining the first identifier of the second electronic device through the NFC module includes: obtaining the first identifier of the second electronic device when the NFC module is in the card reader mode.
[0009] In some embodiments, after receiving the first user operation, the method further includes: sending a first friendship request to the server, wherein the first friendship request includes a second identifier of the first electronic device, so that the server updates the preset corresponding relationship according to the second identifier.
[0010] In some embodiments, before receiving and outputting the first message from the server, the method further includes: receiving and outputting a second message from the server, wherein the second message is used to indicate that the first electronic device is in a friend creation state.
[0011] In some embodiments, before receiving and outputting the first message from the server, the method further includes: receiving a third message from the server, the third message being used to indicate that the NFC module is controlled to be in a closed state; and in response to the third message, controlling the NFC module to be in a closed state.
[0012] In some embodiments, the second message and the third message are the same message.
[0013] In a second aspect, the present application provides a method for making friends based on near field communication NFC, which is applied to a server, and the method includes: receiving a first identifier of a second electronic device obtained from a first electronic device and / or a second identifier of the first electronic device obtained by the second electronic device; matching devices and creating a friend relationship based on a target identifier and a preset correspondence, wherein the preset correspondence includes a correspondence between electronic devices and identifiers, and the target identifier is one of the first identifier and the second identifier; when the friend relationship between the first electronic device and the second electronic device is successfully established, sending a first message to the first electronic device and the second electronic device, wherein the first message is used to indicate that the first electronic device and the second electronic device have successfully made friends.
[0014] In some embodiments, the server receives the first identifier obtained from the first electronic device, the target identifier is the first identifier, and the device matching and creation of a friend relationship based on the target identifier and a preset correspondence relationship include: initializing a first pairing relationship of the first electronic device; based on the first identifier and the preset correspondence relationship, finding the second electronic device that matches the first identifier; and establishing a friend relationship between the first electronic device and the second electronic device based on the initialized first pairing relationship with the second electronic device.
[0015] In some embodiments, the server receives the second identifier obtained from the second electronic device, the target identifier is the second identifier, and the device matching and creation of a friend relationship based on the target identifier and a preset correspondence relationship include: initializing a second pairing relationship of the second electronic device; based on the second identifier and the preset correspondence relationship, finding the first electronic device that matches the second identifier; and establishing a friend relationship between the first electronic device and the second electronic device based on the initialized second pairing relationship with the first electronic device.
[0016] In some embodiments, the server receives the first identifier obtained from the first electronic device and the second identifier obtained from the second electronic device, and the device matching and creation of a friend relationship based on the target identifier and a preset correspondence relationship include: initializing a first pairing relationship of the first electronic device and a second pairing relationship of the second electronic device; based on the first identifier, the second identifier and the preset correspondence relationship, searching for the second electronic device that matches the first identifier and the first electronic device that matches the second identifier; taking the pairing relationship corresponding to the electronic device that is first found to match the identifier as a valid pairing relationship, and taking the identifier obtained by the electronic device corresponding to the valid pairing relationship as the target identifier; establishing a friend relationship between the first electronic device and the second electronic device based on the valid pairing relationship and the electronic device that is first found to match the identifier.
[0017] In some embodiments, the method further includes: deleting pairing relationships among the first pairing relationship and the second pairing relationship except the valid pairing relationship.
[0018] In some embodiments, before receiving the first identifier of the second electronic device obtained from the first electronic device and / or the second identifier of the first electronic device obtained by the second electronic device, the method also includes: receiving a first friend request from the first electronic device, the first friend request including the second identifier of the first electronic device, so that the server updates the preset corresponding relationship according to the second identifier; and / or receiving a second friend request from the second electronic device, the second friend request including the first identifier of the second electronic device, so that the server updates the preset corresponding relationship according to the first identifier.
[0019] In some embodiments, before sending the first message to the first electronic device and the second electronic device, the method further includes: sending a second message to the first electronic device and the second electronic device, wherein the second message is used to indicate that the first electronic device and the second electronic device are in a friend creation state.
[0020] In some embodiments, before sending the first message to the first electronic device and the second electronic device, the method also includes: sending a third message to the first electronic device and the second electronic device, wherein the third message is used to indicate that the NFC module controlling the first electronic device and the NFC module of the second electronic device are in a turned off state.
[0021] In some embodiments, the second message and the third message are the same message.
[0022] In some embodiments, the method further includes: when the first electronic device and the second electronic device successfully establish friendship, deleting the first identifier and the second identifier in the preset corresponding relationship.
[0023] In a third aspect, the present application provides a friendship device based on near field communication (NFC), which is applied to a first electronic device, wherein the first electronic device includes an NFC module, and the device includes: an acquisition module, which is used to acquire a first identifier of a second electronic device through the NFC module; a sending module, which is used to send the first identifier to a server, so that the server matches devices according to the first identifier and a preset correspondence to create a friend, wherein the preset correspondence includes a correspondence between the electronic device and the identifier; a processing module, which is used to receive and output a first message from the server, wherein the first message is used to indicate that the first electronic device and the second electronic device have successfully made friends.
[0024] In a fourth aspect, the present application provides a friendship device based on near field communication (NFC), which is applied to a server, and the device includes: a receiving module, which is used to receive a first identifier of a second electronic device obtained from a first electronic device and / or a second identifier of the first electronic device obtained by the second electronic device; a processing module, which is used to match devices and create a friendship according to a target identifier and a preset correspondence, and the preset correspondence includes a correspondence between electronic devices and identifiers, and the target identifier is one of the first identifier and the second identifier; a sending module, which is used to send a first message to the first electronic device and the second electronic device when the friendship between the first electronic device and the second electronic device is successfully established, and the first message is used to indicate that the first electronic device and the second electronic device have successfully established friendship.
[0025] In a fifth aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store code instructions; the processor is used to execute the code instructions to implement the method in the above-mentioned first aspect, second aspect and any one of the embodiments.
[0026] Optionally, there are one or more processors and one or more memories.
[0027] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0028] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.
[0029] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a computer program (also referred to as code, or instructions) which, when run on a computer, enables the computer to execute the method in the above-mentioned first aspect, second aspect, and any one of the embodiments.
[0030] In a seventh aspect, the present application provides a computer program product, comprising: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute the method in the above-mentioned first aspect, second aspect, and any one of the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of a system architecture provided for an embodiment of the present application;
[0032] Figure 2 A schematic flow chart of a method for making friends based on NFC provided in one embodiment of the present application;
[0033] Figure 3 A schematic flow chart of a method for making friends based on NFC provided in another embodiment of the present application;
[0034] Figure 4 A schematic diagram of an interface of an electronic device provided by an embodiment of the present application;
[0035] Figure 5 A schematic diagram of an interface of an electronic device provided in another embodiment of the present application;
[0036] Figure 6 A structural schematic diagram of an NFC-based dating device provided in one embodiment of the present application;
[0037] Figure 7 A structural schematic diagram of an NFC-based dating device provided in another embodiment of the present application;
[0038] Figure 8A structural schematic diagram of an NFC-based friendship device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0039] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0040] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. For example, the first instruction and the second instruction are to distinguish different user instructions, and their order is not limited. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit them to be different.
[0041] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0042] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
[0043] With the continuous development of the field of computer technology, the application of smart electronic devices is becoming more and more extensive. For example, smart watches are very popular among users. Smart watches are watches with information processing capabilities and meet the basic technical requirements of watches. In addition to indicating time, they should also have one or more functions such as reminders, navigation, calibration, monitoring, and interaction; display methods include pointers, numbers, images, etc.
[0044] Taking children's smart watches as an example, children's smart watches on the market generally have the function of "shake to add friends" or "touch to add friends", which can increase children's interest in adding friends.
[0045] However, the “shake to add friends” or “touch to add friends” functions in children’s smart watches on the market mostly use Bluetooth pairing to make friends. This method has a low fault tolerance rate and there is a certain probability of failure in making friends.
[0046] Therefore, how to improve the accuracy of friendship matching between electronic devices such as children's smart watches has become a technical problem that needs to be solved urgently.
[0047] In view of this, the embodiment of the present application provides a method, device and storage medium for making friends based on near field communication NFC. In the technical solution of the present application, the first electronic device obtains the first identifier of the second electronic device through the NFC module, and sends the first identifier to the server, so that the server matches the device according to the first identifier and the preset corresponding relationship to create a friend, and the preset corresponding relationship includes the corresponding relationship between the electronic device and the identifier; accordingly, the server receives the first identifier of the second electronic device obtained from the first electronic device and / or the second identifier of the first electronic device obtained by the second electronic device, and then matches the device according to the target identifier and the preset corresponding relationship and creates a friend relationship, and the target identifier is one of the first identifier and the second identifier; finally, when the server successfully creates the friend relationship between the first electronic device and the second electronic device, it sends a first message to the first electronic device and the second electronic device, and the first message is used to indicate that the first electronic device and the second electronic device have successfully made friends, and accordingly, the first electronic device and the second electronic device receive and output the first message from the server. The NFC-based making friends method mainly uses the NFC function in the electronic device as a technical medium, and places the pairing method between the electronic devices in the server, which can improve the accuracy and convenience of making friends pairing.
[0048] It should be understood that the electronic device involved in the embodiments of the present application may be a mobile phone, a watch, a bracelet and other electronic devices with NFC function. The electronic device may also include components such as a processor, a memory, a transceiver, a display unit, an input unit, a sensor, an audio circuit and a power module, but the specific embodiments of the present application are not limited to this.
[0049] In order to make the purpose and technical solution of this application clearer and more intuitive, the following will be combined with the accompanying drawings and embodiments to describe in detail the NFC-based dating method, device and storage medium provided in the embodiments of this application. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.
[0050] Please refer to Figure 1 , is a schematic diagram of a system architecture provided by an embodiment of the present application, such as Figure 1As shown, the system architecture includes a first electronic device 101, a second electronic device 102 and a server 103. The first electronic device 101 includes a first near field communication (NFC) module 1011, and the location of the first NFC module 1011 includes but is not limited to the position under the display screen or the bottom shell of the first electronic device 101; the second electronic device 102 includes a second NFC module 1021, and the location of the second NFC module 1021 includes but is not limited to the position under the display screen or the bottom shell of the second electronic device 102. The first electronic device 101 and the second electronic device 102 also have virtual buttons for adding friends. Clicking "Add Friend" in the electronic device can upload the request to add friends to the server.
[0051] It should be noted that NFC is an emerging technology. Devices using NFC technology (such as mobile phones) can exchange data when they are close to each other.
[0052] Exemplarily, when the "Add Friend" virtual button in the first electronic device 101 and the second electronic device 102 is clicked, the first electronic device 101 and the second electronic device 102 respectively send friendship requests to the server 103, and then the first NFC module 1011 and the second NFC module 1021 will send the identifiers of the NFC modules read by each to the server 103. The server 103 matches the electronic devices in the server 103 to complete the friendship based on the received NFC identifier and the correspondence between the preset electronic device and the identifier, and notifies the first electronic device 101 and the second electronic device 102 that the friendship is successful if the friendship is successful.
[0053] Based on the above system architecture, please refer to Figure 2 , is a schematic flow chart of a method for making friends based on NFC provided in one embodiment of the present application. The method can be applied to the above Figure 1 The system architecture shown in the figure can also be applied to other system architectures, and the present application embodiment does not limit this. For the convenience of explanation, the following uses the method as applied in Figure 1 Taking the system architecture shown in FIG. 1 as an example, accordingly, the first electronic device in the following text is Figure 1 The first electronic device 101 is shown, and the second electronic device hereinafter is Figure 1 The second electronic device 102 is shown, and the server hereinafter is Figure 1 The server 103 is shown in detail below. Figure 2 The various steps in the method shown in the flowchart include:
[0054] S201: A first electronic device obtains a first identifier of a second electronic device through an NFC module.
[0055] It should be understood that the first identifier of the second electronic device may be a device identifier of the second electronic device, or may be an NFC identifier of an NFC module in the second electronic device, which is not limited in this embodiment of the present application.
[0056] It should also be understood that the first electronic device may obtain the first identification of the second electronic device by reading it through the card reading function of the NFC module in the first electronic device, or by interacting with the second electronic device, which is not limited in this embodiment of the present application.
[0057] S202: The second electronic device obtains a second identifier of the first electronic device through the NFC module.
[0058] It should be understood that the second identifier of the first electronic device may be a device identifier of the first electronic device, or may be an NFC identifier of an NFC module in the first electronic device, which is not limited in this embodiment of the present application.
[0059] It should also be understood that the second electronic device may obtain the second identification of the first electronic device by reading it through the card reading function of the NFC module in the second electronic device, or by interacting with the first electronic device, which is not limited in this embodiment of the present application.
[0060] It should be noted that the above-mentioned step S201 and step S202 can be executed simultaneously, or one after the other, or only one of the steps can be executed, and the embodiment of the present application does not limit this.
[0061] S203: The first electronic device sends the first identifier to the server.
[0062] Correspondingly, the server receives the first identifier.
[0063] It should be understood that after obtaining the first identifier of the second electronic device, the first electronic device can send the first identifier to the server via wireless communication or wired communication so that the server can perform subsequent operations. The specific sending method is not limited in this embodiment of the present application.
[0064] S204: The second electronic device sends the second identifier to the server.
[0065] Correspondingly, the server receives the second identifier.
[0066] It should be understood that after obtaining the second identifier of the first electronic device, the second electronic device can send the second identifier to the server via wireless communication or wired communication so that the server can perform subsequent operations. The specific sending method is not limited in this embodiment of the present application.
[0067] It should be noted that the above-mentioned step S203 and step S204 can be executed simultaneously, or one after the other, or only one of the steps can be executed, and the embodiment of the present application does not limit this.
[0068] S205, the server matches devices and creates a friend relationship according to the target identifier and a preset corresponding relationship, where the preset corresponding relationship includes a corresponding relationship between electronic devices and identifiers, and the target identifier is one of the first identifier and the second identifier.
[0069] It should be understood that the preset correspondence includes the correspondence between electronic devices and identifiers, for example, the first electronic device corresponds to the second identifier, and the second electronic device corresponds to the first identifier. The preset correspondence may be stored in the server in advance, or it may be updated in real time based on the report of the electronic device. The embodiment of the present application does not limit this.
[0070] It should also be understood that the target identifier is one of the first identifier and the second identifier, that is, when the server only receives the second identifier from the first electronic device, the target identifier is the second identifier; when the server only receives the first identifier from the second electronic device, the target identifier is the first identifier; when the server receives the second identifier from the first electronic device and the first identifier from the second electronic device, the target identifier is the identifier that first matches the corresponding device.
[0071] It should be noted that the server matches devices and creates friend relationships according to the target identifier and the preset corresponding relationship by creating a friendship link or by other methods, which is not limited in the embodiments of the present application.
[0072] S206, when the friend relationship between the first electronic device and the second electronic device is successfully established, the server sends a first message to the first electronic device, where the first message is used to indicate that the first electronic device and the second electronic device have successfully established a friend relationship.
[0073] Accordingly, the first electronic device receives and outputs the first message from the server.
[0074] It should be understood that the first message may be a prompt instruction or a success mark, etc., and this embodiment of the present application does not limit this.
[0075] It should also be understood that after the first electronic device receives the first message, the first message can be output in the form of text output, voice output, or video animation output, etc., which is not limited in this embodiment of the present application.
[0076] S207: When successfully establishing a friendship relationship between the first electronic device and the second electronic device, the server sends a first message to the second electronic device.
[0077] Accordingly, the second electronic device receives and outputs the first message from the server.
[0078] It should be understood that the first message may be a prompt instruction or a success mark, etc., and this embodiment of the present application does not limit this.
[0079] It should also be understood that after the second electronic device receives the first message, the first message may be output in the form of text output, voice output, or video animation output, etc., which is not limited in this embodiment of the present application.
[0080] It should be noted that the above-mentioned step S206 and step S207 can be executed simultaneously or one after the other, and the embodiment of the present application does not limit this.
[0081] In this embodiment, the server receives the first identifier of the second electronic device obtained from the first electronic device and / or the second identifier of the first electronic device obtained by the second electronic device, and then matches the devices and creates a friend relationship based on one of the first identifier and the second identifier and a preset corresponding relationship. This method mainly uses the NFC function in the electronic device as a technical medium, and places the pairing method between the electronic devices in the server, which can improve the accuracy and convenience of friendship pairing.
[0082] Based on the above embodiments, Figure 3 A schematic flow chart of a method for making friends based on NFC provided in another embodiment of the present application, Figure 3 In the embodiment shown, taking how to make friends based on NFC as an example, the following describes in detail Figure 3 The various steps in the method shown in the flowchart include:
[0083] S301, a first electronic device receives a first user operation, where the first user operation is used to trigger the first electronic device to request a friend.
[0084] For example, assuming that the first electronic device includes an "add friend" virtual button, the first user operation may be that the user clicks the "add friend" virtual button, thereby triggering the first electronic device to request to make a friend. Figure 4 shown.
[0085] Furthermore, after receiving the first user operation, the first electronic device sends a first friendship request to the server, where the first friendship request includes the second identifier of the first electronic device, so that the server updates the preset corresponding relationship according to the second identifier.
[0086] S302: The second electronic device receives a second user operation, where the second user operation is used to trigger the second electronic device to request a friend.
[0087] Exemplarily, assuming that the second electronic device includes an "add friend" virtual button, the second user operation may be that the user clicks the "add friend" virtual button, thereby triggering the second electronic device to request to make a friend.
[0088] Furthermore, after receiving the second user operation, the second electronic device sends a second friendship request to the server, where the second friendship request includes the first identifier of the second electronic device, so that the server updates the preset corresponding relationship according to the first identifier.
[0089] Understandably, after receiving the first friendship request and the second friendship request, the server will put the first identifier and the second identifier therein into a designated location in the server, such as a friendship resource pool, to facilitate subsequent operations.
[0090] It should be noted that the above-mentioned step S301 and step S302 can be executed simultaneously or one after the other, and the embodiment of the present application does not limit this.
[0091] S303: The first electronic device controls the NFC module to be in an operating state in response to the first user operation.
[0092] It should be understood that the working state of the NFC module includes the NFC module alternately entering the card reader mode or the card mode. When the NFC module is in the card reader mode, it can be used to read the card information of the card close to it; when the NFC module is in the card mode, it can be used as a card to be read by the NFC module of other devices.
[0093] Exemplarily, the NFC module alternately enters the card reading mode or the card mode state and can be set to use 1 second as a timing cycle, read the card once in each timing cycle, and simulate the card twice, and poll alternately.
[0094] Understandably, after triggering the friendship request, the first electronic device controls the NFC module to alternately enter the card reading mode or the card mode.
[0095] S304: The second electronic device controls the NFC module to be in an operating state in response to the second user operation.
[0096] Understandably, after triggering the friendship request, the second electronic device controls the NFC module to alternately enter the card reading mode or the card mode.
[0097] It should be noted that the above-mentioned step S303 and step S304 can be executed simultaneously or one after the other, and the embodiment of the present application does not limit this.
[0098] S305: When the NFC module of the first electronic device is in a card reading mode, the first electronic device obtains a first identifier of the second electronic device.
[0099] Understandably, when the NFC module is in the card reading mode, the first electronic device reads the information of the second electronic device whose NFC module is in the card mode, and accordingly obtains the first identification of the second electronic device.
[0100] S306: When the NFC module of the second electronic device is in a card reading mode, the second electronic device obtains a second identifier of the first electronic device.
[0101] Understandably, when the NFC module is in the card reading mode, the second electronic device reads the information of the first electronic device whose NFC module is in the card mode, and accordingly obtains the second identification of the first electronic device.
[0102] It should be noted that the above-mentioned step S305 and step S306 can be executed simultaneously, or one after the other, or only one of the steps can be executed, and the embodiment of the present application does not limit this.
[0103] S307: The first electronic device sends the first identifier to the server.
[0104] Correspondingly, the server receives the first identifier.
[0105] It should be understood that after obtaining the first identifier of the second electronic device, the first electronic device can send the first identifier to the server via wireless communication or wired communication so that the server can perform subsequent operations. The specific sending method is not limited in this embodiment of the present application.
[0106] S308: The second electronic device sends the second identifier to the server.
[0107] Correspondingly, the server receives the second identifier.
[0108] It should be understood that after obtaining the second identifier of the first electronic device, the second electronic device can send the second identifier to the server via wireless communication or wired communication so that the server can perform subsequent operations. The specific sending method is not limited in this embodiment of the present application.
[0109] It should be noted that the above-mentioned step S307 and step S308 can be executed simultaneously, or one after the other, or only one of the steps can be executed, and the embodiment of the present application does not limit this.
[0110] S309, the server matches devices and creates a friend relationship according to the target identifier and a preset corresponding relationship, where the preset corresponding relationship includes a corresponding relationship between electronic devices and identifiers, and the target identifier is one of the first identifier and the second identifier.
[0111] In a possible implementation, the server only receives the first identifier obtained from the first electronic device, and the target identifier is the first identifier. Accordingly, the server initializes a first pairing relationship with the first electronic device, and then finds a second electronic device that matches the first identifier based on the first identifier and the preset correspondence relationship. Finally, based on the initialized first pairing relationship with the second electronic device, a friendship relationship is established between the first electronic device and the second electronic device.
[0112] Exemplarily, assuming that the first identifier of the second electronic device is identifier Y, after the server receives the identifier Y sent by the first electronic device, it will quickly initialize the first pairing relationship of the first electronic device in the server, for example, create a friendship link A of the first electronic device in the friendship resource pool of the server, and then the friendship link A will quickly compare the identifier Y in the friendship resource pool, find the second electronic device corresponding to the identifier Y, and then start the pairing process of the first electronic device and the second electronic device on the server side to establish a friend relationship between the first electronic device and the second electronic device.
[0113] In another possible implementation, the server only receives the second identifier obtained from the second electronic device, and the target identifier is the second identifier. Accordingly, the server initializes the second pairing relationship of the second electronic device, and then finds the first electronic device that matches the second identifier based on the second identifier and the preset correspondence. Finally, based on the initialized second pairing relationship with the first electronic device, a friendship relationship between the first electronic device and the second electronic device is established.
[0114] Exemplarily, assuming that the second identifier of the first electronic device is identifier X, after the server receives the identifier X sent by the second electronic device, it will quickly initialize the second pairing relationship of the second electronic device in the server, for example, create a friendship link B of the second electronic device in the friendship resource pool of the server, and then the friendship link B will quickly compare the identifier X in the friendship resource pool, find the first electronic device corresponding to the identifier X, and then start the pairing process of the first electronic device and the second electronic device on the server side to establish a friend relationship between the first electronic device and the second electronic device.
[0115] In another possible implementation, the server simultaneously receives a first identifier obtained from a first electronic device and a second identifier obtained from a second electronic device, then the server initializes a first pairing relationship between the first electronic device and a second pairing relationship between the second electronic device, and then searches for a second electronic device matching the first identifier and a first electronic device matching the second identifier based on the first identifier, the second identifier and a preset correspondence, and then takes the pairing relationship corresponding to the electronic device that is first found to match the identifier as a valid pairing relationship, and takes the identifier obtained by the electronic device corresponding to the valid pairing relationship as a target identifier; finally, based on the valid pairing relationship and the electronic device that is first found to match the identifier, a friendship relationship is established between the first electronic device and the second electronic device.
[0116] Furthermore, after taking the pairing relationship corresponding to the electronic device that is first found to match the identifier as a valid pairing relationship, the server will also delete the pairing relationships other than the valid pairing relationship in the first pairing relationship and the second pairing relationship.
[0117] Exemplarily, assuming that the second identifier of the first electronic device is identifier X, and the first identifier of the second electronic device is identifier Y, after the server receives identifier Y sent by the first electronic device and identifier X sent by the second electronic device, it will quickly initialize the first pairing relationship of the first electronic device and the second pairing relationship of the second electronic device in the server, for example, create a friendship link A of the first electronic device and a friendship link B of the second electronic device in the friendship resource pool of the server, and then the friendship link A will quickly compare the identifier Y in the friendship resource pool, and the friendship link B will quickly compare the identifier X in the friendship resource pool; the server takes the friendship link corresponding to the electronic device corresponding to the identifier that is first found as the valid friendship link, and deletes another friendship link except the valid friendship link, and then starts the pairing process of the first electronic device and the second electronic device on the server side to establish a friend relationship between the first electronic device and the second electronic device.
[0118] S310, the server sends a second message to the first electronic device, where the second message is used to indicate that the first electronic device and the second electronic device are in a friend creation state.
[0119] Correspondingly, the first electronic device receives and outputs the second message.
[0120] It should be understood that after starting the pairing process of the first electronic device and the second electronic device, the server will also send a second message to the first electronic device to prompt that the first electronic device and the second electronic device are in a friend creation state.
[0121] It should also be understood that after the first electronic device receives the second message, the second message may be output in the form of text output, voice output, or video animation output, etc., which is not limited in this embodiment of the present application.
[0122] For example, taking the first electronic device outputting the second message in text as an example, its interface diagram is as follows: Figure 5 As shown, the interface will display "Friend Creating".
[0123] S311, the server sends a second message to the second electronic device, where the second message is used to indicate that the first electronic device and the second electronic device are in a friend creation state.
[0124] Accordingly, the second electronic device receives and outputs the second message.
[0125] It should be understood that after starting the pairing process of the first electronic device and the second electronic device, the server will also send a second message to the second electronic device to prompt that the first electronic device and the second electronic device are in the state of creating a friend.
[0126] It should also be understood that after the second electronic device receives the second message, the second message may be output in the form of text output, voice output, or video animation output, etc., which is not limited in this embodiment of the present application.
[0127] It should be noted that the above step S310 and step S311 can be executed simultaneously or one after the other, and the embodiment of the present application does not limit this.
[0128] S312: The server sends a third message to the first electronic device, where the third message is used to indicate that the NFC module controlling the first electronic device is in a turned-off state.
[0129] Correspondingly, the first electronic device receives the third message, and controls the NFC module to be in a closed state in response to the third message.
[0130] It should be understood that after starting the pairing process of the first electronic device and the second electronic device, the server will also send a third message to the first electronic device to notify the first electronic device to turn off its NFC module to prevent signal interference from other devices during the friend creation process.
[0131] S313: The server sends a third message to the second electronic device, where the third message is used to indicate that the NFC module controlling the second electronic device is in a closed state.
[0132] Correspondingly, the second electronic device receives the third message, and controls the NFC module to be in a closed state in response to the third message.
[0133] It should be understood that after starting the pairing process of the first electronic device and the second electronic device, the server will also send a third message to the second electronic device to notify the second electronic device to turn off its NFC module to prevent signal interference from other devices during the friend creation process.
[0134] It should be noted that the above-mentioned step S312 and step S313 can be executed simultaneously or one after the other, and the embodiment of the present application does not limit this.
[0135] In a possible implementation, the second message and the third message are the same message, that is, after the server starts the pairing process of the first electronic device and the second electronic device, it sends a prompt message to the first electronic device and the second electronic device, and the prompt message is used to instruct the first electronic device and the second electronic device to turn off their respective NFC modules, and to prompt the electronic devices that the first electronic device and the second electronic device are in a friend creation state.
[0136] S314, when the server successfully creates a friendship relationship between the first electronic device and the second electronic device, the server sends a first message to the first electronic device, where the first message is used to indicate that the friendship between the first electronic device and the second electronic device is successful.
[0137] Accordingly, the first electronic device receives and outputs the first message from the server.
[0138] Exemplarily, when the friend relationship between the first electronic device and the second electronic device is successfully established, the server sends a friendship success flag to the first electronic device to indicate that the friendship between the first electronic device and the second electronic device is successful.
[0139] Furthermore, after the first electronic device receives the friendship success mark, "friendship success" can be output on the screen of the first electronic device, and at the same time, smooth communication can be carried out with the second electronic device.
[0140] S315: When successfully establishing a friendship relationship between the first electronic device and the second electronic device, the server sends a first message to the second electronic device.
[0141] Accordingly, the second electronic device receives and outputs the first message from the server.
[0142] Exemplarily, when the friend relationship between the first electronic device and the second electronic device is successfully established, the server sends a friendship success flag to the second electronic device to indicate that the friendship between the first electronic device and the second electronic device is successful.
[0143] Furthermore, after receiving the friendship success mark, the second electronic device can output "friendship success" on the screen of the second electronic device, and can communicate smoothly with the first electronic device at the same time.
[0144] It should be noted that the above-mentioned step S314 and step S315 can be executed simultaneously or one after the other, and the embodiment of the present application does not limit this.
[0145] In a possible implementation, when the first electronic device and the second electronic device successfully establish friendship, the server deletes the first identifier and the second identifier in the preset corresponding relationship to release memory, for example, deleting the first identifier and the second identifier from the friendship resource pool of the server.
[0146] In this embodiment, after receiving the user operation, the first electronic device and the second electronic device control their respective NFC modules to be in working state, and then read the identification of the other electronic device and send it to the server. The server matches according to the identification sent by the first electronic device and the second electronic device to establish a friend relationship between the first electronic device and the second electronic device. This NFC-based dating method uses NFC identification technology as a trigger for dating between electronic devices, and at the same time places the pairing method between electronic devices in the server, which can improve the accuracy and convenience of dating pairing.
[0147] It should also be understood that, starting from Android 10, the Android system is preparing to abandon the peer-to-peer (P2P) function of NFC in order to improve the security and stability of the system. Subsequent upgraded Android versions do not support this function. The NFC-based dating method in the embodiment of the present application is not affected by the Android system's cutting of the NFC P2P function. It uses the NFC card reading mode / card emulation mode as a technical medium, and the way of pairing electronic devices is placed on the server, so the accuracy of dating pairing is high.
[0148] It should also be understood that the above embodiments may be coupled to each other, and this application does not limit this. Moreover, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0149] Combined with the above Figures 1 to 5 , describes in detail the NFC-based dating method of the present application embodiment, and will be combined with Figures 6 to 8 , a detailed description of the NFC-based dating device of an embodiment of the present application is described.
[0150] Figure 6A structural schematic diagram of an NFC-based dating device 600 provided in one embodiment of the present application, the device 600 includes: an acquisition module 601, a sending module 602 and a processing module 603.
[0151] Among them, the acquisition module 601 is used to obtain the first identifier of the second electronic device through the NFC module; the sending module 602 is used to send the first identifier to the server, so that the server matches the devices according to the first identifier and a preset correspondence to create a friend, and the preset correspondence includes the correspondence between the electronic device and the identifier; the processing module 603 is used to receive and output a first message from the server, and the first message is used to indicate that the first electronic device and the second electronic device have successfully established friendship.
[0152] In some embodiments, the NFC-based friendship device further includes: a receiving module and a control module. The receiving module is used to receive a first user operation, and the first user operation is used to trigger the first electronic device to request friendship; the control module is used to control the NFC module to be in a working state in response to the first user operation.
[0153] In some embodiments, the working state includes the NFC module alternately entering the card reading mode or the card mode, and the acquisition module 601 is specifically used to: when the NFC module is in the card reading mode, acquire the first identifier of the second electronic device.
[0154] In some embodiments, after receiving the first user operation, the sending module 602 is further used to send a first friendship request to the server, wherein the first friendship request includes a second identifier of the first electronic device, so that the server updates the preset corresponding relationship according to the second identifier.
[0155] In some embodiments, before receiving and outputting the first message from the server, the processing module 603 is further used to receive and output a second message from the server, where the second message is used to indicate that the first electronic device is in a friend creation state.
[0156] In some embodiments, before receiving and outputting the first message from the server, the receiving module is further used to receive a third message from the server, and the third message is used to indicate that the NFC module is controlled to be in a closed state; the control module is further used to control the NFC module to be in a closed state in response to the third message.
[0157] In some embodiments, the second message and the third message are the same message.
[0158] It should be understood that the device 600 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the device 600 may be specifically the first electronic device in the above-mentioned embodiment, or the function of the first electronic device in the above-mentioned embodiment may be integrated in the device 600, and the device 600 may be used to execute the various processes and / or steps corresponding to the first electronic device in the above-mentioned method embodiment, and to avoid repetition, it will not be repeated here.
[0159] The above-mentioned device 600 has the function of implementing the corresponding steps executed by the first electronic device in the above-mentioned method; the above-mentioned function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned function.
[0160] Figure 7 A structural schematic diagram of an NFC-based dating device 700 provided in another embodiment of the present application, the device 700 includes: a receiving module 701 , a processing module 702 and a sending module 703 .
[0161] Among them, the receiving module 701 is used to receive the first identifier of the second electronic device obtained from the first electronic device and / or the second identifier of the first electronic device obtained by the second electronic device; the processing module 702 is used to match devices and create a friend relationship according to the target identifier and a preset correspondence, and the preset correspondence includes the correspondence between the electronic device and the identifier, and the target identifier is one of the first identifier and the second identifier; the sending module 703 is used to send a first message to the first electronic device and the second electronic device when the friend relationship between the first electronic device and the second electronic device is successfully established, and the first message is used to indicate that the first electronic device and the second electronic device have successfully established friendship.
[0162] In some embodiments, the server receives the first identifier obtained from the first electronic device, the target identifier is the first identifier, and the processing module 702 is specifically used to: initialize a first pairing relationship of the first electronic device; based on the first identifier and the preset correspondence, find the second electronic device that matches the first identifier; and establish a friend relationship between the first electronic device and the second electronic device based on the initialized first pairing relationship and the second electronic device.
[0163] In some embodiments, the server receives the second identifier obtained from the second electronic device, the target identifier is the second identifier, and the processing module 702 is specifically used to: initialize the second pairing relationship of the second electronic device; based on the second identifier and the preset correspondence, find the first electronic device that matches the second identifier; and establish a friend relationship between the first electronic device and the second electronic device based on the initialized second pairing relationship with the first electronic device.
[0164] In some embodiments, the server receives the first identifier obtained from the first electronic device and the second identifier obtained from the second electronic device, and the processing module 702 is specifically used to: initialize the first pairing relationship of the first electronic device and the second pairing relationship of the second electronic device; based on the first identifier, the second identifier and the preset correspondence, search for the second electronic device that matches the first identifier and the first electronic device that matches the second identifier; take the pairing relationship corresponding to the electronic device that is first found to match the identifier as the effective pairing relationship, and take the identifier obtained by the electronic device corresponding to the effective pairing relationship as the target identifier; establish a friend relationship between the first electronic device and the second electronic device based on the effective pairing relationship and the electronic device that is first found to match the identifier.
[0165] In some embodiments, the NFC-based dating device further includes: a deletion module, configured to delete the pairing relationships of the first pairing relationship and the second pairing relationship except the valid pairing relationship.
[0166] In some embodiments, before receiving the first identifier of the second electronic device obtained from the first electronic device and / or the second identifier of the first electronic device obtained by the second electronic device, the receiving module 701 is further used to receive a first friendship request from the first electronic device, the first friendship request includes the second identifier of the first electronic device, so that the server updates the preset corresponding relationship according to the second identifier; and / or, receive a second friendship request from the second electronic device, the second friendship request includes the first identifier of the second electronic device, so that the server updates the preset corresponding relationship according to the first identifier.
[0167] In some embodiments, before sending the first message to the first electronic device and the second electronic device, the sending module 703 is also used to send a second message to the first electronic device and the second electronic device, and the second message is used to indicate that the first electronic device and the second electronic device are in a friend creation state.
[0168] In some embodiments, before sending the first message to the first electronic device and the second electronic device, the sending module 703 is further used to send a third message to the first electronic device and the second electronic device, and the third message is used to indicate that the NFC module controlling the first electronic device and the NFC module of the second electronic device are in a turned off state.
[0169] In some embodiments, the second message and the third message are the same message.
[0170] In some embodiments, the deletion module is further used to delete the first identifier and the second identifier in the preset corresponding relationship when the first electronic device and the second electronic device successfully establish friendship.
[0171] It should be understood that the device 700 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art will understand that the device 700 may be specifically the server in the above-mentioned embodiment, or the function of the server in the above-mentioned embodiment may be integrated in the device 700, and the device 700 may be used to execute the various processes and / or steps corresponding to the server in the above-mentioned method embodiment, and to avoid repetition, it will not be repeated here.
[0172] The above device 700 has the function of implementing the corresponding steps executed by the server in the above method; the above function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above function.
[0173] Figure 8 A structural schematic diagram of an NFC-based dating device provided in another embodiment of the present application. Figure 8 The NFC-based dating device shown can be used to execute the method of any of the aforementioned embodiments.
[0174] like Figure 8As shown, the NFC-based dating device 800 of this embodiment includes: a memory 801, a processor 802, a communication interface 803 and a bus 804. The memory 801, the processor 802 and the communication interface 803 are connected to each other through the bus 804.
[0175] The memory 801 may be a read only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 801 may store a program. When the program stored in the memory 801 is executed by the processor 802, the processor 802 is used to execute each step of the method shown in the above embodiment.
[0176] The processor 802 can adopt a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs to implement the various methods shown in the embodiments of the present application.
[0177] The processor 802 may also be an integrated circuit chip with signal processing capability. In the implementation process, each step of the method of the embodiment of the present application may be completed by an integrated logic circuit of hardware in the processor 802 or by instructions in the form of software.
[0178] The processor 802 may also be a general purpose processor, a digital signal processor (DSP), an ASIC, a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general purpose processor may be a microprocessor or the processor may be any conventional processor.
[0179] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 801, and the processor 802 reads the information in the memory 801, and completes the functions required to be performed by the units included in the device of the present application in combination with its hardware.
[0180] The communication interface 803 may use, but is not limited to, a transceiver or other transceiver device to implement communication between the apparatus 800 and other devices or a communication network.
[0181] The bus 804 may include a path for transmitting information between various components of the device 800 (eg, the memory 801 , the processor 802 , and the communication interface 803 ).
[0182] It should be understood that the device 800 shown in the embodiment of the present application may be an electronic device, or may also be a chip configured in the electronic device.
[0183] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0184] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0185] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0186] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0187] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0188] 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 separately, or two or more units may be integrated into one unit.
[0189] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0190] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for making friends based on near field communication (NFC), characterized in that: Applied to a first electronic device, the first electronic device includes an NFC module, and the method includes: Acquire a first identifier of a second electronic device through the NFC module; Sending the first identifier to a server, so that the server performs device matching according to the first identifier and a preset correspondence relationship to create a friend, wherein the preset correspondence relationship includes a correspondence relationship between an electronic device and an identifier; A first message from the server is received and outputted, wherein the first message is used to indicate that the first electronic device and the second electronic device have successfully established friendship.
2. The method according to claim 1, characterized in that Before acquiring the first identifier of the second electronic device through the NFC module, the method further includes: Receiving a first user operation, where the first user operation is used to trigger the first electronic device to request a friend; In response to the first user operation, the NFC module is controlled to be in an operating state.
3. The method according to claim 2, characterized in that The working state includes the NFC module alternately entering a card reading mode or a card mode, and acquiring the first identifier of the second electronic device through the NFC module includes: When the NFC module is in a card reading mode, the first identifier of the second electronic device is obtained.
4. The method according to claim 2, characterized in that: After receiving the first user operation, the method further includes: A first friendship request is sent to the server, wherein the first friendship request includes a second identifier of the first electronic device, so that the server updates the preset corresponding relationship according to the second identifier.
5. The method according to claim 1, characterized in that Before receiving and outputting the first message from the server, the method further includes: A second message from the server is received and outputted, where the second message is used to indicate that the first electronic device is in a friend creation state.
6. The method according to claim 5, characterized in that Before receiving and outputting the first message from the server, the method further includes: receiving a third message from the server, where the third message is used to instruct to control the NFC module to be in a closed state; In response to the third message, the NFC module is controlled to be in a closed state.
7. The method according to claim 6, characterized in that The second message and the third message are the same message.
8. A method for making friends based on near field communication (NFC), characterized in that: Applied to a server, the method comprises: Receiving a first identifier of a second electronic device acquired from a first electronic device and / or a second identifier of the first electronic device acquired by the second electronic device; Matching devices and establishing a friend relationship according to a target identifier and a preset corresponding relationship, wherein the preset corresponding relationship includes a corresponding relationship between an electronic device and an identifier, and the target identifier is one of the first identifier and the second identifier; In case that the friendship relationship between the first electronic device and the second electronic device is successfully established, a first message is sent to the first electronic device and the second electronic device, where the first message is used to indicate that the friendship between the first electronic device and the second electronic device is successful.
9. The method according to claim 8, characterized in that The server receives the first identifier obtained from the first electronic device, the target identifier is the first identifier, and the device matching and establishing a friend relationship according to the target identifier and a preset corresponding relationship include: Initializing a first pairing relationship of the first electronic device; Finding the second electronic device matching the first identifier based on the corresponding relationship between the first identifier and the preset one; A friend relationship between the first electronic device and the second electronic device is established according to the initialized first pairing relationship with the second electronic device.
10. The method according to claim 8, characterized in that The server receives the second identifier obtained from the second electronic device, the target identifier is the second identifier, and the device matching and establishing the friend relationship according to the target identifier and the preset corresponding relationship include: Initializing a second pairing relationship of the second electronic device; Finding the first electronic device matching the second identifier based on the corresponding relationship between the second identifier and the preset one; A friend relationship between the first electronic device and the second electronic device is established according to the initialized second pairing relationship with the first electronic device.
11. The method according to claim 8, characterized in that The server receives the first identifier obtained from the first electronic device and the second identifier obtained from the second electronic device, and the device matching and establishing a friend relationship according to the target identifier and the preset corresponding relationship include: Initializing a first pairing relationship of the first electronic device and a second pairing relationship of the second electronic device; Based on the first identifier, the second identifier and the preset corresponding relationship, searching for the second electronic device matching the first identifier and the first electronic device matching the second identifier; The pairing relationship corresponding to the electronic device that first finds a match with the identifier is used as a valid pairing relationship, and the identifier obtained by the electronic device corresponding to the valid pairing relationship is used as the target identifier; A friendship relationship between the first electronic device and the second electronic device is established according to the valid pairing relationship and the electronic device that is first found to match the identifier.
12. The method according to claim 11, characterized in that The method further comprises: Deleting the pairing relationships among the first pairing relationship and the second pairing relationship except the valid pairing relationship.
13. The method according to claim 8, characterized in that Before receiving the first identification of the second electronic device acquired from the first electronic device and / or the second identification of the first electronic device acquired by the second electronic device, the method further includes: receiving a first friendship request from the first electronic device, wherein the first friendship request includes the second identifier of the first electronic device, so that the server updates the preset corresponding relationship according to the second identifier; and / or, A second friendship request is received from the second electronic device, wherein the second friendship request includes the first identifier of the second electronic device, so that the server updates the preset corresponding relationship according to the first identifier.
14. The method according to claim 8, characterized in that Before sending the first message to the first electronic device and the second electronic device, the method further includes: A second message is sent to the first electronic device and the second electronic device, where the second message is used to indicate that the first electronic device and the second electronic device are in a friend creation state.
15. The method according to claim 14, characterized in that Before sending the first message to the first electronic device and the second electronic device, the method further includes: A third message is sent to the first electronic device and the second electronic device, where the third message is used to indicate that the NFC module controlling the first electronic device and the NFC module controlling the second electronic device are in a closed state.
16. The method according to claim 15, characterized in that The second message and the third message are the same message.
17. The method according to claim 8, characterized in that The method further comprises: When the first electronic device and the second electronic device successfully establish friendship, the first identifier and the second identifier in the preset corresponding relationship are deleted.
18. A device for making friends based on near field communication (NFC), characterized in that: Applied to a first electronic device, the first electronic device includes an NFC module, and the device includes: An acquisition module, configured to acquire a first identifier of a second electronic device through the NFC module; A sending module, used for sending the first identifier to a server, so that the server performs device matching according to the first identifier and a preset corresponding relationship to create a friend, wherein the preset corresponding relationship includes a corresponding relationship between an electronic device and an identifier; The processing module is used to receive and output a first message from the server, where the first message is used to indicate that the first electronic device and the second electronic device have successfully established friendship.
19. A device for making friends based on near field communication (NFC), characterized in that: Applied to a server, the device comprises: A receiving module, configured to receive a first identifier of a second electronic device acquired from a first electronic device and / or a second identifier of the first electronic device acquired by the second electronic device; a processing module, configured to match devices and create a friend relationship according to a target identifier and a preset corresponding relationship, wherein the preset corresponding relationship includes a corresponding relationship between an electronic device and an identifier, and the target identifier is one of the first identifier and the second identifier; The sending module is used to send a first message to the first electronic device and the second electronic device when a friendship relationship between the first electronic device and the second electronic device is successfully established, wherein the first message is used to indicate that the friendship between the first electronic device and the second electronic device is successful.
20. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store code instructions; the processor is used to run the code instructions to execute the method as claimed in any one of claims 1 to 7 or 8 to 17.
21. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method as claimed in any one of claims 1 to 7 or 8 to 17.
Citation Information
Cited By
Equipment pairing method, device and system, processing equipment and computer readable storage medium
CN120614582A
