Communication method and device

By using relationship chain identifiers to replace private information such as phone numbers and email addresses, terminals can establish communication connections with servers or other terminals, solving the problem of personal information leakage and achieving higher security and efficiency in communication.

WO2025260656A1PCT designated stage Publication Date: 2025-12-26HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/140071
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-10-25
Filing Date
2024-12-17
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

In existing technologies, obtaining users' mobile phone numbers, email addresses, and other identity information poses a risk of personal information leakage.

Method used

User identity is identified by a relationship chain identifier. The terminal obtains the communication identifier based on the relationship chain identifier, reducing the reliance on private information such as mobile phone number and email address, and establishing a communication connection with the terminal by querying the server or directly.

Benefits of technology

It reduces the risk of user privacy information leakage, improves communication security and efficiency, simplifies the identity authentication process, and enhances the security of information transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140071_26122025_PF_FP_ABST
    Figure CN2024140071_26122025_PF_FP_ABST
Patent Text Reader

Abstract

A communication method and device, relating to the technical field of communications, and used for reducing the risk of privacy information leakage of a user. The method can be applied to a first terminal, an account of a first user logs in to a system of the first terminal, and the first terminal stores a relationship chain identifier of the first user and a relationship chain identifier of a second user, wherein the second user is a contact of the first user, and the relationship chain identifiers are generated on the basis of the account of the user that logs in to the system of the terminal. The method may comprise: receiving a first operation of initiating a communication connection to a second user; in response to the first operation, acquiring a communication identifier of a second terminal of the second user on the basis of a relationship chain identifier of the second user; and sending a communication connection request to the second terminal of the second user on the basis of the communication identifier. In this way, when communicating with the second terminal, the first terminal can query the communication identifier of the second terminal of the second user on the basis of a relationship chain identifier of a contact, thereby reducing the risk of privacy information leakage of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method and apparatus

[0001] The present application claims priority to a Chinese patent application No. 202410808178.2, filed on June 20, 2024, with the State Intellectual Property Office, and entitled "A relationship chain construction method and device", a Chinese patent application No. 202410808194.1, filed on June 20, 2024, with the State Intellectual Property Office, and entitled "A contact authentication method, device and electronic equipment", a Chinese patent application No. 202411109200.0, filed on August 12, 2024, with the State Intellectual Property Office, and entitled "A communication method and apparatus", and a Chinese patent application No. 202411507240.0, filed on October 25, 2024, with the State Intellectual Property Office, and entitled "A communication method and apparatus", the contents of which are incorporated herein by reference in their entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of communication, in particular to a communication method and apparatus. BACKGROUND

[0003] When a user uses a certain software in a terminal, the terminal can obtain the identity information of the user, obtain the contact person associated with the identity information of the user, and communicate with the terminal of the contact person. In the related art, the identity information of the user is identified by obtaining the mobile phone number, email, etc. of the user, and there is a risk of leakage of personal information of the user. SUMMARY

[0004] The present application provides a communication method and apparatus, which can reduce the risk of leakage of personal information.

[0005] In order to achieve the above-mentioned purpose, the embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, a communication method is provided, which can be applied to a first terminal, the system of the first terminal logs in an account of a first user, the first terminal stores a relationship chain identifier of the first user and a relationship chain identifier of a second user, the second user is a contact person of the first user, and the relationship chain identifier is generated based on the account of the user logged in by the system of the terminal; the method can include: receiving a first operation of initiating a communication connection to the second user; in response to the first operation, obtaining a communication identifier of a second terminal of the second user based on the relationship chain identifier of the second user; and based on the communication identifier, sending a communication connection request to the second terminal of the second user.

[0007] By using the method, when the first terminal communicates with the second terminal, the first terminal can query the communication identifier of the second terminal of the second user based on the relationship chain identifier of the contact, without needing to find the user in the second terminal through the private information such as the mobile phone number or the email number, thereby reducing the risk of leakage of the private information of the user.

[0008] For example, the first terminal can store the association between the relationship chain identifier of the second user and the communication identifier of the second terminal of the second user. In some other embodiments, the first terminal can also query the communication identifier of the second user from the server, and directly use the communication identifier to initiate the communication connection to the second terminal. In some other embodiments, the first terminal can also establish the communication connection between the first terminal and the second terminal through the server. For example, as a possible implementation manner, the first terminal sends the relationship chain identifier of the second user to the server, and the server determines the communication identifier of the second user based on the relationship chain identifier. Then, the server establishes the communication connection between the first terminal and the second terminal based on the communication identifier of the second user. The method can be implemented independently of the first aspect.

[0009] In a possible design, the method further includes a process in which the first terminal obtains the relationship chain identifier of the contact from the server, which can be referred to as a process of downloading the relationship chain identifier. For example, the first terminal downloads the relationship chain identifier, which can be implemented as follows: sending the contact information of at least one contact of the first user to the server; and receiving the relationship chain identifier of the at least one contact of the first user sent by the server. The at least one contact includes the second user. The terminal can store the relationship chain identifier of the second user.

[0010] For example, the server does not return the relationship chain identifier of the part of the contacts who do not have the Huawei account. In a possible design, the method further includes a registration process of the first terminal to the server. As a possible implementation manner, the registration process can include: the first terminal sends the contact information of the first user and the relationship chain identifier of the first user to the server.

[0011] By using the method, each terminal can upload the contact information of the user of the terminal and the relationship chain identifier of the user of the terminal, so that the terminal can download the relationship chain identifier of the corresponding contact from the server. As described above, the terminal uses the relationship chain identifier of the contact to reduce the security risk.

[0012] For example, the terminal generates the relationship chain identifier of the user of the terminal, and the terminal uploads the contact information of the user of the terminal and the relationship chain identifier of the user of the terminal. In some other embodiments, the terminal can upload the account (such as the Huawei account) of the user of the terminal, the server generates the relationship chain identifier of the user of the terminal, and returns the relationship chain identifier of the user of the terminal to the terminal.

[0013] In addition, in the embodiment of the present application, the application on the terminal can share the system-level relationship chain identifier, and the maintenance cost is low. When the application using the relationship chain identifier, such as the smooth connection application and the near field sharing application, needs to identify the identity of the contact person, the system-level contact person database is queried, and it can be known in time whether the opposite party belongs to the local friend.

[0014] In a possible design, the method further includes receiving the communication identifier of the at least one contact person sent by the server. The first terminal can store the association between the relationship chain identifier and the communication identifier of the at least one contact person.

[0015] In a possible design, the method further includes receiving a second operation of modifying the contact manner of the first user, and in response to the second operation, sending the modified contact manner of the first user to the server.

[0016] By using the method, the server can know that the contact manner of the first user of the terminal has been modified, and the server can modify the association between the contact manner of the first user and the relationship chain identifier of the first user, so that the contact person terminal of the first user can download the modified relationship chain identifier of the first user in the future.

[0017] In a possible design, the method further includes receiving a third operation of adding a third user as a contact person, in response to the third operation, sending the contact manner of the third user to the server, and receiving and storing the relationship chain identifier of the third user sent by the server.

[0018] By using the method, after the first terminal adds the third user as a contact person, the first terminal can obtain the relationship chain identifier of the third user from the server, so that the communication identifier of the third user can be queried based on the relationship chain identifier in the future, and the information security is improved.

[0019] In a possible design, the method further includes receiving and storing the communication identifier of the third user sent by the server.

[0020] In a possible design, the method further includes receiving a fourth operation of deleting a fourth user as a contact person, and in response to the fourth operation, deleting the stored relationship chain identifier of the fourth user.

[0021] In a possible design, the method further includes, in response to the fourth operation, deleting the communication identifier of the fourth user.

[0022] In a possible design, the method further includes, in response to the fourth operation, sending the contact manner of the fourth user to the server.

[0023] In a possible design, the first terminal further stores a contact manner of a fifth user and a relationship chain identifier of the fifth user, where the fifth user is a contact of the first user; and the method further includes: receiving a fifth operation of updating the contact manner of the fifth user from a first contact manner to a second contact manner; and in response to the fifth operation, updating the contact manner corresponding to the relationship chain identifier of the fifth user from the first contact manner to the second contact manner.

[0024] By using this method, in the scenario of updating the contact manner of a contact (the fifth user), the first terminal can quickly learn about the scenario and can update the association between the relationship chain identifier of the fifth user and the contact manner in a timely manner.

[0025] In a possible design, the method further includes: in response to the fifth operation, sending, to the server, the first contact manner and the second contact manner of the fifth user.

[0026] In a possible design, the first terminal further stores a contact manner of at least one contact of the first user, and the contact manner of the contact corresponds to the relationship chain identifier of the contact in a one-to-one manner; and the method further includes: receiving a notification message sent by the server, where the notification message is used to notify the first terminal to modify the association between the stored contact manner and the relationship chain identifier; and the modification of the association between the stored contact manner and the relationship chain identifier includes one or more of the following:

[0027] deleting the association between the contact manner of a sixth user and the relationship chain identifier of the sixth user in the at least one contact of the first user;

[0028] updating the contact manner corresponding to the relationship chain identifier of a seventh user in the at least one contact of the first user;

[0029] adding the association between the contact manner of an eighth user and the relationship chain identifier of the eighth user.

[0030] By using this method, the first terminal can modify the association between the stored contact manner and the relationship chain identifier according to the notification message from the server.

[0031] In some examples, if a terminal (for example, a fifth terminal) logs in to the same account as the first terminal, and the fifth terminal enables a cloud synchronization function, the server sends the notification message to both the first terminal and the fifth terminal, so as to synchronize the association between the stored contact manner and the relationship chain identifier in the first terminal and the fifth terminal.

[0032] In another example, if the fifth terminal that logs in to the same account as the first terminal does not enable the cloud synchronization function, when the association between the contact manner and the relationship chain identifier of the first terminal changes, the server does not send the notification message to the fifth terminal.

[0033] In a possible design, the communication connection request is used to initiate audio / video communication; the first terminal further stores capability information of at least one contact of the first user, the capability information of the contact corresponding to a relationship chain identifier of the contact, and the capability information is used to indicate whether the corresponding contact has audio / video communication capability; and the capability information of the second user is used to indicate that the second user has audio / video communication capability.

[0034] With the method, the first terminal can learn whether a contact has audio / video communication capability according to the capability information of the contact. When the contact has audio / video communication capability, the first terminal can initiate an audio / video communication connection to the terminal of the contact using the relationship chain identifier of the contact, so as to reduce the security risks in the information transmission process.

[0035] In a possible design, the method further includes: sending the capability information of the first user to a server.

[0036] With the method, the server can determine the account level capability information of each user. Subsequently, the process of corresponding communication can be controlled according to the capability information of the corresponding user, so as to improve the security of the communication.

[0037] In a possible design, the method further includes: receiving a notification message sent by the server, the notification message being used to notify the first terminal to modify the association between the stored communication identifier and the relationship chain identifier. For example, after adding a device A of a login account A, the terminal can add the association between the relationship chain identifier and the communication identifier of the device A.

[0038] In a possible design, the contact information includes one or more of the following: a telephone number, a fax number, or an email address.

[0039] In a second aspect, a communication method is provided, which can be applied to a server, and the method can include: receiving contact information of at least one contact of a first user from a first terminal; and sending a relationship chain identifier of the at least one contact of the first user to the first terminal.

[0040] In a possible design, the method further includes: sending a communication identifier of the at least one contact to the first terminal.

[0041] In a possible design, the at least one contact includes a second user; and before sending the relationship chain identifier of the at least one contact of the first user to the first terminal, the method further includes: receiving contact information of the second user and a relationship chain identifier of the second user sent by a second terminal of the second user.

[0042] In a possible design, the method further includes: sending, to the first terminal, capability information of at least one contact of the first user, where the capability information is used to indicate whether a corresponding contact has audio and video communication capability.

[0043] In a possible design, the method further includes: receiving the modified contact information of the first user sent by the first terminal; the modification includes one or more of the following: adding contact information, deleting contact information, and updating contact information; sending, to a third terminal, a first notification message, where the first notification message is used to notify the third terminal of the modification of the association between the contact information of the first user and the relationship chain identifier of the first user; the contact information of a contact of a user of the third terminal includes the added contact information of the first user.

[0044] In a possible design, the method further includes: sending, to a third terminal, a notification message, where the notification message is used to notify the third terminal of the modification of the association between the communication identifier of the first user and the relationship chain identifier of the first user.

[0045] In a possible design, the method further includes: receiving the modified contact information of the third user from the first terminal; the modification includes one or more of the following: adding the third user as a contact, deleting the third user from the contacts, and updating the contact information of the third user.

[0046] sending, to a fourth terminal, a second notification message, where the second notification message is used to notify the fourth terminal of the modification of the association between the stored contact information and the relationship chain identifier, and the account logged in by the fourth terminal is the same as the account logged in by the first terminal.

[0047] In a possible design, the server stores the association between the contact information of at least one contact of the first user of the first terminal and the relationship chain identifier of the first user.

[0048] After the receiving of the modified contact information of the third user from the first terminal, the method further includes:

[0049] modifying the stored association based on the modified contact information of the third user.

[0050] In a possible design, the method further includes: modifying the association between the stored communication identifier and the relationship chain identifier.

[0051] In some embodiments, the communication method provided by the embodiments of the present application can be applied to an identity authentication scenario. The specific implementation process of identity authentication of a terminal based on a relationship chain identifier is described below by the method of the third aspect.

[0052] In a third aspect, a communication method is provided. The method is applied to a first terminal. The first terminal logs in a system with an account of a first user. The first terminal stores a relationship chain identifier of the first user and a device hash of the first terminal. The relationship chain identifier is generated based on the account of the user logged in the system of the terminal. The device hash is generated based on a device identifier of the terminal. The method comprises: receiving an operation for triggering the first terminal to search for a device; receiving a first broadcast from a second terminal, the first broadcast comprising a relationship chain identifier of a second user of the second terminal and / or a device hash of the second terminal; displaying a first interface in a case where a first condition is met. The first condition comprises determining that the second user is a contact of the first user according to the relationship chain identifier of the second user, and / or determining that the second terminal is a device that has shared data with the first terminal according to the device hash of the second terminal. The first interface comprises a first object, and the first object comprises information of the second user and / or information of the second terminal.

[0053] By using the method, when the first terminal communicates with the second terminal, the relationship chain identifier and the device hash can be used for identity authentication, instead of using private information such as a mobile phone number or an email address for identity authentication, thereby reducing the risk of leakage of private information of the user and increasing the security and efficiency of communication. Moreover, the relationship chain identifier and the device hash are used for identity authentication, which simplifies the operation process of identity authentication and improves the efficiency of identity authentication.

[0054] The relationship chain identifier of the first user is obtained by performing a hash operation on the account of the first user logged in the system of the first terminal. The hash value of the first terminal is obtained by performing a hash operation on the device identifier of the first terminal.

[0055] By using the method, the relationship chain identifier is used to identify the user, without using private information such as a mobile phone number or an email address to identify the user, thereby reducing the risk of leakage of private information of the user. The device hash is used to identify the device, so as to quickly screen the device.

[0056] The second terminal starts a data sharing function and is set as a terminal with "contact and shared device visible". The relationship chain identifier of the second user is obtained by performing a hash operation on the account of the second user logged in the system of the second terminal. The hash value of the second terminal is obtained by performing a hash operation on the device identifier of the second terminal.

[0057] In a possible design, the first terminal comprises a contact database, and the contact database comprises the relationship chain identifier corresponding to the contact of the first user. The method further comprises: in a case where the contact database comprises part of bytes of the relationship chain identifier of at least the second user, determining that the second user is the contact of the first user.

[0058] In some examples, the first broadcast includes a relationship chain identifier of the second user. The first terminal matches the relationship chain identifier of the second user in the contact database, and determines that the second user is a contact of the first user if the contact database includes the relationship chain identifier of the second user.

[0059] In some other examples, the first broadcast includes a partial byte of a relationship chain identifier of the second user. That is, the second terminal truncates the relationship chain identifier of the second user, and carries the partial byte of the relationship chain identifier of the second user in the first broadcast when sending the first broadcast. The first terminal matches the partial byte of the relationship chain identifier of the second user in the contact database after receiving the first broadcast, and determines that the second user is a contact of the first user if the contact database includes the partial byte of the relationship chain identifier of the second user.

[0060] In some other examples, the first broadcast includes a partial byte of a relationship chain identifier of the second user. That is, the second terminal truncates the relationship chain identifier of the second user, and carries the partial byte of the relationship chain identifier of the second user in the first broadcast when sending the first broadcast. The first terminal matches the partial byte of the relationship chain identifier of the second user in the contact database after receiving the first broadcast, and determines that the second user is a contact of the first user if the contact database includes the partial byte of the relationship chain identifier of the second user.

[0061] In a possible design, the first terminal includes a history sharing database that includes device hashes corresponding to devices that have shared data with the first terminal, and the method further includes: determining that the second terminal is a device that has shared data with the first terminal if the history sharing database includes a partial byte of a device hash of the second terminal.

[0062] In some examples, the first broadcast includes a device hash of the second terminal. The first terminal matches the device hash of the second terminal in the history sharing database, and determines that the second terminal is a device that has shared data with the first terminal if the history sharing database includes the device hash of the second terminal.

[0063] In some other examples, the first broadcast includes a device hash of the second terminal. The first terminal truncates the device hash of the second terminal to obtain a partial byte of the device hash of the second terminal. The first terminal matches the partial byte of the device hash of the second terminal in the history sharing database, and determines that the second terminal is a device that has shared data with the first terminal if the history sharing database includes the partial byte of the device hash of the second terminal.

[0064] In some examples, the first terminal determines the second terminal as a device that shares data with the first terminal based on the part of the device hash of the second terminal in the first broadcast. In other examples, the first terminal determines the second terminal as a device that shares data with the first terminal based on the part of the device hash of the second terminal in the first broadcast and the history sharing database.

[0065] With the method, the first terminal can quickly determine whether the first condition is met based on the contact database and the history sharing database, thereby improving the response speed and authentication efficiency.

[0066] In a possible design, the second user is a contact of the first user includes that the relationship chain identifier of the second user obtained by the first terminal is same as the first authentication identifier determined by the first terminal, and the first authentication identifier is determined based on the account of the second user obtained by the first terminal.

[0067] In some examples, after the first terminal determines that the contact database includes the relationship chain identifier of the second user, the first terminal displays a first interface, and the first interface includes a first object. The first terminal interacts with the second terminal in response to a first operation of a user on the first object, and obtains the account of the second user. The first terminal performs a hash operation on the account of the second user to obtain the first authentication identifier, and determines that the authentication is passed when the relationship chain identifier of the second user obtained by the first terminal is same as the first authentication identifier determined by the first terminal. The second terminal corresponding to the second user establishes a connection to send data. That is, in this example, the first terminal performs preliminary screening and displays the preliminary screening result. Then, the first terminal establishes a connection with the object selected by the user and the object that passes the authentication.

