Communication method and device
By generating a relationship chain identifier based on the terminal system logged in to the user account, the first terminal can receive a communication connection request to the contact, obtain the communication identity of the contact based on the relationship chain identifier of the contact, and send a communication connection request to the contact's terminal, solving the problem of personal information leakage in the prior art and achieving an efficient and secure communication connection.
Patent Information
- Application Number
- CN202510140853.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-08-12
- Filing Date
- 2024-10-25
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, users identify identity information through mobile phone numbers, email addresses, etc. at risk of personal information leakage.
By generating a relationship link identifier based on the terminal system logged in to the user account, the first terminal can receive a communication connection request to the contact, obtain the communication identifier of the contact based on the contact's relationship link identifier, and send a communication connection request to the contact's terminal.
It reduces the risk of user privacy information leakage, improves the security and efficiency of communication, simplifies the operation process of identity authentication, and improves the efficiency of identity authentication.
Smart Images

Figure CN119892789A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202411507240.0, and the original application date is October 25, 2024. The entire contents of the original application are incorporated into this application by reference.
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 20, 2024, with application number 202410808194.1 and application name “Contact authentication method, device and electronic device”, as well as priority to the Chinese patent application filed with the State Intellectual Property Office on June 20, 2024, with application number 202410808178.2 and application name “A relationship chain construction method and device”, and priority to the Chinese patent application filed with the State Intellectual Property Office on August 12, 2024, with application number 202411109200.0 and application name “A communication method and device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art
[0004] When a user uses a software in a terminal, the terminal can obtain the user's identity information and obtain the contact associated with the user's identity information, thereby communicating with the contact's terminal. In the related art, the user's identity information is identified by obtaining the user's mobile phone number, email address, etc., which poses a risk of leaking the user's personal information. Summary of the invention
[0005] The present application provides a communication method and device that can reduce the risk of personal information leakage.
[0006] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:
[0007] In a first aspect, a communication method is provided, which can be applied to a first terminal, wherein a system of the first terminal logs in to 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 of the first user, and the relationship chain identifier is generated based on the account of the user logged in to the system of the terminal; the method may include: receiving a first operation to initiate 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 sending a communication connection request to the second terminal of the second user based on the communication identifier.
[0008] By adopting this method, when the first terminal communicates with the second terminal, it can query the communication identifier of the second terminal of the second user based on the relationship chain identifier of the contact, without having to search for the user in the second terminal through privacy information such as mobile phone number and email address, thereby reducing the risk of leakage of user privacy information.
[0009] Exemplarily, the first terminal may store the association relationship between the relationship chain identifier of the second user and the communication identifier of the second terminal of the second user. In other embodiments, the first terminal may also query the server for the communication identifier of the second user, and directly use the communication identifier to initiate a communication connection to the second terminal. In other embodiments, the first terminal may also establish a communication connection with the second terminal through the server. For example, as a possible implementation method, 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 this. Afterwards, the server establishes a communication connection between the first terminal and the second terminal based on the communication identifier of the second user. This method can be implemented independently of the first aspect.
[0010] In a possible design, the method further includes a process in which the first terminal obtains a relationship chain identifier of a contact from a server, which may be referred to as a process of downloading the relationship chain identifier. Exemplarily, the first terminal downloading the relationship chain identifier may be implemented by: sending contact information of at least one contact of the first user to the server; and receiving the relationship chain identifier of at least one contact of the first user sent by the server. The at least one contact includes a second user. The terminal may store the relationship chain identifier of the second user.
[0011] Among them, the server may return the relationship chain identifiers of all or part of the contacts. For example, if some contacts do not have a Huawei account, the server does not return the relationship chain identifiers of these contacts. In one possible design, the method also includes a registration process of the first terminal to the server. As a possible implementation method, the registration process may include: the first terminal sends the contact information of the first user and the relationship chain identifier of the first user to the server.
[0012] By adopting this method, each terminal can upload the contact information and relationship chain identifier of each user, so that the terminal can download the relationship chain identifier of the corresponding contact from the server. As described above, the terminal can reduce security risks by using the relationship chain identifier of the contact.
[0013] In the above, the terminal generates a relationship chain identifier for the terminal user, and the terminal reports the contact information of the terminal user and the relationship chain identifier of the terminal user as an example. In other embodiments, the terminal may report the account of the terminal user (such as a Huawei account), and the server generates a relationship chain identifier for the terminal user and returns the relationship chain identifier of the terminal user to the terminal.
[0014] In addition, in the embodiment of the present application, applications on the terminal can share system-level relationship chain identifiers, which reduces maintenance costs. When applications that use relationship chain identifiers, such as the Changlian application and the near-field sharing application, need to identify the identity of a contact, they can query the system-level contact database to promptly know whether the other party is a local friend.
[0015] In a possible design, the method may further include: receiving a communication identifier of the at least one contact sent by the server. The first terminal may store an association relationship between the relationship chain identifier and the communication identifier of the at least one contact.
[0016] In one possible design, the method further includes: receiving a second operation of modifying the contact information of the first user; and sending the modified contact information of the first user to a server in response to the second operation.
[0017] By adopting this method, the server can learn that the contact information of the first user of the terminal has been modified, and the server can modify the association between the contact information of the first user and the relationship chain identifier of the first user accordingly, so that the subsequent contact terminal of the first user can download the modified relationship chain identifier of the first user.
[0018] In one possible design, the method also includes: receiving a third operation of adding a third user as a contact; in response to the third operation, sending contact information of the third user to a server; and receiving and storing a relationship chain identifier of the third user sent by the server.
[0019] By adopting this method, after the first terminal adds the third user as a contact, the relationship chain identifier of the third user can be obtained from the server, so as to subsequently query the communication identifier of the third user based on the relationship chain identifier, thereby improving information security.
[0020] In one possible design, the method further includes: receiving and storing a communication identifier of the third user sent by the server.
[0021] In one possible design, the method further includes: receiving a fourth operation of deleting a fourth user as a contact; and in response to the fourth operation, deleting a stored relationship chain identifier of the fourth user.
[0022] In one possible design, the method further includes: in response to the fourth operation, deleting the communication identification of the fourth user.
[0023] In one possible design, the method further includes: in response to the fourth operation, sending contact information of the fourth user to the server.
[0024] In one possible design, the first terminal also stores contact information of a fifth user and a relationship chain identifier of the fifth user, and the fifth user is a contact of the first user; the method also includes: receiving 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, updating the contact information corresponding to the relationship chain identifier of the fifth user from the first contact information to the second contact information.
[0025] By adopting this method, in the scenario where the contact information of the contact person (fifth user) is updated, the first terminal can quickly know and can timely update the association between the relationship chain identifier and the contact information of the fifth user.
[0026] In one possible design, the method further includes: in response to the fifth operation, sending the first contact information and the second contact information of the fifth user to the server.
[0027] In a possible design, the first terminal further stores 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 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 relationship between the stored contact information and the relationship chain identifier; wherein modifying the association relationship between the stored contact information and the relationship chain identifier includes one or more of the following:
[0028] Deleting the association between the contact information of the sixth user and the relationship chain identifier in at least one contact of the first user;
[0029] Updating the contact information corresponding to the relationship chain identifier of the seventh user in the at least one contact of the first user;
[0030] Add an association between the contact information of the eighth user and the relationship chain identifier.
[0031] By adopting this method, the first terminal can modify the association relationship between the stored contact information and the relationship chain identifier according to the notification message from the server.
[0032] In some examples, if a terminal (such as a fifth terminal) is logged in to the same account as the first terminal, and the fifth terminal has the cloud synchronization function turned on, the server sends a notification message to both the first terminal and the fifth terminal to synchronize the association between the contact information and the relationship chain identifier stored in the first terminal and the fifth terminal.
[0033] In other examples, if the fifth terminal logged into the same account as the first terminal does not have the cloud synchronization function enabled, the server does not send a notification message to the fifth terminal when the association between the contact information of the first terminal and the relationship chain identifier changes.
[0034] In one possible design, the communication connection request is used to initiate audio and video communication; the first terminal also stores capability information of at least one contact of the first user, the capability information of the contact corresponds one-to-one to the relationship chain identifier of the contact, and 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.
[0035] By adopting this method, the first terminal can learn whether the contact has audio and video communication capabilities based on the contact's capability information. If the contact has audio and video communication capabilities, the first terminal can use the contact's relationship chain identifier to initiate an audio and video communication connection to the contact's terminal to reduce security risks during information transmission.
[0036] In one possible design, the method further includes: sending the capability information of the first user to a server.
[0037] By adopting this method, the server can determine the capability information of each user's account level. Subsequently, the corresponding communication process can be controlled according to the capability information of the corresponding user to improve the security of the communication.
[0038] In one 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 stored association relationship between the communication identifier and the relationship chain identifier. For example, after adding a device A logged in to account A, the terminal can add an association relationship between the relationship chain identifier and the communication identifier of the device A.
[0039] In a possible design, the contact information includes one or more of the following: a telephone number, a fax number, or an email address.
[0040] In a second aspect, a communication method is provided, which can be applied to a server, and the method may include: receiving contact information of at least one contact of a first user from a first terminal; and sending a relationship chain identifier of at least one contact of the first user to the first terminal.
[0041] In one possible design, the method may further include: sending a communication identifier of the at least one contact to the first terminal.
[0042] In one possible design, the at least one contact includes a second user; before sending the relationship chain identifier of at least one contact of the first user to the first terminal, the method also includes: receiving the contact information of the second user and the relationship chain identifier of the second user sent by the second terminal of the second user.
[0043] In one possible design, the method further includes: sending capability information of at least one contact of the first user to the first terminal, the capability information being used to indicate whether the corresponding contact has audio and video communication capabilities.
[0044] In one possible design, the method also includes: receiving 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 a first notification message to a third terminal, the first notification message being used to notify the third terminal of modifying the association between the contact information of the first user and the relationship chain identifier of the first user; the contact information of the contacts of the users of the third terminal includes the added contact information of the first user.
[0045] In a possible design, the method further includes: sending a notification message to a third terminal, where the notification message is used to notify the third terminal to modify the association between the communication identifier of the first user and the relationship chain identifier of the first user.
[0046] In one possible design, the method further includes: receiving 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 contact information of the third user;
[0047] A second notification message is sent to a fourth terminal, where the second notification message is used to notify the fourth terminal to modify the association relationship 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.
[0048] In a possible design, the server stores an association relationship between contact information of at least one contact of the first user of the first terminal and a relationship chain identifier of the first user;
[0049] After receiving the modified contact information of the third user from the first terminal, the method further includes:
[0050] The stored association relationship is modified based on the modified contact information of the third user.
[0051] In a possible design, the method further includes: modifying the association relationship between the stored communication identifier and the relationship chain identifier.
[0052] In some embodiments, the communication method provided in the embodiments of the present application can be applied to identity authentication scenarios. The specific implementation process of identity authentication based on the relationship chain identifier of the terminal is introduced below through the method described in the third aspect.
[0053] According to a third aspect, a communication method is provided, which is applied to a first terminal, wherein a system of the first terminal logs in to an account of a first user, and the first terminal stores a relationship chain identifier of the first user and a device hash of the first terminal, wherein the relationship chain identifier is generated based on the account of the user logged in to the system of the terminal, and the device hash is generated based on the 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 when a first condition is met; the first condition comprises 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 second terminal is a device with which the first terminal has shared data based on 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.
[0054] By adopting this method, when the first terminal communicates with the second terminal, it can perform identity authentication based on the relationship chain identifier and the device hash, without the need to perform identity authentication through private information such as mobile phone number and email address, thereby reducing the risk of leakage of user's private information and increasing the security and efficiency of communication. Moreover, performing 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.
[0055] The relationship chain identifier of the first user is obtained by performing a hash operation based on the account number of the first user logged into the system of the first terminal. The hash value of the first terminal is obtained by performing a hash operation based on the device identifier of the first terminal.
[0056] In this method, the relationship chain identifier is used to identify the user, and there is no need to identify the user through private information such as mobile phone number and email address, which reduces the risk of user privacy information leakage. The device hash is used to identify the device so that the device can be quickly screened.
[0057] The second terminal is a terminal that starts the data sharing function and is set to be "visible to contacts and shared devices". The relationship chain identifier of the second user is obtained by hashing the account of the second user logged into the system of the second terminal. The hash value of the second terminal is obtained by hashing the device identifier of the second terminal.
[0058] In one possible design, the first terminal includes a contact database, which includes a relationship chain identifier corresponding to the first user's contacts. The method also includes: when the contact database includes at least partial bytes of the relationship chain identifier of the second user, determining that the second user is a contact of the first user.
[0059] 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 a 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.
[0060] In some other examples, the first broadcast includes a relationship chain identifier of the second user. The first terminal truncates the relationship chain identifier of the second user to obtain partial bytes of the relationship chain identifier of the second user. A match is performed in a contact database based on the partial bytes of the relationship chain identifier of the second user. If the contact database includes the partial bytes of the relationship chain identifier of the second user, it is determined that the second user is a contact of the first user.
[0061] In other examples, the first broadcast includes some 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 when sending the first broadcast, the broadcast carries some bytes of the relationship chain identifier of the second user. After receiving the first broadcast, the first terminal matches the partial bytes of the relationship chain identifier of the second user in the first broadcast in the contact database, and determines that the second user is a contact of the first user if the contact database includes some bytes of the relationship chain identifier of the second user.
[0062] In one possible design, 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 also includes: when the historical sharing database includes at least partial bytes of the device hash of the second terminal, determining that the second terminal is a device that has shared data with the first terminal.
[0063] 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 a history sharing database, and if the history sharing database includes the device hash of the second terminal, determines that the second terminal is a device that has shared data with the first terminal.
[0064] 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 partial bytes of the device hash of the second terminal. A match is performed in a historical sharing database based on the partial bytes of the device hash of the second terminal. If the historical sharing database includes partial bytes 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.
[0065] In other examples, the first broadcast includes some bytes of the device hash of the second terminal. That is, the second terminal truncates the device hash of the second terminal, and when sending the first broadcast, the broadcast carries some bytes of the device hash of the second terminal. After receiving the first broadcast, the first terminal matches the partial bytes of the device hash of the second terminal in the first broadcast in the historical sharing database, and if the historical sharing database includes some bytes of the device hash of the second terminal, it determines that the second terminal is a device that has shared data with the first terminal.
[0066] By adopting this method, the first terminal can quickly screen based on the contact database and the historical sharing database to quickly determine whether the first condition is met, thereby improving the response speed and helping to improve the authentication efficiency.
[0067] In one possible design, the second user is a contact of the first user, including: 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.
[0068] 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. In response to the user's first operation on the first object, the first terminal interacts with the second terminal to obtain the second user's account. A hash operation is performed based on the second user's account to obtain a first authentication identifier. When 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. A connection is established with the second terminal corresponding to the second user to send data. That is, in this example, a preliminary screening is performed first, and the preliminary screening results are displayed. Then the object selected by the authentication user is authenticated, and a connection is established with the object that has passed the authentication.
[0069] 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. A hash operation is performed based on the account of the second user to obtain a first authentication identifier. When 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 a first object, which is the information of the second user after the authentication is passed, and / or the information of the second terminal. That is, in this example, a preliminary screening is performed first, and then the preliminary screening result is authenticated, and the authenticated preliminary screening result is displayed.
[0070] In one possible design, 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.
[0071] 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 user's first operation on the first object to obtain the device identification of the second terminal. A hash operation is performed based on the device identification of the second terminal to obtain a second authentication identification. If the device hash of the second terminal obtained by the first terminal is the same as the second authentication identification determined by the first terminal, it is determined that the authentication is passed. A connection is established with the second terminal corresponding to the second user to send data.
[0072] In other 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 the device identification of the second terminal. A hash operation is performed based on the device identification of the second terminal to obtain a second authentication identification. When the device hash of the second terminal obtained by the first terminal is the same as the second authentication identification determined by the first terminal, it is determined that the authentication is successful and the first interface is displayed. The first interface includes a first object, which is the information of the second terminal after the authentication is successful, and / or the information of the second user.
[0073] The first authentication identifier and the second authentication identifier are complete data obtained after hash calculation, or the first authentication identifier and the second authentication identifier are partial bytes obtained after hash calculation and then truncation.
[0074] This method ensures the legitimacy of devices and accounts through authentication, prevents fake accounts and other behaviors, improves security, enhances data protection, and prevents information leakage. Moreover, when a terminal contacts other terminals, it can verify the legitimacy of the other terminal, which may enhance the security of the communication process, enhance the user's trust in communication, and improve the user experience.
[0075] In one possible design, the method also 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; 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 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 including a first object and a second object, the second object including information of the second user, and / or information of the third terminal.
[0076] By adopting this method, the same information is displayed when the same contact displays the user's information, providing consistent visual identification for the same contact, making it convenient for users to quickly and intuitively identify and classify contacts, avoiding confusion, and improving the user experience.
[0077] In one possible design, the method also includes: when the storage period of the device hash of the device that has shared data with the first terminal exceeds a preset period, deleting the device hash of the device that has shared data with the first terminal; the preset period is the storage period of the device hash of the device that has shared data with the first terminal in a preset historical sharing database.
[0078] In some examples, each device hash in the history sharing database may have its own preset duration, and different device hashes may have different preset durations.
[0079] In other examples, each device hash in the history sharing database may have the same preset duration, and the device hash is valid only within the preset duration.
[0080] This method can ensure the real-time performance of device hashes in the historical sharing database, avoid information redundancy, and improve authentication efficiency.
[0081] In a fourth aspect, an electronic device is provided, which has the function of implementing the method described in any of the above aspects and any of the designs thereof. 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 above functions.
[0082] In a fifth aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store program code, the program code includes instructions, and the processor reads the instructions from the memory so that the electronic device executes a method as described in any of the above aspects and any of the designs thereof.
[0083] In a sixth aspect, a computer-readable storage medium comprises a computer program, and when the computer program runs on an electronic device, the electronic device executes the method described in any of the above aspects and any of the designs thereof.
[0084] In a seventh aspect, a computer program product is provided, comprising: a computer program or instructions, which, when executed on a computer, enables the computer to execute a method as described in any of the above aspects and any of the designs thereof.
[0085] In an eighth aspect, a communication system is provided, comprising a first terminal and a server, wherein the first terminal is used to execute the method described in the first aspect and any one of the designs thereof, and the server is used to execute the method described in the second aspect and any one of the designs thereof.
[0086] In a ninth aspect, the present application provides a chip system comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to at least one processor, and when the at least one processor executes the instructions, the at least one processor executes the method described in any of the above aspects and any of the designs therein.
[0087] In a tenth aspect, the technical solution of the present application provides a communication device, comprising: a processor, configured to execute the method in any of the above aspects and any of its implementation methods.
[0088] Optionally, the device also includes a memory and / or a communication interface.
[0089] The communication interface is used to receive and / or send signals. Optionally, the communication interface is coupled to the processor.
[0090] The memory is used to store computer programs, and the processor is configured to execute the method described in the first aspect and any one of its implementations, which can be implemented as: executing the computer program stored in the memory to execute the method described in the first aspect and any one of its implementations.
[0091] Alternatively, the processor may also be a hardware-implemented circuit, such as an artificial intelligence (AI) processor, to increase the operating speed. This application does not limit the specific implementation of the processor.
[0092] Optionally, the communication device may be a complete device, or a module in the device, such as a chip.
[0093] It should be noted that the technical effects brought about by any design in the above-mentioned second to tenth aspects can refer to the technical effects brought about by the corresponding design in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 , Figure 2 A schematic diagram of the architecture provided for an embodiment of the present application;
[0095] Figure 3A A schematic diagram of a relationship network provided in an embodiment of the present application;
[0096] Figure 3B A schematic diagram of the association relationship between a communication identifier and an account provided in an embodiment of the present application;
[0097] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0098] Figure 5 Another structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0099] Figure 6 Schematic diagram of the process of the method provided in the embodiment of the present application Figure 1 ;
[0100] Figure 7 Schematic diagram of the business scenario provided by the embodiment of the present application Figure 1 ;
[0101] Fig. 8A Schematic diagram of the business scenario provided by the embodiment of the present application Figure 2 ;
[0102] Figure 8B Schematic diagram of the process of the method provided in the embodiment of the present application Figure 2 ;
[0103] Fig. 9 A schematic diagram of a scenario for modifying the association between a relationship chain identifier and contact information provided in an embodiment of the present application;
[0104] Fig.10 Flow chart 3 of the method provided in the embodiment of the present application;
[0105] Fig.11 A schematic diagram of the requirements for visibility of electronic devices in the relevant specifications provided in the embodiments of the present application;
[0106] Fig.12 A schematic diagram of a user operation interface of a contact authentication method provided in an embodiment of the present application;
[0107] Fig.13 Schematic diagram of the identity authentication method provided in this application embodiment Figure 1 ;
[0108] Fig.14 A schematic diagram of performing preliminary screening based on truncated hash values provided in an embodiment of the present application;
[0109] Fig.15 Schematic diagram of the identity authentication method provided in this application embodiment Figure 2 ;
[0110] Fig.16 Schematic diagram 3 of the identity authentication method flow provided for the embodiment of the present application;
[0111] Fig.17 A flow chart of a communication method provided in an embodiment of the present application;
[0112] Fig.18 A schematic diagram of a communication device provided in an embodiment of the present application;
[0113] Fig.19 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0114] Fig. 20 A schematic diagram of the structure of the chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0115] The technical solutions in the embodiments of the present application are described below in conjunction with the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to include expressions such as "one or more", unless there is a clear indication to the contrary in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two).
[0116] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0117] In the embodiments of the present application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0118] In the technical solution of the embodiment of this application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. For example, in the technical solution of the embodiment of this application, the processing of user personal information is carried out with the authorization of the user, which is uniformly explained here and will not be repeated below.
[0119] "Used for" can be "exclusively used for" or "can be used for", but is not limited to "exclusively used for". For example, in addition to being used for xx, it can also have other functions without limitation.
[0120] In the embodiment of the present application, the data sent by the terminal to the server may be referred to as uplink data. Conversely, the data sent by the server to the terminal may be referred to as downlink data.
[0121] An embodiment of the present application provides a communication method, in which a system of a first terminal logs in to an account of a first user, and the first terminal stores a relationship chain identifier of the first user and a relationship chain identifier 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 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. With this method, when the first terminal communicates with the second terminal, it can query the communication identifier of the contact based on the relationship chain identifier of the contact, without having to search for the user in the second terminal through private information such as mobile phone number and email address, thereby reducing the risk of leakage of the user's private information.
[0122] The above-mentioned relationship chain identifier (Account encrypt Id) is used to characterize / identify the user identity (corresponding to the user of the terminal), and is different from the contact information of the user and does not involve privacy. Among them, the contact information can be a mobile phone number, email address, fax number, etc. There is a one-to-one correspondence between the user's relationship chain identifier and the user's account. For example, the relationship chain identifier can be determined based on the account logged in by the user's terminal. The account logged in by the terminal (AccountId) can also be called a system account, which is a system-level account. For example, the account can be a Huawei account.
[0123] The relationship chain identifier can be determined based on the account logged in by the user's terminal, and can be implemented as follows: the relationship chain identifier can be obtained by encrypting the associated account. The encryption method is, for example, hashing, but is not limited.
[0124] The above-mentioned communication identifier is used to address the terminal. For example, the communication identifier can be a device identifier (DeviceID) or a communication address. For example, the communication address can be the Internet protocol (IP) address of the device. For example, the device identifier can be the serial number of the device, or other identifier that uniquely addresses the device. One terminal corresponds to one communication identifier. The communication identifiers of different terminals are different. This article takes the communication identifier as DeviceID as an example, which is explained uniformly here and will not be repeated below.
[0125] When a terminal logs in to 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 DeviceID of the terminal. Afterwards, other terminals can find the DeviceID of the terminal based on the relationship chain identifier of the user of the terminal, thereby addressing the terminal.
[0126] Reference Figure 1 The method of the embodiment of the present application can be applied to a server 100 (or cloud) and multiple terminals 200 ( Figure 1 Optionally, the terminal 200 can be connected to the server via a wired network or a wireless network, such as a local area network, a cellular network, a wireless fidelity (Wi-Fi), or the like.
[0127] Exemplarily, the server may be an independent server, or a server cluster consisting of multiple regions, multiple computer rooms, and multiple servers, without limitation.
[0128] Exemplarily, the terminal 200 may 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, and the wearable device includes but is not limited to various devices such as smart watches, smart bracelets, and smart anklets. The operating system installed on the terminal 200 is not limited. This application does not limit the specific type of the terminal 200 or the installed operating system.
[0129] For example, Figure 2 Another example of a system architecture provided by an embodiment of the present application is shown. Exemplarily, the server may include an account cloud, a relationship chain service, and a push service. The server may be referred to as a relationship chain server.
[0130] The account cloud may also be referred to as a cloud space or an account cloud service. The account cloud may be used to receive some uplink data uploaded by each terminal. Optionally, the uplink data uploaded by the terminal may include: a relationship chain identifier of the terminal user and the contact information of the terminal user. The relationship chain identifier does not involve sensitive privacy information and has a high degree of security.
[0131] Optionally, the uplink data may further include: contact information of at least one contact of the terminal user.
[0132] 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.
[0133] Optionally, the user's contact information includes but is not limited to at least one of the following: a telephone number, an email address, or a fax number. Optionally, the types of contact information of different contacts may be the same or different. For example, the type of contact information of the contacts is 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 email address.
[0134] Optionally, the contact information of the contact corresponds to the relationship chain identifier of the contact. That is, the contact information, relationship chain identifier, and account of the contact correspond to each other. For example, contact B of user A uses phone number B to register a Huawei account. Phone number B corresponds to the registered Huawei account one by one, and different Huawei accounts are bound to different phone numbers.
[0135] For example, Figure 2 , terminal A uploads the relationship chain identifier of user 1 of terminal A (such as Account encrypt Id_A), the phone number of user A (such as PhoneNum_A) and the email address of user A (such as Email_A) to the account cloud. Similarly, other terminals upload the contact information of other terminal users and the relationship chain identifier of other terminal users to the account cloud.
[0136] Still Figure 2 , terminal A can also upload the mobile phone number of contact B (such as PhoneNum_B) and the email address of contact C (such as Email_C) to the account cloud. Figure 2, terminal A can upload the contact information of the contact in the following format: {AccountOwnerID_A, PhoneNum_B; AccountOwnerID_A, Email_C}, for contact B, PhoneNum_B indicates the phone number of contact B, and AccountOwnerID_A indicates that contact B is a contact of user A of terminal A. Similarly, for contact C, the email address of contact C of user A is Email_C.
[0137] Similarly, other terminals upload the contact information of their respective contacts.
[0138] In one or more embodiments of the present application, the contact may also be referred to as a friend, with no limitation on the name.
[0139] Optionally, each terminal may also upload its own push token (pushToken) to the server. Figure 2 In the example, 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 sent to instruct the terminal to modify the relationship chain identifier of the contact.
[0140] Optionally, each terminal may also upload its own DeviceID. For example, terminal A uploads DeviceID A (an example of a communication identifier).
[0141] As a possible implementation method, the terminal logs in to the account. After the user agrees to the privacy statement, the terminal can upload the above uplink data to the account cloud. The uplink data reported by terminals A, C, and D are as follows: Figure 2 .
[0142] After receiving the uplink data uploaded by each terminal, the account cloud can summarize the uplink data and establish a relationship network between users. The relationship network can represent the friendship between users. Figure 3A , and the arrows represent friend relationships. User A's contacts include users G, F, E, D, C, and B. User B's contacts include users A and K. User C's contacts include users A and B, and so on.
[0143] In this article, the relationship network can also be called a relationship chain network, a relationship chain cloud, or a relationship chain, with no limitation on the name.
[0144] After receiving the uplink data uploaded by each terminal, the account cloud can also determine and store the relationship information between users based on the uplink data. The relationship information can be used to represent the above relationship network, that is, it can represent the friend relationship between users. For example, the relationship information stored in the account cloud is as follows: Figure 3A, the relationship information in the first row indicates that the phone number of contact B of user A is PhoneNum_B, and the relationship chain identifier of contact B is Account encrypt Id_B.
[0145] After receiving the uplink data uploaded by each terminal, the account cloud can also determine and store relevant communication information based on the uplink data. The communication information may include the Device ID used to address the contact device. For example, the communication information stored in the account cloud is as follows: Figure 3A , the communication information of the first line indicates: the relationship chain identifier of user A is Account encrypt Id_A, the DeviceID A of user A's terminal A, the phone number of user A is PhoneNum_A, and the email address of user A is Email_A. The communication information of the second to last line indicates: the relationship chain identifier of user E is Account encrypt Id_E, the DeviceID E1 of user E's terminal E1, the phone number of user E is PhoneNum_E, and the email address of user E is Email_E. The communication information of the last line indicates: the relationship chain identifier of user E is Account encrypt Id_E, the DeviceID E2 of user E's terminal E2, the phone number of user E is PhoneNum_E, and the email address of user E is Email_E.
[0146] As can be seen from the above, the relationship chain identifier is associated with the DeviceID. Correspondingly, the account number is associated with the DeviceID. Figure 3B The association relationship between the account and the DeviceID is shown. The account of user 1 is account 1, and the DeviceID of user 1 includes DeviceID 1-DeviceID 3. For example, DeviceID 1-3 are the DeviceIDs of three different devices of user 1. The account of user 2 is account 2, and the DeviceID of user 2 includes DeviceID 4-6.
[0147] The relationship chain service in the server can be used to send the contact's relationship chain identifier to the terminal based on the data stored in the account cloud. The relationship chain service can also be used to send the contact's DeviceID to the terminal. Figure 3A Taking contact E as an example, the DeviceID of contact E includes DeviceID E1 of terminal E1 and DeviceID E2 of terminal E2.
[0148] Subsequently, the terminal may obtain the contact's DeviceID based on the contact's relationship chain identifier, and use the contact's DeviceID to initiate a communication connection to the contact's terminal. Optionally, the server may return all or part of the contact's relationship chain identifiers to the terminal. For example, Figure 2 In the example, if contact X of user A of terminal A does not have a Huawei account, the server does not return the relationship chain identifier of contact X to the terminal.
[0149] For example, after terminal A uploads the contact information of contact B and contact C to the account cloud, the relationship chain service may query whether the relationship chain identifiers of contact B and contact C have been stored in the account cloud. If the relationship chain identifiers of contact B and contact C have been stored in the account cloud, the relationship chain service may return the relationship chain identifiers of contact B and contact C to terminal A. Optionally, the server may return the DeviceID of contact B and the DeviceID of contact C to terminal A.
[0150] Optionally, if there is no relationship chain identifier of contact B and contact C in the account cloud, the relationship chain service can store the relationship chain identifier of contact B and contact C in the account cloud and return the relationship chain identifier of contact B and contact C to terminal A. Optionally, the server can return the DeviceID of contact B and the DeviceID of contact C to terminal A.
[0151] After receiving the relationship chain identifiers of contacts B and C from the relationship chain server, terminal A can store the relationship chain identifiers of contacts B and C in the contact database. Similarly, other terminals can obtain the relationship chain identifiers of contacts from the server. In some scenarios, the terminal can obtain the DeviceID of the contact based on the relationship chain identifier of the contact, and use the DeviceID of the contact to initiate a communication connection to the terminal of the contact. For specific implementation, please refer to the following text.
[0152] In some scenarios, such as Huawei sharing scenarios, the terminal can also query the contact database based on the other party's relationship chain identifier, and identify whether the other party is a local contact based on the query result. The specific implementation can be found in the following text.
[0153] In this article, the contact database may also be referred to as a relationship chain database, with no limitation on the name. Exemplarily, the contact database is a system-level or account-level database. The address book corresponding to the system-level database may be referred to as a system address book.
[0154] For example, Table 1-1 shows the relationship chain identifiers of contacts B and C stored in terminal A. Each row represents M contact methods associated with a relationship chain identifier. M is a positive integer.
[0155] Table 1-1
[0156] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_B PhoneNum_B Email_B Account encrypt Id_C PhoneNum_C Email_C … … …
[0157] For another example, Table 1-2 shows the relationship chain identifiers of contacts B and C stored in terminal A. Each row represents a contact method associated with a relationship chain identifier. M contact methods of a contact correspond to M rows.
[0158] Table 1-2
[0159] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_B PhoneNum_B Account encrypt Id_B Email_B Account encrypt Id_C PhoneNum_C Account encrypt Id_C Email_C … … …
[0160] Alternatively, the terminal may store the relationship chain identifier in other ways, not limited to the formats shown in Table 1-1 and Table 1-2.
[0161] The push service in the server can be used to push change messages to the push service of the terminal. For example, when a user's relationship chain identifier changes, the push service pushes a change message to the terminal of the user's contact to instruct the terminal to modify the user's relationship chain identifier. Subsequently, the contact's terminal can initiate a communication connection with the user's terminal based on the modified relationship chain identifier.
[0162] The above-mentioned relationship chain server is used to update the information related to the relationship chain. In some examples, when the terminal initiates a business, it no longer connects to the relationship chain server in real time, but can connect to the business server to implement the business. When the terminal needs to change the information related to the relationship chain, it connects to the relationship chain server to obtain it. For example, the business server receives message A from the first terminal, and based on the packet header parsing result of the message A, identifies that the destination device of the first terminal is the second terminal. For another example, the business server can check whether the second user of the second terminal is online. If not online, the business server can send message B to pull the second user of the second terminal online. For example, message A may include the DeviceID of the second terminal of the second user.
[0163] In other examples, in order to improve the accuracy of information, the terminal may obtain the latest relationship chain related information from the relationship chain server when initiating a service.
[0164] In other examples, the business server and the relationship chain server are connected to the cloud to ensure the accuracy and real-time nature of the relationship chain related information.
[0165] As a possible implementation, for services such as calls, the above system may also include a signaling server to achieve reliable voice interaction.
[0166] For example, Figure 4 The schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. The electronic device may be the terminal 200 or the server 100 described above.
[0167] like Figure 4 As shown, 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 be found in Figure 5 The implementation of the processor and memory of the terminal shown. The transceiver 503 is used for the electronic device to interact with other devices. The transceiver 503 can be a device based on Wi-Fi, Bluetooth or other communication protocols.
[0168] Another example, Figure 5 Another structural schematic diagram of a terminal 500 provided in an embodiment of the present application is shown.
[0169] like Figure 5 As shown, the terminal 500 may include a processor 510, a memory 520, and a display screen 530, etc.
[0170] The processor 510 may include one or more processing units, for example, the processor 510 may include an application processor (AP), a modem processor, a graphics processor (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. Different processing units may be independent devices or integrated into one or more processors.
[0171] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0172] The processor 510 may 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 may store instructions or data that the processor 510 has just used or cyclically used. If the processor 510 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 510, and thus improves the efficiency of the system.
[0173] In some embodiments, the processor 510 may include one or more interfaces. The one or more interfaces may be used to connect the processor 510 with the memory 520, the display screen 530, etc.
[0174] In some embodiments of the present application, the processor 510 may be used to verify whether the received relationship chain identifier is a stored relationship chain identifier of a contact friend. Please refer to the following for details.
[0175] The memory 520 can be used to store computer executable program codes, and the executable program codes include instructions. The memory 520 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as an image playback function, etc.), etc. The data storage area may 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 instructions stored in the memory 520 and / or instructions stored in a memory provided in the processor.
[0176] The terminal 500 implements the display function through a GPU, a display screen 530, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 530 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 510 may include one or more GPUs, which execute program instructions to generate or change display information.
[0177] The display screen 530 is used to display images, videos, etc. The display screen 530 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal 500 may include 1 or N display screens 530, where N is a positive integer greater than 1.
[0178] In some embodiments of the present application, the display screen 530 may be used to display various interfaces, such as prompting to add the user who has received the relationship chain identifier as a contact.
[0179] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal. Figure 5More or fewer components are shown, or some components are combined, or some components are separated, or different component arrangements are arranged. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.
[0180] Above Figure 4 , Figure 5 These are only possible examples of the structures of the terminals and servers in the above-mentioned system and do not constitute any limitation on the structures of the terminals and servers.
[0181] The communication method provided by the embodiment of the present application is described below in conjunction with the accompanying drawings in the embodiment of the present application. It should be noted that the message name or number of messages or parameter name in the message exchanged between the various devices in the embodiment of the present application is only an example, and other names can also be used in the specific implementation. For example, request A can also be called other requests, or other message names.
[0182] In addition, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation.
[0183] Figure 6 The following is an example of the process of the technical solution of the embodiment of the present application. Figure 6 , the method may include the following steps:
[0184] S101: A first terminal receives a first operation of initiating a communication connection to a second user.
[0185] The system of the first terminal logs in the account of the first user. Exemplarily, the system of the first terminal logs in the Huawei account of the first user. The account logged in by the system can be called an account.
[0186] The first terminal stores a relationship chain identifier of the first user and a relationship chain identifier of a second user, the second user being a contact of the first user, and the relationship chain identifier is generated based on an account of a user logged into a system of the terminal. Exemplarily, 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.
[0187] Optionally, the relationship chain identifier can be obtained by performing a hash operation on the account. Terminal A logs in to Huawei account A of user A, and takes the hash value of Huawei account A to obtain the relationship chain identifier Account encrypt Id_A of user A. Terminal B logs in to Huawei account B of user B, and takes the hash value of Huawei account B to obtain the relationship chain identifier Account encrypt Id_B of user B. Alternatively, the relationship chain identifier can also be determined based on other methods, which are not limited by the embodiments of the present application. For example, the account is processed with SHA-256, or SHA-256, or MD5 to obtain the relationship chain identifier.
[0188] Exemplarily, the contacts of the first user include contact 1 and contact 2, and the first terminal may store a relationship chain identifier of contact 1, a relationship chain identifier of contact 2, and a relationship chain identifier of the first user.
[0189] Optionally, the first terminal may also store contact information of at least one contact of the first user.
[0190] For example, the first terminal is terminal A, and user A of terminal A initiates a video call to user B of terminal B. Figure 7 , terminal A detects that user A clicks on the video call control 102 corresponding to user B (Jane) (an example of the first operation), and terminal A determines that user A initiates a communication connection with user B. This is only an example of the first operation, and in other scenarios, the first operation may also be other operations without limitation. For example, in a near-field sharing scenario, the first operation may be clicking on the icon of the searched other party.
[0191] S102: In response to the first operation, obtain a communication identifier of a second terminal of the second user based on the relationship chain identifier of the second user.
[0192] As a possible implementation method, the application can generate its own address book based on the content downloaded from the server. In other words, the application can maintain its own address book based on the existing relationship chain of the system address book. The application's own address book has a finer granularity, such as indicating the DeviceID of each device (an example of a communication identifier). The application can initiate communication to the corresponding device based on a finer-grained address book. The application's own address book can be called an application-level address book. For example, Changlian maintains the address book shown in Table 2, through which Changlian can index the DeviceID of each device.
[0193] Table 2
[0194]
[0195] The application can index the communication device through its own address book according to the implementation of the application itself, and the specific implementation method is not limited.
[0196] For example, multiple terminals log in to the same account. In the Changlian address book, the multiple terminals can present one contact to the outside world. Taking Table 2 as an example, assuming that the contact person who logs in to account A is Jane, Jane's relationship chain identifier 1 is associated with mobile phone 1 and mobile phone 2. Figure 7 In the Changlian address book interface 101, Jane's mobile phone 1 and mobile phone 2 are presented as one contact. In response to the user clicking the video call control 102, terminal A calls mobile phone 1 and mobile phone 2, and both mobile phone 1 and mobile phone 2 ring.
[0197] For example, the smart screen, tablet, and mobile phone are logged in to the same account. In the Changlian address book, the mobile phone and tablet present one contact to the outside world, and when a call is made, multiple devices ring together. The smart screen can be used as a separate device, and the smart screen logo can be presented separately in the Changlian address book, and the terminal can call the smart screen separately.
[0198] Still taking Table 2 as an example, assuming that the contact person of login account B is Jeff, Jeff's relationship chain identifier 2 is associated with the smart screen, tablet and other devices, such as Figure 7 In the Changlian address book interface 101, Jeff's smart screen is presented as a separate contact. Jeff's other devices are presented as another contact. In response to the user clicking the video call control corresponding to "Jeff's smart screen", terminal A will call the smart screen alone. In response to the user clicking the video call control corresponding to "Jeff", terminal A will call Jeff's tablet and other devices.
[0199] For example, Figure 7 , terminal A detects that user A clicks on the video call control 102 corresponding to user B (Jane) (an example of the first operation), and terminal A knows that the video call control corresponds to user B. Terminal A can query a table such as 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, terminal B of user B includes mobile phone 1 and mobile phone 2, and accordingly, the DeviceID of the device of user B includes the DeviceID of mobile phone 1: 887XXX1 and the DeviceID of mobile phone 2: 887XXX2.
[0200] For example, Figure 7 If terminal A detects that user A clicks on the video call control corresponding to "Jeff's smart screen", terminal A can query a table such as shown in Table 2 based on Jeff's relationship chain identifier to obtain the DeviceID of Jeff's smart screen: 887XXX4.
[0201] S103: The first terminal sends a communication connection request to the second terminal of the second user based on the communication identifier.
[0202] In some scenarios, the communication connection request is used to initiate audio and video communication.
[0203] Exemplarily, terminal A sends a communication connection request to terminal B (such as a mobile phone) of user B based on the DeviceID (an example of a communication identifier) of user B. Terminal B responds to the communication connection request and establishes a communication connection with terminal A. Terminal A and terminal B can communicate through the communication connection, such as exchanging audio and video data during a call.
[0204] By adopting this method, when an application in the first terminal communicates with an application in the second terminal, it can query the communication identifier of the contact based on the relationship chain identifier of the contact, without having to search for the user in the second terminal through private information such as mobile phone number and email address, thereby reducing the risk of leakage of user privacy information.
[0205] In the above, the first terminal itself stores the association between the relationship chain identifier of the contact and the DeviceID of the contact as an example. In other embodiments, the terminal does not pre-acquire and store the DeviceID of the contact from the server. When the first terminal has a business demand, the first terminal queries the server for the DeviceID of the contact. The implementation method is introduced as follows:
[0206] As a possible implementation, when there is a business demand, 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. Afterwards, the first terminal sends a communication connection request to the second terminal based on the DeviceID.
[0207] As a possible implementation manner, the server may store the corresponding relationship between the relationship chain identifier and the DeviceID of each user among the multiple users.
[0208] Some examples include Figure 7 The information stored in the server includes: the relationship chain identifier of user B and the DeviceID B1 of terminal B used by user B (such as the identifier of a mobile phone); the relationship chain identifier of user C and the DeviceID C1 of terminal C used by user C (such as the identifier of a tablet).
[0209] like Figure 7 , terminal A detects that user A clicks on the video call control 102 corresponding to user B (Jane) (an example of the first operation), and terminal A sends the relationship chain identifier of user B to the server to query the DeviceID of user B. After the server receives the relationship chain identifier of user B from terminal A, it queries the stored corresponding relationship to obtain the DeviceID B1 of user B associated with the relationship chain identifier. After that, the server returns the DeviceID B1 of user B to terminal A. After terminal A queries the DeviceID of user B from the server, it can send a communication connection request to terminal B of user B based on the DeviceID.
[0210] Optionally, the communication connection request sent to terminal B may include the relationship chain identifier of user A. Terminal B may query the contact database of terminal B according to the relationship chain identifier of user A. After querying, the relationship chain identifier of user A exists in the contact database, indicating that user A is a friend of user B. Terminal B may display the call request interface of the friend accordingly. Conversely, if terminal B determines that the other party of the call request is not a friend of user B, terminal B may display the call request interface of the non-friend. That is, terminal B may display the call request interface of the friend and the non-friend in different user interface (UI) styles.
[0211] In other examples, user B has multiple devices that log in to the same account. For example, user B's terminal B1 (such as a mobile phone) and terminal B2 (such as a tablet) log in to the same account. Accordingly, the mobile phone and the tablet have the same relationship chain identifier. In this example, the information stored by the server may include: user B's relationship chain identifier and DeviceID B1 of the mobile phone used by user B; user B's relationship chain identifier and DeviceID B2 of the tablet used by user B; user C's relationship chain identifier and DeviceID C1 of terminal C used by user C.
[0212] In this example, terminal A wants to initiate a video call with user B's terminal, so terminal A can send user B's relationship chain identifier to the server to query the DeviceID of user B's terminal. After the server receives user B's relationship chain identifier from terminal A, it queries the stored corresponding relationship to obtain the DeviceID B1 (such as the DeviceID of user B's mobile phone) and DeviceID B2 (such as the DeviceID of user B's tablet) of user B's terminal associated with the relationship chain identifier. After that, the server returns DeviceID B1 and DeviceID B2 of user B's terminal to terminal A. Terminal A can use DeviceID B1 of user B's terminal to send a video call request to user B's mobile phone. In addition, terminal A can use DeviceID B2 of user B's terminal to send a video call request to user B's tablet. In this way, all devices of user B that log in to the same account will receive the video call request, and user B can choose to accept the video call request on any device and use the device to make a video call with user A.
[0213] In the above, the first terminal queries the server for the DeviceID of the second terminal of the second user, and directly uses the DeviceID to initiate a communication connection to the second terminal as an example. In 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 based on it, and determines that the DeviceID of user B's terminal is B1. After that, the server establishes a communication connection between terminal A and terminal B based on the DeviceID of user B's terminal. The server that triggers the establishment of a communication connection between terminals can be the same server as the server that implements other functions in this article, or a different server.
[0214] Optionally, the communication connection between the first terminal and the second terminal may be a direct connection or an indirect connection. For example, the connection between the first terminal and the second terminal may be a point-to-point (P2P) connection. Alternatively, the first terminal and the second terminal are connected via a relay. The relay includes but is not limited to a server. The server used as a relay may be the same server as the server implementing other functions herein, or a different server.
[0215] 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 may change. In this case, the first terminal or the server needs to perform a corresponding update operation so that the subsequent corresponding terminal can use the updated relationship chain identifier to initiate a communication connection. The following is an introduction to each case:
[0216] Case 1: The first user of the first terminal modifies his / her contact information
[0217] In this case, the terminal of the contact person of the first user modifies the association between the contact information of the first user and the relationship chain identifier of the first user.
[0218] As a possible implementation, the first terminal receives a second operation for modifying the contact information of the first user. In response to the second operation, the first terminal may 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, it may send a first notification message to the third terminal, and the first notification message is 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 contact of the user of the third terminal includes the contact information of the added first user. That is to say, in the scenario where the first user modifies his own contact information, the server may notify the contact's terminal to modify the association between the contact information of the first user and the relationship chain identifier of the first user.
[0219] As a possible implementation manner, the server modifies the association between the contact information of the first user and the relationship chain identifier of the first user.
[0220] Optionally, modifications include one or more of the following: add contact information, delete contact information, update contact information.
[0221] As follows, it is taken as an example that the first terminal is terminal A and the first user is user A.
[0222] For example, user A adds a phone number 189xxx to terminal A, and terminal A can report the phone number 189xxx to the server. Specifically, terminal A reports the relationship chain identifier of the phone number 189xxx and user A. The server can modify the communication information of user A accordingly. For example, add the phone number 179xxx to the communication information corresponding to user A.
[0223] The server sends a first communication message to the terminal of the contact of user A according to the received information, so as 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 may store the information such as Figure 2 In the relationship information example shown, it is learned that the contacts of user A include user B and user C, and the server sends a first notification message to the terminals of user B and user C respectively.
[0224] Taking the example of the server sending the first communication message to the terminal B of user B, the first notification message includes the relationship chain identifier of user A, the new phone number 189xxx of user A and the push token (push Token B) of terminal B. Terminal B adds the association relationship between the new phone number 189xxx and the relationship chain identifier of user A according to the first notification message. As shown in Table 3-2 below, compared with Table 3-1, terminal B adds the second line Account encrypt Id_A, 189xxx in Table 3-2 to indicate the association between the new phone number 189xxx and the relationship chain identifier Account encrypt Id_A of user A. Optionally, the mailbox in the second line of Table 3-2 can be Email_A, or empty without restriction.
[0225] Table 3-1
[0226] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_A 189yyy Email_A … … …
[0227] Table 3-2
[0228] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_A 189yyy Email_A Account encrypt Id_A 189xxx Email_A … … …
[0229] For another example, user A deletes his contact information in terminal A. User A can delete some of the contact information or all of the contact information. For example, user A deletes only the phone number, or deletes the phone number and email address.
[0230] Terminal A can report the contact information of user A that has been deleted to the server. Specifically, terminal A reports: the deleted contact information and the relationship chain identifier of user A. After receiving the information reported by terminal A, the server sends a first notification message to the terminal of user A's contact that stores the deleted contact information. For example, the first notification message includes the deleted contact information, the relationship chain identifier of user A, and the push token. The terminal of user A's contact can delete the association between the contact information of user A and the relationship chain identifier of user A based on the first notification message. In some examples, such as the following Table 4-2, compared with Table 4-1, terminal B deletes the first row in Table 4-2.
[0231] Table 4-1
[0232] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_A 189yyy null … … …
[0233] Table 4-2
[0234] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox … … …
[0235] In some other examples, such as the following Table 5-2, compared with Table 5-1, terminal B deleted the telephone number 189yyy in the first row in Table 5-2, and the association relationship between the relationship chain identifier Account encrypt Id_A and the mailbox Email_A still exists.
[0236] Table 5-1
[0237] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_A 189yyy Email_A … … …
[0238] Table 5-2
[0239] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_A null Email_A … … …
[0240] For another example, user A updates phone number A to phone number B in terminal A, and terminal A can report both phone number A and phone number B to the server. After receiving the information from terminal A, the server can send a first notification message to the contact terminal storing phone number A, and the first notification message may include: phone number A, phone number B, user A's relationship chain identifier, and the push token of the contact terminal. As shown in Tables 6-1 and 6-2 below, contact terminal B can delete the association relationship between phone number A and user A's relationship chain identifier, and add the association relationship between phone number B and user A's relationship chain identifier according to the first notification message.
[0241] Table 6-1
[0242] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_A Phone Number A null … … …
[0243] Table 6-2
[0244] Relationship chain identification Mobile phone number associated with the relationship chain identifier Relationship chain identifies the associated mailbox Account encrypt Id_A Phone Number B null … … …
[0245] Case 2: The first user of the first terminal modifies the contact information of the contact
[0246] In this case, the first terminal modifies the association relationship of the relationship chain identifier of the contact accordingly. Accordingly, the server can modify the stored association relationship between the contact information of the contact (such as the third user) and the relationship chain identifier based on the modified contact information of the contact.
[0247] In some scenarios, the first user of the first terminal adds the contact information of the contact. As a possible implementation, the first terminal receives a third operation of adding a 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 may also receive and store the Device ID of the terminal of the third user sent by the server.
[0248] For example, user A adds the contact information of friend B in terminal A, and terminal A can report the contact information of friend B to the server. Specifically, terminal A reports: the contact information of friend B and the relationship chain identifier of user A.
[0249] The server searches for the relationship chain identifier of friend B in the storage space, and pushes the relationship chain identifier of friend B to terminal A. For example, the server sends a push message, which includes the contact information of friend B, the relationship chain identifier of friend B, and the corresponding push token, which is used to indicate the association between the contact information of friend B and the relationship chain identifier of friend B. The server can also send the Device ID of the terminal of the newly added friend B to terminal A.
[0250] In some scenarios, the first terminal also stores 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 some contacts. As a possible implementation, the first terminal receives a fourth operation of deleting a 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 fourth user's terminal.
[0251] For example, user A deletes the contact information of a friend B in terminal A, and the first terminal deletes the stored relationship chain identifier of friend B and the Device ID of the terminal of friend B.
[0252] In this scenario, the first terminal may also send the contact information of the fourth user to the server in response to the fourth operation. For example, terminal A may also report the contact information of friend B to the server, and the server deletes the association between the contact information of friend B and the relationship chain identifier of friend B.
[0253] In some scenarios, the first terminal also stores 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.
[0254] As a possible implementation, the first terminal further stores the contact information of a fifth user and a relationship chain identifier of the fifth user, and the fifth user is a contact of the first user. The first terminal may receive a fifth operation to update the contact information of the fifth user from the first contact information to the second contact information, and in response to the fifth operation, update the contact information corresponding to the relationship chain identifier of the fifth user from the first contact information to the second contact information.
[0255] For example, if user A changes friend B's phone number from number 1 to number 2, terminal A can delete the association between friend B's number 1 and friend B's relationship chain identifier, and add the association between friend B's number 2 and friend B's relationship chain identifier. In this way, in the scenario where the fifth user's contact information is updated, the first terminal can timely update the association between the fifth user's relationship chain identifier and contact information.
[0256] In this scenario, the first terminal may 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, terminal A may also notify the server of the changed number 2 of friend B to instruct the server to delete the association between number 1 and the relationship chain identifier of friend B, and to add the association between number 2 and the relationship chain identifier of friend B. In this way, the server can quickly learn about the update of the contact information of the fifth user, and correspondingly update the association between the relationship chain identifier and the contact information of the fifth user.
[0257] In this scenario, after receiving the first contact information and the second contact information of the fifth user, the server may also send a notification message to the terminal of the fifth user's contact to instruct the contact terminal 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. The server Figure 3AIn the relationship network shown, it is determined that friend B's contacts also include contact C and contact K. Then, the server may send a notification message to the terminals of contact C and contact K to instruct terminal C and terminal K to update the association between the relationship chain identifier and contact information of friend B. Specifically, terminal C and terminal K may delete the association between friend B's number 1 and friend B's relationship chain identifier, and add the association between friend B's number 2 and friend B's relationship chain identifier.
[0258] In case 2, as a possible implementation, if user A has other devices, the server may also send a push message to user A's other devices to indicate deletion, addition, or update of the association between friend B's contact information and friend B's relationship chain identifier.
[0259] The above mainly uses Changlian communication, a far-field communication, as an example to introduce the solution of the embodiment of the present application. The solution can also be applied to near-field communication.
[0260] For example, terminal A may send the contact information of friend user B to the server, and receive the relationship chain identifier of user B sent by the server. Fig. 8A In the Huawei sharing scenario, terminal B sends a broadcast, which 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 determines whether the relationship chain identifier in the broadcast has been stored in the contact database. If the relationship chain identifier has been stored, it means that terminal B is a contact of user A. On the contrary, if terminal A does not store the relationship chain identifier, it means that terminal B is not a contact of user A.
[0261] Optionally, terminal A may display contacts and non-contacts in different ways. Fig. 8A , the UI style of the contact icon is style one, and the UI style of the non-contact icon is style two.
[0262] Some examples include 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. Figure 8B Shows Fig. 8A Example of flow for the scenario shown.
[0263] As a possible implementation, terminal A may be configured to support interaction with all searched users. In this case, terminal A may establish a communication connection with the searched counterparty, which may be a contact person or a non-contact person.
[0264] As another possible implementation, terminal A can be set to interact only with contacts. In this case, terminal A can establish a communication connection with the searched contact. For non-contacts searched, terminal A can display a prompt message to prompt communication after adding them as contacts. After user A adds the searched party as a contact, terminal A can establish a communication connection with the contact.
[0265] By adopting this method, in the near-field communication scenario, the terminal carries the relationship chain identifier in the broadcast instead of sensitive information such as the mobile phone number, which can improve information security and avoid privacy leakage.
[0266] In some embodiments, the relationship chain identifier can also be shared between multiple devices. As a possible implementation method, the first terminal also stores the contact information of at least one contact of the first user, and the contact information of the contact corresponds one-to-one to the relationship chain identifier of the contact. 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 relationship between the stored contact information and the relationship chain identifier. Among them, modifying the association relationship between the stored contact information and the relationship chain identifier includes one or more of the following: deleting the association relationship between the contact information of the sixth user in at least one contact of the first user and the relationship chain identifier; updating the contact information corresponding to the relationship chain identifier of the seventh user in at least one contact of the first user; adding the association relationship between the contact information of the eighth user and the relationship chain identifier.
[0267] The server may 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 may 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 relationship 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.
[0268] For example, the user adds the phone number 180xxx of contact B in mobile phone A1. Mobile phone A1 can query the server for the relationship chain identifier of contact B. Fig. 9 , mobile phone A1 receives a notification message from the server, the notification message including the contact B's phone number 180xxx and the contact B's relationship chain identifier Account encrypt Id_B, to instruct mobile phone A1 to add an association relationship between the phone number 180xxx and the relationship chain identifier Account encrypt Id_B.
[0269] like Fig. 9, tablet A2, which is logged in to the same Huawei account A as mobile phone A1, has turned on the cloud synchronization function. Then, the server may also send the above notification message (an example of the second notification message) to tablet A2 to instruct tablet A2 to add the association between the phone number 180xxx and the relationship chain identifier Account encrypt Id_B. It can be seen that a device with the cloud synchronization function turned on can not only obtain the relationship chain identifier of the contacts of its own device from the server, but also obtain the relationship chain identifier of the contacts of the same account device (such as the mobile phone of the account). Alternatively, it can be understood that after turning on the cloud synchronization function, the device can obtain the data in the contact database of the same account device. In other words, the data in the contact database of devices with the same account may be exactly the same.
[0270] like Fig. 9 , the computer A3 logged in with the same account A as the mobile phone A1 does not have the cloud synchronization function turned on. Then, the server may 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 account).
[0271] In some embodiments, each terminal may store capability information of its respective contacts. Taking the first terminal as an example, the first terminal also stores capability information of at least one contact of the first user, and the capability information of the contact corresponds one-to-one to the relationship chain identifier of the contact, and 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. It can also be understood or replaced as: the capability information of the contact represents the capabilities of the contact's account. Different accounts may have different capabilities. Accordingly, different relationship chain identifiers may correspond to different capability information.
[0272] As a possible implementation manner, each terminal may also store capability information of its own local user.
[0273] Exemplarily, the format of capability information can be in bit format. For example, the capability information of contact B of user A: 000001100. The capability information of contact B: 000001101. Among them, the 6th, 7th, 8th, and 9th bits of the 9 bits of capability information represent the Changlian application capability, Huawei sharing capability, long-tail application 1 capability, and long-tail application 2 capability, respectively. Then, the above capability information can respectively indicate: the Huawei account of contact B has activated the Changlian application capability and Huawei sharing capability; the Huawei account of contact C has activated the Changlian application capability, Huawei sharing capability, and 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 also be other, without limitation. The format of capability information can also be other, without limitation.
[0274] Huawei account has enabled the Changlian application capability, which can be understood or replaced as follows: After the Changlian application logs in to the Huawei account, the terminal can implement the method of the embodiment of the present application to conduct audio and video communication through the Changlian application and improve the security of audio and video communication. For example, obtain the relationship chain identifier of the local user, upload the contact information of the local user and the relationship chain identifier of the local user to the server. For another example, receive the relationship chain identifier of the contact from the server. For another example, use the relationship chain identifier of the contact to initiate an audio connection request or a video connection request to the contact's terminal.
[0275] Huawei account has Huawei sharing capability enabled, which can be understood or replaced as follows: In the Huawei sharing scenario, the terminal can implement the method of the embodiment of the present application to transmit data through Huawei sharing and improve the security of data transmission. For example, receive the relationship chain identifier of the contact from the server. For another example, use the relationship chain identifier of the contact to query the Device ID of the contact's terminal. For another example, use the Device ID of the contact's terminal to initiate a communication connection to the contact's terminal.
[0276] Similarly, if other capabilities are enabled for a Huawei account, it can be understood or replaced as follows: In the corresponding scenario, the terminal can implement the method of the embodiment of the present application to improve the security of communications in the scenario.
[0277] As a possible implementation method, each terminal can upload the capability information of each user 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 capability information of each user's account level. Subsequently, the corresponding communication process can be controlled according to the capability information of the corresponding user to improve the security of communication. For specific implementation, please refer to the following text.
[0278] As a possible implementation, the server may send the capability information of the contact to each terminal. The terminal may store the capability information of at least one contact. For example, the server may send the capability information of at least one contact of the first user to the first terminal, and the capability information is used to indicate whether the corresponding contact has audio and video communication capabilities.
[0279] Illustratively, Table 7 shows an example of capability information of a contact (second user) stored in the first terminal. Optionally, the first terminal may also store nicknames, avatar information, etc. of the second user, without limitation.
[0280] Table 7
[0281]
[0282] As an alternative implementation, the server may also store device-level capability information in order to determine devices that enable corresponding capabilities.
[0283] As an alternative implementation method, the terminal may also store capability information at a device granularity. The embodiment of the present application does not limit the storage granularity of the capability information.
[0284] For example, if the Huawei account of user A has enabled the Changlian application capability, and the capability information of the contact B of user A indicates that the Huawei account of user B has enabled the Changlian application capability, then terminal A can communicate with the terminal of user B using the relationship chain identifier of user B.
[0285] For another example, user A's Huawei account has enabled the system application 3 capability, and user B's Huawei account has not enabled the system application 3 capability. In this example, terminal A does not use user B's relationship chain identifier to communicate with user B's terminal, and terminal A can communicate with user B's terminal using the solution of the relevant technology.
[0286] As a possible implementation manner, the terminal may also distinguish the capability information of the contacts and determine the UI styles of different contact information accordingly.
[0287] Exemplarily, the first terminal can mark contacts that support audio and video capabilities in the contact application. For example, for contacts that support the smooth audio and video capabilities, the first terminal displays the corresponding icon of the contact, such as the smooth connection icon, to indicate that the contact supports the smooth audio and video capabilities. Using this method, the first terminal can quickly retrieve a corresponding capability from the contact, thereby improving communication efficiency.
[0288] For example, when Changlian is enabled, the terminal can call the system-level relationship chain information to generate a friend list. The terminal's friend list can only display friends who support communication through the Changlian application. Or a special mark can be used to indicate whether a friend supports communication through the Changlian application.
[0289] The embodiment of the present application also provides a communication method, before the first terminal communicates with the second terminal, it is necessary to obtain a communication token (comToken) as a security credential. Fig.10 , the method of obtaining a communication token may include:
[0290] S201. The contact database management module sends a request A, where the request A is used to request an authentication code (AuthCode).
[0291] The terminal may include a contact database management module, which may be used to manage the contact database. The authentication code may be used to represent the identity information of the application.
[0292] Exemplarily, the request may include the identifier of the application (APP ID).
[0293] Exemplarily, the application sends the request A to the account management module in the terminal.
[0294] S202: The terminal sends a request B to the server.
[0295] Exemplarily, the request B may include the package name (PackageName) of the application and the identifier of the application. Optionally, the request B may also include the key of the application.
[0296] Exemplarily, the terminal sends a request B to the account cloud of the server through the account management module to request an authentication code.
[0297] S203: The server returns the signature fingerprint and authentication code to the terminal.
[0298] Exemplarily, after receiving the request B, the account cloud of the server obtains the signature fingerprint of the application and returns the signature fingerprint and the authentication code to the terminal.
[0299] The signature fingerprint of the application is used to verify that the signature fingerprint comes from the server. For example, 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.
[0300] 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.
[0301] As a possible implementation method, 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. Exemplarily, the terminal can also upload the relationship chain identifier to the server.
[0302] If the signature fingerprint verification passes, the account management module can obtain the Huawei account based on the signature fingerprint and calculate the relationship chain identifier of the terminal user based on the Huawei account. The specific calculation method of the relationship chain identifier can refer to the content of other parts of this article. Afterwards, the account management module can return the relationship chain identifier and the authorized authentication code to the contact database management module.
[0303] S205. The contact database management module sends a request C to the server, where the request C is used to request a communication token.
[0304] The communication token can be used as a security credential of the terminal, and the terminal that obtains the communication token has the authority to obtain the relationship chain identifier of the contact from the server. Optionally, the terminal that obtains the communication token may also have the authority to obtain the Device ID of the contact's terminal from the server.
[0305] As a possible implementation, the contact database management module may send the request C to the relationship chain service of the server. Exemplarily, the request C may include an authentication code. Exemplarily, the request C may also include the relationship chain identifier of the terminal user. Optionally, the request C may also include the package name of the application. Optionally, the request C may also include the Device ID of the terminal.
[0306] S206: The server determines to return a communication token.
[0307] S2061. The relationship chain service verifies the relationship chain identifier and the Device ID.
[0308] As a possible implementation, after receiving the request C, the relationship chain service determines whether the relationship chain identifier of the terminal user and the Device ID of the terminal are legal. For example, if the relationship chain identifier does not exist in the relationship chain whitelist, and the Device ID does not exist in the Device ID whitelist, it means that the relationship chain identifier and the Device ID have security risks. The server rejects the request C accordingly and determines not to return the communication token to the contact database management module of the terminal.
[0309] S2062: Relationship chain service verification package name.
[0310] As a possible implementation, if the package name exists in the package name whitelist, the package name verification passes. For another example, if the package name does not exist in the package name blacklist, the package name verification passes.
[0311] S2063: The relationship chain service obtains the key of the application.
[0312] 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 application identifier according to the package name, and obtain the key of the application corresponding to the identifier.
[0313] S2064. The relationship chain service sends a request D to the account cloud, where the request D is used to request a communication token.
[0314] Optionally, the token includes but is not limited to an access token (AT) and / or a refresh token (RT).
[0315] Exemplarily, request D may carry an authentication code, an application key, and an application identifier.
[0316] S2065. The account cloud verifies the authentication code and the application key.
[0317] For example, the account cloud verifies whether the authentication code in the request D is a legal authentication code. If it is an authorized and legal authentication code, the authentication code passes the verification.
[0318] For another example, the account cloud can also verify the association between the authentication code, key and application identifier. In some examples, if the authentication code carried in request D is the authentication code corresponding to the application identifier, and the application key in request D is the key corresponding to the application identifier, then the key and authentication code pass the verification.
[0319] S2066. The account cloud returns a communication token to the relationship chain service.
[0320] If both the authentication code and the application key are verified, it means that the application is initially trusted, and the account cloud returns a communication token to the relationship chain service.
[0321] S207: The relationship chain service returns a communication token to the terminal.
[0322] Exemplarily, the relationship chain service returns a communication token to the contact database management module of the terminal.
[0323] It can be seen that when the terminal obtains the communication token from the server, there is no need to transmit sensitive identity information such as phone number or email address, which can reduce the security risk of information.
[0324] S208: The terminal uses the communication token as a security credential to communicate with the server.
[0325] Exemplarily, 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 learn that the terminal has the authority 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.
[0326] After the terminal obtains the relationship chain identifier of at least one contact from the server, the relationship chain identifier of at least one contact may be stored in the contact database. Optionally, after the terminal obtains the Device ID of the terminal of at least one contact from the server, the Device ID of the terminal of at least one contact may be stored (such as in Table 2 above). Subsequently, the terminal may search for 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.
[0327] As a possible implementation manner, the contact database management module of the terminal communicates with the server using the above communication token.
[0328] 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 validity period, the terminal can request the communication token from the server again. For another example, when the terminal service fails, the communication token can be requested from the server again. In this way, the communication token can be prevented from being valid for a long time, and the security and robustness of the communication system can be improved.
[0329] 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.
[0330] As a possible implementation method, the communication token is a random number, so as to reduce the correlation between different communication tokens as much as possible and improve communication security.
[0331] In some scenarios, the malicious application of the malicious terminal obtains the communication token and the relationship chain identifier of user B. After that, the malicious terminal sends a communication connection request to terminal B according to the Device ID of user B's terminal. After receiving the communication connection request from the malicious terminal, terminal B can determine that the relationship chain identifier of the malicious terminal user 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 "unfamiliar call" in the interface to indicate that the caller is not a friend. It can be seen that 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 user B's terminal, terminal B can also determine that user B and the user of the malicious terminal are not friends according to the contact database to prevent security risks that may be caused by communicating with non-friends.
[0332] The scenarios to which the embodiments of the present application are applicable are not limited to the Changlian and Huawei sharing scenarios listed above. Scenarios such as text messages and calls can also use the solutions of the embodiments of the present application, so as to obtain the Device ID of the contact's terminal by using the relationship chain identifier, thereby reducing the probability of user identity information (such as mobile phone number) being leaked.
[0333] The communication method provided in the above embodiment 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. The relationship chain identifier in the above embodiment can also be applied to the process of identity authentication, such as contact authentication. Based on the relationship chain identifier to improve the efficiency and accuracy of contact authentication. For example, terminal A can initiate a broadcast to search for surrounding devices, and the system of terminal A logs in to the account of user A, and the broadcast can carry the relationship chain identifier A generated based on the account of user A. Terminal B in the surrounding device can receive the broadcast, and the system of terminal B logs in to the account of user B. Terminal B can determine whether user A is a contact of user B based on the relationship chain identifier A in the broadcast. If so, a broadcast response can be sent to terminal A, and the broadcast response can carry the relationship chain identifier B generated based on the account of user B. If not, terminal A is not replied. If terminal A receives a broadcast response replied by terminal B, terminal A can determine whether user B is a contact of user A based on the relationship chain identifier B in the broadcast response.
[0334] In the following, a possible specific application process of the relationship chain identifier for identity authentication in the near field communication process is introduced in detail.
[0335] The terminal can share data with other terminals using short-range wireless communication technology. For example, the first terminal shares data such as files with the second terminal. In the above process, the first terminal as the sender needs to discover or search for the nearby second terminal, and only after establishing a connection with the second terminal can operations such as file sharing be performed. Among them, 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 identification of the second terminal is not added or stored in the first terminal, and / or the device identification 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 contacts with each other, or the first terminal and the second terminal have shared data.
[0336] In order to improve the security of data sharing and reduce the sharing of illegal data between terminals, relevant specifications require that the terminal should provide a switch to turn on or off the visible function of other nearby devices before implementing the aforementioned data sharing and other operations. In addition, the relevant specifications clarify the activation time of this function. For example, the second terminal as the receiving end will automatically turn off 10 minutes after the "visible to everyone" function is turned on. Therefore, within 10 minutes after the second terminal turns on the above-mentioned "visible to everyone" function, other nearby terminals can find or search for the second terminal. After the "visible to everyone" 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 find or search for the second terminal as long as they are near the second terminal. For example, the first terminal as the sending end in the aforementioned example can find the second terminal within 10 minutes. Among them, the first user associated with the first terminal can be a contact of the second user or a stranger of the second user.
[0337] It should be understood that 10 minutes in the above example is an example duration. In actual applications, the visible functions of other nearby devices can also be turned off according to other durations, and there is no limitation to this.
[0338] On the other hand, the relevant specifications also stipulate the visibility of the sender, that is, the first terminal as the sender cannot be discovered or searched by the second terminal as the receiver at any time. Fig.11 The following is a schematic diagram of the terminal visibility requirements of relevant specifications. Fig.11 As shown, the second terminal as the receiving end should have a visibility switch. When the visibility switch is turned on, it means that the second terminal can, for example, Fig.11 In the 10 minutes shown in , it is discovered by other terminals, that is, "visible to everyone". In this way, other terminals can share data with the second terminal by establishing a connection with the second terminal. For example, Fig.11 The first terminal in the example can discover the second terminal within 10 minutes after the "visible to everyone" function is turned on. When the "visible to everyone" function is turned on for more than 10 minutes, the second terminal will automatically turn off the function. For the first terminal at the sending end, the relevant specifications require that the sending end device cannot be discovered by other terminals at any time.
[0339] Affected by the above-mentioned relevant regulatory requirements, before sharing data with unfamiliar or familiar devices, the terminal needs to rely on the visibility of the other 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 have an adverse impact on the efficiency of data sharing.
[0340] In order to reduce the adverse effects of relevant regulatory requirements on data sharing, some terminals provide a "visible only to contacts" function. For example, after the "visible only to contacts" function is turned on at the receiving end of the second terminal, when the terminals corresponding to the contacts of the second terminal, such as the first terminal, are near the second terminal, the second terminal can be discovered by the first terminal. When the "visible only to contacts" 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 and 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.
[0341] In the prior art, for identity authentication under the condition of "only contacts visible", the terminal needs to prove that the peer device has a contact identifier associated with the user account, such as a phone number, email address, etc. In addition, the identifier must exist in the contact address book of the terminal. When a user logs in to the device using a user account, a unique universally unique identifier (UUID) will be assigned to identify the device. When performing identity authentication, a "record data (RD)" signed in the form of a hash will be used. The RD contains the device UUID and the contact identifiers in the address books of all devices. The sending device can sign the above RD to obtain RD(s), where s represents the corresponding certificate.
[0342] When authenticating, the receiving device will calculate a hash value, such as SHA2, for each contact identifier in its address book, and compare it with the hash value contained in RD(s) to verify whether the device UUID matches the certificate of the current secure transport layer security (TLS) link. If the sender or receiver fails to provide a valid signed TLS certificate or does not provide an RD, the identity authentication between the terminals cannot be completed. It can be seen that in the prior art, the process of implementing security verification for contacts is cumbersome, complicated, and the deployment cost is also high. However, if the security verification of contacts is not performed, there is a problem that the "visible to everyone" function needs to be automatically turned off within a certain period of time after the function is turned on according to relevant specifications.
[0343] In view of the problems existing 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. Applying the identity authentication method provided in the embodiment of the present application, the terminal can perform a preliminary screening of contacts and / or devices by matching the contact database and / or the historical sharing database, and quickly perform identity authentication. At the same time, the contacts and / or devices obtained by the preliminary screening can be displayed by the terminal in the corresponding area for user identification and further operation by the user. The embodiment of the present application can quickly filter out nearby contacts by matching the contact database. When both parties of the terminal are not added as contacts, the embodiment of the present application can also use the historical sharing database to quickly filter out devices that have shared data. On this basis, when the user needs to share data with the contacts or devices obtained by the preliminary screening through the terminal, the terminal can perform further identity authentication on the contact or device.
[0344] It can be understood that the above-mentioned contact identification is applied to the process of preliminary screening of contacts by the terminal, and the specific implementation method is shown below.
[0345] It is understandable that the embodiments of the present application can quickly display contacts and / or devices that meet certain conditions through preliminary screening, so that users can select contacts or devices that need to share data, and then further authenticate the selected contacts or devices. Compared with the prior art that requires the completion of contact authentication before displaying it to the user, the speed and efficiency of contact or device screening can be improved, and it also helps to improve the efficiency of data sharing. That is, the embodiments of the present application can display multiple contacts and / or devices through preliminary screening, and only authenticate the contacts or devices that need to share data; while the prior art requires all displayed contacts to be authenticated, the embodiments of the present application simplifies the operation process of authentication and improves the efficiency of authentication. Moreover, in the embodiments of the present application, there is no need to send private information, reducing the risk of privacy leakage.
[0346] The identity authentication method provided in 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 aforementioned example. The first terminal can apply the method to quickly implement identity authentication with the second terminal. Among them, 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 also 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, etc. The embodiment of the present application does not limit the type of terminal.
[0347] like Fig.12FIG. 1 is a schematic diagram of a user operation interface of an identity authentication method provided in an embodiment of the present application. Fig.12 (a) in FIG. 1 shows a schematic diagram of a data sharing function setting page using near-field wireless communication technology. For example, the function may be Fig.12 The “Huawei Share” function 1200 shown in (a) in FIG. Fig.12 (a) in FIG. 1 shows three options displayed on the current terminal, for example, on the data sharing function setting page of the second terminal, namely, "Visible to everyone (10 minutes)" option 1201, "Visible to contacts and shared devices" option 1202, and "Invisible" option 1203. Fig.12 When the "invisible" option 1203 in (a) is selected, the current second terminal cannot be discovered or searched by other nearby terminals, such as the first terminal. The first terminal cannot share data with the second terminal through the short-range wireless communication technology. Fig.12 When the "Visible to Everyone (10 Minutes)" option 1201 in (a) is selected, it can be indicated that within 10 minutes, the second terminal can be discovered by other nearby terminals. Other nearby terminals, such as the first terminal, can share data with the second terminal. In the case of being visible to everyone, the process of establishing a connection between other terminals and the second terminal and performing contact identity authentication can be performed in the same manner as in the prior art, and the embodiments of the present application will not be repeated in detail.
[0348] when Fig.12 When the option 1202 "Visible to contacts and shared devices" in (a) is selected, the page of the second terminal can be as follows: Fig.12 As shown in (a) in the figure. This indicates that the "Huawei Share" function is turned on. At this time, the contacts of the second user associated with the second terminal, as well as other terminals that have shared data with the second terminal, or terminals that have shared data with the second terminal, can all find or search for the second terminal when they are near the current location of the second terminal. In this way, the second terminal can serve as a receiving device for shared data, and after completing identity authentication with other terminals, it can receive data shared from other terminals.
[0349] If the first user associated with the first terminal is a contact of the second user associated with the second terminal, that is, the first user uses the first terminal, 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, then Fig.12 After the "visible to contacts and shared devices" option 1202 in (a) is selected, the second terminal can be discovered by the first terminal when it is located near the first terminal.
[0350] 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, Fig.12 After the "Visible to contacts and shared devices" option 1202 in (a) is selected, the second terminal can also be discovered by the first terminal when it is located near the first terminal.
[0351] When the contacts and the shared devices are visible, the second terminal can use the method provided in the embodiment of the present application to perform identity authentication with the first terminal. The second terminal and the first terminal can perform a preliminary screening based on the contact database and / or the historical sharing database, and the contacts and / or the shared devices of the second user are obtained and displayed in the corresponding area of the second terminal.
[0352] In an embodiment of the present application, the second terminal may display the information of the second user's contact, and the contact information includes the contact's user information. For example, the user information may include avatar information, user ID, user name, and other information. The second terminal may also display the information of the shared device. For example, the device information may include device name, device model, device type, device image, and other information.
[0353] Optionally, when displaying the information of the second user's contact, the information of the device associated with the contact may also be displayed, such as the device name, device model, etc. When displaying the information of the shared device, the information of the user associated with the shared device may also be displayed, such as the user name, etc.
[0354] It is understandable that the embodiments of the present application do not limit how to display the initial screening results (ie, the contacts of the second user, and / or the shared devices), and the information contained in the initial screening results.
[0355] like Fig.12 (b) is a schematic diagram of a page that displays the information of contacts and devices obtained through preliminary screening. Fig.12 The displayed items in (b) may be the second user's contacts and shared devices located near the current second terminal. Fig.12 Contact 1, contact 2, device 1 and device 2 are displayed in the display area 1204 in (b). Contact 1 and contact 2 are contacts of the second user related to the second terminal, and device 1 and device 2 are devices that have shared data with the second terminal.
[0356] In a possible implementation of the embodiment of the present application, as Fig.12(c) is another schematic diagram of a page that displays the information of contacts and devices obtained by preliminary screening. After the method provided in the embodiment of the present application is used to obtain the nearby contacts and shared devices by preliminary screening, the second terminal can display them by region according to the contacts and shared devices. For example, Fig.12 As shown in (c), nearby contacts are displayed in the same area, such as contact 1 and contact 2 displayed in contact display area 1205; nearby shared devices are displayed in another area, such as device 1 and device 2 displayed in device display area 1206. The embodiment of the present application does not limit the display method of contacts and shared devices.
[0357] Optionally, the second terminal may also contain information of other devices and / or non-contact persons, wherein non-contact persons are contacts that have not passed the initial screening, and other devices are devices that have not passed the initial screening.
[0358] The contacts and / or devices displayed above may be obtained after preliminary screening according to the method provided in the embodiment of the present application. Through preliminary screening, the terminal can quickly display nearby possible contacts and / or shared devices in the corresponding area to facilitate subsequent operations by the user.
[0359] In the embodiment of the present application, there may be certain errors in the initial screening process. For example, the displayed contact is not the contact of the user associated with the terminal, and the displayed shared device may not be the device with which the terminal has shared data. Therefore, when sharing data, the terminal needs to further authenticate the above contacts or devices.
[0360] When a user wants to share data with a device, such as Fig.12 As shown in (d) in FIG. 1 , when the user wants to share data with the initially screened device 1, 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 with the device 1 to confirm that both parties have the corresponding authority and can share data with each other.
[0361] In a possible implementation of the embodiment of the present application, Fig.12 The second terminal shown in can be a terminal serving as a receiving terminal. That is, the second terminal serving as a receiving terminal can enable the "Huawei Share" function and set "Visible to Contacts and Shared Devices" in accordance with the requirements of relevant specifications. Fig.12 After the second terminal in the communication establishes a connection with other nearby contacts or devices and completes mutual authentication, the second terminal can receive data shared by other devices.
[0362] In another possible implementation of the embodiment of the present application, Fig.12The second terminal in the device is used as the sending terminal, the "Huawei Share" function is turned on, and after setting "Visible to contacts and shared devices", the second terminal can connect with other nearby contacts or devices and complete mutual authentication. In this way, other contacts or devices that have passed the authentication can be displayed in the corresponding area of the second terminal. In other words, other contacts or devices that have passed the authentication are also visible to the second terminal. In this way, the second terminal can be used as the sending terminal to share data with other contacts or devices that have passed the authentication.
[0363] Below, combined with specific examples, Fig.12 Each technical point involved in the operation process shown is introduced separately.
[0364] like Fig.13 The figure is a flow chart of an identity authentication method provided in an embodiment of the present application. Fig.13 The specific process of mutual identity authentication between the first terminal 41 and the peripheral device 40 is shown in FIG. The peripheral device 40 may include multiple terminals, such as Fig.13 The second terminal 42 in the Fig.13 In the embodiment, the first terminal 41 may be a transmitting terminal, and the second terminal 42 in the peripheral device 40 may be a receiving terminal. The second terminal 42 is a device that can share data with the first terminal 41 after being authenticated according to the method provided in 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 being authenticated. Fig.13 The identity authentication process shown may specifically include the following steps S401-S406:
[0365] S401: A first terminal initiates a broadcast search.
[0366] The system of the first terminal logs in the account of the first user. Exemplarily, the system of the first terminal logs in the Huawei account of the first user. The account logged in by the system can be called an account.
[0367] In an embodiment of the present application, the first terminal 41 can be used as an initiating device to search whether there are contacts or other devices in the surrounding area that can share data. For example, the first terminal 41 can initiate a search in a broadcast manner. The message broadcast by the first terminal 41 may 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 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 embodiment of the present application does not limit the type of hash algorithm used for the hash operation.
[0368] In the embodiment of the present application, the coverage range of the broadcast message sent by the first terminal 41 may be determined according to the hardware capability of the first terminal 41. Under different coverage ranges, the number of terminals included in the peripheral device 40 may be different. The embodiment of the present application does not limit this.
[0369] S402: The first terminal receives a broadcast response from a peripheral device.
[0370] In the embodiment of the present application, the peripheral devices 40 near the first terminal 41 may be terminals with a data sharing function enabled. For example, some or all of the terminals in the peripheral devices 40 may be terminals with a data sharing function enabled. Fig.12 As shown, the "Huawei Share" function is turned on and set to "Visible to contacts and shared devices".
[0371] When some or all of the terminals in the surrounding device 40 receive the broadcast message sent by the first terminal 41, they can reply to the broadcast message. For example, the second terminal 42 in the surrounding device 40 can reply to the broadcast message of the first terminal 41.
[0372] In a possible implementation of the embodiment of the present application, the second terminal 42 may reply to the first terminal 41 in the form of broadcast, that is, reply a message to the first terminal 41 through broadcast.
[0373] The user of the second terminal 42 logs in an account in the system of the second terminal 42. Exemplarily, the user of the second terminal 42 logs in a Huawei account in the system of the second terminal 42. The account logged in by the system may be referred to as an account.
[0374] In a possible implementation of the embodiment of the present application, the broadcast reply sent by the second terminal 42 may carry the relationship chain identifier of the second user and the device hash of the second terminal, and the relationship chain identifier of the second user may be obtained by performing a hash operation based on the account of the second user. The device hash of the second terminal may be obtained by performing a hash operation based on the device identifier of the second terminal 42. The embodiment of the present application does not limit the type of hash algorithm used for the hash operation.
[0375] In the embodiment of the present application, the second user of the second terminal may be a contact of the first user, and the user of the second terminal may also be a user who has logged into a device shared with the first terminal 41 .
[0376] In a possible implementation 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 a preliminary screening based on the broadcast message and the contact database and / or 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.
[0377] 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 so, 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 not, 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 so, 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 not, the broadcast is not replied.
[0378] It is understandable that in the above example, if the second user determines that the first user is a contact of the second user, it indicates that the first user and the second user are friends. Therefore, the second terminal can filter out the first terminal associated with the first user to subsequently interact with the first terminal.
[0379] It is understandable that the judgment is first made based on the contact database, and then based on the historical sharing database. In practical applications, the judgment may also be made based on the historical sharing database first, and then based on the contact database. This application is not limited to this comparison.
[0380] It is understandable that the specific implementation method of the second terminal performing preliminary screening based on the received broadcast message of the first terminal 41 is the same as the process of the first terminal 41 performing preliminary screening based on the broadcast reply in S403. The specific process can be found in the description of S403.
[0381] S403: The first terminal performs preliminary screening according to the broadcast reply.
[0382] In an embodiment of the present application, the first terminal 41 can perform preliminary screening based on the broadcast replies sent by the surrounding devices 40 to determine whether the surrounding devices 40 include devices associated with the contacts of the first user of the first terminal 41, and whether there are devices that have shared data with the first terminal 41.
[0383] In the embodiment of the present application, the first terminal 41 performs preliminary screening based on the broadcast reply, which may refer to the first terminal 41 processing and identifying the broadcast reply received from other devices (such as the second terminal 42) to determine whether the screening condition is met. The screening condition includes: 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.
[0384] The first terminal 41 may include a local hash database, which includes a contact database and a historical sharing database. The contact database may include relevant information about each contact of the first user associated with the first terminal 41, and the historical sharing database may include relevant information about devices that have shared data with the first terminal. For example, the contact database includes the relationship chain identifier of each contact, and the historical sharing database includes the device hash of the device that has shared data.
[0385] Optionally, the contact database may also include relevant information of devices associated with each contact. The historical sharing database may also include relevant information of users associated with devices that have shared data.
[0386] It is understandable that each data in the contact database can be stored in a table, and the relationship chain identifier of the contact stored in the contact database is obtained by hashing the contact's account. Therefore, the contact database can also be described as a contact list, or a contact hash data table, etc. Each data in the historical sharing database can also be stored in a table, and the device hash of the device stored in the historical sharing database is obtained by hashing the device identifier. Therefore, the historical sharing database can also be described as a historical sharing list, a recent sharing list, or a historical sharing device hash data table, etc. This application does not impose any restrictions on this.
[0387] The first terminal 41 may perform a match in the local hash database according to the broadcast reply to determine whether the screening condition is met.
[0388] For example, take the example of the first terminal 41 receiving a broadcast reply from the second terminal 42, which includes the relationship chain identifier of the second user and / or the device hash of the second terminal. The first terminal 41 matches the relationship chain identifier of the second user in the broadcast reply and / or the device hash of the second terminal in the local hash database of the first terminal 41 to determine whether the screening condition is met. When 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.
[0389] The second terminal 42 and the first terminal 41 having shared data include the first terminal 41 having shared data with the second terminal 42 , or the second terminal 42 having shared data with the first terminal 41 .
[0390] In a possible implementation of the embodiment of the present application, the first terminal 41 performs the initial screening based on the contact database and / or the history sharing database of the first terminal 41.
[0391] In some examples, the first terminal 41 determines whether the second user is a contact of the first user based on 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 based on 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.
[0392] In other examples, the first terminal 41 determines whether the second terminal 42 is a device that has shared data with the first terminal 41 based on 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, the first terminal 41 determines whether the second user is a contact of the first user based on 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. 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.
[0393] It is understandable that the embodiment of the present application does not limit the specific implementation method of the initial screening by the first terminal 41.
[0394] In the embodiment of the present application, the first terminal 41 obtains information that meets the screening conditions for subsequent display.
[0395] In a possible implementation of an embodiment of the present application, in order to realize rapid identity identification during the initial screening process, the broadcast reply is preprocessed, and the initial screening is performed based on the preprocessed data. The preprocessing is a truncation process. For example, the broadcast reply includes the relationship chain identifier of the second user and the device hash of the second device, and the relationship chain identifier of the second user and the device hash of the second device are truncation-processed respectively, and the initial screening is performed based on the relationship chain identifier of the second user after the truncation and the device hash of the second device after the truncation. Exemplarily, the process of the first terminal 41 performing initial screening according to the broadcast message replied by the second terminal 42, and the process of the second terminal 42 performing initial screening according to the broadcast message initiated by the first terminal 41, can both preprocess the data in the broadcast, and then perform initial screening based on the preprocessed data.
[0396] like Fig.14 FIG. 4 is a schematic diagram of performing preliminary screening of contacts based on preprocessed data provided by an embodiment of the present application. Taking the first terminal 41 performing preliminary screening based on the broadcast message replied by the second terminal 42 as an example, Fig.14The hash value 12345678 shown in can be the relationship chain identifier of the second user or the device hash of the second terminal. When preprocessing the above hash value, 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 ath character and the bth character are intercepted, etc. Among them, 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 use the truncated hash value to match in the local hash database, and determine whether the screening condition is met based on whether the local hash database contains the truncated hash value.
[0397] like Fig.14 As shown, a hash value 12345115 in the local hash database is shown, and the hash value can be a relationship chain identifier of a contact in the contact database of the first terminal 41, or a device hash of a device in the history sharing database. The aforementioned hash value 12345678 is used as the relationship chain identifier of the second user, and the aforementioned hash value 12345115 is used as the relationship chain identifier of a contact in the contact database of the first terminal 41. When the truncated hash value is used for matching, the first terminal 41 can use the truncated hash value 1234 to match in the local hash database. According to the truncation method, it is determined that the truncated hash value of "hash value 12345115" in the contact database is also 1234, then it is determined that the truncated hash value 1234 can hit the hash value 12345115 in the contact database, that is, the hash value 12345115 contains the same string as the truncated hash value. It means that the second user corresponding to the truncated hash value 1234 hits the contact database of the first terminal 41, and the second user is a contact of the first user.
[0398] It is understandable that in the above example, after receiving the broadcast reply from the second terminal, the first terminal truncates the data in the broadcast reply and performs preliminary screening based on the truncated data. In another embodiment, the terminal may first truncate the relationship chain identifier and / or device hash. When sending a broadcast or replying to a broadcast, the broadcast may carry the truncated relationship chain identifier and / or device hash. The peer device may perform preliminary screening based on the truncated relationship chain identifier and / or device hash, which can speed up the processing flow.
[0399] In a possible implementation manner of the embodiment of the present application, the contact database in the local hash database of the terminal may include relationship chain identifiers of multiple contacts of the user associated with the terminal.
[0400] Based on the above-described embodiment, the terminal can determine the relationship chain identifier of the user of the terminal based on the account logged into the system, and obtain the relationship chain identifier of the contact of the terminal user from the server. It can be understood that the specific implementation method of the terminal obtaining the relationship chain identifier of the contact is as described above, and the terminal can store the obtained relationship chain identifier of the contact in the contact database in the local hash database.
[0401] In another possible implementation of the embodiment of the present application, the historical sharing database in the local hash database of the terminal may include device hashes of multiple 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 identification of the device and perform a hash operation on the device identification to obtain the device hash of the device. The terminal can store the device hash of the device that has shared data in the historical sharing database in the local hash database.
[0402] In a possible implementation of an embodiment of the present application, each device hash in the history sharing database may have its own aging period (which may also be described as a preset duration), and different device hashes may have different aging periods. The device hash is valid within the aging period. When the storage duration of the device hash exceeds the aging period, the device hash will become an invalid device hash. The terminal may delete the invalid device hash. The storage duration starts from the time the device hash is acquired.
[0403] In another possible implementation of the embodiment of the present application, each device hash in the historical sharing database may have the same aging cycle. In one example, when the storage time of a device hash in the historical sharing database reaches the time corresponding to the aging cycle, the device hash may become an invalid device hash, while other device hashes that have not reached the aging cycle may remain valid. In another example, each device hash in the historical sharing database may also become invalid at the same time.
[0404] In another possible implementation of the embodiment of the present application, the aging cycle may be the aging cycle of the historical sharing database. That is, when the generation time of the historical sharing database reaches the time corresponding to the aging cycle, the historical sharing database becomes invalid. Accordingly, all device hashes in the historical sharing database become invalid.
[0405] S404: The first terminal displays a first interface, where the first interface includes information of contacts obtained through preliminary screening and / or information of shared devices.
[0406] For the contacts and / or shared devices obtained by the initial screening (that is, the contacts and / or shared devices meet the screening conditions), the first terminal 41 can Fig.12As shown in (b) or (c) in FIG. 1 , the contact information and / or the information of the shared device is displayed in the corresponding area of the first interface. In this way, the user can choose to connect to a certain contact or device to share data.
[0407] In a possible implementation of the embodiment of the present application, for the same contact, the first terminal 41 can display the same avatar to indicate that the multiple contacts are the same person.
[0408] In a possible implementation of the embodiment of the present application, one account can log in to multiple devices. For example, user A uses account A to log in to device a, device b, and device c respectively. In this way, the users related to device a, device b, and device c are all user A, and each device has the same relationship chain identifier generated based on account A, which is relationship chain identifier a. Device a, device b, and device c generate device hashes based on their respective UDIDs, respectively. Device a generates device hash a, device b generates device hash b, and device c generates device hash c. In this way, the device hash corresponding to relationship chain identifier a includes device hash a, device hash b, and device hash c. Whether the contacts are the same can be determined based on the relationship chain identifier. For the same contact, the same information can be used to represent the contact.
[0409] S405: The first terminal authenticates the contacts obtained through the initial screening and / or the shared devices.
[0410] In the embodiment of the present application, the first terminal 41 may authenticate the contact information and / or the shared device information after the initial screening is completed. After the initial screening is completed, the first terminal 41 may display the screened contact information and / or the shared device information in the first interface.
[0411] It is understandable that since the initial screening process is not a strict authentication process, matching is performed based on partial information during the initial screening process, and it is not determined whether the user's account, device, etc. are safe. For example, whether the user's account is registered through official channels, and the user of the account has the right to use the account, etc. Whether the device is formally produced, etc. Therefore, the first terminal 41 needs to further authenticate the contact or shared device, and re-verify to improve the accuracy and security of identity authentication.
[0412] In a possible implementation of an embodiment of the present application, the first terminal authenticates the target object in response to the user touching the target object. The target object may be the information of a contact, or the target object may be the information of a shared device. The first terminal responds to the user touching the target object to trigger the first terminal to initiate a communication connection to the terminal corresponding to the target object, which can be understood as the first operation in the above embodiment. For example, the target object includes an avatar of the second user. The first device authenticates the second user in response to the user touching the avatar of the second user.
[0413] It is understandable that in the above embodiment, after receiving the broadcast reply, the first terminal first performs a preliminary screening based on the broadcast reply, then displays the data after the preliminary screening, and finally authenticates the data after the preliminary screening. In another embodiment, after receiving the broadcast, the first terminal may first perform a preliminary screening based on the broadcast data, then authenticate the data after the preliminary screening, and finally display the authenticated data.
[0414] In some embodiments, the first terminal includes a first list and a second list, the first list includes device identifications of trusted devices, and the second list includes information of trusted accounts. Among them, the trusted device is a device recognized as safe by the platform or service provider, and the trusted account is an account recognized as safe by the platform or service provider. Trusted devices and trusted accounts can be determined after identity authentication and trust evaluation. The first terminal interacts with the second terminal corresponding to the second user to obtain the device identification of the second terminal and the account of the second user. The second terminal is authenticated according to the device identification of the second terminal and the first list. When the first list includes the device identification of the second terminal, the first terminal authenticates the second user according to the acquired account of the second user and the second list. In the case where the second list includes the account of the second user, a hash operation is performed according to the account of the second user to obtain a first authentication credential. If the first authentication credential is the same as the relationship chain identifier of the second user, it is determined that the second user has passed the authentication. And / or, a hash operation is performed according to the device identification of the second terminal to obtain a second authentication credential. If the first authentication credential is the same as the device hash of the second terminal, it is determined that the second terminal has passed the authentication. In the above manner, the contacts obtained by the initial screening and / or the shared devices are authenticated.
[0415] like Fig.15 FIG. 1 is a flow chart of a method for authenticating an account provided in an embodiment of the present application. Fig.15 FIG. 4 shows a process of further authentication between the first terminal 41 and the second terminal 42 after the first contact screening is completed. Fig.15 After the authentication process shown, the first terminal 41 and the second terminal 42 can share data.
[0416] like Fig.15As shown, when the first terminal 41 and the second terminal 42 are authenticating, they need to inform each other of their own account IDs, that is, 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. In order to achieve the above goal, before the first terminal 41 and the second terminal 42 are authenticated, the first terminal 41 and the second terminal 42 need to obtain the account ID of the other party to generate their own second list. The first terminal 41 and the second terminal 42 both need to complete a series of the same operations. Fig.15 As shown, the first terminal 41 and the second terminal 42 first need to log in to the account and register the credentials, and then the two parties exchange the account ID (the account ID can also be described as the user identification (UID)) and the account device authentication credentials to authenticate the account. That is, determine whether the account ID is credible. Among them, the account ID is used to identify the user. In addition, the first terminal 41 and the second terminal 42 also need to negotiate using the local private key and the other party's public key. This process can be implemented based on the password-based key exchange protocol (simple password exponential keyexchange) SPEKE protocol. In this way, the first terminal 41 and the second terminal 42 can obtain the account ID of the other party and store it in their own second list for subsequent account authentication to verify the authenticity of the account ID.
[0417] The first terminal interacts with the second terminal, obtains the account of the second user, and verifies whether the account of the second user is credible based on the second list and the account of the second user. If the second list includes the account of the second user, it is determined that the second terminal is credible.
[0418] like Fig.15As shown, the account ID logged in by the second terminal 42 can be the mobile phone number of the contact. During authentication, the first terminal 41 and the second terminal 42 respectively inform the other party of their own account ID. The first terminal 41 can query the trusted account ID of the other party, as well as the mapping relationship table between the account ID and the contact, to confirm the contact corresponding to the mobile phone number logged in by the other party. Then, the first terminal 41 can specify an account ID and authenticate whether the peer device, i.e., the second terminal 42, belongs to the account ID. If the second terminal 42 belongs to the specified account ID, it can be considered that the second terminal authentication is passed and the device belongs to the account. The second terminal 42 can also query the trusted account ID of the other party, as well as the mapping relationship table between the account ID and the contact, to confirm the contact corresponding to the mobile phone number logged in by the other party. On the other hand, the second terminal 42 can authenticate whether the peer device, i.e., the first terminal 41, belongs to the trusted account list specified by the data sharing service. If the first terminal 41 belongs to the trusted account list specified by the data sharing service, it means that the first terminal 41 is authenticated. The query of the trusted account list by the second terminal 42 can be performed by way of service registration callback.
[0419] It is understandable that the first terminal can obtain the first list through the server. For example, the server obtains the device identifications of multiple terminals, determines the trusted devices, and generates the first list. The first terminal interacts with the server to obtain the first list. The first terminal obtains the device identification of the second terminal, and authenticates whether the second terminal is trustworthy based on the first list and the device identification of the second terminal. In the case where the first list includes the device identification of the second terminal, it is determined that the second terminal is trustworthy.
[0420] Optionally, the account and device identification may be associated to establish an association relationship between the account and the device in order to authenticate the account or device.
[0421] After the authentication is completed, the first interface of the first terminal 41 may be updated to display the information of the authenticated contact or the information of the shared device.
[0422] S406: Share data with authenticated contacts or shared devices.
[0423] In some embodiments, the first terminal may share data with a terminal corresponding to an authenticated contact or a shared device.
[0424] like Fig.16 , which is a flow chart of another contact authentication method provided in an embodiment of the present application. Fig.16 The diagram shows different processing procedures for the sender and the receiver during contact authentication when the sender and the receiver are distinguished. Fig.16 The sender in the example may be the first terminal 41 in the foregoing embodiments, and the receiver may be the second terminal 42 in the foregoing embodiments.
[0425] The sender's first terminal 41 can broadcast externally and search for the contact's device or the shared device in the surrounding devices. 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 opposite device through the initial screening and authentication process introduced in the above embodiments.
[0426] In the embodiment of the present application, the visibility of the second terminal 42 in the above embodiment is "visible to contacts and shared devices". Fig.16 As shown, the first terminal 41 of the sender and the second terminal 42 of the receiver can adopt different initial screening and authentication strategies for different scenarios.
[0427] Scenario 1: The sender has contacts and / or shared devices, and the recipient is visible to everyone.
[0428] That is, the first terminal 41 as the sender stores the relevant information of the contact and / or the relevant information of the shared device, and the second terminal 42 as the receiver turns on the "visible to everyone" option under the data sharing function. Therefore, the first terminal 41 as the sender can find or search for the second terminal 42 within a certain period of time after the second terminal 42 turns on the above-mentioned "visible to everyone" option. For example, within 10 minutes.
[0429] At this time, the contact screening and authentication strategy is one-way, 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 credible. If so, 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 may not display the second terminal 42 or the second user information of the second terminal 42.
[0430] Scenario 2: The sender has no contacts or shared devices, but the recipient's contacts and shared devices are visible.
[0431] That is, the first terminal 41 as the sender does not have the relevant information of the contacts and the shared devices, and the second terminal 42 as the receiver has enabled the option of "only contacts and shared devices visible" under the data sharing function. Therefore, the first terminal 41 as the sender can only find or search for the second terminal 42 if it is a device that belongs to the contact of the second user of the second terminal 42 or a shared device.
[0432] At this time, the contact screening and authentication strategy is also one-way, that is, the second terminal 42 of the receiver authenticates the first terminal 41 of the sender to determine whether the first terminal 41 is a device of the contact of the second user or a shared device.
[0433] Scenario 3: The sender has contacts and / or shared devices, and the recipient's contacts and shared devices are visible.
[0434] That is, the first terminal 41 as the sender stores the relevant information of the contact and / or the relevant information of the shared device. The second terminal 42 of the receiver turns on the option "Only visible to contacts and shared devices" under the data sharing function. Therefore, the first terminal 41 as the sender can only find or search for the second terminal 42 if it is a device of the contact of the second user of the second terminal 42 or a shared device.
[0435] At this time, the contact screening and authentication strategy 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 credible. 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 a device of the contact of the second user or a shared device.
[0436] Scenario 4: The sender has no contacts or shared devices, and the recipient is visible to everyone.
[0437] That is, the first terminal 41 as the sender does not have the relevant information of the contacts and the shared devices, and the second terminal 42 as the receiver has turned on the "visible to everyone" option under the data sharing function. The first terminal 41 as the sender can find or search for the second terminal 42 within a certain period of time after the second terminal 42 turns on the "visible to everyone" option. For example, within 10 minutes.
[0438] 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.
[0439] based on Figures 12 to 16 The various embodiments shown, such as Fig.17 FIG. 1 is a schematic diagram of another communication method provided in an embodiment of the present application. The method may include the following steps S1701-S1703:
[0440] S1701: A first terminal receives an operation for triggering the first terminal to search for a device.
[0441] In an embodiment of the present application, the system of the first terminal logs in to 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 to the system of the terminal, and the device hash is generated based on the device identifier of the terminal.
[0442] The relationship chain identifier of the first user is obtained by performing a hash operation based on the account of the first user logged in to the system of the first terminal. 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 hash value of the first terminal is obtained by performing a hash operation based on the device identifier of the first terminal. 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.
[0443] In this application, the relationship chain identifier is used to identify the user, and there is no need to identify the user through private information such as mobile phone number and email address, which reduces the risk of user privacy information leakage. The device hash is used to identify the device so that the device can be quickly screened.
[0444] For example, the operation that triggers the first terminal to search for devices may be an operation in which a user starts a "Huawei Share" function, and the first terminal searches for surrounding devices in response to the operation.
[0445] In some embodiments, the first terminal may also send a second broadcast in response to an operation that triggers the first terminal to search for a device, where the second broadcast includes a relationship chain identifier of the first user and a device hash of the first terminal.
[0446] For example, the first terminal responds to the operation that triggers the first terminal to search for a device, and as an initiating device, sends a second broadcast to the outside in the form of a broadcast to search for peripheral devices near the first terminal. The number of peripheral devices may be one or more, and the device types of each device in the peripheral devices may be the same or different. The device types of the peripheral devices and the first terminal may also be the same or different.
[0447] S1702: The first terminal receives a first broadcast from the second terminal, where the first broadcast includes a relationship chain identifier of a second user of the second terminal and / or a device hash of the second terminal.
[0448] In the embodiment of the present application, the second terminal is a terminal that starts the data sharing function and is set to be "visible to contacts and shared devices".
[0449] It is understandable that since the second terminal is set to "visible to contacts and shared devices", after receiving the broadcast sent by other devices, the second terminal needs to determine whether the device sending the broadcast is a terminal that meets the condition of "visible to contacts and shared devices". If it meets the condition, it will reply to the broadcast for subsequent connection and data sharing; otherwise, it will not reply to the broadcast.
[0450] 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 in the second broadcast and the device hash of the first terminal, it determines 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 a first broadcast and sends the first broadcast to the first terminal. 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.
[0451] The relationship chain identifier of the second user is obtained by performing a hash operation based on the account number of the second user logged into the system of the second terminal. The hash value of the second terminal is obtained by performing a hash operation based on the device identifier of the second terminal.
[0452] It can be understood that the implementation method of the second terminal determining 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 is the same as the implementation method of 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. The specific implementation process can be found in S403 or S1703.
[0453] S1703. When the first condition is met, the first terminal displays the first interface; the first 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 second terminal is a device with which the first terminal has shared data based on 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.
[0454] In some embodiments, the first terminal includes a contact database, the contact database includes relationship chain identifiers corresponding to contacts of the first user, and the method further includes: when the contact database includes at least partial bytes of the relationship chain identifier of the second user, determining that the second user is a contact of the first user.
[0455] 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 a 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.
[0456] In some other examples, the first broadcast includes a relationship chain identifier of the second user. The first terminal truncates the relationship chain identifier of the second user to obtain partial bytes of the relationship chain identifier of the second user. A match is performed in a contact database based on the partial bytes of the relationship chain identifier of the second user. If the contact database includes the partial bytes of the relationship chain identifier of the second user, it is determined that the second user is a contact of the first user.
[0457] In other examples, the first broadcast includes some 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 when sending the first broadcast, the broadcast carries some bytes of the relationship chain identifier of the second user. After receiving the first broadcast, the first terminal matches the partial bytes of the relationship chain identifier of the second user in the first broadcast in the contact database, and determines that the second user is a contact of the first user if the contact database includes some bytes of the relationship chain identifier of the second user.
[0458] In some embodiments, the first terminal includes a historical sharing database, which includes a device hash corresponding to a device that has shared data with the first terminal. The method also includes: when the historical sharing database includes at least partial bytes of the device hash of the second terminal, determining that the second terminal is a device that has shared data with the first terminal.
[0459] 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 a history sharing database, and if the history sharing database includes the device hash of the second terminal, determines that the second terminal is a device that has shared data with the first terminal.
[0460] 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 partial bytes of the device hash of the second terminal. A match is performed in a historical sharing database based on the partial bytes of the device hash of the second terminal. If the historical sharing database includes partial bytes 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.
[0461] In other examples, the first broadcast includes some bytes of the device hash of the second terminal. That is, the second terminal truncates the device hash of the second terminal, and when sending the first broadcast, the broadcast carries some bytes of the device hash of the second terminal. After receiving the first broadcast, the first terminal matches the partial bytes of the device hash of the second terminal in the first broadcast in the historical sharing database, and if the historical sharing database includes some bytes of the device hash of the second terminal, it determines that the second terminal is a device that has shared data with the first terminal.
[0462] In some embodiments, when the storage period of the device hash of the device that has shared data with the first terminal exceeds a preset period, the device hash of the device that has shared data with the first terminal is deleted; the preset period is the storage period of the device hash of the device that has shared data with the first terminal in a preset historical sharing database.
[0463] The device hash of the device that has shared data with the first terminal is stored in the historical sharing database of the first terminal. In order to ensure the real-time and accuracy of the data and avoid information redundancy, only the device hash of the device that has recently performed data analysis with the first terminal can be stored. Therefore, a preset time can be set, and the device hash of the device that has shared data with the first terminal can be saved according to the preset time. The preset time is the aging period mentioned above.
[0464] In some examples, each device hash in the history sharing database may have its own preset duration, and different device hashes may have different preset durations.
[0465] In other examples, each device hash in the history sharing database may have the same preset duration, and the device hash is valid only within the preset duration.
[0466] In some examples, the first broadcast includes a relationship chain identifier of the second user and a device hash of the second terminal. The first terminal matches in a contact database according to the relationship chain identifier of the second user, and matches in a history sharing database according to the device hash of the second terminal. When 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 met.
[0467] In other examples, the first broadcast includes the relationship chain identifier of the second user and the device hash of the second terminal. The first terminal truncates the relationship chain identifier of the second user and the device hash of the second terminal to obtain partial bytes of the relationship chain identifier of the second user and partial bytes of the device hash of the second terminal, respectively. Matching is performed in the contact database based on the partial bytes of the relationship chain identifier of the second user, and matching is performed in the history sharing database based on the partial bytes of the device hash of the second terminal. In the case where the contact database includes partial bytes of the relationship chain identifier of the second user, and / or the history sharing database includes partial bytes of the device hash of the second terminal, it is determined that the first condition is satisfied.
[0468] In other 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 truncates the relationship chain identifier of the second user and the device hash of the second terminal. When sending the first broadcast, the first terminal matches 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 broadcast according to the partial bytes of the relationship chain identifier of the second user in the contact database, and matches the partial bytes of the device hash of the second terminal in the historical sharing database. In the case where the contact database includes partial bytes of the relationship chain identifier of the second user, and / or the historical sharing database includes partial bytes of the device hash of the second terminal, it is determined that the first condition is satisfied.
[0469] In the present application, the first terminal can quickly screen based on the contact database and the historical sharing database to quickly determine whether the first condition is met, which helps to improve authentication efficiency.
[0470] It can be understood that the above example is a specific implementation method in which the first terminal performs preliminary screening based on the first broadcast replied by the second terminal.
[0471] In some embodiments, the second user being a contact of the first user includes: the relationship chain identifier of the second user acquired 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 acquired by the first terminal.
[0472] 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. In response to the user's first operation on the first object, the first terminal interacts with the second terminal to obtain the second user's account. A hash operation is performed based on the second user's account to obtain a first authentication identifier. When 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. A connection is established with the second terminal corresponding to the second user to send data. That is, in this example, a preliminary screening is performed first, and the preliminary screening results are displayed. Then the object selected by the authentication user is authenticated, and a connection is established with the object that has passed the authentication.
[0473] 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. A hash operation is performed based on the account of the second user to obtain a first authentication identifier. When 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 a first object, which is the information of the second user after the authentication is passed, and / or the information of the second terminal. That is, in this example, a preliminary screening is performed first, and then the preliminary screening result is authenticated, and the authenticated preliminary screening result is displayed.
[0474] In some embodiments, 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.
[0475] 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 user's first operation on the first object to obtain the device identification of the second terminal. A hash operation is performed based on the device identification of the second terminal to obtain a second authentication identification. If the device hash of the second terminal obtained by the first terminal is the same as the second authentication identification determined by the first terminal, it is determined that the authentication is passed. A connection is established with the second terminal corresponding to the second user to send data.
[0476] In other 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 the device identification of the second terminal. A hash operation is performed based on the device identification of the second terminal to obtain a second authentication identification. When the device hash of the second terminal obtained by the first terminal is the same as the second authentication identification determined by the first terminal, it is determined that the authentication is successful and the first interface is displayed. The first interface includes a first object, which is the information of the second terminal after the authentication is successful, and / or the information of the second user.
[0477] It can be understood that the first authentication identifier and the second authentication identifier can be complete data obtained after hash calculation, or the first authentication identifier and the second authentication identifier can be partial bytes obtained after hash calculation and then truncation.
[0478] In this application, authentication is used to ensure the legitimacy of devices and accounts, and to prevent fake accounts and other behaviors, which can improve security, enhance data protection, and prevent information leakage. Moreover, when a terminal contacts other terminals, it can verify the legitimacy of the other terminal, which may enhance the security of the communication process, enhance the user's trust in the communication, and improve the user experience.
[0479] In some embodiments, the method also 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; 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 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 including a first object and a second object, the second object including information of the second user, and / or information of the third terminal.
[0480] It is understandable that the same user can have multiple terminals.
[0481] It is understandable that in the above example, a user has multiple terminals, such as a mobile phone and a tablet, and logs in to the same account, such as account 1. When the mobile phone and the platform start the data sharing function and set it to "visible to contacts and shared devices", the broadcast sent by the computer is received. The mobile phone and the computer have recently shared data, and the computer and the tablet have recently shared the mobile phone. Therefore, the mobile phone and the tablet return broadcasts to the computer respectively, and the broadcast 1 sent by the mobile phone carries the relationship chain identifier 1 generated based on account 1 and the device hash 1 generated by the device identifier of the mobile phone. The broadcast 2 sent by the tablet carries the relationship chain identifier 1 generated based on account 1 and the device hash 2 generated by the device identifier of the tablet. The computer determines that the mobile phone and the tablet are the devices that have been shared recently, and the relationship chain identifiers in the broadcasts sent by the mobile phone and the platform 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 user of the tablet, the information of the user of the mobile phone is the same as the information of the user of the tablet. For example, the avatar information of the user of the mobile phone is the same as the avatar information of the user of the tablet.
[0482] 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 to perform identity authentication through private information such as mobile phone numbers and email addresses, thereby reducing the risk of user privacy information leakage 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.
[0483] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of 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 to exceed the scope of the technical solution of the embodiment of the present application.
[0484] The present application is an embodiment that can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0485] Corresponding to the above Figure 11-Figure 17 For various embodiments, refer to Fig.18 , showing a structural block diagram of a communication device provided in an embodiment of the present application, the device can be applied to the terminals in the aforementioned embodiments, such as the first terminal, and the device can specifically include the following modules: a processing module 1801 and a display module 1802.
[0486] The processing module 1801 is used to support the communication device to execute Figures 1 to 9 or Figure 11-Figure 17 The display module 1802 is used to support the communication device to execute Figures 1 to 9 or Figure 11-Figure 17 The display function of any one of the items.
[0487] Fig.18 The technical effects of the communication device shown can refer to the technical effects of the method described in the above method embodiment, which will not be repeated here. Fig.18 The processing module 1801 involved in the communication device shown can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing module. The display module 1802 can be implemented by a display screen-related component.
[0488] Optionally, the communication device may include at least one processor, and the processor is used to perform any one of the processing functions in the above embodiments. The communication device may also include a communication interface, and the communication interface is used to receive and / or send signals.
[0489] like Fig.19 As shown, it is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 2200 can be used to implement the methods recorded in the above various method embodiments. For example, the method recorded in each method embodiment of the first terminal is executed. For another example, the method recorded in each method embodiment of the server is executed. Exemplarily, the electronic device 2200 may specifically include: a processing unit 2201 and a display unit 2202.
[0490] The processing unit 2201 is used to support the electronic device 2200 to execute Figures 1 to 9 or Figure 11-Figure 17 The processing function of any one of the above.
[0491] The display unit 2202 is optional and is used to support the electronic device 2200 to execute Figures 1 to 9 or Figure 11-Figure 17 The display function of any one of the items.
[0492] Optional, Fig.19 The electronic device 2200 shown may also include a communication unit ( Fig.19 (not shown), the communication unit is used to support the electronic device 2200 to execute the steps of communication between the electronic device and other electronic devices in the embodiment of the present application.
[0493] Optional, Fig.19 The electronic device 2200 shown may also include a storage unit 2203, which stores a program or instruction. When the processing unit 2201 executes the program or instruction, Fig.19 The electronic device 2200 shown can execute the method shown in the above method embodiment.
[0494] Fig.19 The technical effects of the electronic device 2200 shown can refer to the technical effects of the method shown in the above method embodiment, and will not be repeated here. Fig.19 The processing unit 2201 involved in the electronic device 2200 shown 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 transceiver module. The display unit 2202 can be implemented by display screen-related components.
[0495] The present application also provides a chip system, such as Fig. 20As shown, the chip system includes at least one processor 2301 and at least one interface circuit 2302. The processor 2301 and the interface circuit 2302 can be interconnected via lines. 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 processor 2301). Exemplarily, the interface circuit 2302 can read instructions stored in the memory and send the instructions to the processor 2301. When the instruction is executed by the processor 2301, the electronic device can execute the various steps performed by the electronic device in the above embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiments of the present application.
[0496] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0497] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0498] Exemplarily, 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 microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0499] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0500] An embodiment of the present application further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the above method embodiment.
[0501] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, when the computer program or instructions are executed on a computer, the computer executes the method described in the above method embodiment.
[0502] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the device executes the methods in the above-mentioned method embodiments.
[0503] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0504] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0505] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The various embodiments can be combined with each other or referenced to each other without conflict. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0506] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0507] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0508] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0509] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A communication method, characterized in that: Applied to a first terminal, a 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 comprises: receiving a first operation, where the first operation is used to initiate a communication connection with the second user; In response to the first operation, acquiring a communication identifier of a second terminal of the second user based on the relationship chain identifier of the second user; 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 comprises: The contact information of the first user and the relationship chain identifier of the first user are sent to the server.
3. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: receiving a third operation of adding a third user as a contact; In response to the third operation, sending the contact information of the third user 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 to 3, characterized in that The method further comprises: receiving a fourth operation of deleting a fourth user as a contact; In response to the fourth operation, the stored relationship chain identifier of the fourth user is deleted.
5. The method according to claim 4, characterized in that The method further comprises: 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 to 5, characterized in that The first terminal further stores contact information of a fifth user and a relationship chain identifier of the fifth user, and the fifth user is a contact person of the first user; The method further comprises: receiving a fifth operation of updating 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 comprises: 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 to 7, characterized in that The first terminal further stores contact information of at least one contact of the first user, where the contact information of the contact corresponds to a relationship chain identifier of the contact in a one-to-one manner; The method further comprises: receiving a notification message sent by the server, wherein the notification message is used to notify the first terminal to modify the association relationship between the stored contact information and the relationship chain identifier; The modified stored association relationship between the 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 in 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; Add an association between the contact information of the eighth user and the relationship chain identifier.
9. The method according to any one of claims 1 to 8, characterized in that The communication connection request is used to initiate audio and video communication; The first terminal further stores capability information of at least one contact of the first user, wherein the capability information of the contact corresponds to the relationship chain identifier of the contact in a one-to-one manner, and the capability information is used to indicate whether the corresponding contact has audio and video communication capability; 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 comprises: The capability information of the first user is sent to a server.
11. A communication method, characterized in that: Applied to a server, the method comprises: Receiving contact information of at least one contact of a first user of the first terminal; Sending a relationship chain identifier of at least one contact of the first user 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 contact of the first user to the first terminal, the method further includes: Receive the contact information of the second user and the relationship chain identifier of the second user sent by the second terminal of the second user.
13. The method according to claim 11 or 12, characterized in that: The method further comprises: 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; A first notification message is sent to a third terminal, where the first notification message is 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 contact person of the user of the third terminal includes the added contact information of the first user.
14. The method according to any one of claims 11 to 13, characterized in that The method further comprises: Receiving 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 contact information of the third user; A second notification message is sent to a fourth terminal, where the second notification message is used to notify the fourth terminal to modify the association relationship 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.
15. A communication method, characterized in that: Applied to a first terminal, a 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 device hash of the first terminal, the relationship chain identifier is generated based on the account of the user logged in by the terminal system, and the device hash is generated based on the device identifier of the terminal; the method includes: Receiving an operation for triggering the first terminal to search for a device; receiving a first broadcast from a second terminal, wherein the first broadcast includes a relationship chain identifier of a second user of the second terminal and / or a device hash of the second terminal; When 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 a relationship chain identifier of the second user, and / or determining that the second terminal is a device with which the first terminal has shared data based on a 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.
16. The method according to claim 15, characterized in that The first terminal includes a contact database, the contact database includes relationship chain identifiers corresponding to contacts of the first user, and the method further includes: In a case where the contact database includes at least some bytes of the relationship chain identifier of the second user, it is determined that the second user is a contact of the first user.
17. The method according to claim 15, characterized in that The first terminal includes a history sharing database, the history sharing database includes a device hash corresponding to a device with which the first terminal has shared data, and the method further includes: In a case where the historical sharing database includes at least some bytes of the device hash of the second terminal, it is determined that the second terminal is 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 is a contact person of the first user comprising: a relationship chain identifier of the second user acquired by the first terminal is the same as a first authentication identifier determined by the first terminal, and the first authentication identifier is determined based on the account of the second user acquired 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: a device hash of the second terminal obtained by the first terminal is the same as a 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 to 19, characterized in that The method further comprises: receiving a second broadcast from a third terminal, wherein the second broadcast includes 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 including 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 information of the second user, and / or information of the third terminal.
21. The method according to claim 17, characterized in that The method further comprises: When the storage period of the device hash of the device that has shared data with the first terminal exceeds a preset period, the device hash of the device that has shared data with the first terminal is deleted; the preset period is the storage period of the device hash of the device that has shared data with the first terminal in the preset historical sharing database.
22. A communication device, characterized in that: include: At least one processor configured to execute the method of any one of claims 1-14 or 15-21.
23. The communication device according to claim 22, characterized in that: The communication device further comprises: a communication interface, and the communication interface is used to receive and / or send signals.
24. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is coupled to the processor, the memory is used to store program code, the program code includes instructions, and the processor reads the instructions from the memory so that the electronic device executes 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 comprises a computer program, and when the computer program is executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 14 or 15 to 21.
26. A computer program product, characterized in that The computer program product comprises: a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 14 or 15 to 21.
27. A communication system, characterized in that: The method comprises a first terminal and a server, wherein the first terminal is used to execute the method according to any one of claims 1-10 or 15-21, and the server is used to execute the method according to any one of claims 11-14.
Citation Information
Patent Citations
Content sharing method and electronic equipment
CN114895991A
Method for managing the establishment of a digital connection
US20150017959A1
Communication method and device
WO2018133853A1