Equipment sharing connection method and device, electronic equipment and storage medium

By obtaining the team account and device role of the target device and performing device authentication, the problem of small application scope of device sharing connection in the existing technology is solved, and the shared connection between different devices is realized, and the scope of application is expanded.

CN120185840APending Publication Date: 2025-06-20BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311766498.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, only devices with the same user account can be established for device sharing connections, resulting in a smaller scope of application of device sharing connections.

Method used

By obtaining the team account and device role of the target device, and performing device authentication according to the preset role combination conditions, if the authentication is passed, a shared connection is established.

Benefits of technology

The scope of application of device shared connections has been expanded, so that device shared connections can be established between different devices with the same team account, solving the problem that devices with different user accounts cannot share connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120185840A_ABST
    Figure CN120185840A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and particularly provides an equipment sharing connection method and device, electronic equipment and a storage medium. The device sharing connection method comprises the following steps: when a connection request message sent by a target device is received in response, obtaining a first team account of the target device according to the connection request message; if the first team account is matched with a second team account of the user equipment, acquiring a first equipment role of the target equipment; if it is determined that the first device role and a second device role correspondingly set by the user device conform to a role combination condition, response information is sent to the target device to perform device authentication; and if it is determined that the device authentication is passed, the sharing connection with the target device is established, so that the device sharing connection can be established between different devices of the same team account, the problem that the device sharing connection cannot be realized between the devices logged in with different user accounts is solved, and the application range of the device sharing connection is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a method, apparatus, electronic device, and storage medium for sharing and connecting devices. Background Art

[0002] In some scenarios of sharing intelligent devices (such as, in a scenario of sharing home devices), multiple devices logged in with the same user account can usually form a mutual trust ring, and any two devices in the mutual trust ring can perform device authentication and sharing connection through the account. Among them, the sharing connection refers to a connection for device sharing established based on the interoperability function between devices, such as screen mirroring.

[0003] However, only devices logged in with the same user account can establish a device sharing connection, and the applicable range of the device sharing connection is relatively small. Summary of the Invention

[0004] The purpose of the embodiments of this application is to provide a method, apparatus, electronic device, and storage medium for sharing and connecting devices, so as to improve the applicable range of the device sharing connection.

[0005] On the one hand, the embodiments of this application provide a method for sharing and connecting devices, which is applied to a user device. The method includes:

[0006] When receiving a connection request message sent by a target device, obtain the first team account of the target device according to the connection request message;

[0007] If the first team account matches the second team account of the user device, obtain the first device role of the target device;

[0008] If it is determined that the first device role and the second device role correspondingly set by the user device meet the role combination condition, send a response message to the target device for device authentication;

[0009] If it is determined that the device authentication is passed, establish a sharing connection with the target device.

[0010] In one implementation, determining that the first device role and the second device role correspondingly set by the user device meet the role combination condition includes:

[0011] If the first device role includes a controller and the second device role includes a controlled device, it is determined that the role combination condition is met;

[0012] If the first device role includes a controlled device and the second device role includes a controller, it is determined that the role combination condition is met.

[0013] In one implementation, the first team account is determined based on the first team certificate included in the connection request message; the first team certificate further includes a first certificate time and a first member set; the first member set includes the user accounts of the team members corresponding to the first team account.

[0014] The second team account is determined based on the second team certificate of the user device; the second team certificate further includes a second certificate time and a second member set; the second member set includes the user accounts of the team members corresponding to the second team account.

[0015] In one implementation, sending response information to a target device for device authentication includes:

[0016] Performing certificate verification on the first team certificate of the target device;

[0017] If it is determined that the certificate verification is passed, the first certificate time is not later than the second certificate time, and the second member set includes the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed;

[0018] If it is determined that the certificate verification is passed and the first certificate time is later than the second certificate time, then update the second team certificate, and obtain a new second member set from the updated second team certificate; if the new second member set includes the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed.

[0019] In one implementation, the method further includes:

[0020] If it is determined that the certificate verification is passed, then generate a transmission key;

[0021] Transmit data with the target device through the transmission key.

[0022] In one implementation, before receiving the connection request message sent by the target device, the method further includes:

[0023] Sending a team account creation request to a server, so that the server generates a second team account based on the team account creation request;

[0024] Receiving the second team account returned by the server;

[0025] Sending a team invitation notification to the target device, so that the target device sends a team join request to the server and receives the first team account returned by the server based on the second team account.

[0026] In one implementation, before receiving the connection request message sent by the target device, the method further includes:

[0027] When it is determined that a team invitation notification is received, send a team joining request to the server and receive a second team account returned by the server based on the team joining request;

[0028] Alternatively, when it is determined that a team information update notification sent by the server is received, send a team information update request to the server and receive a second team account returned by the server based on the team information update request.

[0029] On the one hand, an embodiment of the present application provides a method for device sharing connection, which is applied to a target device. The method includes:

[0030] Send a connection request message; the connection request message is used to determine the first team account of the target device;

[0031] When it is determined that a response message returned by the user device based on the connection request message is received, perform device authentication on the user device; the response message is sent when it is determined that the first team account matches the second team account of the user device, and the first device role of the target device and the second device role of the user device meet the role combination condition;

[0032] If it is determined that the device authentication is passed, establish a shared connection with the target device.

[0033] In one implementation, the first team account is determined from the first team certificate included in the connection request message; the first team certificate also includes a first certificate time and a first member set; the first member set includes the user accounts of the team members corresponding to the first team account;

[0034] The second team account is determined from the second team certificate of the user device; the second team certificate also includes a second certificate time and a second member set; the second member set includes the user accounts of the team members corresponding to the second team account.

[0035] In one implementation, performing device authentication on the user device includes:

[0036] Perform certificate verification on the second team certificate of the user device;

[0037] If it is determined that the certificate verification is passed, the first certificate time is not earlier than the second certificate time, and the first member set includes the first user account of the target device and the second user account of the user device, then determine that the device authentication is passed;

[0038] If it is determined that the certificate verification is passed and the first certificate time is earlier than the second certificate time, update the first team certificate, and obtain a new first member set from the updated first team certificate; if the new first member set includes the first user account of the target device and the second user account of the user device, then determine that the device authentication is passed.

[0039] On the one hand, an apparatus for sharing and connecting devices is provided in an embodiment of the present application, which is applied to a user device and includes:

[0040] A receiving unit, configured to obtain a first team account of a target device according to a connection request message when receiving the connection request message sent by the target device;

[0041] A matching unit, configured to obtain a first device role of the target device if the first team account matches a second team account of the user device;

[0042] An authentication unit, configured to send a response message to the target device for device authentication if it is determined that the first device role and a second device role corresponding to the user device meet the role combination condition;

[0043] A connection unit, configured to establish a shared connection with the target device if it is determined that the device authentication is passed.

[0044] In one implementation, the authentication unit is configured to:

[0045] If the first device role includes a controller and the second device role includes a controlled device, it is determined that the role combination condition is met;

[0046] If the first device role includes a controlled device and the second device role includes a controller, it is determined that the role combination condition is met.