[0068] In other examples, after the first terminal determines that the contact database includes the relationship chain identifier of the second user, the first terminal interacts with the second terminal to obtain the account of the second user. The first terminal performs a hash operation on the account of the second user to obtain the first authentication identifier, and determines that the authentication is passed when the relationship chain identifier of the second user obtained by the first terminal is same as the first authentication identifier determined by the first terminal. The first terminal displays a first interface. The first interface includes a first object, and the first object is information of the second user after the authentication and / or information of the second terminal. That is, in this example, the first terminal performs preliminary screening and authentication on the preliminary screening result, and displays the preliminary screening result that passes the authentication.

[0069] In a possible design, the device shared by the second terminal for the first terminal includes: a device hash of the second terminal obtained by the first terminal, and a second authentication identifier determined by the first terminal based on a device identifier of the second terminal obtained by the first terminal.

[0070] In some examples, after the first terminal determines that the historical sharing database includes the device hash of the second terminal, a first interface is displayed, and the first interface includes a first object. The first terminal interacts with the second terminal in response to a first operation of the user on the first object, and obtains a device identifier of the second terminal. A second authentication identifier is obtained by performing a hash operation on the device identifier of the second terminal. In a case where the device hash of the second terminal obtained by the first terminal is the same as the second authentication identifier determined by the first terminal, it is determined that the authentication is passed. The second terminal corresponding to the second user establishes a connection to send data.

[0071] In some examples, after the first terminal determines that the historical sharing database includes the device hash of the second terminal, the first terminal interacts with the second terminal to obtain a device identifier of the second terminal. A second authentication identifier is obtained by performing a hash operation on the device identifier of the second terminal. In a case where the device hash of the second terminal obtained by the first terminal is the same as the second authentication identifier determined by the first terminal, it is determined that the authentication is passed, and a first interface is displayed. The first interface includes a first object, the first object is information of the second terminal after the authentication is passed, and / or information of the second user.

[0072] The first authentication identifier and the second authentication identifier are complete data obtained by performing a hash operation, or the first authentication identifier and the second authentication identifier are part of bytes obtained by performing a hash operation and then performing a truncation operation.

[0073] By using the method, the legality of the device and the account is ensured through authentication, false accounts and other behaviors are prevented, the security can be improved, the data protection is enhanced, and information leakage is prevented. Moreover, when the terminal contacts other terminals, the legality of the opposite terminal can be verified, the security of the communication process can be enhanced, the trust of the user on the communication can be enhanced, and the user experience is improved.

[0074] In a possible design, the method further includes: receiving a second broadcast from a third terminal, the second broadcast including a second user relationship chain identifier of the third terminal and a device hash of the third terminal; and in a case where a second condition is met, displaying a second interface, the second condition including determining that the second user is a contact of the first user according to the second user relationship chain identifier, and / or determining that the third terminal is a device shared by the first terminal according to the device hash of the third terminal, the second interface including the first object and a second object, the second object including information of the second user and / or information of the third terminal.

[0075] By using the method, the same contact displays the same information of the user, provides consistent visual identification for the same contact, facilitates the user to quickly and intuitively identify and classify the contact, avoids confusion, and improves user experience.

[0076] In a possible design, the method further includes: deleting the device hash of the device that shares data with the first terminal in a case where a storage duration of the device hash of the device that shares data with the first terminal exceeds a preset storage duration; and the preset storage duration is a preset storage duration of the device hash of the device that shares data with the first terminal in the preset historical sharing database.

[0077] In some examples, each device hash in the historical sharing database can have a respective preset storage duration, and the preset storage durations of different device hashes are different.

[0078] In some other examples, each device hash in the historical sharing database can have the same preset storage duration, and the device hash is only valid within the preset storage duration.

[0079] By using the method, the real-time performance of the device hash in the historical sharing database can be ensured, information redundancy can be avoided, and authentication efficiency can be improved.

[0080] In a fourth aspect, an electronic device is provided, which has a function of implementing the method in any of the aspects and designs described above. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.

[0081] In a fifth aspect, an electronic device is provided, which includes a processor and a memory coupled to the processor, the memory being configured to store program code including instructions, and the processor being configured to read the instructions from the memory to cause the electronic device to perform the method in any of the aspects and designs described above.

[0082] In a sixth aspect, a computer-readable storage medium is provided, which includes a computer program, and when the computer program is run on an electronic device, the computer program causes the electronic device to perform the method in any of the aspects and designs described above.

[0083] In a seventh aspect, a computer program product is provided, which includes a computer program or instructions, and when the computer program or instructions are run on a computer, the computer program or instructions cause the computer to perform the method in any of the aspects and designs described above.

[0084] In an eighth aspect, a communication system is provided, including a first terminal configured to perform the method of any of the first aspect and the designs thereof, and a server configured to perform the method of any of the second aspect and the designs thereof.

[0085] In a ninth aspect, a chip system is provided, including at least one processor and at least one interface circuit, the at least one interface circuit is configured to perform a transceiving function and send an instruction to the at least one processor, when the at least one processor executes the instruction, the at least one processor performs the method of any of the aspects and the designs thereof.

[0086] In a tenth aspect, a communication device is provided, including a processor configured to perform the method of any of the aspects and the designs thereof.

[0087] Optionally, the device further includes a memory and / or a communication interface.

[0088] The communication interface is configured to receive and / or send a signal. Optionally, the communication interface is coupled with the processor.

[0089] The memory is configured to store a computer program, and the processor is configured to perform the method of the first aspect and the designs thereof. The processor can be configured to execute the computer program stored in the memory to perform the method of the first aspect and the designs thereof.

[0090] Alternatively, the processor can also be a hardware-implemented circuit, such as an artificial intelligence (AI) processor, to improve the running speed. The present application does not limit the specific implementation of the processor.

[0091] Optionally, the communication device can be a whole machine device, or a module in the device, such as a chip.

[0092] It should be noted that the technical effects brought by any of the designs of the second aspect to the tenth aspect can be referred to the technical effects brought by the corresponding design in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0093] FIG. 1 and FIG. 2 are schematic diagrams of architectures provided by embodiments of the present application;

[0094] FIG. 3A is a schematic diagram of a relationship network provided by an embodiment of the present application;

[0095] FIG. 3B is a schematic diagram of an association relationship between a communication identifier and an account provided by an embodiment of the present application;

[0096] FIG. 4 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application;

[0097] FIG. 5 is another structural schematic diagram of an electronic device according to an embodiment of the present application;

[0098] FIG. 6 is a flowchart of a method according to an embodiment of the present application;

[0099] FIG. 7 is a schematic diagram of a service scenario according to an embodiment of the present application;

[0100] FIG. 8A is a schematic diagram of a service scenario according to an embodiment of the present application;

[0101] FIG. 8B is a flowchart of a method according to an embodiment of the present application;

[0102] FIG. 9 is a schematic diagram of a scenario of modifying the association between the identifier of a relationship chain and a contact method according to an embodiment of the present application;

[0103] FIG. 10 is a flowchart of a method according to an embodiment of the present application;

[0104] FIG. 11 is a schematic diagram of a requirement of a related specification on the visibility of an electronic device according to an embodiment of the present application;

[0105] FIG. 12 is a schematic diagram of a user operation interface of a contact authentication method according to an embodiment of the present application;

[0106] FIG. 13 is a flowchart of an identity authentication method according to an embodiment of the present application;

[0107] FIG. 14 is a schematic diagram of preliminary screening according to a truncated hash value according to an embodiment of the present application;

[0108] FIG. 15 is a flowchart of an identity authentication method according to an embodiment of the present application;

[0109] FIG. 16 is a flowchart of an identity authentication method according to an embodiment of the present application;

[0110] FIG. 17 is a flowchart of a communication method according to an embodiment of the present application;

[0111] FIG. 18 is a schematic diagram of a communication apparatus according to an embodiment of the present application;

[0112] FIG. 19 is a structural schematic diagram of an electronic device according to an embodiment of the present application;

[0113] FIG. 20 is a structural schematic diagram of a chip system according to an embodiment of the present application. DETAILED DESCRIPTION

[0114] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing the specific embodiments and are not intended to be limiting on the present application. As used in the specification and the appended claims of the present application, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that “at least one” and “one or more” refer to one or two or more (including two) in the following embodiments of the present application.

[0115] In the present specification, the phrase “one embodiment” or “some embodiments” etc. means that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Therefore, the phrases “in one embodiment”, “in some embodiments”, “in other some embodiments”, “in further some embodiments” etc. appearing in different places in the present specification are not necessarily all referring to the same embodiment, but mean “one or more but not all embodiments”, unless otherwise specifically emphasized. The terms “comprise”, “include”, “have” and their conjugates mean “including but not limited to”, unless otherwise specifically emphasized. The term “connected” includes direct connection and indirect connection through another element, unless otherwise specified. “First”, “second”, etc. are used only for the purpose of description and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated.

[0116] In the embodiments of the present application, the words “exemplarily” or “for example” are used to mean as an example, illustration or description. Any embodiment or design scheme described as “exemplarily” or “for example” in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words “exemplarily” or “for example” are used to present the relevant concept in a specific manner.

[0117] In the technical solutions of the embodiments of the present application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are in line with the relevant legal regulations and do not violate public order and good customs. For example, the processing of user personal information in the technical solutions of the embodiments of the present application is carried out with the authorization of the user. This is uniformly stated here and will not be repeated below.

[0118] “For” can be “exclusively for” or “may be for”, not limited to “exclusively for”. For example, in addition to being used for xx, it can also have other functions, which are not limited.

[0119] In the embodiments of the present application, the data sent by the terminal to the server can be referred to as uplink data. Conversely, the data sent by the server to the terminal can be referred to as downlink data.

[0120] The embodiments of the present application provide a communication method. A first terminal logs in a system with an account of a first user. The first terminal stores a relationship chain identifier of the first user and relationship chain identifiers of at least one contact of the first user. The first terminal receives a first operation of initiating a communication connection to a second user in the at least one contact of the first user. In response to the first operation, a communication identifier of a second terminal of the second user is obtained. Based on the communication identifier, a communication connection request is sent to the second terminal of the second user. By using the method, when the first terminal communicates with the second terminal, the communication identifier of the contact can be queried based on the relationship chain identifier of the contact, without the need to find the user in the second terminal through private information such as a mobile phone number or an email number, thereby reducing the risk of leakage of private information of the user.

[0121] The relationship chain identifier (Account encrypt Id) is used to represent / identify the identity of the user (corresponding to the user of the terminal) and is different from the contact information of the user and does not involve privacy. The contact information can be a mobile phone number, an email number, a fax number, etc. The relationship chain identifier of the user and the account of the user are in one-to-one correspondence, for example, the relationship chain identifier can be determined based on the account logged in by the terminal of the user. The account logged in by the terminal (Account Id) can also be referred to as a system account, which is a system-level account. For example, the account can be a Huawei account.

[0122] The relationship chain identifier can be determined based on the account logged in by the terminal of the user, which can be implemented by encrypting the associated account. The encryption method is, for example, hashing, but is not limited thereto.

[0123] The communication identifier is used to address the terminal, for example, the communication identifier can be a device identifier (Device ID) or a communication address. For example, the communication address can be a device internet protocol (IP) address. For example, the device identifier can be a serial number of the device or other unique identifier that addresses the device. One terminal corresponds to one communication identifier. The communication identifiers of different terminals are different. In this paper, the communication identifier is taken as an example of Device ID, which is uniformly described hereinafter and will not be described again.

[0124] In the case where a terminal logs in an account, the relationship chain identifier of the user of the terminal can be determined based on the account. The relationship chain identifier corresponds to the Device ID of the terminal. Then, other terminals can find the Device ID of the terminal based on the relationship chain identifier of the user of the terminal, so as to address the terminal.

[0125] Referring to FIG. 1, the method of the embodiments of the present application can be applied to a system comprising a server 100 (or referred to as cloud) and a plurality of terminals 200 (200a-200e shown in FIG. 1). Optionally, the terminal 200 can be connected with the server through a wired network or a wireless network. For example, through a local area network, a cellular network, wireless fidelity (Wi-Fi), and the like.

[0126] For example, the server can be a stand-alone server, or a server cluster composed of multiple regions, multiple machine rooms, and multiple servers, without limitation.

[0127] For example, the terminal 200 can be a mobile phone, a tablet computer, a handheld computer, a netbook, a personal digital assistant (PDA), an artificial intelligence (AI) device, a wearable device, including but not limited to a smart watch, a smart bracelet, a smart ring, and the like. The operating system installed on the terminal 200 is not limited. The specific type of the terminal 200 and the operating system installed thereon are not limited in the present application.

[0128] For example, FIG. 2 shows another example of a system architecture provided by the embodiments of the present application. For example, the server can comprise an account cloud, a relationship chain service, and a push service. The server can be referred to as a relationship chain server.

[0129] The account cloud, also referred to as a cloud space or an account cloud service, can be used to receive some uplink data uploaded by the terminals. Optionally, the uplink data uploaded by the terminal can comprise a relationship chain identifier of a terminal user and a contact information of the terminal user. The relationship chain identifier does not involve sensitive private information, and has high security.

[0130] Optionally, the uplink data can further comprise a contact information of at least one contact of the terminal user.

[0131] That is, the terminal can report some information of the terminal user and some information of the contact, which can be used by the terminal to obtain the relationship chain identifier of the contact from the server. Subsequently, the terminal can initiate a communication connection to the terminal of the contact through the relationship chain identifier of the contact.

[0132] Optionally, the contact information of the user comprises at least one of the following: a telephone number, an electronic mail address, or a fax number. Optionally, the types of the contact information of different contacts can be the same or different. For example, the types of the contact information of the contacts are all telephone numbers. For another example, the contact information of some contacts is a telephone number, and the contact information of some contacts is an electronic mail address.

[0133] Optionally, the contact information of a contact corresponds to the relationship chain identifier of the contact in one-to-one correspondence. That is, the contact information, the relationship chain identifier, and the account of a contact correspond to each other in one-to-one correspondence. For example, the contact B of the user A registers a Huawei account using the phone number B, and the phone number B corresponds to the registered Huawei account in one-to-one correspondence. Different Huawei accounts are bound to different phone numbers.

[0134] For example, as shown in FIG. 2, the terminal A uploads the relationship chain identifier of the user 1 of the terminal A (denoted as Account encrypt Id_A), the phone number of the user A (denoted as PhoneNum_A), and the email of the user A (denoted as Email_A) to the account cloud. Similarly, other terminals upload the contact information of the users of the terminals and the relationship chain identifiers of the users of the terminals to the account cloud.

[0135] As shown in FIG. 2, the terminal A also uploads the mobile phone number of the contact B (denoted as PhoneNum_B) and the email of the contact C (denoted as Email_C) to the account cloud. In some examples, as shown in FIG. 2, the terminal A uploads the contact information of the contacts in the following format: {AccountOwnerID_A, PhoneNum_B; AccountOwnerID_A, Email_C}. For the contact B, PhoneNum_B represents the phone number of the contact B, and AccountOwnerID_A represents that the contact B is the contact of the user A of the terminal A. Similarly, for the contact C, the email of the contact C of the user A is Email_C.

[0136] Similarly, other terminals upload the contact information of the respective contacts.

[0137] In one or more embodiments of the present application, the contact can also be referred to as a friend, and the name is not limited.

[0138] Optionally, each terminal can also upload a respective push token (pushToken) to the server. For example, in FIG. 2, the terminal A uploads pushToken_A. Subsequently, the server can push information to the terminal corresponding to the push token. For example, a push message is pushed to indicate that the terminal modifies the relationship chain identifier of the contact.

[0139] Optionally, each terminal can also upload a respective DeviceID. For example, the terminal A uploads DeviceID A (an example of a communication identifier).

[0140] As a possible implementation, after the terminal logs in the account and the user agrees to the privacy statement, the terminal can upload the above uplink data to the account cloud. The uplink data reported by the terminals A, C, and D is shown in FIG. 2.

[0141] After the account cloud receives the uplink data uploaded by each terminal, the account cloud can aggregate the uplink data, establish a relationship network among users, and the relationship network can represent the friend relationship among users. For example, as shown in FIG. 3A, arrows represent the friend relationship. The contact of user A includes user G, F, E, D, C, and B, the contact of user B includes user A and K, the contact of user C includes user A and user B, and so on.

[0142] In this document, the relationship network can also be referred to as a relationship chain network or a relationship chain cloud or a relationship chain, without limitation of the name.

[0143] After the account cloud receives the uplink data uploaded by each terminal, the account cloud can also determine and store the relationship information among users according to the uplink data. The relationship information can be used to represent the relationship network, that is, can represent the friend relationship among users. For example, the relationship information stored by the account cloud is shown in FIG. 3A. The relationship information in the first row indicates that the phone number of the contact B of user A is PhoneNum_B, and the relationship chain identifier of the contact B is Account encrypt Id_B.

[0144] After the account cloud receives the uplink data uploaded by each terminal, the account cloud can also determine and store the relevant communication information according to the uplink data. The communication information can include DeviceID used to address the device of the contact. For example, the communication information stored by the account cloud is shown in FIG. 3A. The communication information in the first row indicates that the relationship chain identifier of user A is Account encrypt Id_A, the DeviceID of the terminal A of user A is DeviceID A, the phone number of user A is PhoneNum_A, and the email of user A is Email_A. The communication information in the second last row indicates that the relationship chain identifier of user E is Account encrypt Id_E, the DeviceID of the terminal E1 of user E is DeviceID E1, the phone number of user E is PhoneNum_E, and the email of user E is Email_E. The communication information in the last row indicates that the relationship chain identifier of user E is Account encrypt Id_E, the DeviceID of the terminal E2 of user E is DeviceID E2, the phone number of user E is PhoneNum_E, and the email of user E is Email_E.

[0145] As can be seen from the above, the relationship chain identifier has a correlation with the DeviceID. Correspondingly, the account has a correlation with the DeviceID. FIG. 3B shows the correlation between the account and the DeviceID. The account of the user 1 is the account 1, and the DeviceID of the user 1 includes the DeviceID 1-DeviceID 3. For example, the DeviceID 1-3 are the DeviceIDs of three different devices of the user 1 respectively. The account of the user 2 is the account 2, and the DeviceID of the user 2 includes the DeviceID 4-6.

[0146] The relationship chain service in the server can be used to issue the relationship chain identifier of the contact to the terminal based on the data stored in the account cloud. The relationship chain service can also be used to issue the DeviceID of the contact to the terminal. As shown in FIG. 3A, taking the contact E as an example, the DeviceID of the contact E includes the DeviceID E1 of the terminal E1 and the DeviceID E2 of the terminal E2.