[0047] In one implementation, the first team account is determined according to a first team certificate included in the connection request message; the first team certificate further includes a first certificate time and a first member set; the first member set includes user accounts of team members corresponding to the first team account;

[0048] The second team account is determined according to a second team certificate of the user device; the second team certificate further includes a second certificate time and a second member set; the second member set includes user accounts of team members corresponding to the second team account.

[0049] In one implementation, the authentication unit is configured to:

[0050] Perform certificate verification on the first team certificate of the target device;

[0051] If it is determined that the certificate verification is passed, the first certificate time is not later than the second certificate time, and the second member set includes the first user account of the target device and the second user account of the user device, it is determined that the device authentication is passed;

[0052] If it is determined that the certificate verification is passed and the first certificate time is later than the second certificate time, update the second team certificate, and obtain a new second member set from the updated second team certificate; if the new second member set contains the first user account of the target device and the second user account of the user device, determine that the device authentication is passed.

[0053] In one implementation, the authentication unit is further configured to:

[0054] If it is determined that the certificate verification is passed, generate a transmission key;

[0055] Transmit data with the target device through the transmission key.

[0056] In one implementation, the receiving unit is further configured to:

[0057] Send a team account creation request to the server, so that the server generates a second team account based on the team account creation request;

[0058] Receive the second team account returned by the server;

[0059] Send a team invitation notification to the target device, so that the target device sends a team join request to the server and receives the first team account returned by the server based on the second team account.

[0060] In one implementation, the receiving unit is further configured to:

[0061] When it is determined that a team invitation notification is received, send a team join request to the server and receive the second team account returned by the server based on the team join request;

[0062] Alternatively, when it is determined that a team information update notification sent by the server is received, send a team information update request to the server and receive the second team account returned by the server based on the team information update request.

[0063] On the one hand, an apparatus for device sharing connection is provided in an embodiment of the present application, which is applied to a target device and includes:

[0064] A sending unit, configured to send a connection request message; the connection request message is used to determine the first team account of the target device;

[0065] An authentication unit, configured to perform device authentication on the user device when it is determined that a response message returned by the user device based on the connection request message is received; the response message is sent when it is determined that the first team account matches the second team account of the user device and the first device role of the target device conforms to the role combination condition with the second device role of the user device;

[0066] A connection unit, configured to establish a shared connection with the target device if it is determined that the device authentication is passed.

[0067] In one implementation, the first team account is determined based on the first team certificate included in the connection request message; the first team certificate further includes a first certificate time and a first member set; the first member set includes the user accounts of the team members corresponding to the first team account.

[0068] The second team account is determined based on the second team certificate of the user device; the second team certificate further includes a second certificate time and a second member set; the second member set includes the user accounts of the team members corresponding to the second team account.

[0069] In one implementation, the authentication unit is configured to:

[0070] Perform certificate verification on the second team certificate of the user device;

[0071] If it is determined that the certificate verification is passed, the first certificate time is not earlier than the second certificate time, and the first member set includes the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed;

[0072] If it is determined that the certificate verification is passed and the first certificate time is earlier than the second certificate time, then update the first team certificate, and obtain a new first member set from the updated first team certificate; if the new first member set includes the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed.

[0073] On the one hand, an electronic device is provided in an embodiment of the present application, including:

[0074] A processor; and

[0075] A memory storing computer instructions for causing the processor to execute the steps of the method provided in any of the various alternative implementations of the device sharing connection as described above.

[0076] On the one hand, a storage medium is provided in an embodiment of the present application, storing computer instructions for causing a computer to execute the steps of the method provided in any of the various alternative implementations of the device sharing connection as described above.

[0077] The method for shared connection of devices in the embodiments of the present application includes: when receiving a connection request message sent by a target device, obtaining the first team account of the target device according to the connection request message; if the first team account matches the second team account of the user device, obtaining the first device role of the target device; if it is determined that the first device role and the second device role set corresponding to the user device meet the role combination condition, sending a response message to the target device for device authentication; if it is determined that the device authentication is passed, establishing a shared connection with the target device. In this way, device shared connections can be established between different devices with the same team account, solving the problem that device shared connections cannot be established between devices logged in with different user accounts, and improving the applicable range of device shared connections. Description of the Drawings

[0078] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0079] Figure 1 It is a scenario example diagram of home device sharing under traditional technology.

[0080] Figure 2 It is an interaction diagram of a method for obtaining team certificates in the embodiments of the present application.

[0081] Figure 3 It is a flowchart of a method for shared connection of devices in the embodiments of the present application.

[0082] Figure 4 It is an interaction diagram of a method for device screening in the embodiments of the present application.

[0083] Figure 5 It is an interaction diagram of another method for device screening in the embodiments of the present application.

[0084] Figure 6 It is an interaction diagram of a method for certificate update in the embodiments of the present application.

[0085] Figure 7 It is an interaction diagram of a method for certificate verification in the embodiments of the present application.

[0086] Figure 8 It is a scenario example diagram of home device shared connection in the embodiments of the present application.

[0087] Figure 9 It is a structural block diagram of a device for shared connection of devices in the embodiments of the present application.

[0088] Figure 10 It is a structural block diagram of another device sharing connection device in the embodiments of the present application.

[0089] Figure 11 It is a schematic structural diagram of an electronic device in the embodiments of the present application. Detailed implementation manners

[0090] Next, the technical solutions of the present application will be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application. In addition, the technical features involved in different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0091] First, some terms involved in the embodiments of the present application will be described to facilitate the understanding of those skilled in the art.

[0092] Terminal device: It can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a site, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system device, a personal navigation device, a personal digital assistant, an audio / video player, a digital camera / video camera, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a game device or any combination thereof, including accessories and peripherals of these devices or any combination thereof. It is also foreseeable that the terminal device can support any type of interface for users (such as wearable devices), etc.

[0093] Server: It can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms.

[0094] In some intelligent device sharing scenarios (such as, home device sharing scenarios), multiple devices logged in with the same user account can usually form a mutual trust ring, and any two devices in the mutual trust ring can perform device authentication and shared connection through the account, such as screen mirroring.

[0095] Refer to Figure 1As shown in the figure, it is an example diagram of a field of sharing household devices under traditional technologies. A household includes two family members, namely User 1 and User 2. Multiple devices logged in with the user account of User 1 form a first mutual trust ring, and multiple devices logged in with the user account of User 2 form a second mutual trust ring.

[0096] However, device sharing connections can only be established between devices logged in with the same user account. For example, Figure 1 there is no support for device sharing connections between the TV in the first mutual trust ring and the mobile phone in the second mutual trust ring, and the scope of application of device sharing connections is relatively small.

[0097] Based on the defects existing in the above related technologies, in the embodiments of the present application, a method, device, electronic device, and storage medium for device sharing connections are provided, aiming to improve the scope of application of device sharing connections.

[0098] In the embodiments of the present application, a method for device sharing connections is provided. This method can be applied to an electronic device. The present application does not limit the type of the electronic device, and it can be any device type suitable for implementation, such as terminal devices and servers, etc. The present application will not elaborate on this.