[0147] Subsequently, the terminal can obtain the DeviceID of the contact based on the relationship chain identifier of the contact, and initiate a communication connection to the terminal of the contact using the DeviceID of the contact. Optionally, the server can return all or part of the relationship chain identifier of the contact to the terminal. For example, in FIG. 2, the contact X of the user A of the terminal A has no Huawei account, and therefore the server does not return the relationship chain identifier of the contact X to the terminal.

[0148] For example, after the terminal A uploads the contact information of the contact B and the contact C to the account cloud, the relationship chain service can query whether the relationship chain identifier of the contact B and the contact C has been stored in the account cloud. If the relationship chain identifier of the contact B and the contact C has been stored in the account cloud, the relationship chain service can return the relationship chain identifier of the contact B and the contact C to the terminal A. Optionally, the server can return the DeviceID of the contact B and the DeviceID of the contact C to the terminal A.

[0149] Optionally, if the relationship chain identifier of the contact B and the contact C is not stored in the account cloud, the relationship chain service can store the relationship chain identifier of the contact B and the contact C in the account cloud, and then return the relationship chain identifier of the contact B and the contact C to the terminal A. Optionally, the server can return the DeviceID of the contact B and the DeviceID of the contact C to the terminal A.

[0150] After terminal A receives the relationship chain identifiers of contact B and contact C from the relationship chain server, terminal A can store the relationship chain identifiers of contact B and contact C into a contact database. Similarly, other terminals can obtain the relationship chain identifiers of contacts from the server. In some scenarios, a terminal can obtain the DeviceID of a contact based on the relationship chain identifier of the contact, and initiate a communication connection to the terminal of the contact using the DeviceID of the contact. For details, refer to the following.

[0151] In some scenarios, such as in the Huawei Share scenario, a terminal can also query a contact database based on the relationship chain identifier of the other party, and identify whether the other party is a local contact according to the query result. For details, refer to the following.

[0152] In this document, the contact database, which can also be referred to as a relationship chain database, is not limited in name. For example, the contact database is a system-level or account-level database. The address book corresponding to the system-level database can be referred to as a system address book.

[0153] For example, Table 1-1 shows the relationship chain identifiers of contact B and contact C stored in terminal A. Each row represents M contact manners associated with a relationship chain identifier. M is a positive integer.

[0154] Table 1-1

[0155] For another example, Table 1-2 shows the relationship chain identifiers of contact B and contact C stored in terminal A. Each row represents one contact manner associated with a relationship chain identifier. M contact manners of a contact correspond to M rows.

[0156] Table 1-2

[0157] Alternatively, the manner in which a terminal stores relationship chain identifiers can also be other manners, which are not limited to the formats shown in Table 1-1 and Table 1-2.

[0158] The push service in the server can be used to push a change message to the push service of a terminal. For example, when the relationship chain identifier of a user changes, the push service pushes a change message to the terminal of a contact of the user to instruct the terminal to modify the relationship chain identifier of the user. Subsequently, the terminal of the contact can initiate a communication connection to the terminal of the user based on the modified relationship chain identifier.

[0159] The relationship chain server is used to update the relationship chain related information. In some examples, when the terminal initiates a service, the terminal no longer connects the relationship chain server in real time, but can connect the service server to implement the service. When the terminal needs to change the relationship chain related information, the terminal connects the relationship chain server to obtain the information. For example, the service server receives a message A of a first terminal, and identifies, according to a header analysis result of the message A, that a destination device of the first terminal is a second terminal. For another example, the service server can check whether a second user of the second terminal is online. If the second user is not online, the service server can send a message B to pull the second user of the second terminal online. For example, the message A can include a DeviceID of the second terminal of the second user.

[0160] In some other examples, in order to improve the accuracy of the information, the terminal can obtain the latest relationship chain related information from the relationship chain server when initiating the service.

[0161] In some other examples, the service server and the relationship chain server are connected between clouds to ensure the accuracy and real-time performance of the relationship chain related information.

[0162] As a possible implementation, for a service such as a call, the system can further include a signaling server to implement reliable voice interaction.

[0163] For example, FIG. 4 shows a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device can be the terminal 200 or the server 100.

[0164] As shown in FIG. 4, the electronic device includes a processor 501, a memory 502, and a transceiver 503. The implementation of the processor 501 and the memory 502 can refer to the implementation of the processor and the memory of the terminal shown in FIG. 5. The transceiver 503 is used for the electronic device to interact with other devices. The transceiver 503 can be a device based on a communication protocol such as Wi-Fi, Bluetooth, or other communication protocols.

[0165] For another example, FIG. 5 shows another structural schematic diagram of a terminal 500 provided by an embodiment of the present application.

[0166] As shown in FIG. 5, the terminal 500 can include a processor 510, a memory 520, and a display screen 530, etc.

[0167] The processor 510 can include one or more processing units, for example: the processor 510 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0168] The controller can generate operation control signals according to instruction operation codes and timing signals, complete the control of fetching instructions and executing instructions.

[0169] The processor 510 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 510 is a cache memory. The memory can save instructions or data that the processor 510 has just used or repeatedly uses. If the processor 510 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 510, thereby improving the efficiency of the system.

[0170] In some embodiments, the processor 510 can include one or more interfaces. The one or more interfaces can be used for the connection of the processor 510 with the memory 520, the display screen 530, etc.

[0171] In some embodiments of the present application, the processor 510 can be used to verify whether the received relationship chain identifier is the relationship chain identifier of the stored contact friend. For specific details, please refer to the following.

[0172] The memory 520 can be used to store computer executable program codes, and the executable program codes include instructions. The memory 520 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, at least one application required by a function (such as an image playing function, etc.), etc. The data storage area can store data created during the use of the terminal 500, etc. The processor 510 executes various functional applications and data processing of the terminal 500 by running the instructions stored in the memory 520 and / or the instructions stored in the memory provided in the processor.

[0173] The terminal 500 implements display functions through a GPU, a display screen 530, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 530 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 510 can include one or more GPUs that execute program instructions to generate or change display information.

[0174] The display screen 530 is used to display images, videos, etc. The display screen 530 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the terminal 500 can include 1 or N display screens 530, N being a positive integer greater than 1.

[0175] In some embodiments of the present application, the display screen 530 can be used to display various interfaces. For example, a user who will receive a relationship chain identifier is prompted to be added as a contact.

[0176] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal. In other embodiments of the present application, the terminal can include more or fewer components than those shown in FIG. 5, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0177] The above-mentioned FIG. 4 and FIG. 5 are only possible examples of the structure of the terminal and the server in the above-mentioned system, and do not constitute a limitation on the structure of the terminal and the server.

[0178] The communication method provided by the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. It should be noted that the message name or the number of messages or the parameter name in the message between the devices in the embodiments of the present application is only an example, and other names can also be used in specific implementation. For example, request A can also be called other request or other message name.

[0179] In addition, the actions and terms involved between the embodiments of the present application can be mutually referenced and not limited.

[0180] FIG. 6 shows a flow example of the technical solution of the embodiments of the present application. As shown in FIG. 6, the method can include the following steps:

[0181] S101, the first terminal receives a first operation of initiating a communication connection to a second user.

[0182] The system of the first terminal logs in the account of the first user. For example, the system of the first terminal logs in the Huawei account of the first user. The account logged in by the system can be referred to as an account.

[0183] The first terminal stores the relationship chain identifier of the first user and the relationship chain identifier of the second user, wherein the second user is a contact of the first user, and the relationship chain identifier is generated based on the account of the user logged in by the system of the terminal. For example, the relationship chain identifier of the first user is generated based on the account of the first user, and the relationship chain identifier of the contact of the first user is determined based on the account of the contact.

[0184] Optionally, the relationship chain identifier can be obtained by performing a hash operation on the account. Terminal A logs in the Huawei account A of user A, and obtains the relationship chain identifier Account encrypt Id_A of user A by performing a hash operation on the Huawei account A. Terminal B logs in the Huawei account B of user B, and obtains the relationship chain identifier Account encrypt Id_B of user B by performing a hash operation on the Huawei account B. Alternatively, the relationship chain identifier can be determined based on other manners, which is not limited in the embodiments of the present application. For example, the relationship chain identifier can be obtained by performing SHA-256 processing, SHA-256 processing, or MD5 processing on the account.

[0185] For example, the contacts of the first user include contact 1 and contact 2, and the first terminal can store the relationship chain identifier of the contact 1, the relationship chain identifier of the contact 2, and the relationship chain identifier of the first user.

[0186] Optionally, the first terminal can also store the contact information of at least one contact of the first user.

[0187] For example, the first terminal is terminal A, and user A of terminal A initiates a video call to user B of terminal B. As shown in FIG. 7, terminal A detects that user A clicks the video call control 102 (an example of the first operation) corresponding to user B (Jane), and terminal A determines that user A initiates a communication connection to user B. Here, it is only an example of the first operation, and in other scenarios, the first operation can also be other operations, which is not limited. For example, in a near-field sharing scenario, the first operation can be clicking the icon of the searched opposite party.

[0188] S102, in response to the first operation, obtaining the communication identifier of the second terminal of the second user based on the relationship chain identifier of the second user.

[0189] As a possible implementation, the application can generate its own address book according to the content downloaded from the server. That is, the application can maintain its own address book on the basis of the relationship chain of the system address book. The application's own address book has a finer granularity, such as indicating the DeviceID (an example of a communication identifier) of each device. The application can initiate communication to the corresponding device based on the finer-grained address book. The application's own address book can be referred to as an application-level address book. For example, the SmoothLink maintains an address book as shown in Table 2, through which the SmoothLink can index to the DeviceID of each device.

[0190] Table 2

[0191] The application can index to the communication device through its own address book according to the implementation of the application, and the specific implementation manner is not limited.

[0192] For example, multiple terminals log in to the same account, and in the SmoothLink address book, the multiple terminals can present one contact person to the outside. Taking Table 2 as an example, assume that the contact person of account A is Jane, and Jane's relationship chain identifier 1 is associated with mobile phone 1 and mobile phone 2. As shown in FIG. 7, in the SmoothLink address book interface 101, Jane's mobile phone 1 and mobile phone 2 are presented as one contact person. In response to the user clicking the video call control 102, the terminal A calls the mobile phone 1 and the mobile phone 2, and both the mobile phone 1 and the mobile phone 2 ring.

[0193] For example, the smart screen, the tablet, and the mobile phone log in to the same account. In the SmoothLink address book, the mobile phone and the tablet present one contact person to the outside, and when called, the multiple devices ring together. The smart screen can be a separate device, and in the SmoothLink address book, the identifier of the smart screen can be presented separately, and the terminal can call the smart screen separately.

[0194] Still taking Table 2 as an example, assume that the contact person of account B is Jeff, and Jeff's relationship chain identifier 2 is associated with the smart screen, the tablet, and other devices. As shown in FIG. 7, in the SmoothLink address book interface 101, Jeff's smart screen is presented as one separate contact person. Jeff's other devices are presented as another contact person. In response to the user clicking the video call control corresponding to Jeff's smart screen, the terminal A calls the smart screen separately. In response to the user clicking the video call control corresponding to Jeff, the terminal A calls Jeff's tablet and other devices.

[0195] For example, as shown in FIG. 7, when terminal A detects that user A clicks the video call control 102 corresponding to user B (Jane) (an example of the first operation), terminal A knows that the video call control corresponds to user B, and terminal A can query the table shown in Table 2 based on the relationship chain identifier of user B to obtain the DeviceID of the device of user B. For example, the terminal B of user B includes a mobile phone 1 and a mobile phone 2, and the DeviceID of the device of user B includes the DeviceID of the mobile phone 1: 887XXX1 and the DeviceID of the mobile phone 2: 887XXX2.

[0196] For another example, as shown in FIG. 7, when terminal A detects that user A clicks the video call control corresponding to "Jeff's smart screen", terminal A can query the table shown in Table 2 based on the relationship chain identifier of Jeff to obtain the DeviceID of the smart screen of Jeff: 887XXX4.

[0197] In S103, the first terminal sends a communication connection request to the second terminal of the second user based on the communication identifier.

[0198] In some scenarios, the communication connection request is used to initiate audio and video communication.

[0199] For example, terminal A sends a communication connection request to the terminal B (such as a mobile phone) of user B based on the DeviceID of user B (an example of the communication identifier). Terminal B responds to the communication connection request to establish a communication connection with terminal A. Terminal A and terminal B can communicate through the communication connection, such as audio and video data in the interactive smooth communication process.

[0200] By using the method, when the application in the first terminal communicates with the application in the second terminal, the application in the first terminal can query the communication identifier of the contact based on the relationship chain identifier of the contact, without the need to find the user in the second terminal through the private information such as a mobile phone number or an email number, thereby reducing the risk of leakage of private information of the user.

[0201] In the above example, the first terminal stores the association between the relationship chain identifier of the contact and the DeviceID of the contact. In another embodiment, the terminal does not pre-acquire and store the DeviceID of the contact from the server. When the first terminal has a business requirement, the first terminal queries the DeviceID of the contact from the server. The implementation is described as follows:

[0202] As a possible implementation, when the first terminal has a business requirement, the first terminal sends the relationship chain identifier of the second user to the server and receives the DeviceID of the second user from the server. Then, the first terminal sends a communication connection request to the second terminal based on the DeviceID.

[0203] As a possible implementation, the server can store the correspondence between the relationship chain identifier of each user in the plurality of users and the DeviceID.

[0204] In some examples, as shown in FIG. 7, the information stored by the server includes: the relationship chain identifier of user B and the DeviceID B1 (such as the identifier of a mobile phone) of the terminal B used by user B; the relationship chain identifier of user C and the DeviceID C1 (such as the identifier of a tablet) of the terminal C used by user C.

[0205] As shown in FIG. 7, the terminal A detects that user A clicks the video call control 102 (an example of the first operation) corresponding to user B (Jane), and the terminal A sends the relationship chain identifier of user B to the server to query the DeviceID of user B. After receiving the relationship chain identifier of user B from the terminal A, the server queries the stored correspondence to obtain the DeviceID B1 of user B associated with the relationship chain identifier. Then, the server returns the DeviceID B1 of user B to the terminal A. After querying the DeviceID of user B from the server, the terminal A can send a communication connection request to the terminal B of user B based on the DeviceID.

[0206] Optionally, the communication connection request sent to the terminal B can include the relationship chain identifier of user A. The terminal B can query the contact database of the terminal B according to the relationship chain identifier of user A, and after the query, it is found that the relationship chain identifier of user A exists in the contact database, indicating that user A is a friend of user B. The terminal B can display the call request interface of the friend accordingly. Conversely, if the terminal B determines that the opposite party of the call request is not a friend of user B, the terminal B can display the call request interface of the non-friend. That is, the terminal B can display the call request interfaces of the friends and non-friends in different user interface (UI) styles.

[0207] In other examples, user B has multiple devices logged in the same account, for example, the terminal B1 (such as a mobile phone) and the terminal B2 (such as a tablet) of user B are logged in the same account, and correspondingly, the mobile phone and the tablet have the same relationship chain identifier. In this example, the information stored by the server can include: the relationship chain identifier of user B and the DeviceID B1 of the mobile phone used by user B; the relationship chain identifier of user B and the DeviceID B2 of the tablet used by user B; the relationship chain identifier of user C and the DeviceID C1 of the terminal C used by user C.

[0208] In this example, terminal A wants to initiate a video call to the terminal of user B, terminal A can send the relationship chain identifier of user B to the server to query the DeviceID of the terminal of user B. After receiving the relationship chain identifier of user B from terminal A, the server queries the stored correspondence to obtain the DeviceID B1 (such as the DeviceID of the mobile phone of user B) and DeviceID B2 (such as the DeviceID of the tablet of user B) of the terminal of user B associated with the relationship chain identifier. Then, the server returns the DeviceID B1 and DeviceID B2 of the terminal of user B to terminal A. Terminal A can use the DeviceID B1 of the terminal of user B to send a video call request to the mobile phone of user B. And terminal A can use the DeviceID B2 of the terminal of user B to send a video call request to the tablet of user B. In this way, the devices logged in the same account of user B will all receive the video call request, and user B can choose to accept the video call request on any device and use the device to have a video call with user A.

[0209] In some other embodiments, the first terminal can also establish a communication connection with the second terminal through the server. For example, terminal A sends the relationship chain identifier of user B to the server, and the server queries the locally stored communication information to determine that the DeviceID of the terminal of user B is B1. Then, the server establishes a communication connection between terminal A and terminal B according to the DeviceID of the terminal of user B. The server that triggers the establishment of the communication connection between terminals can be the same server as the server that implements other functions in this article, or a different server.

[0210] Optionally, the communication connection between the first terminal and the second terminal can be a direct connection or an indirect connection. For example, the connection between the first terminal and the second terminal can be a point-to-point (P2P) connection. Alternatively, the first terminal and the second terminal are connected through a relay. The relay includes but is not limited to a server. The server acting as a relay can be the same server as the server that implements other functions in this article, or a different server.

[0211] In some embodiments, the contact information of the first user of the first terminal, or the contact information of the contact of the first terminal, can change, in which case the first terminal or the server needs to perform corresponding update operations so that subsequent corresponding terminals can initiate a communication connection using the updated relationship chain identifier. The following describes the cases:

[0212] Case 1: The first user of the first terminal modifies his / her own contact information

[0213] In this case, the terminal of the contact of the first user modifies the association between the contact information of the first user and the relationship chain identifier of the first user.

[0214] As a possible implementation, the first terminal receives a second operation of modifying the contact information of the first user. In response to the second operation, the first terminal can send the modified contact information of the first user to the server. After the server receives the modified contact information of the first user sent by the first terminal, the server can send a first notification message to the third terminal, the first notification message being used to notify the third terminal to modify the association between the contact information of the first user and the relationship chain identifier of the first user. The contact information of the user of the third terminal includes the added contact information of the first user. That is, in the scenario that the first user modifies the contact information of the first user, the server can notify the terminal of the contact to modify the association between the contact information of the first user and the relationship chain identifier of the first user.

[0215] As a possible implementation, the server modifies the association between the contact information of the first user and the relationship chain identifier of the first user.

[0216] Optionally, the modification includes one or more of the following: adding the contact information, deleting the contact information, and updating the contact information.

[0217] As an example, the first terminal is terminal A, and the first user is user A.

[0218] For example, user A adds a telephone number 189xxx of himself in terminal A, and terminal A can report the telephone number 189xxx to the server. Specifically, terminal A reports the telephone number 189xxx and the relationship chain identifier of user A to the server. The server can modify the communication information of user A accordingly. For example, the telephone number 189xxx is added in the communication information corresponding to user A.

[0219] The server sends a first communication message to the terminal of the contact of user A according to the received information, to notify the terminal of the contact to modify the association between the contact information of user A and the relationship chain identifier of user A. For example, the server can know that the contacts of user A include user B and user C according to the stored relationship information example as shown in FIG. 2, and then the server sends a first notification message to the terminal of user B and the terminal of user C respectively.

[0220] For example, the server sends a first notification message to the terminal B of the user B, the first notification message includes the relationship chain identifier of the user A, the new phone number 189xxx of the user A, and the push token of the terminal B (push Token B). The terminal B adds the association between the new phone number 189xxx and the relationship chain identifier of the user A according to the first notification message. As shown in Table 3-2, compared with Table 3-1, the terminal B adds the second row Account encrypt Id_A, 189xxx in Table 3-2 to represent the association between the new phone number 189xxx and the relationship chain identifier of the user A (Account encrypt Id_A). Optionally, the mailbox in the second row of Table 3-2 can be Email_A, or null, which is not limited.

[0221] Table 3-1

[0222] Table 3-2

[0223] For another example, the user A deletes the contact information of the user A in the terminal A. For example, the user A deletes part of the contact information, or deletes all the contact information. For example, the user A deletes the phone number, or deletes the phone number and the mailbox.

[0224] The terminal A can report the deleted contact information of the user A to the server. Specifically, the terminal A reports the deleted contact information and the relationship chain identifier of the user A. After receiving the information reported by the terminal A, the server sends a first notification message to the terminal of the contact of the user A who stores the deleted contact information. For example, the first notification message includes the deleted contact information, the relationship chain identifier of the user A, and the push token. The terminal of the contact of the user A can delete the association between the deleted contact information of the user A and the relationship chain identifier of the user A according to the first notification message. In some examples, as shown in Table 4-2, compared with Table 4-1, the terminal B deletes the first row in Table 4-2.

[0225] Table 4-1

[0226] Table 4-2

[0227] In some other examples, as shown in Table 5-2, compared with Table 5-1, the terminal B deletes the phone number 189yyy in the first row of Table 5-2, and the association between the relationship chain identifier Account encrypt Id_A and the mailbox Email_A still exists.

[0228] Table 5-1

[0229] Table 5-2

[0230] For another example, user A updates the phone number A to the phone number B in the terminal A, the terminal A can report the phone number A and the phone number B to the server. After receiving the information from the terminal A, the server can send a first notification message to the contact terminal storing the phone number A, and the first notification message can include the phone number A, the phone number B, the relationship chain identifier of user A and the push token of the contact terminal. As shown in Table 6-1 and Table 6-2 below, the contact terminal B can delete the association between the phone number A and the relationship chain identifier of user A according to the first notification message, and add the association between the phone number B and the relationship chain identifier of user A.

[0231] Table 6-1

[0232] Table 6-2

[0233] Case 2: The first user of the first terminal modifies the contact's contact information

[0234] In this case, the first terminal modifies the association of the relationship chain identifier of the contact accordingly. Correspondingly, the server can modify the association between the contact information and the relationship chain identifier of the contact (such as the third user) stored based on the modified contact information of the contact.

[0235] In some scenarios, the first user of the first terminal adds the contact information of the contact. As a possible implementation manner, the first terminal receives a third operation of adding the third user as a contact, and in response to the third operation, the first terminal sends the contact information of the third user to the server. The first terminal receives and stores the relationship chain identifier of the third user sent by the server. In some examples, the first terminal can also receive and store the Device ID of the terminal of the third user sent by the server.

[0236] For example, user A adds the contact information of a friend B in terminal A, and the terminal A can report the contact information of the friend B to the server. Specifically, the terminal A reports the contact information of the friend B and the relationship chain identifier of user A.

[0237] The server searches for the relationship chain identifier of the friend B in the storage space, and pushes the relationship chain identifier of the friend B to the terminal A. For example, the server sends a push message, and the push message includes the contact information of the friend B, the relationship chain identifier of the friend B and the corresponding push token, which is used to indicate the association between the contact information of the friend B and the relationship chain identifier of the friend B. The server can also send the Device ID of the terminal of the newly added friend B to the terminal A.

[0238] In some scenarios, the first terminal also stores the contact information of at least one contact of the first user. The first user of the first terminal can delete the contact information of one or more contacts. As a possible implementation, the first terminal receives a fourth operation of deleting the fourth user as a contact. In response to the fourth operation, the first terminal deletes the stored relationship chain identifier of the fourth user. In some examples, the first terminal can also delete the Device ID of the terminal of the fourth user.

[0239] For example, the user A deletes the contact information of a friend B in the terminal A, and the first terminal deletes the stored relationship chain identifier of the friend B and the Device ID of the terminal of the friend B.

[0240] In this scenario, the first terminal can also send the contact information of the fourth user to the server in response to the fourth operation. For example, the terminal A can also report the contact information of the friend B to the server, and the server deletes the association between the contact information of the friend B and the relationship chain identifier of the friend B.

[0241] In some scenarios, the first terminal also stores the contact information of at least one contact of the first user. The first user of the first terminal can update the contact information of one or more contacts.

[0242] As a possible implementation, the first terminal also stores the contact information of a fifth user and the relationship chain identifier of the fifth user, the fifth user being a contact of the first user. The first terminal can receive a fifth operation of updating the contact information of the fifth user from a first contact information to a second contact information, and in response to the fifth operation, update the corresponding contact information of the relationship chain identifier of the fifth user from the first contact information to the second contact information.

[0243] For example, the user A changes the phone number of the friend B from number 1 to number 2, and the terminal A can delete the association between the number 1 of the friend B and the relationship chain identifier of the friend B, and add the association between the number 2 of the friend B and the relationship chain identifier of the friend B. In this way, in the scenario of updating the contact information of the fifth user, the first terminal can timely update the association between the relationship chain identifier of the fifth user and the contact information.

[0244] In this scenario, the first terminal can also send the first contact information and the second contact information of the fifth user to the server in response to the fifth operation. For example, the terminal A can also notify the server of the changed number 2 of the friend B, to instruct the server to delete the association between the number 1 and the relationship chain identifier of the friend B, and add the association between the number 2 and the relationship chain identifier of the friend B. In this way, the server can quickly learn the update of the contact information of the fifth user, and correspondingly update the association between the relationship chain identifier of the fifth user and the contact information.

[0245] In this scenario, after receiving the first contact information and the second contact information of the fifth user, the server can also send a notification message to the terminals of the fifth user's contacts to instruct the contact terminals to modify the association between the fifth user's contact information and the relationship chain identifier. For example, the phone number of user A's friend B is updated from number 1 to number 2. According to the relationship network shown in FIG. 3A, the server determines that the contacts of friend B also include contact C and contact K. Then, the server can send a notification message to the terminals of contact C and contact K to instruct terminals C and K to update the association between the relationship chain identifier of friend B and the contact information. Specifically, terminals C and K can delete the association between the number 1 of friend B and the relationship chain identifier of friend B, and add the association between the number 2 of friend B and the relationship chain identifier of friend B.

[0246] In case 2, as a possible implementation manner, if user A has other devices, the server can also send a push message to the other devices of user A to instruct to delete or add or update the association between the contact information of friend B and the relationship chain identifier of friend B.

[0247] The above mainly takes the far-field communication as an example to introduce the scheme of the embodiments of the present application, and the scheme is also applicable to near-field communication.

[0248] For example, terminal A can send the contact information of friend user B to the server, and receive the relationship chain identifier of user B sent by the server. As shown in FIG. 8A, in the Huawei Share scenario, terminal B sends a broadcast, and the broadcast can carry the relationship chain identifier of user B of terminal B. Terminal A searches for nearby devices, and terminal A searches for the broadcast of terminal B. Terminal A judges whether the relationship chain identifier in the broadcast has been stored in the contact database. If the relationship chain identifier has been stored, it indicates that terminal B is a contact of user A. On the contrary, if terminal A does not store the relationship chain identifier, it indicates that terminal B is not a contact of user A.

[0249] Optionally, the display manners of terminal A to contacts and non-contacts can be different. For example, as shown in FIG. 8A, the UI style of the icon of a contact is style one, and the UI style of the icon of a non-contact is style two.

[0250] In some examples, as shown in FIG. 8A, user B is a contact. In response to user A clicking the icon 103 of the contact, terminal A can establish a communication connection with terminal B. FIG. 8B shows a flow example of the scenario shown in FIG. 8A.

[0251] As a possible implementation manner, terminal A can be set to support interaction with all searched users. In this case, terminal A can establish a communication connection with the searched opposite party. The opposite party can be a contact or a non-contact.

[0252] As another possible implementation, the terminal A can be configured to interact with only the contact. In this case, the terminal A can establish a communication connection with the searched contact. For the searched non-contact, the terminal A can display a prompt message to prompt the communication after being added as a contact. After the user A adds the searched opposite party as a contact, the terminal A can establish a communication connection with the contact.

[0253] With this method, in the near field communication scenario, the terminal carries the relationship chain identifier in the broadcast instead of the sensitive information such as the mobile phone number, which can improve the information security and avoid the privacy leakage.

[0254] In some embodiments, the relationship chain identifiers can be shared among multiple devices. As a possible implementation, the first terminal further stores the contact information of at least one contact of the first user, and the contact information of the contact corresponds to the relationship chain identifier of the contact in a one-to-one manner. The first terminal receives a notification message sent by the server, and the notification message is used to notify the first terminal to modify the association between the stored contact information and the relationship chain identifier. The modification of the association between the stored contact information and the relationship chain identifier includes one or more of the following: deleting the association between the contact information of the sixth user and the relationship chain identifier of the sixth user in the at least one contact of the first user; updating the contact information corresponding to the relationship chain identifier of the seventh user in the at least one contact of the first user; and adding the association between the contact information of the eighth user and the relationship chain identifier of the eighth user.

[0255] The server can receive the modified contact information of the third user from the first terminal. The modification includes one or more of the following: adding the third user as a contact, deleting the third user from the contact, and updating the contact information of the third user. The server can send a second notification message to the fourth terminal, and the second notification message is used to notify the fourth terminal to modify the association between the stored contact information and the relationship chain identifier. The account logged in by the fourth terminal is the same as the account logged in by the first terminal.

[0256] For example, the user adds the phone number 180xxx of the contact B in the mobile phone A1. The mobile phone A1 can query the relationship chain identifier of the contact B from the server. As shown in FIG. 9, the mobile phone A1 receives a notification message from the server, and the notification message includes the phone number 180xxx of the contact B and the relationship chain identifier Account encrypt Id_B of the contact B, to instruct the mobile phone A1 to add the association between the phone number 180xxx and the relationship chain identifier Account encrypt Id_B.

[0257] As shown in FIG. 9, the tablet A2 logged in the same Huawei account A as the mobile phone A1 opens the cloud synchronization function. Then, the server can also send the above notification message (an example of the second notification message) to the tablet A2 to indicate that the tablet A2 adds the association of the phone number 180xxx and the relationship chain identifier Account encrypt Id_B. It can be seen that the device opening the cloud synchronization function can not only obtain the relationship chain identifier of the contact of the device itself from the server, but also obtain the relationship chain identifier of the contact of the same account device (such as the mobile phone of the same account). Or, it can be understood that after opening the cloud synchronization function, the device can obtain the data in the contact database of the same account device. That is, the data in the contact database of the same account device can be completely the same.

[0258] As shown in FIG. 9, the computer A3 logged in the same account A as the mobile phone A1 does not open the cloud synchronization function. Then, the server can not send the above notification message to the computer A3. The computer A3 cannot obtain the relationship chain identifier of the contact of the same account device (such as the mobile phone of the same account).

[0259] In some embodiments, each terminal can store the capability information of each contact. Taking the first terminal as an example, the first terminal also stores the capability information of at least one contact of the first user, and the capability information of the contact corresponds to the relationship chain identifier of the contact in a one-to-one manner. The capability information is used to indicate whether the corresponding contact has the audio and video communication capability. The capability information of the second user is used to indicate that the second user has the audio and video communication capability. It can also be understood or replaced as: the capability information of the contact represents the capability of the account of the contact. Different accounts can have different capabilities. Correspondingly, different relationship chain identifiers can correspond to different capability information.

[0260] As a possible implementation manner, each terminal can also store the capability information of the local user of the terminal.

[0261] For example, the format of the capability information can be a bit format. For example, the capability information of the contact B of the user A is 000001100. The capability information of the contact B is 000001101. Among them, the 6th, 7th, 8th and 9th bits in the 9-bit capability information respectively represent the smooth connection application capability, the Huawei sharing capability, the long tail application 1 capability and the long tail application 2 capability. Then, the above capability information can represent that the Huawei account of the contact B opens the smooth connection application capability and the Huawei sharing capability; the Huawei account of the contact C opens the smooth connection application capability, the Huawei sharing capability and the long tail application 2 capability. The number of bits and the meaning of each bit here are only examples, and the number of bits and the meaning of each bit can be other, which is not limited. The format of the capability information can also be other, which is not limited.

[0262] The Huawei account opens the smooth connection application capability, which can be understood or replaced as: after the smooth connection application logs in the Huawei account, the terminal can implement the method of the embodiment of the application to perform audio and video communication through the smooth connection application, and improve the security of audio and video communication. For example, the relationship chain identifier of the local user is obtained, and the contact information of the local user and the relationship chain identifier of the local user are uploaded to the server. For another example, the relationship chain identifier of the contact person is received from the server. For another example, the relationship chain identifier of the contact person is used to initiate an audio connection request or a video connection request to the terminal of the contact person.

[0263] The Huawei account opens the Huawei sharing capability, which can be understood or replaced as: in the Huawei sharing scenario, the terminal can implement the method of the embodiment of the application to transmit data through Huawei sharing, and improve the security of data transmission. For example, the relationship chain identifier of the contact person is received from the server. For another example, the Device ID of the terminal of the contact person is queried using the relationship chain identifier of the contact person. For another example, the Device ID of the terminal of the contact person is used to initiate a communication connection to the terminal of the contact person.

[0264] Similarly, the Huawei account opens other capabilities, which can be understood or replaced as: in the corresponding scenario, the terminal can implement the method of the embodiment of the application to improve the security of communication in the scenario.

[0265] As a possible implementation manner, each terminal can upload the capability information of the user thereof to the server. Taking the first terminal as an example, the first terminal can send the capability information of the first user to the server. In this way, the server can determine the account-level capability information of each user. Subsequently, the process of the corresponding communication can be controlled according to the capability information of the corresponding user to improve the security of the communication. The specific implementation can be referred to later.

[0266] As a possible implementation manner, the server can send the capability information of the contact person to each terminal. The terminal can store the capability information of at least one contact person. For example, the server can send the capability information of at least one contact person of the first user to the first terminal, and the capability information is used to indicate whether the corresponding contact person has the audio and video communication capability.

[0267] For example, Table 7 shows an example of the capability information of the contact person (the second user) stored by the first terminal. Optionally, the first terminal can also store the nickname, avatar information, etc. of the second user, which is not limited.

[0268] Table 7

[0269] As an alternative implementation manner, the server can also store the device-level capability information to determine the device that opens the corresponding capability.

[0270] As an alternative implementation, the terminal can also store the device granularity capability information, and the embodiments of the present application do not limit the storage granularity of the capability information.

[0271] For example, the Huawei account of user A is enabled with the smooth connection application capability, and the capability information of the contact B of user A indicates that the Huawei account of user B is enabled with the smooth connection application capability. Then, the terminal A can communicate with the terminal of user B using the relationship chain identifier of user B.

[0272] For another example, the Huawei account of user A is enabled with the system application 3 capability, and the Huawei account of user B is not enabled with the system application 3 capability. In this example, the terminal A does not communicate with the terminal of user B using the relationship chain identifier of user B, and the terminal A can communicate with the terminal of user B using the related technical solution.

[0273] As a possible implementation, the terminal can also distinguish the capability information of the contact, and determine the UI style of different contact information accordingly.

[0274] For example, the first terminal can mark the contact supporting the audio and video capability in the contact application. For example, for the contact supporting the smooth connection audio and video capability, the first terminal displays the corresponding icon of the contact, such as the smooth connection icon, to indicate that the contact supports the smooth connection audio and video capability. By using this method, the first terminal can quickly search for the corresponding capability from the contacts, and improve the communication efficiency.

[0275] For another example, taking the smooth connection as an example, when the smooth connection is enabled, the terminal can call the system-level relationship chain information to generate a friend list. The friend list of the terminal can only display the friends supporting the communication through the smooth connection application, or indicate whether the friends support the communication through the smooth connection application through special marking.

[0276] The embodiments of the present application also provide a communication method. Before the first terminal communicates with the second terminal, the communication token (comToken) serving as a security credential needs to be obtained. As shown in FIG. 10, the method for obtaining the communication token can include the following steps.

[0277] In S201, the contact database management module sends a request A, and the request A is used to request an authentication code (AuthCode).

[0278] The terminal can include a contact database management module, and the contact database management module can be used to manage the contact database. The authentication code can be used to represent the identity information of the application.

[0279] For example, the request can include the identifier (APP ID) of the application.

[0280] For example, the application sends the request A to the account management module in the terminal.

[0281] S202, the terminal sends a request B to the server.

[0282] The request B may include, for example, a package name of the application and an identifier of the application. Optionally, the request B may also include a key of the application.

[0283] The terminal may send the request B to the account cloud of the server through the account management module to request an authentication code.

[0284] S203, the server returns the signature fingerprint and the authentication code to the terminal.

[0285] The account cloud of the server may obtain the signature fingerprint of the application after receiving the request B, and return the signature fingerprint and the authentication code to the terminal.

[0286] The signature fingerprint of the application is used to verify that the signature fingerprint comes from the server. For example, the account cloud uses its own private key to digitally sign the Huawei account associated with the application to obtain the signature fingerprint of the application.

[0287] S204, if the signature fingerprint is legal, the account management module returns the authentication code and the relationship chain identifier to the contact database management module.

[0288] As a possible implementation, the account management module verifies the application signature fingerprint from the server. If the signature fingerprint passes the verification, it means that the signature fingerprint comes from the server and has not been tampered with, which means that the Huawei account used to obtain the signature fingerprint has not been tampered with. Subsequently, the terminal can determine the relationship chain identifier of the user of the terminal based on the accurate Huawei account. The terminal may also upload the relationship chain identifier to the server, for example.

[0289] If the signature fingerprint verification passes, the account management module can obtain the Huawei account according to the signature fingerprint, and calculate the relationship chain identifier of the user of the terminal according to the Huawei account. The specific calculation method of the relationship chain identifier can refer to the content in other parts of this document. Then, the account management module can return the relationship chain identifier and the authorized authentication code to the contact database management module.

[0290] S205, the contact database management module sends a request C to the server, and the request C is used to request a communication token.