[0099] In the embodiments of the present application, a user (such as a family member) first creates a target team account (one target team account corresponds to one target team) through the server, generates a target team certificate containing the target team account, and invites other users (such as other family members) to join the target team corresponding to the target team account, and updates the target team certificate based on the newly joined users to obtain a target team certificate containing the target team account and each user account. Then, between each device of each target team member in the target team, device sharing connections are made based on the target team certificates stored respectively.

[0100] Next, in combination with Figure 2 , the generation and acquisition process of the team certificate will be described. Figure 2 It is an interaction diagram of a method for obtaining a team certificate in the embodiments of the present application. Next, in combination with Figure 2 , this method will be described. The specific implementation process of this method is as follows:

[0101] Step 200: The first member device sends a team account creation request to the server.

[0102] Among them, the team creation request includes the first member account of the first team member (such as an application account). It should be noted that any user can send a team account creation request to the server, and this user can be referred to as the first member device.

[0103] Optionally, the team creation request may further include the device identifiers (such as device names or device codes) of at least one shared device allowed to be shared by the first team member. The first member device can be any device, such as a server or a terminal device. As an example, the team can be a family, a study group, or a company department, etc.

[0104] Step 201: The server returns the target team certificate to the first member device.

[0105] In one implementation, the server generates a target team account (such as a family account) based on the team account creation request, and creates a target team certificate based on the target team account and the first member account.

[0106] Among them, when creating the target team certificate based on the target team account and the first member account, any of the following methods can be adopted:

[0107] Method 1: Directly generate a target team certificate containing the target team account and the first member account.

[0108] Method 2: Perform a hash calculation on the target team account to obtain the hash value of the account, and generate a target team certificate containing the first member account and the hash value of the account.

[0109] Optionally, the target team certificate may further include the device identifiers of at least one shared device (such as a mobile phone and a tablet, etc.) allowed to be shared by the first team member.

[0110] Step 202: The first member device sends a team invitation notification to the second member device.

[0111] Optionally, the team invitation notification can be a text message or a message containing an invitation link. In practical applications, the invitation link can be sent to the second member device in any way. For example, the team invitation notification can also be sent (such as pushed) by the server, and no limitation is made here.

[0112] It should be noted that the second member account of the second team member is logged in to the second member device.

[0113] Step 203: The second member device sends a team join request to the server.

[0114] In one implementation, the second member device sends a team join request to the server by clicking the invitation link.

[0115] Among them, the team join request includes the second member account of the second team member. Optionally, it may further include the device identifiers of at least one shared device allowed to be shared by the second team member.

[0116] Step 204: The server returns the updated target team certificate to the second member device.

[0117] In one implementation, the server obtains the second member account in the team join request, updates the target team account according to the second member account, and sends the updated target team certificate to the second member device.

[0118] Among them, the updated target team certificate includes the target team account, the first member account, and the second member account. Optionally, the target team certificate may further include the device identifiers of at least one shared device allowed to be shared by the first team member, and may also include the device identifiers of at least one shared device allowed to be shared by the second team member.

[0119] Step 205: The server sends a team information update notification to the first member device.

[0120] Step 206: The first member device sends a team information update request to the server.

[0121] Step 207: The server returns the updated target team certificate to the first member device.

[0122] Step 208: The server sends a team information update notification to the third member device.

[0123] It should be noted that the second member account is logged in to both the second member device and the third member device. Therefore, after the second team member joins the target team through the second member device, the server will also synchronize the updated target team certificate to other devices logged in with the second member account, that is, the third member device.

[0124] Step 209: The third member device sends a team information acquisition request to the server.

[0125] Step 210: The server returns the updated target team certificate to the third member device.

[0126] The following takes the target team as a family as an example for illustration. A family certificate (i.e., the target team certificate) corresponding to a family may include a family account (Identification, ID) (i.e., the target team account), a certificate generation time (i.e., the certificate time), a shared user list (i.e., the member set), and a shared device list (i.e., the shared device set). As an example, it includes the following content:

[0127] Family ID: 1234560;

[0128] Certificate generation time: 2023.01.01.10.00;

[0129] Shared user list:

[0130] ---- User 1;

[0131] ---- User 2;

[0132] ---- User 3;

[0133] -- Shared device list:

[0134] ---- DID: Device ID;

[0135] ---- UID: User ID;

[0136] Further, when the server receives a certificate modification request sent by a member device for the target team certificate, the server can also modify the target team certificate according to the certificate modification request and return the updated target team certificate to the member device; and, the server also sends a team information update notification to other member devices, and based on the team information update requests of other member devices, sends the updated target team certificate to each member device respectively.

[0137] In the embodiments of the present application, a target team certificate can be created based on the team account creation request of a member device, and the target team certificate can be updated when the member set of the target team changes or the shared device sets of each team member change. For example, the addition (i.e., new), deletion, and modification requests of a member device, and the updated target team certificate is synchronized to all member devices under the target team account.

[0138] In the embodiments of the present application, after the target team certificate is generated, different member devices can perform device authentication and shared connection according to the target team certificates stored by themselves.

[0139] The following combines Figure 2 and 3 , taking the device shared connection between a user device and a target device as an example, to illustrate the method of device shared connection. It should be noted that both the user device and the target device can be any two member devices in a certain target team. For example, the target device and the user device can be Figure 1 any two of the first member device, the second member device, and the third member device, and for another example, the target device is the first member device, the user device is the second member device, or the target device is the third member device, and the user device is the first member device.

[0140] For the convenience of distinction and description below, the team certificate, target team account, member set, shared device set, and device role corresponding to the target device are successively referred to as: the first team certificate, the first team account, the first member set, the first shared device set, and the first device role; the team certificate, target team account, member set, shared device set, and device role corresponding to the user device are successively referred to as: the second team certificate, the second team account, the second member set, the second shared device set, and the second device role.

[0141] As an example, the first team account is the target team account corresponding to a R & D department (i.e., the target team) of a certain company. The first member set corresponding to the first team account is all the members in the R & D department, and the corresponding first shared device set is the mobile phones and meeting devices of all the members in the R & D department.

[0142] As another example, the first team account is the target team account corresponding to a certain family (i.e., the target team). The first member set corresponding to the first team account is all the family members in the family, and the corresponding first shared device set is the mobile phones and audio - video devices (such as TVs, tablets, and computers, etc.) of all the family members in the family.

[0143] As another example, the first team account is the target team account corresponding to a certain class (i.e., the target team). The first member set corresponding to the first team account is all the students and teachers in the class, and the corresponding first shared device set is the mobile phones and audio - video devices (such as TVs) of all the students and teachers in the class.

[0144] Figure 3 The following is a flowchart of a method for device sharing connection in an embodiment of the present application. The specific implementation process of this method is as follows:

[0145] Step 300: When the user device responds to receiving a connection request message sent by the target device, according to the connection request message, obtain the first team account of the target device.

[0146] Among them, the connection request message is used to determine the first team account of the target device. The first team account is determined from the first team certificate included in the connection request message. Optionally, the connection request message can also be used to determine the first device role.