[0291] The communication token can be used as a security credential of the terminal, and the terminal that obtains the communication token has the permission to obtain the relationship chain identifier of the contact from the server. Optionally, the terminal that obtains the communication token also has the permission to obtain the Device ID of the terminal of the contact from the server.

[0292] As a possible implementation, the contact database management module can send the request C to a relationship chain service of the server. As an example, the request C can include an authentication code. As an example, the request C can further include the relationship chain identifier of the end user. Optionally, the request C can further include the package name of the application. Optionally, the request C can further include the Device ID of the terminal.

[0293] S206, the server determines to return a communication token.

[0294] S2061, the relationship chain service verifies the relationship chain identifier and the Device ID.

[0295] As a possible implementation, after receiving the request C, the relationship chain service determines whether the relationship chain identifier and the Device ID of the terminal user are legal. For example, the relationship chain identifier does not exist in the relationship chain white list, and the Device ID does not exist in the Device ID white list, which means that the relationship chain identifier and the Device ID have security risks. Accordingly, the server rejects the request C and determines not to return a communication token to the contact database management module of the terminal.

[0296] S2062, the relationship chain service verifies the package name.

[0297] As a possible implementation, if the package name exists in the package name white list, the package name verification is passed. For another example, if the package name does not exist in the package name black list, the package name verification is passed.

[0298] S2063, the relationship chain service obtains the key of the application.

[0299] As a possible implementation, if the relationship chain identifier, the Device ID, and the package name are all verified, the relationship chain service can obtain the identifier of the application according to the package name, and obtain the key of the application corresponding to the identifier.

[0300] S2064, the relationship chain service sends a request D to an account cloud, and the request D is used to request a communication token.

[0301] Optionally, the token includes but is not limited to an access token (AT) and / or a refresh token (RT).

[0302] As an example, the request D can carry the authentication code, the key of the application, and the identifier of the application.

[0303] S2065, the account cloud verifies the authentication code and the key of the application.

[0304] For example, the account cloud verifies whether the authentication code in the account cloud verification request D is a legal authentication code. If the authentication code is an authorized legal authentication code, the authentication code passes the verification.

[0305] For another example, the account cloud can also verify the association among the authentication code, the key, and the application identifier. In some examples, if the authentication code carried in the request D is the authentication code corresponding to the application identifier, and the application key in the request D is the key corresponding to the application identifier, the key and the authentication code pass the verification.

[0306] S2066, the account cloud returns the communication token to the relationship chain service.

[0307] If the verification of the authentication code and the application key both pass, it means that the application is initially trusted, and the account cloud returns the communication token to the relationship chain service.

[0308] S207, the relationship chain service returns the communication token to the terminal.

[0309] For example, the relationship chain service returns the communication token to the contact database management module of the terminal.

[0310] As can be seen, in the process of obtaining the communication token from the server, the terminal does not need to transmit sensitive identity information such as the telephone number or the mailbox, and the security risk of the information can be reduced.

[0311] S208, the terminal uses the communication token as a security credential to communicate with the server.

[0312] For example, the terminal sends the communication token and the contact information of at least one contact of the user of the terminal to the server. After receiving the communication token and the contact information of at least one contact of the user of the terminal, the server can know that the terminal has the right to obtain the relationship chain identifier of at least one contact. The server can send the relationship chain identifier of at least one contact to the terminal. Optionally, the server can also send the Device ID of the terminal of at least one contact to the terminal.

[0313] After obtaining the relationship chain identifier of at least one contact from the server, the terminal can store the relationship chain identifier of at least one contact to the contact database. Optionally, after obtaining the Device ID of the terminal of at least one contact from the server, the terminal can store the Device ID of the terminal of at least one contact (for example, store it in Table 2 as described above). Subsequently, the terminal can find the Device ID of the terminal of the contact through the relationship chain identifier of the contact, and use the Device ID of the terminal of the contact to initiate a communication connection to the terminal of the contact.

[0314] As a possible implementation, the contact database management module of the terminal communicates with the server using the communication token.

[0315] As a possible implementation, the communication token can be updated. For example, the communication token is set to be valid for a period of time. After the expiration of the period of time, the terminal can request a communication token from the server again. For another example, the terminal can request a communication token from the server again in the case of a service failure. In this way, the long-term validity of the communication token can be prevented, and the security and robustness of the communication system can be improved.

[0316] As a possible implementation, the validity period of the communication token is not fixed. For example, the validity period of the token for the first communication is 7 days, and the validity period of the token for the second communication is 5 days. Alternatively, the validity period of the communication token is fixed.

[0317] As a possible implementation, the communication token is a random number. In this way, the correlation between different communication tokens can be reduced as much as possible, and the communication security can be improved.

[0318] In some scenarios, a malicious application of a malicious terminal obtains the communication token and the relationship chain identifier of user B. Then, the malicious terminal sends a communication connection request to terminal B according to the Device ID of the terminal of user B. After receiving the communication connection request from the malicious terminal, terminal B can determine that the relationship chain identifier of the user of the malicious terminal does not exist in the contact database, which means that terminal B determines that user B and the user of the malicious terminal are not friends. Terminal B can prompt "strange call" in the interface to prompt that the opposite party of the call is not a friend. As can be seen, even if the malicious terminal obtains the communication token as a security credential, the relationship chain identifier of user B, and the Device ID of the terminal of user B, terminal B can determine that user B and the user of the malicious terminal are not friends according to the contact database, so as to prevent the security risk that may be caused by the communication with a non-friend.

[0319] The scenarios to which the embodiments of the present application are applicable are not limited to the smooth connection and Huawei sharing scenarios listed above. The embodiments of the present application can also be used in scenarios such as short message and call, so as to obtain the Device ID of the terminal of the contact by using the relationship chain identifier, and reduce the probability of leakage of user identity information (such as a mobile phone number).

[0320] The communication method provided in the above embodiments can be applied to near field communication, and the relationship chain identifier is used to obtain the Device ID of the terminal of the contact person. The relationship chain identifier in the above embodiments can also be applied to the process of identity authentication, such as contact person authentication. The relationship chain identifier is used to improve the efficiency and accuracy of contact person authentication. For example, terminal A can initiate a broadcast to search for surrounding devices, the system of the terminal A logs in the account of user A, and the relationship chain identifier A generated based on the account of user A can be carried in the broadcast. Terminal B in the surrounding devices can receive the broadcast, and the system of the terminal B logs in the account of user B. Terminal B can determine whether user A is a contact person of user B according to the relationship chain identifier A in the broadcast. If yes, a broadcast response can be sent to terminal A, and the relationship chain identifier B generated based on the account of user B can be carried in the broadcast response. If not, terminal A is not replied. If terminal A receives the broadcast response replied by terminal B, terminal A can determine whether user B is a contact person of user A according to the relationship chain identifier B in the broadcast response.

[0321] In the following, a possible specific application process of the relationship chain identifier in the process of near field communication for identity authentication will be described in detail.

[0322] The terminal can share data with other terminals using near field wireless communication technology. For example, a first terminal shares files and other data with a second terminal. In the above process, the first terminal as a sending terminal needs to discover or search for the second terminal nearby, and can share files and perform other operations after establishing a connection with the second terminal. The first terminal and the second terminal can be unfamiliar devices, that is, the first user associated with the first terminal and the second user associated with the second terminal are strangers to each other, or the first terminal and the second terminal have not shared data. The identity information of the second user is not added or stored in the first terminal, and / or the identity information of the first user is not added or stored in the second terminal. The device identifier of the second terminal is not added or stored in the first terminal, and / or the device identifier of the first terminal is not added or stored in the second terminal. The first terminal and the second terminal can also be familiar devices, that is, the first user associated with the first terminal and the second user associated with the second terminal are contact persons to each other, or the first terminal and the second terminal have shared data.

[0323] In order to improve the security of data sharing and reduce the sharing of illegal data between terminals, the relevant specification requires that the terminal should provide a switch to turn on or off the function of making other devices in the vicinity visible before implementing the foregoing data sharing operation. Moreover, the relevant specification specifies the opening time of this function. For example, the second terminal as the receiving end will automatically turn off the "everyone visible" function 10 minutes after it is turned on. Therefore, within 10 minutes after the second terminal turns on the "everyone visible" function, other terminals in the vicinity can discover or search for the second terminal. After the "everyone visible" function of the second terminal is turned on, all contacts or terminals used by strangers of the second user associated with the second terminal can discover or search for the second terminal as long as they are in the vicinity of the second terminal. For example, the first terminal as the sending end in the foregoing example can discover the second terminal within 10 minutes. The first user associated with the first terminal can be a contact of the second user or a stranger of the second user.

[0324] It should be understood that 10 minutes in the foregoing example is an example time length, and in actual applications, the function of making other devices in the vicinity visible can also be turned off according to other time lengths, which is not limited.

[0325] On the other hand, the relevant specification also specifies the visibility of the sending end, that is, the first terminal as the sending end cannot be discovered or searched by the second terminal as the receiving end at any time. As shown in FIG. 11, which is a schematic diagram of the visibility requirement of the terminal according to the relevant specification, the second terminal as the receiving end should have a visibility switch. When the visibility switch is turned on, it indicates that the second terminal can be discovered by other terminals within a certain time, for example, 10 minutes as shown in FIG. 11, that is, "everyone visible". In this way, other terminals can share data with the second terminal by establishing a connection with the second terminal. For example, the first terminal in FIG. 11 can discover the second terminal within 10 minutes after the "everyone visible" function is turned on. When the foregoing "everyone visible" function is turned on for more than 10 minutes, the second terminal will automatically turn off the function. For the first terminal as the sending end, the relevant specification requires that the sending end device cannot be discovered by other terminals at any time.

[0326] Due to the foregoing requirement of the relevant specification, the terminal needs to rely on the visibility of the peer device before sharing data with a stranger device or a familiar device. For example, only when the second terminal as the receiving end turns on the visibility switch and is discovered by the first terminal as the sending end within the specified time, the first terminal can successfully share data with the second terminal. This will undoubtedly adversely affect the efficiency of data sharing.

[0327] To reduce the adverse effects of relevant regulatory requirements on data sharing, some terminals provide a "contact-only visible" function. For example, after the second terminal at the receiving end turns on the "contact-only visible" function, when each contact of the second terminal corresponding to the terminal, such as the first terminal, is in the vicinity of the second terminal, the second terminal can be discovered by the first terminal. When the "contact-only visible" function of the second terminal is turned on, after the second terminal receives the search broadcast of the first terminal, the second terminal needs to authenticate the identity information of the first user carried in the broadcast to confirm the identity of the first user, whether the first user is a contact of the second user. Only after the first terminal and the second terminal authenticate each other and confirm that the first user and the second user are contacts, can the first terminal share data with the second terminal.

[0328] In the prior art, identity authentication in the "contact-only visible" case requires the terminal to prove that the peer device has a contact identifier associated with the user account, such as a phone number, an email address, etc. Moreover, the identifier needs to exist in the contact directory of the terminal. When a user logs in to a device using a user account, a unique universally unique identifier (UUID) will be assigned to identify the device. During identity verification, a signed "record data (RD)" in the form of a hash signature will be used, which contains the device UUID and all contact identifiers in the contact directory of the device. The sending device can sign the above RD to obtain RD(s), where s represents the corresponding certificate.

[0329] During authentication, the receiving device will calculate the hash value, such as SHA2, for each contact identifier in its contact directory and compare it with the hash value contained in RD(s) to verify whether the device UUID matches the certificate of the current transport layer security (TLS) link. If the sending or receiving device fails to provide a valid signed TLS certificate or does not provide RD, the identity authentication between terminals cannot be completed. As can be seen, to implement security verification for contacts in the prior art, the process is cumbersome and complex, and the deployment cost is also high. However, if no security verification for contacts is performed, there is a problem that the "everyone visible" function needs to be automatically turned off within a certain time after being turned on according to relevant regulatory requirements.

[0330] To solve the problems in the prior art, the terminal in the embodiment of the present application can perform identity authentication based on the relationship chain identifier described above. The embodiment of the present application provides an identity authentication method. By using the identity authentication method provided by the embodiment of the present application, the terminal can preliminarily screen the contacts and / or devices by matching the contact database and / or the historical sharing database, and quickly perform identity authentication. Meanwhile, the contacts and / or devices obtained through the preliminary screening can be displayed in a corresponding area by the terminal, so as to be recognized by the user and be further operated by the user. The embodiment of the present application can quickly screen the contacts nearby by matching the contact database. When the terminals are not added as contacts, the embodiment of the present application can also quickly screen the devices that have shared data by means of the historical sharing database. On this basis, when the user needs to share data with the contacts or devices obtained through the preliminary screening by the terminal, the terminal can further perform identity authentication on the contacts or devices.

[0331] It can be understood that the relationship chain identifier in the above is applied in the process of preliminarily screening the contacts by the terminal, and the specific implementation mode is described below.

[0332] It can be understood that the embodiment of the present application can quickly display the contacts and / or devices meeting certain conditions through the preliminary screening, so that the user can select the contacts or devices that need to share data from the displayed contacts and / or devices, and then further perform identity authentication on the selected contacts or devices. Compared with the prior art that needs to perform identity authentication on the contacts and then display the contacts to the user, the embodiment of the present application can improve the speed and efficiency of screening the contacts or devices, and also help to improve the efficiency of data sharing. That is, the embodiment of the present application can display multiple contacts and / or devices through the preliminary screening, and only perform identity authentication on the contacts or devices that need to share data; while the prior art needs to perform identity authentication on all displayed contacts, the embodiment of the present application simplifies the operation process of identity authentication and improves the efficiency of identity authentication. Moreover, the embodiment of the present application does not need to send privacy information, thereby reducing the risk of privacy leakage.

[0333] The identity authentication method provided by the embodiment of the present application can be applied to a terminal. For example, the method can be applied to the first terminal in the foregoing example. The first terminal can quickly perform identity authentication with the second terminal by using the method. The first terminal and the second terminal can be terminals of the same type. For example, the first terminal and the second terminal can both be mobile phones, or the first terminal and the second terminal can both be tablet computers. Alternatively, the first terminal and the second terminal can be terminals of different types. For example, the first terminal can be a mobile phone, and the second terminal can be a tablet computer, or the first terminal can be a tablet computer, and the second terminal can be a wearable device such as a smart watch, and the like. The type of the terminal is not limited in the embodiment of the present application.

[0334] As shown in FIG. 12, it is a schematic diagram of a user operation interface of an identity authentication method provided by an embodiment of the present application. In FIG. 12, (a) shows a schematic diagram of a data sharing function setting page using a near field wireless communication technology, for example, the function can be the "Huawei Share" function 1200 shown in (a). In (a), three options on the data sharing function setting page of the current terminal, for example, the second terminal, are shown, i.e., the "Visible to all (10 minutes)" option 1201, the "Visible to contacts and shared devices" option 1202, and the "Invisible" option 1203. When the "Invisible" option 1203 in (a) is selected, the current second terminal cannot be found or searched by other terminals, for example, the first terminal, in the vicinity. The first terminal and the like cannot share data with the second terminal through the near field wireless communication technology. When the "Visible to all (10 minutes)" option 1201 in (a) is selected, it means that the second terminal can be found by other terminals in the vicinity within 10 minutes. The other terminals, for example, the first terminal, can share data with the second terminal. In the case of being visible to all, the process of establishing a connection and performing contact identity authentication between the other terminal and the second terminal can be performed in the same way as the prior art, and the embodiment of the present application will not be described again.

[0335] When the "Visible to contacts and shared devices" option 1202 in (a) is selected, the page of the second terminal can be as shown in (a). This means that the "Huawei Share" function is turned on. At this time, the contacts of the second user associated with the second terminal, and other terminals that have shared data with the second terminal or terminals that have been shared data by the second terminal, can find or search the second terminal when they are in the vicinity of the current location of the second terminal. In this way, the second terminal can act as a receiving terminal device of shared data, and receive data shared by other terminals after completing identity authentication with other terminals.

[0336] If the first user associated with the first terminal is a contact of the second user associated with the second terminal, i.e., the first user uses the first terminal and the second user uses the second terminal, and the identity information of the first user associated with the first terminal is stored in the second terminal, the second terminal can be found by the first terminal when the second terminal is in the vicinity of the first terminal after the "Visible to contacts and shared devices" option 1202 in (a) is selected.

[0337] If the first terminal is a device that has shared data with the second terminal, even if the first user associated with the first terminal is not a contact of the second user, the second terminal can be found by the first terminal when the second terminal is in the vicinity of the first terminal after the "Visible to contacts and shared devices" option 1202 in (a) is selected.

[0338] In the case that the contact and the shared device are visible, the second terminal can perform identity authentication with the first terminal by using the method provided in the embodiments of the present application. The second terminal and the first terminal can perform preliminary screening according to the contact database and / or the historical sharing database, and the preliminary screening result is the contact of the second user and / or the shared device, and the result is displayed in a corresponding area of the second terminal.

[0339] In the embodiments of the present application, the second terminal can display the information of the contact of the second user, and the information of the contact includes the user information of the contact. For example, the user information can include the avatar information, the user ID, the user name and the like. The second terminal can also display the information of the shared device. For example, the information of the device can include the device name, the device model, the device type, the device image and the like.

[0340] Optionally, when the information of the contact of the second user is displayed, the information of the device associated with the contact, such as the device name and the device model, can also be displayed. When the information of the shared device is displayed, the information of the user associated with the shared device, such as the user name, can also be displayed.

[0341] It can be understood that the embodiments of the present application do not limit how to display the preliminary screening result (i.e. the contact of the second user and / or the shared device) and the information contained in the preliminary screening result.

[0342] As shown in (b) of FIG. 12, it is a page schematic diagram for displaying the information of the contact and the device obtained by preliminary screening. The contact and the shared device of the second user located in the vicinity of the current second terminal can be displayed in (b) of FIG. 12. For example, the contact 1, the contact 2, the device 1 and the device 2 are displayed in the display area 1204 in (b) of FIG. 12. Among them, the contact 1 and the contact 2 are the contact of the second user related to the second terminal, and the device 1 and the device 2 are the device shared with the second terminal.

[0343] In a possible implementation manner of the embodiments of the present application, as shown in (c) of FIG. 12, it is another page schematic diagram for displaying the information of the contact and the device obtained by preliminary screening. After the contact in the vicinity and the shared device are obtained by preliminary screening according to the method provided in the embodiments of the present application, the second terminal can display the contact and the shared device in different areas according to the contact and the shared device. For example, as shown in (c) of FIG. 12, the contact in the vicinity is displayed in the same area, such as the contact 1 and the contact 2 displayed in the contact display area 1205; the shared device in the vicinity is displayed in another area, such as the device 1 and the device 2 displayed in the device display area 1206, and the display manner of the contact and the shared device is not limited in the embodiments of the present application.