[0147] In one implementation, the connection request message includes a first team certificate, and the first team certificate includes a first team account or a hash value of the first team account. After the target device sends the connection request message, the user device receives the connection request message, obtains the first team certificate included in the connection request message, and obtains the first team account included in the first team certificate, or obtains the hash value of the first team account in the first team certificate, and obtains the first team account based on the hash value.

[0148] In one implementation, the connection request message includes a first team certificate and a first device role, and the first team certificate includes a first team account or a hash value of the first team account. After the target device sends the connection request message, the user device receives the connection request message, obtains the first team certificate and the first device role included in the connection request message, and obtains the first team account included in the first team certificate, or obtains the hash value of the first team account in the first team certificate, and obtains the first team account based on the hash value.

[0149] Optionally, the connection request message can be sent in real time, sent periodically, or sent when meeting the broadcast conditions (such as broadcast time, communication conditions). In practical applications, the broadcast conditions can be set according to the actual application scenario and are not limited here.

[0150] Among them, the first team certificate can also include a first certificate time (i.e., the certificate time in Figure 1 ), and a first member set (i.e., the member set in Figure 1 ); the first certificate time is the latest generation time or update time of the first team certificate; the first member set includes the user accounts of the team members corresponding to the first team account (i.e., the member accounts in Figure 1 ).

[0151] In one implementation, the user device is the Figure 2 first member device in, and the target device is the Figure 2 second member device in, then the user device can also perform the following steps:

[0152] Send a team account creation request to the server, so that the server generates a second team account based on the team account creation request; receive the second team account returned by the server; send a team invitation notification to the target device, so that the target device sends a team join request to the server, and receive the first team account returned by the server based on the second team account.

[0153] In one implementation, the user device is the Figure 2 first member device in, and the target device is the Figure 2 third member device in, then the user device can also perform the following steps:

[0154] Send a team account creation request to the server, so that the server generates a second team account based on the team account creation request; receive the second team account returned by the server; send a team invitation notification to the second member device, so that the second member device sends a team join request to the server and receive the first team account returned by the server based on the second team account. When the target device determines that it has received the team information update notification sent by the server, it sends a team information update request to the server and receives the first team account returned by the server based on the team information update request.

[0155] In one implementation, the target device is Figure 2 the first member device in Figure 2 and the user device can be the second member device or the third member device in

[0156] Send a team account creation request to the server, so that the server generates a first team account based on the team account creation request and sends a team invitation notification to other devices (such as the second member device and the third member device).

[0157] If the user device is Figure 2 the second member device in

[0158] the second member device in Figure 2 the user device can also perform the following steps: when it determines that it has received the team invitation notification, send a team join request to the server and receive the second team account returned by the server based on the team join request.

[0159] Step 301: If the first team account matches the second team account of the user device, obtain the first device role of the target device.

[0160] In one implementation, obtain the second team account of the user device. If it is determined that the first team account and the second team account are the same, it is determined that the team accounts of the user device and the target device are the same and belong to the same target team, and then obtain the first device role of the target device.

[0161] Optionally, it can also be determined whether the two match according to whether the first team account and the second team account contain the same fields or the matching degree is higher than the set matching threshold. In practical applications, the matching method can be set according to the actual application scenario, which is not limited here. In this way, devices in the same team as the user device can be filtered out through the team account.

[0162] Among them, any of the following methods can be used to obtain the first device role:

[0163] Method 1: If the connection request message contains the first device role, obtain the first device role included in the connection request message.

[0164] Method 2: If the connection request message does not contain the first device role, send a role request message to the target device, receive the role response message returned by the target device, and obtain the first device role included in the role response message.

[0165] In actual applications, the method for obtaining the first device role can also be set according to the actual application scenario, which is not limited here.

[0166] Step 302: If it is determined that the first device role and the second device role correspondingly set by the user device meet the role combination condition, send a response message to the target device for device authentication.

[0167] In one implementation, if the first device role includes a controller and the second device role includes a controlled device, it is determined that the role combination condition is met; if the first device role includes a controlled device and the second device role includes a controller, it is determined that the role combination condition is met.

[0168] Among them, both the first device role and the second device role are device roles, which are roles set for the device.

[0169] In one implementation, the device roles include: a controller (i.e., controller) and a controlled device (i.e., device). The same device can be correspondingly set with multiple roles. The first device role can be a controller and / or a controlled device, and the second device role can also be a controller and / or a controlled device. If the device role is a controller, the device can be used as a controller to control the operation of other devices. If the device role is a controlled device, it can be used as the device to be controlled to operate according to the control instructions of other control devices (i.e., controllers).

[0170] This is because both a controller and a device are required in the two devices to meet the networking conditions, and the two devices can form a networking relationship, and then a device sharing connection can be established. If the device roles of the two devices are the same, such as both being devices or both being controllers, a networking relationship cannot be formed.

[0171] As an example, a family (i.e., the target team) corresponding to a family account (i.e., the target team account) contains multiple devices, namely a television (TV), a tablet, a laptop, and a mobile phone. The device role of the TV is the controlled device, the device roles of the tablet and the laptop include both the controller and the controlled device, and the device role of the mobile phone is the controller. The mobile phone can establish device sharing connections with the TV, the tablet, and the laptop respectively.

[0172] In practical applications, the device roles and the role combination conditions can both be set according to the actual application scenario and are not limited here.

[0173] In one implementation, when the user device sends a response message to the target device for device authentication, the following steps can be adopted:

[0174] S3021: Perform certificate verification on the first team certificate of the target device.

[0175] In one implementation, the user device verifies the target device according to the first team certificate, and the target device also verifies the user device according to the second team certificate.

[0176] Furthermore, if it is determined that the certificate verification is passed, a transmission key is generated; data is transmitted with the target device through the transmission key. Specifically, after both the user device and the target device pass the certificate verification, any subsequent transmitted data can be encrypted and transmitted through the transmission key.

[0177] S3022: If it is determined that the certificate verification is passed, the first certificate time is not later than the second certificate time, and the second member set contains the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed.

[0178] It should be noted that since if the first certificate time is not later than the second certificate time, it means that the second team certificate is updated after the first team certificate, that is, the first team certificate is old version information and the second team certificate is new version information, and the information it contains is more accurate, thus reducing non - security problems caused by the user device not downloading the latest team certificate.

[0179] S3023: If it is determined that the certificate verification is passed and the first certificate time is later than the second certificate time, then update the second team certificate, and obtain a new second member set from the updated second team certificate; if the new second member set contains the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed.

[0180] It should be noted that if the time of the first certificate is later than the time of the second certificate, it indicates that the second team certificate is old version information. Therefore, the certificate needs to be updated to reduce non-security issues caused by the user device not downloading the latest team certificate.

[0181] Similarly, when the target device authenticates the user device, the following steps can be adopted:

[0182] Verify the certificate of the second team certificate of the user device; if it is determined that the certificate verification passes, the time of the first certificate is not earlier than the time of the second certificate, and the first member set contains the first user account of the target device and the second user account of the user device, then it is determined that the device authentication passes. If it is determined that the certificate verification passes and the time of the first certificate is earlier than the time of the second certificate, then update the first team certificate, and obtain a new first member set from the updated first team certificate; if the new first member set contains the first user account of the target device and the second user account of the user device, it indicates that the certificate time condition is met, and the device authentication is determined to pass.

[0183] Step 303: If it is determined that the device authentication passes, establish a shared connection with the target device.

[0184] The following combines Figure 4 to illustrate the screening of the user device in the above embodiments. Figure 4 It is an interaction diagram of a device screening method. Figure 4 In it, the device role of the user device is the controller, and the device role of the target device is the controlled device. The process of this method is as follows:

[0185] Step 400: The user device sets a team account filter.

[0186] Step 401: The target device sends a connection request message to the user device.

[0187] Step 402: The user device filters the received connection request message through the team account filter to screen out the connection request message with a matching team account.

[0188] Among them, the team account filter is set according to the account filtering condition to filter out the team account that matches the second team account of the user device.

[0189] Step 403: The user device obtains the first device role of the target device.

[0190] Step 404: If the first device role is the controlled device, perform device authentication and shared connection on the target device.

[0191] Specifically, when performing steps 400 to 404, reference may be made to the above steps 300 to 303 for details, which will not be elaborated herein.

[0192] The following Figure 5 illustrates the screening of user devices. Figure 5 FIG. is an interaction diagram of another method for device screening. Figure 5 In, the device role of the target device is the controller, and the device role of the user device is the controlled device. The process of this method is as follows:

[0193] Step 500: The user device sets a team account filter.

[0194] Step 501: The target device sends a connection request message to the user device.

[0195] Step 502: The user device filters the received connection request message through the team account filter to screen out the connection request messages with matching team accounts.

[0196] Step 503: The user device obtains the first device role of the target device.

[0197] Step 504: If the first device role is the controller, device authentication and shared connection are performed on the target device.

[0198] Specifically, when performing steps 500 to 504, reference may be made to the above steps 300 to 303 for details, which will not be elaborated herein.

[0199] The following Figure 6 illustrates the certificate update process in the above embodiments. Figure 6 FIG. is an interaction diagram of a certificate update method. The specific implementation process of this method is as follows:

[0200] Step 600: The target device sends a connection request message to the user device.

[0201] In one implementation, the connection request message includes the first team certificate of Alice (i.e., a team member) and the first device role. The first team certificate includes the first date (i.e., the first certificate time), the first user list (i.e., the first member set), and the first device list (i.e., the first shared device set).

[0202] Step 601: If it is determined according to the connection request message that the certificate update condition is met, the user device updates the second team certificate.

[0203] In one implementation, if it is determined according to the first team certificate and the second team certificate that their team accounts match and the certificate verification is passed (i.e., the certificate is legal), then according to the comparison result of the first certificate time and the second certificate time, it is determined whether to update the second team certificate.

[0204] It should be noted that if the certificate update conditions are not met, step 601 may not be executed either.

[0205] Step 602: If the user accounts of both are included in the first team certificate, the user device sends a response message to the target device.

[0206] Among them, the response message can be a message for device authentication and shared connection. The response message includes the second team certificate of Bob (i.e., the team member) and the second device role. The second team certificate includes a second date (i.e., the second certificate time), a second user list (i.e., the second member set), and a second device list (i.e., the second shared device set).

[0207] Step 603: If it is determined that the certificate update conditions are met according to the connection request message, the target device updates the first team certificate.

[0208] It should be noted that if the certificate update conditions are not met, step 603 may not be executed either.

[0209] Step 604: If the user accounts of both are included in the first team certificate, the target device returns a reply message to the user device.

[0210] In this way, the certificate times in the team certificates of both can be compared to avoid non-security issues caused by one end not updating to the latest version of the team certificate but using an old version of the team certificate. After both exchange the information of the team certificates, if the user accounts of both are included in the team certificates of both, it indicates that both have a legal and valid team account sharing relationship (such as a family account sharing relationship), and pass the security authentication. Otherwise, it is determined that the security authentication fails.

[0211] The following combines Figure 7 to specifically describe the method for certificate verification in the above embodiments. Figure 7 It is an interaction diagram of a method for certificate verification. The implementation process of this method includes:

[0212] Step 700: The target device sends a first authentication request including the first temporary public key Pa_t to the user device.

[0213] It should be noted that the target device is correspondingly provided with a first temporary key pair, including: a first temporary public key Pa_t and a first temporary private key Sa_t. The user device is correspondingly provided with a second temporary key pair, including: a second temporary public key Pb_t and a second temporary private key Sb_t.

[0214] Step 701: The user device generates user device encryption information enc_b according to the first temporary public key Pa_t.

[0215] In one implementation, when performing step 701, the following steps can be adopted:

[0216] S7011: The user equipment encrypts the first temporary public key Pa_t and the second temporary private key Sb_t to obtain a key value K.

[0217] Specifically, when determining the key value K, the following formula can be used: K = ECDH(Pa_t, Sb_t).

[0218] Where ECDH is an encryption algorithm, namely the Elliptic Curve Diffie–Hellman key Exchange (ECDH).

[0219] S7012: The user equipment signs according to the first temporary public key Pa_t, the second temporary public key Pb_t, and the second certificate private key Sb_L to obtain the user equipment signature information sign_b.

[0220] It should be noted that the target device is correspondingly provided with a first certificate key pair, including: a first certificate public key Pa_L and a first certificate private key Sa_L. The user equipment is correspondingly provided with a second certificate key pair, including: a second certificate public key Pb_L and a second certificate private key Sb_L.

[0221] Where, when determining the user equipment signature information sign_b, the following formula can be used: sign_b = sign(Pa_t + Pb_t, Sb_L).

[0222] Where sign is a signature algorithm.

[0223] S7013: The user equipment generates user equipment encryption information enc_b according to the user equipment signature information and the key value K.

[0224] In one implementation, when determining the generation of the user equipment encryption information enc_b, the following formula can be used: enc_b = enc(sign_b, K).

[0225] Where enc is an encryption algorithm.

[0226] Step 702: The user equipment returns a first authentication response message to the target device.

[0227] In one implementation, the first authentication response message includes the second temporary public key Pb_t, the second team certificate cert_b, and the user equipment encryption information enc_b.

[0228] Step 703: The target device verifies the second team certificate cert_b.

[0229] In one implementation, when step 703 is executed, the following steps can be adopted:

[0230] S7031: The target device encrypts the second temporary public key Pb_t and the first temporary private key Sa_t to obtain a key value K.

[0231] Specifically, when determining the key value K, the following formula can be used: K = ECDH(Pb_t, Sa_t).

[0232] S7032: The target device verifies the second team certificate according to the secondary certificate.

[0233] In one implementation, the formula verify Sign(Cert2, cert_b) can be used to verify the second team certificate cert_b. For example, the secondary certificate is the Mijia secondary certificate.

[0234] Where verify Sign is the algorithm for certificate verification.