[0344] Optionally, the second terminal can also display information of other devices and / or non-contacts. The non-contacts are contacts that fail the preliminary screening, and the other devices are devices that fail the preliminary screening.

[0345] The displayed contacts and / or devices can be obtained by performing the preliminary screening according to the method provided in the embodiments of the present application. Through the preliminary screening, the terminal can quickly display the possible contacts and / or shared devices in the corresponding area, thereby facilitating the user to perform subsequent operations.

[0346] In the embodiments of the present application, the preliminary screening process can have certain errors. For example, the displayed contacts can not be the contacts of the user associated with the terminal, and the displayed shared devices can not be the devices that have shared data with the terminal. Therefore, when sharing data, the terminal needs to further authenticate the contacts or devices.

[0347] When the user wants to share data with a certain device, for example, as shown in (d) of FIG. 12, the user wants to share data with the device 1 obtained through the preliminary screening, the user can click the image of the device 1 in the device display area 1206. At this time, the current terminal can further authenticate the device 1 to confirm that both parties have the corresponding permissions and can share data with each other.

[0348] In a possible implementation manner of the embodiments of the present application, the second terminal shown in FIG. 12 can be a terminal as a receiving end. That is, the second terminal as the receiving end can start the Huawei Share function according to the requirements of the related specifications, and set the contacts and shared devices to be visible. After the second terminal in FIG. 12 establishes a connection with other contacts or devices nearby and completes the mutual authentication, the second terminal can receive the data shared from other devices.

[0349] In another possible implementation manner of the embodiments of the present application, the second terminal in FIG. 12 is a terminal as a sending end, starts the Huawei Share function, and sets the contacts and shared devices to be visible. After that, the second terminal can connect with other contacts or devices nearby and complete the mutual authentication. In this way, the other contacts or devices that pass the authentication can be displayed in the corresponding area of the second terminal. That is, the other contacts or devices that pass the authentication are also visible to the second terminal. In this way, the second terminal as the sending end can share data with the other contacts or devices that pass the authentication.

[0350] Next, in combination with specific examples, each technical point involved in the operation process shown in FIG. 12 is introduced respectively.

[0351] As shown in FIG. 13, it is a flowchart of an identity authentication method provided by an embodiment of the present application. FIG. 13 shows the specific process of identity authentication between the first terminal 41 and the peripheral device 40. The peripheral device 40 can include multiple terminals, such as the second terminal 42 in FIG. 13, and the like. In FIG. 13, the first terminal 41 can be a sending terminal, and the second terminal 42 in the peripheral device 40 can be a receiving terminal, which can share data with the first terminal 41 after authentication according to the method provided by the embodiment of the present application. That is, the first terminal 41 is the initiating device of data sharing, and the second terminal 42 is the receiving device in data sharing after authentication. The identity authentication process shown in FIG. 13 can include the following steps S401-S406:

[0352] S401, the first terminal initiates a broadcast search.

[0353] The system of the first terminal logs in the account of the first user. For example, the system of the first terminal logs in the Huawei account of the first user. The account logged in by the system can be referred to as an account.

[0354] In the embodiment of the present application, the first terminal 41 can be used as an initiating device to search whether there is a contact or other device that can share data in the periphery. For example, the first terminal 41 can initiate a search in a broadcast manner. The message broadcasted by the first terminal 41 to the outside can include the relationship chain identifier of the first user and the device hash of the first terminal. The relationship chain identifier of the first user can be obtained by performing a hash operation based on the account of the first user. For example, the relationship chain identifier of the first user is obtained by performing a hash operation based on the account ID of the first user. The device hash of the first terminal can be obtained by performing a hash operation based on the device identifier (UDID) of the first terminal 41. For example, the device hash of the first terminal is obtained by performing a hash operation based on the unique device identifier (UDID) of the first terminal. The type of hash algorithm used in the hash operation is not limited in the embodiment of the present application.

[0355] In the embodiment of the present application, the coverage range of the broadcast message sent by the first terminal 41 can be determined according to the hardware capability of the first terminal 41. In different coverage ranges, the number of terminals included in the peripheral device 40 can be different. The embodiment of the present application does not limit this.

[0356] S402, the first terminal receives a broadcast reply from the peripheral device.

[0357] In the embodiment of the present application, the peripheral devices 40 near the first terminal 41 can be terminals with the data sharing function enabled, for example, some or all of the terminals in the peripheral devices 40 have the "Huawei Share" function enabled as shown in FIG. 12, and are set to "Visible to contacts and shared devices".

[0358] When some or all of the terminals in the peripheral devices 40 receive the broadcast message sent by the first terminal 41, the broadcast message can be replied to. For example, the second terminal 42 in the peripheral devices 40 can reply to the broadcast message of the first terminal 41.

[0359] In a possible implementation manner of the embodiment of the present application, the second terminal 42 can also reply to the first terminal 41 in the form of broadcast, that is, reply to the message to the first terminal 41 through broadcast.

[0360] The user of the second terminal 42 logs in an account in the system of the second terminal 42. For example, the user of the second terminal 42 logs in a Huawei account in the system of the second terminal 42. The account logged in the system can be referred to as an account.

[0361] In a possible implementation manner of the embodiment of the present application, the broadcast reply sent by the second terminal 42 can carry the relationship chain identifier of the second user and the device hash of the second terminal. The relationship chain identifier of the second user can be obtained by performing hash operation based on the account of the second user. The device hash of the second terminal can be obtained by performing hash operation based on the device identifier of the second terminal 42. The type of hash algorithm used in the hash operation is not limited in the embodiment of the present application.

[0362] In the embodiment of the present application, the second user of the second terminal can be a contact of the first user, and the user of the second terminal can also be a user who logs in a shared device of the first terminal 41.

[0363] In a possible implementation manner of the embodiment of the present application, when the second terminal 42 is set to "Visible to contacts and shared devices", after receiving the broadcast message sent by the first terminal 41, the second terminal 42 can match the broadcast message, and perform preliminary screening based on the broadcast message, the contact database and / or the historical sharing database of the second terminal 42, to determine whether to send a broadcast reply to the first terminal 41. If it is determined to send a broadcast reply, the broadcast reply carrying the relationship chain identifier of the second user and the device hash of the second terminal is sent to the first terminal 41; otherwise, no broadcast reply is sent.

[0364] For example, according to the relationship chain identifier of the first user in the broadcast message and the contact database of the second terminal 42, it is determined whether the first user is a contact of the second user. If yes, a broadcast reply is sent to the first terminal 41, and the broadcast reply includes the relationship chain identifier of the second user and the device hash of the second terminal. If no, according to the device hash of the first terminal 41 and the historical sharing database of the second terminal 42, it is determined whether the first terminal 41 is a device that has shared data with the second terminal 42. If yes, a broadcast reply is sent to the first terminal 41, and the broadcast reply includes the relationship chain identifier of the second user and the device hash of the second terminal. If no, the broadcast is not replied.

[0365] It can be understood that in the above example, the second user determines that the first user is a contact of the second user, which indicates that the first user and the second user are friends. Therefore, the second terminal can screen out the first terminal associated with the first user for subsequent interaction with the first terminal.

[0366] It can be understood that the judgment is first based on the contact database and then based on the historical sharing database. In actual application, the judgment can also be first based on the historical sharing database and then based on the contact database. The application does not limit the comparison.

[0367] It can be understood that the specific implementation mode of the second terminal for preliminary screening according to the received broadcast message of the first terminal 41 is the same as the process of the first terminal 41 for preliminary screening according to the broadcast reply in S403. For specific process, please refer to the description in S403.

[0368] S403, the first terminal performs preliminary screening according to the broadcast reply.

[0369] In the embodiment of the application, the first terminal 41 can perform preliminary screening according to the broadcast reply sent by the surrounding device 40 to determine whether the surrounding device 40 includes a device associated with a contact of the first user of the first terminal 41 and a device that has shared data with the first terminal 41.

[0370] In the embodiment of the application, the first terminal 41 performs preliminary screening according to the broadcast reply, which can mean that the first terminal 41 processes and identifies the broadcast reply sent by other devices (for example, the second terminal 42) received to determine whether the screening condition is met. The screening condition includes that the user associated with the other device is a contact of the first terminal 41, and / or the other device is a device that has shared data with the first terminal 41.

[0371] The first terminal 41 can include a local hash database, which includes a contact database and a history sharing database. The contact database can include relevant information of each contact of the first user associated with the first terminal 41, and the history sharing database can include relevant information of devices that have shared data with the first terminal.

[0372] Optionally, the contact database can also include relevant information of devices associated with each contact. The history sharing database can also include relevant information of users associated with devices that have shared data.

[0373] It can be understood that each data in the contact database can be stored in a table, and the relationship chain identifier of each contact stored in the contact database is obtained by performing hash operation on the account of the contact. Therefore, the contact database can also be described as a contact list or a contact hash data table, etc. Each data in the history sharing database can also be stored in a table, and the device hash of each device stored in the history sharing database is obtained by performing hash operation on the device identifier. Therefore, the history sharing database can also be described as a history sharing list, a recent sharing list or a history sharing device hash data table, etc. The present application does not limit this.

[0374] The first terminal 41 can perform matching in the above local hash database according to the broadcast reply to determine whether the screening condition is met.

[0375] For example, taking that the first terminal 41 receives a broadcast reply of the second terminal 42 as an example, the broadcast reply includes the relationship chain identifier of the second user and / or the device hash of the second terminal. The first terminal 41 performs matching in the local hash database of the first terminal 41 according to the relationship chain identifier of the second user and / or the device hash of the second terminal in the broadcast reply to determine whether the screening condition is met. In the case that it is determined that the second user is a contact of the first user, and / or the second terminal 42 is a device that has shared data with the first terminal 41, it is determined that the screening condition is met.

[0376] The second terminal 42 has shared data with the first terminal 41 includes that the first terminal 41 has shared data with the second terminal 42, or the second terminal 42 has shared data with the first terminal 41.

[0377] In a possible implementation manner of the embodiment of the present application, the first terminal 41 performs preliminary screening, which can be performed according to the contact database and / or the history sharing database of the first terminal 41.

[0378] In some examples, the first terminal 41 determines whether the second user is a contact of the first user according to the relationship chain identifier of the second user in the reply broadcast and the contact database of the first terminal 41. If the contact database includes the relationship chain identifier of the second user, it is determined that the second user is a contact of the first user, and the screening condition is met. If the contact database does not include the relationship chain identifier of the second user, the first terminal 41 determines whether the second terminal 42 is a device that has shared data with the first terminal 41 according to the device hash of the second terminal in the reply broadcast and the historical sharing database of the first terminal 41. If the historical sharing database includes the device hash of the second terminal, it is determined that the second terminal 42 is a device that has shared data with the first terminal 41, and the screening condition is met. Otherwise, it is determined that the second user is not a contact of the first user, and the second terminal 42 is a device that has shared data with the first terminal 41, and the screening condition is not met.

[0379] In some examples, the first terminal 41 determines whether the second user is a contact of the first user according to the relationship chain identifier of the second user in the reply broadcast and the contact database of the first terminal 41. If the contact database includes the relationship chain identifier of the second user, it is determined that the second user is a contact of the first user, and the screening condition is met. If the contact database does not include the relationship chain identifier of the second user, the first terminal 41 determines whether the second terminal 42 is a device that has shared data with the first terminal 41 according to the device hash of the second terminal in the reply broadcast and the historical sharing database of the first terminal 41. If the historical sharing database includes the device hash of the second terminal, it is determined that the second terminal 42 is a device that has shared data with the first terminal 41, and the screening condition is met. Otherwise, it is determined that the second user is not a contact of the first user, and the second terminal 42 is a device that has shared data with the first terminal 41, and the screening condition is not met.

[0380] It can be understood that the embodiments of the present application do not limit the specific implementation of the preliminary screening of the first terminal 41.

[0381] In the embodiments of the present application, the first terminal 41 acquires information that meets the screening condition, so as to be displayed subsequently.

[0382] In a possible implementation of the embodiment of the application, in order to quickly identify the identity in the preliminary screening process, the broadcast reply is preprocessed, and the preliminary screening is performed based on the preprocessed data. The preprocessing is truncation processing. For example, the broadcast reply includes the relationship chain identifier of the second user and the device hash of the second device, the relationship chain identifier of the second user and the device hash of the second device are subjected to truncation processing respectively, and the preliminary screening is performed based on the truncated relationship chain identifier of the second user and the truncated device hash of the second device. For example, the process in which the first terminal 41 performs preliminary screening according to the broadcast message replied by the second terminal 42, and the process in which the second terminal 42 performs preliminary screening according to the broadcast message initiated by the first terminal 41, can all preprocess the data in the broadcast, and then perform preliminary screening based on the preprocessed data.

[0383] As shown in FIG. 14, it is a schematic diagram of the contact preliminary screening according to the preprocessed data provided by the embodiment of the application. Taking the process in which the first terminal 41 performs preliminary screening according to the broadcast message replied by the second terminal 42 as an example, the hash value 12345678 shown in FIG. 14 can be the relationship chain identifier of the second user or the device hash of the second terminal. When the above hash value is preprocessed, N characters can be selected for truncation, for example, the first N characters are selected for truncation, or the last N characters are selected for truncation, or the characters between the a th character and the b th character are selected for truncation, and the like. Wherein, N, a, and b are positive integers, and a < b. For example, the first 4 characters are selected for truncation, and the truncated hash value is 1234. The first terminal 41 can match the truncated hash value in the local hash database, and determine whether the screening condition is met according to whether the local hash database contains the truncated hash value.

[0384] As shown in FIG. 14, it is a schematic diagram of the contact preliminary screening according to the preprocessed data provided by the embodiment of the application. Taking the process in which the first terminal 41 performs preliminary screening according to the broadcast message replied by the second terminal 42 as an example, the hash value 12345678 shown in FIG. 14 can be the relationship chain identifier of the second user or the device hash of the second terminal. When the above hash value is preprocessed, N characters can be selected for truncation, for example, the first N characters are selected for truncation, or the last N characters are selected for truncation, or the characters between the a th character and the b th character are selected for truncation, and the like. Wherein, N, a, and b are positive integers, and a < b. For example, the first 4 characters are selected for truncation, and the truncated hash value is 1234. The first terminal 41 can match the truncated hash value in the local hash database, and determine whether the screening condition is met according to whether the local hash database contains the truncated hash value.

[0385] It can be understood that, in the above example, the first terminal truncates the data in the broadcast reply of the second terminal after receiving the broadcast reply, and performs preliminary screening based on the truncated data. In another embodiment, the terminal can first truncate the relationship chain identifier and / or the device hash. When sending a broadcast or a reply broadcast, the broadcast can carry the truncated relationship chain identifier and / or the device hash. The terminal device can perform preliminary screening based on the truncated relationship chain identifier and / or the device hash, which can speed up the processing flow.

[0386] In a possible implementation manner of the embodiment of the application, the contact database in the local hash database of the terminal can include the relationship chain identifiers of a plurality of contacts of the user associated with the terminal.

[0387] Based on the above-described embodiments, the terminal can determine the relationship chain identifier of the user of the terminal based on the account logged in by the system, and obtain the relationship chain identifiers of the contacts of the terminal user from the server. It can be understood that, for the specific implementation manner of the terminal obtaining the relationship chain identifiers of the contacts, reference can be made to the above description, and the terminal can store the obtained relationship chain identifiers of the contacts to the contact database in the local hash database.

[0388] In another possible implementation manner of the embodiment of the application, the historical sharing database in the local hash database of the terminal can include a plurality of device hashes of devices that have shared data with the terminal. After the terminal shares data with other devices, the terminal can interact with the device to obtain the device hash of the device. Alternatively, the terminal can obtain the device identifier of the device, and perform hash operation on the device identifier to obtain the device hash of the device. The terminal can store the device hashes of the devices that have shared data to the historical sharing database in the local hash database.

[0389] In a possible implementation manner of the embodiment of the application, each device hash in the historical sharing database can have a respective aging period (which can also be described as a preset time length), and the aging periods of different device hashes are different. The device hash is valid within the aging period. When the storage time length of the device hash exceeds the aging period, the device hash will become an invalid device hash. The terminal can delete the invalid device hash. The storage time length is counted from obtaining the device hash.

[0390] In another possible implementation of the embodiments of the present application, each device hash in the history sharing database can have the same aging period. In an example, when the storage time of a certain device hash in the history sharing database reaches the time corresponding to the aging period, the device hash can become an invalid device hash, and other device hashes that do not reach the aging period can maintain an effective state. In another example, each device hash in the history sharing database can also be invalidated at the same time.

[0391] In yet another possible implementation of the embodiments of the present application, the aging period can be the aging period of the history sharing database. That is, when the generation time of the history sharing database reaches the time corresponding to the aging period, the history sharing database is invalidated. Accordingly, all device hashes in the history sharing database are invalidated.

[0392] S404, the first terminal displays a first interface, and the first interface includes information of the screened contacts and / or information of the shared devices.

[0393] For the screened contacts and / or the shared devices (that is, the contacts and / or the shared devices meet the screening condition), the first terminal 41 can display the information of the contacts and / or the information of the shared devices in the corresponding regions of the first interface as shown in (b) or (c) of FIG. 12. In this way, the user can select to connect a certain contact or device for data sharing.

[0394] In a possible implementation of the embodiments of the present application, for the same contact, the first terminal 41 can display the same avatar to represent that multiple contacts are the same person.

[0395] In a possible implementation of the embodiments of the present application, one account can log in multiple devices, for example, the user A logs in the device a, the device b and the device c using the account A. In this way, the users related to the device a, the device b and the device c are all the user A, and the relationship chain identifiers generated based on the account A are the same, which are the relationship chain identifier a. The device a, the device b and the device c generate device hashes based on their respective UDIDs, the device a generates the device hash a, the device b generates the device hash b, and the device c generates the device hash c. In this way, the device hashes corresponding to the relationship chain identifier a include the device hash a, the device hash b and the device hash c. Whether the contacts are the same can be determined according to the relationship chain identifier, and for the same contact, the same information can be used to represent the contact.

[0396] S405, the first terminal authenticates the screened contacts and / or the shared devices.

[0397] In the embodiments of the present application, the first terminal 41 authenticating the information of the contact person and / or the information of the shared device can be performed after the preliminary screening is completed. After the preliminary screening is completed, the first terminal 41 can display the information of the screened contact person and / or the information of the shared device in the first interface.

[0398] It can be understood that, since the preliminary screening process is not a strict authentication process, the matching is performed according to part of the information in the preliminary screening process, and it is not determined whether the account of the user, the device, etc. is safe. For example, whether the account of the user is registered through an official channel, whether the user of the account uses the right to use the account, whether the device is a regular production, etc. Therefore, the first terminal 41 needs to further authenticate the contact person or the shared device, and the identity authentication accuracy and safety are improved by re-verification.