[0235] S7033: If the certificate verification passes, the target device obtains the second certificate public key Pb_L, the second device identifier did_b, and the hash value homeidhash_b of the second team account from the second team certificate cert_b.

[0236] S7034: The target device generates the hash value homeidhash_a of the first team account according to the first team account homeid_a and the second device identifier did_b.

[0237] In one implementation, when determining the hash value homeidhash_a of the first team account, the following formula can be used:

[0238] homeidhash_a = hash(homeid_a, did_b); where hash is a hash algorithm.

[0239] S7035: If homeidhash_a and homeidhash_b match, the target device decrypts the user device encrypted information enc_b according to the key value K to obtain the user device signature information sign_b.

[0240] In one implementation, sign_b = dec(enc_b, K), where dec is the decryption algorithm.

[0241] S7036: The target device verifies the user device signature information sign_b according to the second certificate public key Pb_L.

[0242] In one implementation, verify(sign_b, Pb_L) can be used to verify sign_b.

[0243] If the signature information sign_b of the user device passes the verification, it is determined that the second team certificate passes the verification.

[0244] S7037: If it is determined that the verification passes, the target device signs according to the first temporary public key Pa_t, the second temporary public key Pb_t, and the first certificate private key Sa_L to obtain the target device signature information sign_a.

[0245] Among them, when determining the target device signature information sign_a, the following formula can be used: sign_a = sign(Pa_t + Pb_t, Sa_L).

[0246] S7038: The target device encrypts the target device signature information sign_a according to the key value K to obtain the target device encrypted information enc_a.

[0247] In one implementation, when determining the generation of the target device encrypted information enc_a, the following formula can be used: enc_a = enc(sign_a, K).

[0248] Step 704: The target device sends a second authentication request to the user device, including the target device encrypted information enc_a and the first team certificate cert_a.

[0249] Step 705: The user device performs certificate verification on the first team certificate.

[0250] In one implementation, when performing step 705, the following steps can be used:

[0251] S7051: The user device legally verifies the first team certificate according to the secondary certificate.

[0252] In one implementation, the formula verify Sign(Cert2, cert_a) can be used to verify the first team certificate cert_a.

[0253] S7052: If the certificate verification passes, the user device obtains the first certificate public key Pa_L, the first device identifier did_a, and the hash value homeidhash_a of the first team account from the first team certificate cert_a.

[0254] S7053: The user device generates the hash value homeidhash_b of the second team account according to the second team account homeid_b and the first device identifier did_a.

[0255] Among them, when determining homeidhash_b, the following formula can be used: homeidhash_b = hash(homeid_b, did_a).

[0256] S7054: If homeidhash_a and homeidhash_b match, the user device decrypts the target device encrypted information enc_a according to the key value K to obtain the target device signature information sign_a.

[0257] In one implementation, sign_a = dec(enc_a, K), where dec is the decryption algorithm.

[0258] S7055: The user device verifies the target device signature information sign_a according to the first certificate public key Pa_L.

[0259] In one implementation, verify(sign_a, Pa_L) can be used to verify sign_a. If the target device signature information sign_a passes the verification, it is determined that the first team certificate passes the verification.

[0260] Furthermore, in order to improve security and the accuracy of certificate verification, the following steps can also be used for further authentication:

[0261] Step 706: The user device generates authorization data.

[0262] In one implementation, when performing step 706, the following steps can be used:

[0263] S7061: The user device generates a transmission key according to the key information K.

[0264] In one implementation, when generating the transmission key, the following formula can be used:

[0265] The transmission key session_key = HKDF(K, salt, the first string + the second string);

[0266] Among them, HKDF is the key generation algorithm, salt is the salt value, the first string is generated by the target device, the second string is generated by the user device, and salt, the first string, and the second string can all be randomly generated, can also be fixed values, and can also be set according to the actual application scenario, which is not limited here.

[0267] S7062: The user device generates authorization data according to the transmission key session_key and the second temporary public key Pb_t.

[0268] In one implementation, when generating the authorization data authentication_data, the following formula can be used:

[0269] authentication_data = aes_gcm_and_tag(session_key, K + Pb_t); where aes_gcm_and_tag is an encryption algorithm.

[0270] Step 707: The user device sends the authorization data to the target device.

[0271] Step 708: The target device performs re-verification based on the authorization data.

[0272] In one implementation, when performing Step 708, the following steps can be used:

[0273] S7081: The target device decrypts the authorization data to obtain the decrypted data.

[0274] In one implementation, when obtaining the decrypted data decrypt_data, the following formula can be used:

[0275] decrypt_data = aes_gcm_auth_decrypt(session_key, authentication_data);

[0276] where aes_gcm_auth_decrypt is a decryption algorithm.

[0277] S7082: The target device performs re-verification based on the decrypted data decrypt_data and K + Pb_t.

[0278] In one implementation, if decrypt_data is consistent with K + Pb_t, it is determined that the re-verification is passed.

[0279] In this way, after generating the transmission key session_key, any subsequent transmission data can be encrypted and transmitted through session_key to ensure the security of data transmission.

[0280] The following combines Figure 8 , and gives an example to illustrate the scenario of device sharing connection in the home. Figure 8 It is an example diagram of a scenario of home device sharing connection. Figure 8In this case, a family includes User 1 and User 2. User 1 has logged in to the User 1 account on their mobile phone, tablet, and TV, and User 2 has logged in to the User 2 account on their mobile phone and laptop. Then, for this family, a family account can be created, and a family certificate including this family account, the User 1 account, and the User 2 account can be generated. Further, the device role of each mobile phone is the controller, and the device role of other devices is the controlled device. Then, both User 1 and User 2 can use their respective mobile phones to establish a shared connection with the tablet, TV, and laptop respectively through the family certificate stored on each of them.

[0281] In the embodiment of the present application, a team certificate including the team account and the member accounts of the corresponding team members is generated. Any two member devices in the team can perform device authentication and establish a shared connection through the team certificate, which solves the problem that device shared connections cannot be established between devices logged in with different user accounts, simplifies the cumbersome operations of device shared connections, and improves the applicable scope of device shared connections. Moreover, after the team certificate is verified, a transmission key for secure communication is generated, and the transmission data is encrypted and transmitted through the transmission key. For example, the team certificate and team account between different devices can be encrypted and transmitted according to the transmission key, which improves the security of data transmission. Further, it is also possible to determine whether there is a valid family account relationship between different devices according to the member set and certificate time in the team certificate, avoiding the judgment error problem caused by old version information, and improving the accuracy and security of device shared connections.

[0282] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0283] Based on the same inventive concept, an apparatus for device shared connection is also provided in the embodiment of the present application. Since the principle of solving problems by the above apparatus and device is similar to that of a method for device shared connection, the implementation of the above apparatus can refer to the implementation of the method, and the repeated parts will not be described again. This apparatus can be applied to electronic devices. The present application does not limit the type of electronic devices, and it can be any device type suitable for implementation, such as terminal devices and servers, etc., which will not be described in detail in the present application.