[0399] In a possible implementation manner of the embodiments of the present application, the first terminal authenticates the target object in response to the operation of the user touching the target object. The target object can be the information of the contact person, or the target object can also be the information of the shared device. The first terminal triggers the first terminal to initiate a communication connection to the terminal corresponding to the target object in response to the operation of the user touching the target object, which can be understood as the first operation in the above embodiments. For example, the target object includes the avatar of the second user. The first device authenticates the second user in response to the operation of the user touching the avatar of the second user.

[0400] It can be understood that, in the above embodiments, after receiving the broadcast reply, the first terminal performs preliminary screening based on the broadcast reply, displays the data after the preliminary screening, and finally authenticates the data after the preliminary screening. In another embodiment, the first terminal can perform preliminary screening based on the broadcast data after receiving the broadcast, authenticate the data after the preliminary screening, and finally display the data after the authentication.

[0401] In some embodiments, the first terminal comprises a first list and a second list, the first list comprising device identifiers of trusted devices, and the second list comprising information of trusted accounts. The trusted devices are devices identified as secure by a platform or a service provider, and the trusted accounts are accounts identified as secure by the platform or the service provider. The trusted devices and the trusted accounts can be determined through identity authentication and trust evaluation. The first terminal interacts with a second terminal corresponding to a second user, and obtains a device identifier of the second terminal and an account of the second user. The second terminal is authenticated according to the device identifier of the second terminal and the first list. In a case where the first list comprises the device identifier of the second terminal, the second user is authenticated according to the obtained account of the second user and the second list. In a case where the second list comprises the account of the second user, a first authentication credential is obtained by performing a hash operation on the account of the second user, and if the first authentication credential is identical to a relationship chain identifier of the second user, it is determined that the second user passes the authentication. And / or, a second authentication credential is obtained by performing a hash operation on the device identifier of the second terminal, and if the first authentication credential is identical to a device hash of the second terminal, it is determined that the second terminal passes the authentication. In this way, the contacts obtained through the preliminary screening and / or the shared devices are authenticated.

[0402] As shown in FIG. 15, it is a flowchart of a method for authenticating an account according to an embodiment of the present application. FIG. 15 shows a further authentication process between the first terminal 41 and the second terminal 42 after the preliminary screening of the contacts is completed. After the authentication process shown in FIG. 15 is completed, the first terminal 41 and the second terminal 42 can share data.

[0403] As shown in FIG. 15, when the first terminal 41 and the second terminal 42 perform authentication, they need to inform each other of the account ID of the opposite terminal, i.e., the first terminal 41 informs the second terminal 42 of its own account ID, and the second terminal 42 informs the first terminal 41 of its own account ID. To achieve the above-mentioned goal, before performing authentication, the first terminal 41 and the second terminal 42 need to obtain the account ID of the opposite terminal to generate their respective second lists. The first terminal 41 and the second terminal 42 both need to complete a series of the same operations. As shown in FIG. 15, the first terminal 41 and the second terminal 42 first need to log in to an account and register a credential, and then exchange the account ID (which can also be described as user identification (UID)) and exchange the account device authentication credential, and authenticate the account. That is, determine whether the account ID is authentic. The account ID is used to identify a user. In addition, the first terminal 41 and the second terminal 42 also need to negotiate using the local private key and the opposite public key. This process can be implemented based on the simple password exponential key exchange (SPEKE) protocol. In this way, the first terminal 41 and the second terminal 42 can obtain the account ID of the opposite terminal and store it in their own second list, so as to subsequently perform account authentication to verify the authenticity of the account ID.

[0404] The first terminal and the second terminal interact to obtain the account of the second user, and authenticate whether the account of the second user is authentic according to the second list and the account of the second user. In the case where the second list includes the account of the second user, it is determined that the second terminal is authentic.

[0405] As shown in FIG. 15, the account ID logged in by the second terminal 42 can be the mobile phone number of a contact. During authentication, the first terminal 41 and the second terminal 42 respectively inform the opposite terminal of its own account ID. The first terminal 41 can query the authentic account ID of the opposite terminal, and the account ID and contact mapping relationship table to confirm the contact corresponding to the mobile phone number logged in by the opposite terminal. Then, the first terminal 41 can specify an account ID and authenticate whether the second terminal 42, i.e., the opposite terminal device, belongs to the account ID. If the second terminal 42 belongs to the specified account ID, it can be considered that the second terminal passes the authentication, and the device belongs to the account. The second terminal 42 can also query the authentic account ID of the opposite terminal, and the account ID and contact mapping relationship table to confirm the contact corresponding to the mobile phone number logged in by the opposite terminal. On the other hand, the second terminal 42 can authenticate whether the first terminal 41, i.e., the opposite terminal device, belongs to the authentic account list specified by the data sharing service. If the first terminal 41 belongs to the authentic account list specified by the data sharing service, it means that the first terminal 41 passes the authentication. The second terminal 42 can query the authentic account list through the business registration callback.

[0406] It can be understood that the first terminal can acquire the first list through the server. For example, the server acquires the device identifiers of the plurality of terminals, determines the trusted device, and generates the first list. The first terminal interacts with the server to acquire the first list. The first terminal acquires the device identifier of the second terminal, and authenticates whether the second terminal is trusted according to the first list and the device identifier of the second terminal. In a case where the first list includes the device identifier of the second terminal, it is determined that the second terminal is trusted.

[0407] Optionally, the account and the device identifier can be associated to establish an association relationship between the account and the device, so as to authenticate the account or the device.

[0408] After the authentication is completed, the information of the authenticated contact or the shared device can be updated and displayed in the first interface of the first terminal 41.

[0409] S406, sharing data with the authenticated contact or the shared device.

[0410] In some embodiments, the first terminal can share data with the terminal corresponding to the authenticated contact or the shared device.

[0411] As shown in FIG. 16, it is another contact authentication method flowchart provided by the embodiments of the present application. FIG. 16 shows the schematic diagram of the different processing processes of the sender and the receiver in the contact authentication process in the case of distinguishing the sender and the receiver. The sender in FIG. 16 can be the first terminal 41 in the foregoing various embodiments, and the receiver can be the second terminal 42 in the foregoing various embodiments.

[0412] The first terminal 41 of the sender can broadcast externally, search for the device of the contact or the shared device in the surrounding device. The second terminal 42 can reply to the broadcast initiated by the first terminal 41 as the receiver, and the two can complete the authentication of the account of the terminal through the screening and authentication process introduced in the foregoing various embodiments.

[0413] In the embodiments of the present application, the visibility of the second terminal 42 in the above-mentioned embodiments is “contact and shared device visible”. As shown in FIG. 16, the first terminal 41 of the sender and the second terminal 42 of the receiver can adopt different screening and authentication strategies for different scenarios.

[0414] Scenario one: the sender has a contact and / or a shared device, and the owner of the receiver is visible.

[0415] That is, the first terminal 41 as the sender has no relevant information of contacts and shared devices stored therein, and the second terminal 42 as the receiver has the "everyone visible" option under the data sharing function turned on. Therefore, the first terminal 41 as the sender can discover or search for the second terminal 42 within a certain time after the second terminal 42 turns on the "everyone visible" option. For example, within 10 minutes.

[0416] At this time, the screening and authentication strategy of the contacts is one-way, that is, the first terminal 41 as the sender authenticates the second terminal 42 as the receiver, and determines whether the second terminal 42 is trustworthy. If yes, the first terminal 41 can display the information of the second terminal 42 or the second user of the second terminal 42. Otherwise, the first terminal can not display the information of the second terminal 42 or the second user of the second terminal 42.

[0417] Scenario two: the sender has no contacts and shared devices, and the receiver has contacts and shared devices visible.

[0418] That is, the first terminal 41 as the sender has no relevant information of contacts and shared devices stored therein, and the second terminal 42 as the receiver has the "only contacts and shared devices visible" option under the data sharing function turned on. Therefore, the first terminal 41 as the sender can discover or search for the second terminal 42 only when the first terminal 41 is a device of a contact or a shared device of the second user of the second terminal 42.

[0419] At this time, the screening and authentication strategy of the contacts is also one-way, that is, the second terminal 42 as the receiver authenticates the first terminal 41 as the sender, and determines whether the first terminal 41 is a device of a contact or a shared device of the second user.

[0420] Scenario three: the sender has contacts and / or shared devices, and the receiver has contacts and shared devices visible.

[0421] That is, the first terminal 41 as the sender has relevant information of contacts and / or shared devices stored therein. The second terminal 42 as the receiver has the "only contacts and shared devices visible" option under the data sharing function turned on. Therefore, the first terminal 41 as the sender can discover or search for the second terminal 42 only when the first terminal 41 is a device of a contact or a shared device of the second user of the second terminal 42.

[0422] At this time, the screening and authentication strategy of the contact person can be bidirectional, that is, the first terminal 41 of the sender authenticates the second terminal 42 of the receiver to determine whether the second terminal 42 is trustworthy. At the same time, the second terminal 42 of the receiver also authenticates the first terminal 41 of the sender to determine whether the first terminal 41 is the device of the second user's contact person or a shared device.

[0423] Scenario four: the sender has no contact person and shared device, and the owner of the receiver is visible.

[0424] That is, the second terminal 42 of the receiver turns on the "everyone visible" option under the data sharing function, and the first terminal 41 of the sender has no related information of the contact person and the shared device. The first terminal 41 of the sender can discover or search the second terminal 42 within a certain time after the second terminal 42 turns on the "everyone visible" option. For example, within 10 minutes.

[0425] At this time, the first terminal 41 and the second terminal 42 do not need to authenticate each other, and can share data in the manner of the prior art.

[0426] Based on the various embodiments shown in FIGS. 12-16, as shown in FIG. 17, a schematic diagram of another communication method provided by an embodiment of the present application is shown, which can include the following steps S1701-S1703:

[0427] S1701, the first terminal receives an operation for triggering the first terminal to search for a device.

[0428] In the embodiment of the present application, the system of the first terminal logs in the account of the first user, and the first terminal stores the relationship chain identifier of the first user and the device hash of the first terminal. The relationship chain identifier is generated based on the account of the user logged in by the system of the terminal, and the device hash is generated based on the device identifier of the terminal.

[0429] The relationship chain identifier of the first user is obtained by performing a hash operation on the account logged in by the first user in the system of the first terminal. For example, the relationship chain identifier of the first user is obtained by performing a hash operation on the account ID of the first user. The hash value of the first terminal is obtained by performing a hash operation on the device identifier of the first terminal. For example, the device hash of the first terminal is obtained by performing a hash operation on the unique device identifier (UDID) of the first terminal.

[0430] In the present application, the relationship chain identifier is used to identify the user, and the user does not need to be identified by private information such as a mobile phone number or an email number, thereby reducing the risk of user privacy information leakage. The device hash is used to identify the device, so as to quickly screen the device.

[0431] For example, the operation of triggering the first terminal to search for the device can be an operation of starting the "Huawei Share" function by a user, and the first terminal searches for the surrounding device in response to the operation.

[0432] In some embodiments, the first terminal can also send a second broadcast in response to the operation of triggering the first terminal to search for the device, and the second broadcast includes the relationship chain identifier of the first user and the device hash of the first terminal.

[0433] For example, the first terminal, as the initiating device, sends the second broadcast in the form of broadcast to search for the surrounding device near the first terminal in response to the operation of triggering the first terminal to search for the device. The number of the surrounding devices can be one or more, and the device types of the surrounding devices can be the same or different. The device types of the surrounding devices and the first terminal can also be the same or different.

[0434] S1702, the first terminal receives the first broadcast from the second terminal, and the first broadcast includes the relationship chain identifier of the second user of the second terminal and / or the device hash of the second terminal.

[0435] In the embodiments of the present application, the second terminal is a terminal that starts the data sharing function and is set to "contact and shared device visible".

[0436] It can be understood that, since the second terminal is set to "contact and shared device visible", after receiving the broadcast sent by other devices, the second terminal needs to determine whether the device sending the broadcast meets the condition of "contact and shared device visible" according to the broadcast. If it meets, the broadcast is replied to for subsequent connection and data sharing; otherwise, the broadcast is not replied to.

[0437] For example, the second terminal is located near the first terminal, and the second terminal receives the second broadcast sent by the first terminal. According to the relationship chain identifier of the first user and the device hash of the first terminal in the second broadcast, it is determined whether the following conditions are met: the first user is a contact of the second terminal, and / or the first terminal is a device that has shared data with the second terminal. If any of the above conditions is met, the second terminal generates the first broadcast and sends the first broadcast to the first terminal, and the first broadcast includes the relationship chain identifier of the second user of the second terminal and / or the device hash of the second terminal.

[0438] The relationship chain identifier of the second user is obtained by performing a hash operation on the account of the second user logged in the system of the second terminal. The hash value of the second terminal is obtained by performing a hash operation on the device identifier of the second terminal.

[0439] It can be understood that the second terminal determines whether the first user is a contact of the second user or whether the first terminal is a device that has shared data with the second terminal, which is the same as the first terminal determining whether the second user is a contact of the first user or whether the second terminal is a device that has shared data with the first terminal. For details, refer to the part of S403 or S1703.

[0440] S1703, in the case where the first condition is met, the first terminal displays a first interface; the first condition includes determining that the second user is a contact of the first user according to the relationship chain identifier of the second user, and / or determining that the second terminal is a device that has shared data with the first terminal according to the device hash of the second terminal; the first interface includes a first object, and the first object includes information of the second user and / or information of the second terminal.

[0441] In some embodiments, the first terminal includes a contact database, and the contact database includes relationship chain identifiers corresponding to contacts of the first user. The method further includes: in the case where the contact database includes part of the bytes of the relationship chain identifier of at least the second user, determining that the second user is a contact of the first user.

[0442] In some examples, the first broadcast includes the relationship chain identifier of the second user. The first terminal matches the relationship chain identifier of the second user in the contact database, and in the case where the contact database includes the relationship chain identifier of the second user, determines that the second user is a contact of the first user.

[0443] In other examples, the first broadcast includes the relationship chain identifier of the second user. The first terminal truncates the relationship chain identifier of the second user to obtain part of the bytes of the relationship chain identifier of the second user. The first terminal matches part of the bytes of the relationship chain identifier of the second user in the contact database, and in the case where the contact database includes part of the bytes of the relationship chain identifier of the second user, determines that the second user is a contact of the first user.

[0444] In other examples, the first broadcast includes part of the bytes of the relationship chain identifier of the second user. That is, the second terminal truncates the relationship chain identifier of the second user, and carries part of the bytes of the relationship chain identifier of the second user in the first broadcast when sending the first broadcast. After receiving the first broadcast, the first terminal matches part of the bytes of the relationship chain identifier of the second user in the first broadcast in the contact database, and in the case where the contact database includes part of the bytes of the relationship chain identifier of the second user, determines that the second user is a contact of the first user.

[0445] In some embodiments, the first terminal comprises a history sharing database comprising device hashes corresponding to devices that have shared data with the first terminal, and the method further comprises: in a case where the history sharing database comprises a partial byte of a device hash of at least a second terminal, determining that the second terminal is a device that has shared data with the first terminal.

[0446] In some examples, the first broadcast comprises a device hash of the second terminal. The first terminal matches the device hash of the second terminal in the history sharing database, and in a case where the history sharing database comprises the device hash of the second terminal, determines that the second terminal is a device that has shared data with the first terminal.

[0447] In some examples, the first broadcast comprises a device hash of the second terminal. The first terminal matches the device hash of the second terminal in the history sharing database, and in a case where the history sharing database comprises the device hash of the second terminal, determines that the second terminal is a device that has shared data with the first terminal.

[0448] In some examples, the first broadcast comprises a device hash of the second terminal. The first terminal matches the device hash of the second terminal in the history sharing database, and in a case where the history sharing database comprises the device hash of the second terminal, determines that the second terminal is a device that has shared data with the first terminal.

[0449] In some embodiments, in a case where a device hash of a device that has shared data with the first terminal exceeds a preset time length, the device hash of the device that has shared data with the first terminal is deleted; the preset time length is a preset time length for saving the device hash of the device that has shared data with the first terminal in the history sharing database.

[0450] The history sharing database of the first terminal saves device hashes of devices that have shared data with the first terminal. In order to ensure real-time and accuracy of data and avoid information redundancy, only device hashes of devices that have recently shared data with the first terminal can be stored. Therefore, a preset time length can be set to save device hashes of devices that have shared data with the first terminal according to the preset time length. The preset time length is the aging period described above.

[0451] In some examples, each device hash in the history sharing database can have a respective preset time length, and the preset time lengths of different device hashes are different.

[0452] In some examples, each device hash in the history sharing database has the same preset time length, and the device hash is only valid within the preset time length.

[0453] In some examples, the first broadcast includes the relationship chain identifier of the second user and the device hash of the second terminal. The first terminal performs matching in the contact database according to the relationship chain identifier of the second user, and performs matching in the history sharing database according to the device hash of the second terminal. In the case that the contact database includes the relationship chain identifier of the second user, and / or, the history sharing database includes the device hash of the second terminal, it is determined that the first condition is satisfied.

[0454] In some examples, the first broadcast includes the relationship chain identifier of the second user and the device hash of the second terminal. The first terminal performs truncation processing on the relationship chain identifier of the second user and the device hash of the second terminal, respectively obtaining partial bytes of the relationship chain identifier of the second user and partial bytes of the device hash of the second terminal. The first terminal performs matching in the contact database according to the partial bytes of the relationship chain identifier of the second user, and performs matching in the history sharing database according to the partial bytes of the device hash of the second terminal. In the case that the contact database includes the partial bytes of the relationship chain identifier of the second user, and / or, the history sharing database includes the partial bytes of the device hash of the second terminal, it is determined that the first condition is satisfied.

[0455] In some examples, the first broadcast includes partial bytes of the relationship chain identifier of the second user and partial bytes of the device hash of the second terminal. That is, the second terminal performs truncation processing on the relationship chain identifier of the second user and the device hash of the second terminal, and carries the partial bytes of the relationship chain identifier of the second user and the partial bytes of the device hash of the second terminal in the first broadcast when sending the first broadcast. The first terminal performs matching in the contact database according to the partial bytes of the relationship chain identifier of the second user, and performs matching in the history sharing database according to the partial bytes of the device hash of the second terminal. In the case that the contact database includes the partial bytes of the relationship chain identifier of the second user, and / or, the history sharing database includes the partial bytes of the device hash of the second terminal, it is determined that the first condition is satisfied.

[0456] In the present application, the first terminal can quickly screen and quickly determine whether the first condition is satisfied based on the contact database and the history sharing database, which helps to improve the authentication efficiency.

[0457] It can be understood that the above examples are specific implementation manners of the first terminal performing preliminary screening based on the first broadcast replied by the second terminal.

[0458] In some embodiments, the second user being a contact of the first user includes that the relationship chain identifier of the second user obtained by the first terminal is the same as the first authentication identifier determined by the first terminal, the first authentication identifier being determined based on the account of the second user obtained by the first terminal.

[0459] In some examples, after the first terminal determines that the contact database includes the relationship chain identifier of the second user, the first interface is displayed, and the first interface includes the first object. The first terminal interacts with the second terminal in response to the first operation of the user on the first object, and obtains the account of the second user. The first authentication identifier is obtained by performing a hash operation on the account of the second user, and in the case that the relationship chain identifier of the second user obtained by the first terminal is the same as the first authentication identifier determined by the first terminal, it is determined that the authentication is passed. The second terminal corresponding to the second user establishes a connection to send data. That is, in this example, the preliminary screening is performed first, and the preliminary screening result is displayed. Then, the object selected by the authentication user establishes a connection with the object that passes the authentication.

[0460] In some other examples, after the first terminal determines that the contact database includes the relationship chain identifier of the second user, the first terminal interacts with the second terminal to obtain the account of the second user. The first authentication identifier is obtained by performing a hash operation on the account of the second user, and in the case that the relationship chain identifier of the second user obtained by the first terminal is the same as the first authentication identifier determined by the first terminal, it is determined that the authentication is passed, and the first interface is displayed. The first interface includes the first object, and the first object is the information of the second user after the authentication and / or the information of the second terminal. That is, in this example, the preliminary screening is performed first, and then the preliminary screening result is authenticated, and the preliminary screening result that passes the authentication is displayed.

[0461] In some embodiments, the second terminal being a device shared by the first terminal includes that the device hash of the second terminal obtained by the first terminal is the same as the second authentication identifier determined by the first terminal, the second authentication identifier being determined based on the device identifier of the second terminal obtained by the first terminal.

[0462] In some examples, after the first terminal determines that the historical sharing database includes the device hash of the second terminal, the first interface is displayed, and the first interface includes the first object. The first terminal interacts with the second terminal in response to the first operation of the user on the first object, and obtains the device identifier of the second terminal. The second authentication identifier is obtained by performing a hash operation on the device identifier of the second terminal, and in the case that the device hash of the second terminal obtained by the first terminal is the same as the second authentication identifier determined by the first terminal, it is determined that the authentication is passed. The second terminal corresponding to the second user establishes a connection to send data.

[0463] In some examples, the first terminal determines the history sharing database includes the device hash of the second terminal, and then the first terminal interacts with the second terminal to obtain the device identifier of the second terminal. The device identifier of the second terminal is hashed to obtain a second authentication identifier. When the device hash of the second terminal obtained by the first terminal is the same as the second authentication identifier determined by the first terminal, it is determined that the authentication is passed, and the first interface is displayed. The first interface includes the first object, which is the information of the second terminal after the authentication is passed, and / or the information of the second user.

[0464] It can be understood that the first authentication identifier and the second authentication identifier can be complete data obtained after hash calculation, and the first authentication identifier and the second authentication identifier can also be part of the bytes obtained after hash operation and truncation processing.

[0465] In the present application, the legality of the device and the account is ensured through authentication to prevent false account behaviors, which can improve security, enhance data protection, and prevent information leakage. Moreover, when the terminal contacts other terminals, the legality of the opposite terminal can be verified, which can enhance the security of the communication process, enhance the trust of the user in communication, and improve the user experience.

[0466] In some embodiments, the method further includes: receiving a second broadcast from a third terminal, the second broadcast including a second user relationship chain identifier of the third terminal and a device hash of the third terminal; and displaying a second interface when a second condition is met, the second condition including determining that the second user is a contact of the first user according to the second user relationship chain identifier, and / or determining that the third terminal is a device shared by the first terminal according to the device hash of the third terminal, the second interface including the first object and a second object, the second object including information of the second user and / or information of the third terminal.

[0467] It can be understood that a same user can have multiple terminals,

[0468] It can be understood that one user has multiple terminals, such as a mobile phone and a tablet, in the above example, and logs in to the same account, such as account 1. When the mobile phone and the tablet start the data sharing function and are set to "contacts and shared devices are visible", a broadcast sent by the computer is received. The mobile phone and the computer have recently shared data, and the computer and the tablet have also recently shared the mobile phone. Therefore, the mobile phone and the tablet respectively return a broadcast to the computer, the mobile phone sends a broadcast 1 carrying a relationship chain identifier 1 generated based on the account 1 and a device hash 1 generated based on the device identifier of the mobile phone. The tablet sends a broadcast 2 carrying a relationship chain identifier 1 generated based on the account 1 and a device hash 2 generated based on the device identifier of the tablet. The computer determines that the mobile phone and the tablet are the most recently shared devices, and the relationship chain identifiers in the broadcasts sent by the mobile phone and the tablet are the same, both of which are relationship chain identifier 1. When the computer displays the information of the user of the mobile phone and the information of the user of the tablet, the information of the user of the mobile phone and the information of the user of the tablet are the same. For example, the avatar information of the user of the mobile phone and the avatar information of the user of the tablet are the same.

[0469] In this application, when the first terminal and the second terminal communicate, identity authentication can be performed based on the relationship chain identifier and the device hash, without the need for identity authentication through private information such as a mobile phone number or an email number, thereby reducing the risk of leakage of user privacy information and increasing the security and efficiency of communication. Moreover, identity authentication based on the relationship chain identifier and the device hash simplifies the operation process of identity authentication and improves the efficiency of identity authentication.

[0470] The above mainly introduces the scheme provided by the embodiments of the present application from the perspective of the method. It can be understood that, in order to implement the above functions, the electronic device comprises a corresponding hardware structure and / or software module for executing each function. The units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present application.

[0471] The embodiments of the present application can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be implemented in the form of hardware or software functional module. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical functional division. Actual implementation can have another division manner.

[0472] Corresponding to each of the above-described embodiments of FIG. 11-17, referring to FIG. 18, a structural block diagram of a communication apparatus provided in an embodiment of the present application is shown, which can be applied to the terminal in each of the above-described embodiments, for example, the first terminal, and the apparatus specifically can include the following modules: a processing module 1801, a display module 1802.

[0473] The processing module 1801 is configured to support the communication apparatus to perform the processing functions of any one of FIG. 1-9 or FIG. 11-17. The display module 1802 is configured to support the communication apparatus to perform the display functions of any one of FIG. 1-9 or FIG. 11-17.

[0474] The technical effects of the communication apparatus shown in FIG. 18 can refer to the technical effects of the above-described method embodiments, which will not be repeated here. The processing module 1801 involved in the communication apparatus shown in FIG. 18 can be realized by a processor or a processor-related circuit component, which can be a processor or a processing module. The display module 1802 can be realized by a display screen-related component.

[0475] Optionally, the communication apparatus can include at least one processor, and the processor is configured to perform any one of the processing functions in the above-described embodiments. The communication apparatus. The communication apparatus can also include a communication interface, and the communication interface is configured to receive and / or send signals.

[0476] As shown in FIG. 19, a structural schematic diagram of an electronic device provided in an embodiment of the present application is shown, which can be used to implement the methods described in each of the above method embodiments. For example, the electronic device 2200 is used to implement the methods described in each of the above method embodiments. For another example, the electronic device 2200 is used to implement the methods described in each of the above method embodiments. For example, the electronic device 2200 specifically can include: a processing unit 2201 and a display unit 2202.

[0477] The processing unit 2201 is configured to support the electronic device 2200 to perform the processing functions of any one of FIG. 1-9 or FIG. 11-17.

[0478] The display unit 2202 is optional, and the display unit 2202 is configured to support the electronic device 2200 to perform the display functions of any one of FIG. 1-9 or FIG. 11-17.

[0479] Optionally, the electronic device 2200 shown in FIG. 19 can also include a communication unit (not shown in FIG. 19), and the communication unit is configured to support the electronic device 2200 to perform the steps of communication between the electronic device and other electronic devices in the embodiments of the present application.

[0480] Optionally, the electronic device 2200 shown in FIG. 19 can further include a storage unit 2203 storing programs or instructions. When the processing unit 2201 executes the programs or instructions, the electronic device 2200 shown in FIG. 19 can perform the method shown in the above method embodiments.

[0481] The technical effects of the electronic device 2200 shown in FIG. 19 can refer to the technical effects of the method shown in the above method embodiments, which will not be repeated here. The processing unit 2201 involved in the electronic device 2200 shown in FIG. 19 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing module. The communication unit can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiving module. The display unit 2202 can be implemented by a display screen-related component.

[0482] The embodiments of the present application also provide a chip system, as shown in FIG. 20, which includes at least one processor 2301 and at least one interface circuit 2302. The processor 2301 and the interface circuit 2302 can be interconnected by a line. For example, the interface circuit 2302 can be used to receive signals from other devices. For another example, the interface circuit 2302 can be used to send signals to other devices (such as the processor 2301). Illustratively, the interface circuit 2302 can read instructions stored in a memory and send the instructions to the processor 2301. When the instructions are executed by the processor 2301, the electronic device can perform each step performed by the electronic device in the above embodiments. Of course, the chip system can also include other discrete devices, which are not limited in the embodiments of the present application.

[0483] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software codes stored in a memory.

[0484] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor or set separately from the processor, which is not limited in the present application. Illustratively, the memory can be a non-transient processor, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or set separately on different chips, and the type of the memory and the setting mode of the memory and the processor are not limited in the present application.

[0485] For example, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD) or other integrated chip.

[0486] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The method steps disclosed in combination with the embodiments of the present application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.

[0487] The embodiments of the present application also provide a computer storage medium, which stores computer instructions, and when the computer instructions run on an electronic device, the electronic device executes the method in the above method embodiments.

[0488] The embodiments of the present application provide a computer program product, which includes a computer program or instructions, and when the computer program or instructions run on a computer, the computer executes the method in the above method embodiments.

[0489] In addition, the embodiments of the present application also provide a device, which can be a chip, a component or a module. The device can include a processor and a memory connected to each other. The memory is used to store computer execution instructions. When the device runs, the processor can execute the computer execution instructions stored in the memory, so that the device executes the method in the above method embodiments.

[0490] The electronic device, computer storage medium, computer program product or chip provided in the embodiments can be used to execute the corresponding method provided above, and thus the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding method provided above, which will not be described herein again.

[0491] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0492] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. The embodiments can be combined or referred to each other without conflict. The device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0493] The units described as separate components can or can not be physically separate, and the components displayed as units can be one physical unit or multiple physical units, that is, can be located in one place or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0494] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0495] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical scheme of the embodiment of the present application essentially or the part of the prior art that makes a contribution or all or part of the technical scheme can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium that can store program codes.

[0496] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A communication method, characterized in that, Applied to a first terminal, the first terminal is logged into the account of a first user, the first terminal stores the relationship chain identifier of the first user and the relationship chain identifier of a second user, the second user is a contact of the first user, and the relationship chain identifier is generated based on the account of the user logged into the terminal's system; The method includes: Receive the first operation that initiates a communication connection to the second user; In response to the first operation, the communication identifier of the second user's second terminal is obtained based on the second user's relationship chain identifier; Based on the communication identifier, a communication connection request is sent to the second terminal.

2. The method according to claim 1, characterized in that, The method further includes: Send the first user's contact information and the first user's relationship chain identifier to the server.

3. The method according to any one of claims 1-2, characterized in that, The method further includes: Receive the third action of adding a third user as a contact; In response to the third operation, the contact information of the third user is sent to the server; Receive and store the relationship chain identifier of the third user sent by the server.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: Receive the fourth operation to delete the fourth user as a contact; In response to the fourth operation, the stored relation chain identifier of the fourth user is deleted.

5. The method according to claim 4, characterized in that, The method further includes: In response to the fourth operation, the contact information of the fourth user is sent to the server.

6. The method according to any one of claims 1-5, characterized in that, The first terminal also stores the contact information of the fifth user and the relationship chain identifier of the fifth user, the fifth user being the contact of the first user; The method further includes: Receive a fifth operation to update the contact information of the fifth user from the first contact information to the second contact information; In response to the fifth operation, the contact information corresponding to the relationship chain identifier of the fifth user is updated from the first contact information to the second contact information.

7. The method according to claim 6, characterized in that, The method further includes: In response to the fifth operation, the first contact information and the second contact information of the fifth user are sent to the server.

8. The method according to any one of claims 1-7, characterized in that, The first terminal also stores the contact information of at least one of the first user's contacts, and the contact information of each contact corresponds one-to-one with the relationship chain identifier of the contact. The method further includes: The system receives a notification message from the server, which is used to notify the first terminal to modify the association between the stored contact information and the relationship chain identifier. The association between the modified stored contact information and the relationship chain identifier includes one or more of the following: Delete the association between the contact information of the sixth user and the relationship chain identifier among at least one of the first user's contacts; Update the contact information corresponding to the relationship chain identifier of the seventh user among at least one of the first user's contacts; Add the association between the contact information of the eighth user and the relationship chain identifier.

9. The method according to any one of claims 1-8, characterized in that, The communication connection request is used to initiate audio and video communication; The first terminal also stores capability information of at least one of the first user's contacts. The capability information of the contacts corresponds one-to-one with the relationship chain identifier of the contacts. The capability information is used to indicate whether the corresponding contact has audio and video communication capabilities. The capability information of the second user is used to indicate that the second user has audio and video communication capabilities.

10. The method according to claim 9, characterized in that, The method further includes: Send the capability information of the first user to the server.

11. A communication method, characterized in that, Applied to a server, the method includes: Receive contact information of at least one contact of the first user of the first terminal; Send the relationship chain identifier of at least one of the first user's contacts to the first terminal.

12. The method according to claim 11, characterized in that, The at least one contact includes a second user; Before sending the relationship chain identifier of at least one of the first user's contacts to the first terminal, the method further includes: The second terminal receives the contact information of the second user and the relationship chain identifier of the second user sent by the second user.

13. The method according to claim 11 or 12, characterized in that, The method further includes: Receive the modified contact information of the first user sent by the first terminal; the modification includes one or more of the following: adding contact information, deleting contact information, or updating contact information; A first notification message is sent to a third terminal, which is used to notify the third terminal to modify the association between the first user's contact information and the first user's relationship chain identifier; the contact information of the third terminal's user's contacts includes the added contact information of the first user.

14. The method according to any one of claims 11-13, characterized in that, The method further includes: Receive modified contact information of a third user from the first terminal; the modification includes one or more of the following: adding the third user as a contact, deleting the third user from the contacts, and updating the third user's contact information; A second notification message is sent to the fourth terminal. The second notification message is used to notify the fourth terminal to modify the association between the stored contact information and the relationship chain identifier. The account logged in by the fourth terminal is the same as the account logged in by the first terminal.

15. A communication method, characterized in that, The method is applied to a first terminal, where the system login account of the first user is located. The first terminal stores a relationship chain identifier of the first user and a device hash of the first terminal. The relationship chain identifier is generated based on the user's account logged into the system, and the device hash is generated based on the terminal's device identifier. The method includes: Receive an operation to trigger the first terminal to search for the device; Receive a first broadcast from a second terminal, the first broadcast including the relationship chain identifier of the second user of the second terminal and / or the device hash of the second terminal; If a first condition is met, a first interface is displayed; the first condition includes determining that the second user is a contact of the first user based on the second user's relationship chain identifier, and / or determining that the second terminal is a device on which the first terminal has shared data based on the device hash of the second terminal; the first interface includes a first object, the first object including the information of the second user, and / or the information of the second terminal.

16. The method according to claim 15, characterized in that, The first terminal includes a contact database, the contact database including relationship chain identifiers corresponding to the contacts of the first user, and the method further includes: If the contact database includes at least a portion of the bytes identifying the second user's relationship chain, then the second user is determined to be a contact of the first user.

17. The method according to claim 15, characterized in that, The first terminal includes a historical sharing database, which includes device hashes corresponding to devices that have shared data with the first terminal. The method further includes: If the historical sharing database includes at least a portion of the device hash of the second terminal, the second terminal is determined to be a device that has shared data with the first terminal.

18. The method according to claim 15 or 16, characterized in that, The second user being a contact of the first user includes: the relationship chain identifier of the second user obtained by the first terminal is the same as the first authentication identifier determined by the first terminal, and the first authentication identifier is determined based on the account of the second user obtained by the first terminal.

19. The method according to claim 15 or 17, characterized in that, The second terminal is a device that has shared data with the first terminal, including: the device hash of the second terminal obtained by the first terminal is the same as the second authentication identifier determined by the first terminal, and the second authentication identifier is determined based on the device identifier of the second terminal obtained by the first terminal.

20. The method according to any one of claims 15-19, characterized in that, The method further includes: Receive a second broadcast from a third terminal, the second broadcast including a second user relationship chain identifier of the third terminal and a device hash of the third terminal; If the second condition is met, the second interface is displayed. The second condition includes determining that the second user is a contact of the first user based on the relationship chain identifier of the second user, and / or determining that the third terminal is a device shared by the first terminal based on the device hash of the third terminal. The second interface includes the first object and the second object. The second object includes the information of the second user and / or the information of the third terminal.

21. The method according to claim 17, characterized in that, The method further includes: If the storage time of the device hash of the device that shared data with the first terminal exceeds a preset time, the device hash of the device that shared data with the first terminal is deleted; the preset time is the preset storage time of the device hash of the device that shared data with the first terminal in the historical sharing database.

22. A communication device, characterized in that, include: At least one processor, the processor being configured to perform the method as described in any one of claims 1-14 or 15-21.

23. The communication device according to claim 22, characterized in that, The communication device further includes a communication interface for receiving and / or transmitting signals.

24. An electronic device, characterized in that, include: A processor and a memory, the memory being coupled to the processor, the memory being used to store program code including instructions, the processor reading the instructions from the memory to cause the electronic device to perform the method as described in any one of claims 1-14 or 15-21.

25. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-14 or 15-21.

26. A computer program product, characterized in that, The computer program product includes: a computer program or instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-14 or 15-21.

27. A communication system, characterized in that, It includes a first terminal and a server, wherein the first terminal is used to perform the method as described in any one of claims 1-10 or 15-21, and the server is used to perform the method as described in any one of claims 11-14.

Citation Information

Patent Citations

  • Information processing method and electronic apparatus

    CN105376733A

  • Relation chain processing method, device and system

    CN106533917A

  • Individual privacy information use management system and method based on blockchain

    CN113051605A

  • Method and system for searching whether contact person in address book is friend in address book

    CN114244954A

  • Method and system for protecting customer's privacy information in contact center

    KR1020100088861A