[0284] Refer to Figure 9As shown, it is a structural block diagram of a device sharing connection device in an embodiment of the present application. In some embodiments, the device sharing connection device exemplified in the present application includes: a receiving unit, configured to obtain a first team account of the target device according to the connection request message when responding to a connection request message sent by the target device;

[0285] A matching unit 901, configured to obtain a first device role of the target device if the first team account matches the second team account of the user device;

[0286] An authentication unit 902, configured to send a response message to the target device for device authentication if it is determined that the first device role and the second device role corresponding to the user device meet the role combination condition;

[0287] A connection unit 903, configured to establish a shared connection with the target device if it is determined that the device authentication is passed.

[0288] In one embodiment, the authentication unit 902 is configured to:

[0289] If the first device role includes a controller and the second device role includes a controlled device, it is determined that the role combination condition is met;

[0290] If the first device role includes a controlled device and the second device role includes a controller, it is determined that the role combination condition is met.

[0291] In one embodiment, the first team account is determined according to the first team certificate included in the connection request message; the first team certificate further includes a first certificate time and a first member set; the first member set includes the user accounts of the team members corresponding to the first team account;

[0292] The second team account is determined according to the second team certificate of the user device; the second team certificate further includes a second certificate time and a second member set; the second member set includes the user accounts of the team members corresponding to the second team account.

[0293] In one embodiment, the authentication unit 902 is configured to:

[0294] Perform certificate verification on the first team certificate of the target device;

[0295] If it is determined that the certificate verification is passed, the first certificate time is not later than the second certificate time, and the second member set includes the first user account of the target device and the second user account of the user device, it is determined that the device authentication is passed;

[0296] If it is determined that the certificate verification is passed and the time of the first certificate is later than the time of the second certificate, the second team certificate is updated, and a new second member set is obtained from the updated second team certificate; if the new second member set contains the first user account of the target device and the second user account of the user device, it is determined that the device authentication is passed.

[0297] In one implementation, the authentication unit 902 is further configured to:

[0298] If it is determined that the certificate verification is passed, a transmission key is generated;

[0299] Data is transmitted with the target device through the transmission key.

[0300] In one implementation, the receiving unit is further configured to:

[0301] Send a team account creation request to the server, so that the server generates a second team account based on the team account creation request;

[0302] Receive the second team account returned by the server;

[0303] Send a team invitation notice to the target device, so that the target device sends a team join request to the server and receives the first team account returned by the server based on the second team account.

[0304] In one implementation, the receiving unit is further configured to:

[0305] When it is determined that a team invitation notice is received, send a team join request to the server and receive the second team account returned by the server based on the team join request;

[0306] Alternatively, when it is determined that a team information update notice sent by the server is received, send a team information update request to the server and receive the second team account returned by the server based on the team information update request.

[0307] Refer to Figure 10 As shown in the figure, it is a structural block diagram of another device sharing connection device in an embodiment of the present application. In some implementations, the device sharing connection device exemplified in the present application includes:

[0308] A sending unit, configured to send a connection request message; the connection request message is used to determine the first team account of the target device;

[0309] An authentication unit 1001, configured to perform device authentication on the user device when it is determined that a response message returned by the user device based on the connection request message is received; the response message is sent when it is determined that the first team account matches the second team account of the user device and the first device role of the target device and the second device role of the user device meet the role combination condition;

[0310] A connection unit 1002, configured to establish a shared connection with a target device if it is determined that the device authentication is passed.

[0311] In one implementation, the first team account is determined according to the first team certificate included in the connection request message; the first team certificate further includes a first certificate time and a first member set; the first member set includes user accounts of team members corresponding to the first team account.

[0312] The second team account is determined according to the second team certificate of the user device; the second team certificate further includes a second certificate time and a second member set; the second member set includes user accounts of team members corresponding to the second team account.

[0313] In one implementation, the authentication unit 1001 is configured to:

[0314] Perform certificate verification on the second team certificate of the user device;

[0315] If it is determined that the certificate verification is passed, the first certificate time is not earlier than the second certificate time, and the first member set includes the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed;

[0316] If it is determined that the certificate verification is passed and the first certificate time is earlier than the second certificate time, then update the first team certificate, and obtain a new first member set from the updated first team certificate; if the new first member set includes the first user account of the target device and the second user account of the user device, then it is determined that the device authentication is passed.

[0317] The method for device shared connection in the embodiments of the present application includes, when receiving a connection request message sent by a target device, obtaining the first team account of the target device according to the connection request message; if the first team account matches the second team account of the user device, obtaining the first device role of the target device; if it is determined that the first device role and the second device role correspondingly set by the user device meet the role combination condition, sending a response message to the target device for device authentication; if it is determined that the device authentication is passed, establishing a shared connection with the target device. In this way, device shared connections can be established between different devices with the same team account, solving the problem that device shared connections cannot be established between devices logged in with different user accounts, and improving the applicable range of device shared connections.

[0318] In the embodiments of the present application, an electronic device is provided, including:

[0319] A processor; and

[0320] A memory stores computer instructions for causing a processor to execute the method according to any of the above embodiments.

[0321] In an embodiment of the present application, a storage medium stores computer instructions for causing a computer to execute the method according to any of the above embodiments. Figure 11 The structural schematic diagram of an electronic device 1100 is shown. Refer to Figure 11 As shown, the electronic device 1100 includes a processor 1110 and a memory 1120. Optionally, it may further include a power supply 1130, a display unit 1140, and an input unit 1150.

[0322] The processor 1110 is the control center of the electronic device 1100, sharing connections with various components through various interfaces and lines, and executing various functions of the electronic device 1100 by running or executing software programs and / or data stored in the memory 1120, thereby performing overall monitoring of the electronic device 1100.

[0323] In an embodiment of the present application, when the processor 1110 calls the computer program stored in the memory 1120, it executes each step in the above embodiment.

[0324] Optionally, the processor 1110 may include one or more processing units; preferably, the processor 1110 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, applications, etc., and the modem processor mainly processes wireless communication. It can be understood that the above modem processor may not be integrated into the processor 1110. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be separately implemented on independent chips.

[0325] The memory 1120 may mainly include a program storage area and a data storage area. Among them, the program storage area may store the operating system, various applications, etc.; the data storage area may store data created according to the use of the electronic device 1100, etc. In addition, the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices, etc.

[0326] The electronic device 1100 further includes a power supply 1130 (such as a battery) for supplying power to each component. The power supply may be logically connected to the processor 1110 through a power management system, so as to manage functions such as charging, discharging, and power consumption through the power management system.

[0327] The display unit 1140 can be used to display information input by the user or information provided to the user, as well as various menus of the electronic device 1100. In the embodiments of the present application, it is mainly used to display the display interfaces of various applications in the electronic device 1100 and objects such as text and pictures displayed in the display interfaces. The display unit 1140 may include a display panel 1141. The display panel 1141 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0328] The input unit 1150 can be used to receive information such as numbers or characters input by the user. The input unit 1150 may include a touch panel 1151 and other input devices 1152. Among them, the touch panel 1151, also known as a touch screen, can collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 1151).

[0329] Specifically, the touch panel 1151 can detect the user's touch operation, detect the signals brought by the touch operation, convert these signals into contact coordinates, send them to the processor 1110, and receive and execute the commands sent by the processor 1110. In addition, the touch panel 1151 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. The other input devices 1152 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0330] Of course, the touch panel 1151 can cover the display panel 1141. After the touch panel 1151 detects a touch operation on or near it, it is sent to the processor 1110 to determine the type of touch event. Subsequently, the processor 1110 provides a corresponding visual output on the display panel 1141 according to the type of touch event. Although in Figure 11 the touch panel 1151 and the display panel 1141 are implemented as two independent components to realize the input and output functions of the electronic device 1100, in some embodiments, the touch panel 1151 and the display panel 1141 can be integrated to realize the input and output functions of the electronic device 1100.

[0331] The electronic device 1100 may further include one or more sensors, such as a pressure sensor, a gravitational acceleration sensor, a proximity light sensor, etc. Of course, according to the needs in specific applications, the above-mentioned electronic device 1100 may further include other components such as a camera. Since these components are not the key components used in the embodiments of the present application, therefore, in Figure 11It is not shown in [the figure] and will not be elaborated further.

[0332] Those skilled in the art can understand that Figure 11 [The figure] is merely an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than those shown in the figure, or combine certain components, or different components.

[0333] For the convenience of description, the above parts are divided into respective modules (or units) according to their functions and described separately. Of course, when implementing the present application, the functions of the respective modules (or units) can be implemented in the same or multiple software or hardware.

[0334] Obviously, the above embodiments are merely examples given for clear illustration and are not limitations on the embodiments. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to list all the embodiments here. And the obvious changes or variations derived therefrom are still within the protection scope of the present invention.

Claims

1. A method for sharing and connecting devices, characterized in that, Applied to a user device, the method includes: When a connection request message sent by a target device is received, obtain a first team account of the target device according to the connection request message; If the first team account matches a second team account of the user device, obtain a first device role of the target device; If it is determined that the first device role and a second device role correspondingly set by the user device meet a role combination condition, send a response message to the target device for device authentication; If it is determined that the device authentication is passed, establish a shared connection with the target device.

2. The method according to claim 1, characterized in that, The determination that the first device role and the second device role correspondingly set by the user device meet the role combination condition includes: If the first device role includes a controller and the second device role includes a controlled device, it is determined that the role combination condition is met; If the first device role includes a controlled device and the second device role includes a controller, it is determined that the role combination condition is met.

3. The method according to claim 1, characterized in that, The first team account is determined according to the first team certificate included in the connection request message; the first team certificate further includes a first certificate time and a first member set; the first member set includes user accounts of team members corresponding to the first team account; The second team account is determined according to a second team certificate of the user device; the second team certificate further includes a second certificate time and a second member set; the second member set includes user accounts of team members corresponding to the second team account.

4. The method according to claim 3, characterized in that, The sending the response message to the target device for device authentication includes: Perform certificate verification on the first team certificate of the target device; If it is determined that the certificate verification is passed, the first certificate time is not later than the second certificate time, and the second member set includes a first user account of the target device and a second user account of the user device, it is determined that the device authentication is passed; If it is determined that the certificate verification is passed and the first certificate time is later than the second certificate time, update the second team certificate, and obtain a new second member set from the updated second team certificate; if the new second member set includes the first user account of the target device and the second user account of the user device, it is determined that the device authentication is passed.

5. The method according to claim 4, characterized in that, The method further includes: If it is determined that the certificate verification is passed, generate a transmission key; Transmit data with the target device through the transmission key.

6. The method according to any one of claims 1-5, characterized in that, Before receiving the connection request message sent by the target device, the method further includes: Send a team account creation request to a server, so that the server generates the second team account based on the team account creation request; Receive the second team account returned by the server; Send a team invitation notification to the target device, so that the target device sends a team join request to the server and receives the first team account returned by the server based on the second team account.

7. The method according to any one of claims 1-5, characterized in that, Before receiving the connection request message sent by the target device, the method further includes: When it is determined that a team invitation notification is received, send a team joining request to the server and receive the second team account returned by the server based on the team joining request; Alternatively, when it is determined that a team information update notification sent by the server is received, send a team information update request to the server and receive the second team account returned by the server based on the team information update request.

8. A method for sharing and connecting devices, characterized in that, Applied to a target device, the method includes: Send a connection request message; the connection request message is used to determine the first team account of the target device; When it is determined that a response message returned by the user device based on the connection request message is received, perform device authentication on the user device; the response message is sent when it is determined that the first team account matches the second team account of the user device, and the first device role of the target device and the second device role of the user device meet the role combination conditions; If it is determined that the device authentication is passed, establish a shared connection with the target device.

9. The method according to claim 8, characterized in that, The first team account is determined according to the first team certificate included in the connection request message; the first team certificate further includes a first certificate time and a first member set; the first member set includes the user accounts of the team members corresponding to the first team account; The second team account is determined according to the second team certificate of the user device; the second team certificate further includes a second certificate time and a second member set; the second member set includes the user accounts of the team members corresponding to the second team account.

10. The method according to claim 9, characterized in that,The performing device authentication on the user device includes: Perform certificate verification on the second team certificate of the user device; If it is determined that the certificate verification is passed, the first certificate time is not earlier than the second certificate time, and the first member set includes the first user account of the target device and the second user account of the user device, then determine that the device authentication is passed; If it is determined that the certificate verification is passed and the first certificate time is earlier than the second certificate time, update the first team certificate, and obtain a new first member set from the updated first team certificate; if the new first member set includes the first user account of the target device and the second user account of the user device, then determine that the device authentication is passed.

11. A device sharing connection apparatus, characterized in that, Applied to a user device, the device includes: A receiving unit, configured to, when receiving a connection request message sent by a target device, obtain the first team account of the target device according to the connection request message; A matching unit, configured to, if the first team account matches the second team account of the user device, obtain the first device role of the target device; An authentication unit, configured to, if it is determined that the first device role and the second device role correspondingly set by the user device meet the role combination conditions, send a response message to the target device for device authentication; A connection unit, configured to, if it is determined that the device authentication is passed, establish a shared connection with the target device.

12. A device sharing connection apparatus, characterized in that, Applied to a target device, the device includes: A sending unit, configured to send a connection request message; the connection request message is used to determine a first team account of the target device; An authentication unit, configured to perform device authentication on the user device when determining that a response message returned by the user device based on the connection request message is received; the response message is sent when it is determined that the first team account matches a second team account of the user device, and a first device role of the target device and a second device role of the user device meet a role combination condition; A connection unit, configured to establish a shared connection with the target device if it is determined that the device authentication is passed.

13. An electronic device, characterized in that, Comprising: A processor; And A memory storing computer instructions, the computer instructions being used to cause the processor to execute the method according to any one of claims 1 to 10.

14. A storage medium, characterized in that, Storing computer instructions, the computer instructions being used to cause a computer to execute the method according to any one of claims 1 to 10.