Device connection control method and apparatus, electronic device, and storage medium

By caching device credential sets and their combined versions locally on the device, the problems of low efficiency and insufficient security in multi-device login status verification are solved, achieving efficient and secure device connections.

CN115643574BActive Publication Date: 2025-11-04GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211227770.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-09
Publication Date
2025-11-04
Estimated Expiration
2042-10-09

AI Technical Summary

Technical Problem

When multiple devices log in to the same account, the existing technology has low efficiency and insufficient security in verifying the login status between devices, which affects the user experience.

Method used

By caching the device credential set and a collection version of the credential set locally on the device, local verification of device credentials is achieved, avoiding frequent access to the server and improving verification efficiency and security.

Benefits of technology

It improves the efficiency of device login status verification, ensures the security of device connections, avoids connections with faulty devices, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115643574B_ABST
    Figure CN115643574B_ABST
Patent Text Reader

Abstract

The present disclosure provides a device connection control method, a device connection control apparatus, an electronic device and a computer readable storage medium, relating to the technical field of communication. The device connection control method comprises: obtaining a device credential set corresponding to a logged-in account and a collection version of the device credential set, obtaining cached device credential information, the collection version being determined according to the update of the device credential set; receiving a first device credential and a corresponding first credential version of a first device, the first device credential and the first credential version being obtained when the first device logs in the logged-in account; verifying the validity of the first device credential and the first credential version according to the cached device credential information, and controlling the connection process with the first device according to the verification result. The present disclosure can improve the verification efficiency of the validity of the account login state of the device, and avoid establishing a communication connection with a logged-in device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of communication, in particular to a device connection control method, a device connection control apparatus, an electronic device and a computer readable storage medium. BACKGROUND

[0002] With the rapid development of the communication technical field, devices can communicate through establishing near field connection, when the same account is logged in multiple devices, the devices can share data based on the same account, and the devices need to verify each other's identity when establishing near field connection to avoid information leakage.

[0003] At present, when multiple devices logged in with the same account establish connection, the effectiveness verification of the account login state corresponding to the device has the disadvantages of low efficiency and low security, which affects the user experience. SUMMARY

[0004] The purpose of the present disclosure is to provide a device connection control method, a device connection control apparatus, an electronic device and a computer readable storage medium, thereby at least to some extent improving the verification efficiency of the device login state effectiveness, and avoiding establishing communication connection with the device whose login has been invalidated.

[0005] According to a first aspect of the present disclosure, a device connection control method is provided, comprising: obtaining a device credential set corresponding to a logged-in account and a collection version of the device credential set, to obtain cached device credential information, wherein the collection version is determined according to the update of the device credential set; receiving a first device credential of a first device and a corresponding first credential version, wherein the first device credential and the first credential version are obtained when the first device logs in the logged-in account; verifying the effectiveness of the first device credential and the first credential version according to the cached device credential information, and controlling the connection process with the first device according to the verification result.

[0006] According to a second aspect of the present disclosure, a device connection control method is provided, comprising: determining a device credential of a device and a corresponding credential version in response to the device logging in a logged-in account, and sending the device credential and the credential version to the device; updating a device credential set according to the device credential, and determining a collection version of the device credential set according to the update of the device credential set, wherein the device credential set is generated according to the device credential corresponding to the logged-in account; sending the device credential set and the collection version to the device, so that the device obtains cached device credential information based on the device credential set and the collection version, and controls the connection process between other devices according to the cached device credential information, the device credential and the credential version.

[0007] According to a third aspect of the present disclosure, a device connection control apparatus is provided, comprising: a cache module configured to obtain a device credential set corresponding to a logged-in account and a collection version of the device credential set, to obtain cached device credential information, the collection version being determined according to an update of the device credential set; a receiving module configured to receive a first device credential of a first device and a corresponding first credential version, the first device credential and the first credential version being obtained when the first device logs in the logged-in account; a verifying module configured to verify validity of the first device credential and the first credential version according to the cached device credential information, and to control a connection process with the first device according to a verification result.

[0008] According to a fourth aspect of the present disclosure, a device connection control apparatus is provided, comprising: a credential determining module configured to determine a device credential of a device and a corresponding credential version in response to the device logging in a logged-in account, and to send the device credential and the credential version to the device; an updating module configured to update a device credential set according to the device credential, and to determine a collection version of the device credential set according to an update of the device credential set, the device credential set being generated according to device credentials corresponding to the logged-in account; and a sending module configured to send the device credential set and the collection version to the device, to enable the device to obtain cached device credential information based on the device credential set and the collection version, and to control a connection process with other devices according to the cached device credential information, the device credential and the credential version.

[0009] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory storing one or more programs, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method described above.

[0010] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, having stored thereon a computer program, the computer program being executed by a processor to implement the method described above.

[0011] In the technical solutions provided by some embodiments of the present disclosure, on one hand, the current device caches the device credential set corresponding to the logged-in account and the collection version of the device credential set, obtaining cached device credential information, which avoids accessing the server in the process of establishing a connection with the first device, and the cached device credential information can be used to verify the login state of the first device, improving the efficiency of login state verification and the effect of establishing a connection. Even if the current device has no wireless network or data traffic, the login state of the first device can still be verified, the method has high availability, and the user experience is good. On the other hand, the first device credential and the second credential version are verified according to the cached device credential information. If the login state of the first device changes, the device credential set corresponding to the logged-in account and the collection version change accordingly, the current device can learn the login state of the first device in time, and the current device can be prevented from connecting to the device whose login has failed, information leakage is avoided, and the security of device connection is improved.

[0012] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0013] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained from these drawings without creative labor for those skilled in the art. In the drawings:

[0014] Figure 1 A schematic diagram of an application scenario related to a device connection control method of an embodiment of the present disclosure is shown;

[0015] Figure 2 A flowchart of a device connection control method in an exemplary embodiment of the present disclosure is schematically shown;

[0016] Figure 3 A stage diagram related to a device connection control method in an exemplary embodiment of the present disclosure is schematically shown, which verifies the validity of the first device credential and the first credential version according to the cached device credential information, and controls the connection process with the first device according to the verification result;

[0017] Figure 4 A complete flowchart of a device connection control method in an exemplary embodiment of the present disclosure is schematically shown;

[0018] Figure 5 A schematic diagram of feeding back that the login of the first device has failed in an exemplary embodiment of the present disclosure is schematically shown;

[0019] Figure 6A flowchart illustrating another device connection control method in an exemplary embodiment of this disclosure is shown schematically.

[0020] Figure 7 This schematic diagram illustrates the composition of a device connection control apparatus according to an exemplary embodiment of the present disclosure;

[0021] Figure 8 This schematic diagram illustrates the composition of another device connection control device in an exemplary embodiment of the present disclosure;

[0022] Figure 9 A schematic diagram of an electronic device to which embodiments of the present disclosure may be applied is shown. Detailed Implementation

[0023] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0024] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0025] Figure 1 A schematic diagram of an application scenario involving the device connection control method according to an embodiment of the present disclosure is shown.

[0026] like Figure 1 As shown, the first device 101 and the second device 102 are terminal devices with wireless communication capabilities, such as smartphones, computers, tablets, smartwatches, monitoring equipment, wearable devices, etc. The same account can be logged into both the first device 101 and the second device simultaneously. This same account can be any type of application service account, without any special restrictions.

[0027] When the device (the first device 101 or the second device 102) logs in the account, the server 103 issues a device credential and a corresponding credential version to the device, and the server 103 generates a device credential set and a corresponding set version according to the device credential of the device logging in the account. The device can synchronize the device credential set and the set version from the server 103, for verifying the login state between the interconnected devices.

[0028] When the same account is logged in on the first device 101 and the second device 102 at the same time, the identity of each other needs to be confirmed when establishing a connection between the first device 101 and the second device 102, that is, the device connection control method based on the embodiments of the present disclosure verifies whether the device credentials (account login state) of each other are valid, and the connection is established only when both parties have completed the verification, and the account-related data or device data are shared based on the connection.

[0029] The first device 101 and the second device 102 can establish a near-field connection, such as a Bluetooth connection, a WIFI connection, etc., without special restrictions. It should be noted that, Figure 1 The number of devices shown is exemplary, and the embodiments of the present disclosure do not have special restrictions on the number of devices establishing a connection. The server 103 can also be referred to as a cloud, a server, which can be a separately deployed server, or a cluster composed of multiple devices.

[0030] In the related art, the device is usually issued a device credential by the server when logging in an account, and when different devices logged in with the same account establish a connection, the validity of the device credential of the other party needs to be verified first, the device credential is verified whether it is issued by a trusted server, and the credential is verified whether it is tampered with, and the operation permission is determined after the above verification is completed, and the connection is established.

[0031] However, when the account of a certain device is in a logout state, it may establish a connection with a device that has logged out, which has the risk of information leakage; and when establishing a connection, the server needs to be accessed in real time to determine whether the credential presented by the device is valid. However, if the server is accessed in real time every time a connection is established to verify the validity of the credential of the other party, the connection time is affected, and in the absence of wireless networks or data traffic, it is not feasible, affecting the user experience.

[0032] Based on one or more of the above problems, the present example embodiment provides a device connection control method applied to a second device logged in with an application service account. It should be noted that since both parties of the connection need to verify the validity of the device credential, the second device controls the connection process with the first device based on the method of the embodiments of the present disclosure, and accordingly, the first device also controls the connection process with the second device based on the method of the embodiments of the present disclosure. The following describes the control of the connection process between the second device and the first device based on the method of the embodiments of the present disclosure.

[0033] Reference Figure 2 As shown in the device connection control method can include the following steps S210 to S230:

[0034] In step S210, the set of device credentials corresponding to the logged-in account and the collection version of the set of device credentials are obtained, and the cached device credential information is obtained, and the collection version is determined according to the update of the set of device credentials.

[0035] In an exemplary embodiment of the present disclosure, the logged-in account refers to an account that has been logged in on both the first device and the second device. When the first device and the second device establish a connection, the first device and the second device may still be logged in the logged-in account or may be in a logged-out state. The device credentials in the set of device credentials are credential information issued by the server for uniquely identifying the device to obtain server login approval when the device is logged in the logged-in account. The device credentials can include device public keys and other credential contents, which are not specially limited.

[0036] The device credentials corresponding to the device logged in the logged-in account form the set of device credentials. The collection version of the set of device credentials is determined according to the update of the set of device credentials. When a new device credential is added to the set of device credentials, the collection version of the set of device credentials is updated. When a device credential is deleted from the set of device credentials, the collection version of the set of device credentials is also updated. That is, when the login state of the account of the device changes, the collection version of the set of device credentials is updated.

[0037] The cached device credential information includes the set of device credentials corresponding to the logged-in account and the collection version of the set of device credentials cached locally by the second device. The second device periodically obtains the set of device credentials corresponding to the logged-in account and the collection version of the set of device credentials from the server to cache the latest cached device credential information locally.

[0038] As shown in Table 1, the cached device credential information cached locally by the second device is shown. As shown in Table 1, the set of device credentials obtained from the cached device credential information includes device credential A (device credential of the second device), device credential B, device credential C, and device credential D, and the collection version of the cached set of device credentials is 3.

[0039] Table 1

[0040]

[0041] It is worth noting that the collection version is determined according to the update of the device credential set, that is, the collection version is updated by the server according to the update of the device credential set corresponding to the logged-in account on the server. The collection version in the cached device credential information cached by the second device locally is fixed and unchanged before the second device updates the cached device credential information locally according to the device credential set and the collection version of the server.

[0042] In some possible embodiments, when the second device obtains the device credential set and the collection version of the device credential set of the logged-in account from the server again, the login state of the device logging in the logged-in account may change, such as logging out, having no active track for a long time, or having a newly added device logging in the logged-in account, and the device credential set may have an added or deleted device credential. Therefore, the second device can cache the latest device credential set and the collection version, so that the second device can immediately know the login state of the account of each device.

[0043] Through the example embodiment, the second device caches the cached device credential information locally, so that when the connection with the first device is established, the login state of the account of the first device can be verified without immediately accessing the server, and the connection efficiency is improved.

[0044] In step S220, the first device credential of the first device and the corresponding first credential version are received, and the first device credential and the first credential version are obtained when the first device logs in the logged-in account.

[0045] In the example embodiment of the present disclosure, the first device credential of the first device and the corresponding first credential version are obtained. Correspondingly, the second device sends the second device credential of the second device and the corresponding second credential version to the first device, and the second device credential and the second credential version are obtained when the second device logs in the logged-in account.

[0046] The first credential version is determined according to the collection version of the device credential set in the server after the first device logs in the logged-in account. For example, the collection version of the device credential set in the server is 3 before the first device logs in the logged-in account, the first credential version is obtained after the first device logs in the logged-in account, the first credential version is added to the device credential set in the server, the collection version of the device credential set is updated, for example, to 4, and the first credential version of the first device is the updated collection version, that is, the first credential version is 4.

[0047] The first device credential and the corresponding first credential version are issued by the server after the first device completes logging in the logged-in account. Of course, the second device also obtains the second device credential and the second credential version issued by the server when logging in the logged-in account, which will not be described here.

[0048] When the first device establishes a connection with the second device, the second device obtains the first device credential and the corresponding first credential version of the first device for verifying the login status of the account of the first device.

[0049] In step S230, the validity of the first device credential and the first credential version is verified according to the cached device credential information, and the connection process with the first device is controlled according to the verification result.

[0050] In the exemplary embodiments of the present disclosure, the second device can directly verify the validity of the first device credential and the first credential version according to the locally cached cached device credential information, to control the connection process with the first device according to the verification result.

[0051] When the verification result reflects that the first device credential or the first credential version is valid, it indicates that the current login status of the account of the first device is still valid, and the second device continues to perform the connection process with the first device, otherwise the second device refuses to establish a connection with the first device.

[0052] In some possible embodiments, the cached device credential information is obtained by the second device according to the device credential set and the set version of the logged-in account of the server, and if the login status of the account of the first device has changed, the cached device credential information can not update the latest device credential set and set version in the server to the local in time, and then the validity of the first device credential of the first device can be determined by comparing the set version in the cached device credential information with the first credential version of the first device.

[0053] The change of the login status of the account of the first device includes but is not limited to the user logging out of the logged-in account on the first device, the user not accessing the service corresponding to the logged-in account on the first device for more than a preset time, and the like, and no special limitation is made to this, and if the first device exits the login state, the device credential of the first device is deleted from the device credential set of the server.

[0054] By the device connection control method of the exemplary embodiments of the present disclosure, the current device caches the device credential set corresponding to the logged-in account and the collection version of the device credential set, obtains the cached device credential information, avoids accessing the server in the process of establishing connection with the first device, and uses the locally cached cached device credential information to verify the login status of the first device, thereby improving the login status verification efficiency. Even if the current device has no wireless network or data flow, the login status of the first device can still be verified, the method has high availability, and the user experience is good. According to the cached device credential information, the first device credential and the second credential version are verified. If the login status of the first device changes, the device credential set corresponding to the logged-in account and the collection version change accordingly, the current device can learn the login status of the first device in time, and the current device can be connected to the device whose login has failed, thereby avoiding information leakage and improving the security of device connection.

[0055] In an exemplary embodiment, verifying the validity of the first device credential and the first credential version according to the cached device credential information, and controlling the connection process with the first device according to the verification result can include steps S310 to S330:

[0056] Step S310: Verify the validity of the first device credential using the device credential set.

[0057] The embodiments of the present disclosure can verify the validity of the first device credential of the first device according to the locally cached device credential set. The first device credential can be compared with the device credential set to determine whether the first device credential is included in the device credential set.

[0058] In some possible embodiments, if the first device accesses the server after the second device obtains the cached device credential information, the first device credential of the first device does not exist in the device credential set in the cached device credential information of the second device.

[0059] In some possible embodiments, if the first device has accessed the server before the second device obtains the cached device credential information, but the first device has not accessed the service corresponding to the logged-in account for more than a preset time, the server has deleted the first device credential of the first device from the device credential set, and the first device credential of the first device does not exist in the device credential set in the cached device credential information obtained by the second device.

[0060] In some possible embodiments, if the first device has accessed the server before the second device obtains the cached device credential information, and has accessed the service corresponding to the logged-in account within a preset time, the first device credential of the first device exists in the device credential set in the cached device credential information obtained by the second device.

[0061] Verifying validity of the first device credential by using the locally cached device credential set can include determining that the first device credential is valid in response to the first device credential being included in the device credential set, i.e., when the first device credential is included in the device credential set, it is determined that the first device credential is valid.

[0062] Step S320: Verify validity of the first credential version according to the set version.

[0063] The embodiments of the present disclosure can compare the set version locally cached by the second device with the first credential version of the first device. Since the set version is updated according to the update of the device credential set on the server side, if the device corresponding to the logged-in account exits the login state, the set version is updated, but the second device can include two cases:

[0064] Case one: the second device has updated the latest set version locally when verifying the login state of the account of the first device;

[0065] Case two: the second device has not updated the latest set version locally when verifying the login state of the account of the first device.

[0066] Based on the above two cases, the set version locally cached by the second device can be compared with the first credential version of the first device to determine whether the first credential version is valid.

[0067] In an exemplary embodiment, the first credential version is determined according to the set version of the device credential set after the first device logs in the logged-in account, which can be referred to step S220 and will not be described here. Based on this, if the first device credential is determined to be invalid by the device credential set, the validity of the first credential version can be further verified according to the locally cached set version.

[0068] Step S330: Control the connection process with the first device based on the obtained verification result.

[0069] If the locally cached device credential set includes the first device credential, it is determined that the first device credential is valid, and it is determined that the first device credential is trusted, and the connection process with the first device is controlled to continue.

[0070] When the first device credential is determined to be invalid by the device credential set, i.e., the first device credential is not included in the device credential set, in response to the first credential version being greater than the set version, the connection process with the first device is controlled to continue. Since the first credential version is greater than the set version, it means that the time when the first device accesses the server is later than the time when the second device accesses the server, and the device credential set of the server is not synchronized in time in the device credential set locally cached by the second device. In this case, if the first device credential has obtained the trusted feedback of the server, it is determined that the first device credential is trusted, and the connection process with the first device is controlled to continue.

[0071] In some possible embodiments, in response to the first credential version being greater than the set version control, the first device continues to perform the connection process, and the cached device credential information can also be updated according to the first device credential and the first credential version, so that the updating of the cached device credential information can be completed autonomously locally, the number of interactions with the server is reduced, and the accuracy of the cached device credential information is improved.

[0072] In some possible embodiments, if the first device credential is verified as invalid by the device credential set, and the first credential version is less than or equal to the set version, the connection process with the first device is stopped. Since the first credential version is less than or equal to the set version, it indicates that the first device accesses the server earlier than the second device, but the first device credential is not included in the cached device credential set obtained by the second device, which indicates that the first device credential is an invalid credential, and the second device stops performing the connection process with the first device.

[0073] The first device can be indirectly logged out, for example, the user logs out on a webpage, or the user does not access the logged-in account corresponding service on the first device for more than a preset time length, and the server has deleted the first device credential from the device credential set. At this time, when the first device establishes a connection with the second device, the first device credential is invalid.

[0074] In the embodiments of the present disclosure, when the first device credential is not included in the locally cached device credential set, the locally cached set version is further compared with the first credential version of the first device. The comparison result can determine the order in which the first device and the second device access the server, so as to determine whether the first device credential of the first device is invalid in combination with the order and the locally cached device credential set. Since when the login state of the same account device changes, as long as any device that attempts to interconnect synchronizes the device credential set corresponding to the logged-in account and the corresponding set version with the server, the connection with the logged-in invalid device can be avoided, information leakage can be avoided, and the security of device connection can be improved.

[0075] In an example embodiment, the device credential set corresponding to the logged-in account and the set version of the device credential set can also be periodically obtained from the server according to a predetermined period, to update the cached device credential information. The device credential set in the server is updated according to the device credential corresponding to the logged-in account.

[0076] Since any device logs in the logged-in account, the server determines the device credential and the corresponding credential version of the device in response to the device logging in the logged-in account, and sends the device credential and the credential version to the device, and updates the device credential set according to the device credential, and determines the collection version of the device credential set according to the update of the device credential set, which is generated according to the device credential corresponding to the logged-in account.

[0077] It can be seen from step S220 that the server maintains a device credential set and a corresponding collection version for the logged-in account. The device credential set in the server is updated according to the login state of the logged-in account on the device, and the collection version of the device credential set in the server is monotonically increased according to the update of the device credential set in the server. Therefore, for any device (first device, second device), the device credential set and the corresponding collection version of the server can be synchronized periodically, and the account login state of the device corresponding to the logged-in account can be learned in time, so as to verify the account login state of the interconnected device.

[0078] Among them, the device credential of the device corresponding to the logged-in account in the exit login state does not exist in the device credential set in the server. The collection version of the device credential set in the server is monotonically increased according to the update of the device credential set in the server, which means that whether the device credential is added in the device credential set corresponding to the logged-in state (that is, there is a new device logging in the logged-in account), or the device credential is deleted in the device credential set corresponding to the logged-in state (that is, there is a device corresponding to the logged-in account exiting login), the collection version of the device credential set is updated in an increasing manner.

[0079] In an exemplary embodiment, since the two parties of interconnection need to complete mutual authentication before finally establishing connection, the second device can also send its own second device credential and corresponding second credential version to the first device, and establish a communication connection with the second device through the first device based on the validity verification of the cached device credential information of the first device in response to the second device credential and the second credential version.

[0080] Among them, the second device credential and the second credential version are obtained when logging in the logged-in account, and the verification process of the first device by the second device is similar to the above process of the second device verifying the first device, that is, the above method of the second device verifying the first device is applicable to the verification of the account login state of the two parties of any interconnected device to each other, which will not be described here.

[0081] Figure 4 The complete flowchart of the device connection control method of the embodiment of the present disclosure is shown, and the device connection control method of the embodiment of the present disclosure will be described below with reference to Figure 4 The device connection control method of the embodiment of the present disclosure is described.

[0082] Step S410: The server maintains the device credential set of the account A and the corresponding set version.

[0083] Step S420: The user logs in the account A on the first device, the server determines the first device credential of the first device and the corresponding first credential version, and sends the first device credential and the first credential version to the first device.

[0084] The server updates the device credential set according to the first device credential, and updates the set version of the device credential set according to the update of the updated device credential set, such as increasing the version number by 1. The first credential version is the set version of the updated device credential set.

[0085] Step S430: The user logs in the account A on the second device, the server determines the second device credential of the second device and the corresponding second credential version, and sends the second device credential and the second credential version to the second device.

[0086] The server updates the device credential set according to the second device credential, and updates the set version of the device credential set according to the update of the updated device credential set, such as increasing the version number by 1. The second credential version is the set version of the updated device credential set.

[0087] It is worth noting that the execution order of step S420 and step S430 is not specially limited, that is, the server maintains the device credential set and the set version of the account A.

[0088] Step S440: The first device and the second device periodically synchronize the device credential set and the set version of the account A from the server according to the set period, and obtain the respective cached device credential information locally.

[0089] Among them, the first device and the second device can update according to the same period, or can be different, which can be set according to actual needs, and no special limitation is made.

[0090] Step S450: The first device and the second device establish a near field connection, and the second device verifies the first device credential and the first credential version of the first device according to the cached device credential information cached locally.

[0091] Among them, the second device uses the local device credential set to verify the validity of the first device credential, and verifies the validity of the first credential version according to the set version, so as to control whether to continue the connection process with the first device based on the obtained verification result. Please refer to steps S310 to S330, which will not be described here.

[0092] Step S460: The first device verifies the second device credential and the second credential version of the second device according to the cached device credential information cached locally.

[0093] The first device verifies validity of the second device credential by using the local device credential set, and verifies validity of the second credential version according to the set version, to control whether to continue the connection process with the second device based on the obtained verification result. For details, refer to steps S310 to S330, which are not described herein again.

[0094] It should be noted that steps S450 and S460 can be simultaneous mutual verification of the devices, and the sequence of steps S450 and S460 is not limited. Step S470: If the first device and the second device both pass the validity verification of each other, a communication connection between the first device and the second device is established.

[0095] Step S480: If any of the first device and the second device fails to pass the verification of the opposite device, the first device and the second device stop establishing the connection. The user can be fed back the feedback prompt of the failed connection establishment and the invalid login by a visual way, such as Figure 5 , which can prompt the user that “the account login of the first device has been invalid”.

[0096] It should be noted that the device connection control method of the embodiments of the present disclosure further includes a conventional verification process of verifying whether the device credential is issued by a trusted service end, and the like, which will not be listed one by one.

[0097] As known from the above, the device connection control method of the embodiments of the present disclosure can solve the problem of different login states of multiple devices in near field connection. By adding the credential version in the device credential issued to the device by the service end, the service end maintains the device credential set and the set version corresponding to the account, and the device synchronizes the device credential set and the set version corresponding to the account from the service end, the login state of the opposite device can be determined without accessing the service end in real time. After the login state of the device corresponding to the account changes, as long as any one end trying to interconnect and the service end complete synchronization, the connection with the device whose login has been invalid can be avoided, information leakage can be avoided, and the security of device connection can be improved.

[0098] In the exemplary embodiments of the present disclosure, a device connection control method is also provided, which applies to a service end, as shown in Figure 6 , the method can include steps S610 to S630:

[0099] Step S610: In response to the device logging in the logged-in account, determining the device credential of the device and the corresponding credential version, and sending the device credential and the credential version to the device;

[0100] Step S620: Updating the device credential set according to the device credential, and determining the set version of the device credential set according to the update of the device credential set, the device credential set being generated according to the device credential corresponding to the logged-in account;

[0101] Step S630: sending the device credential set and the set version to the device, so that the device obtains the cached device credential information based on the device credential set and the set version, to control the connection process with other devices according to the cached device credential information, the device credential and the credential version.

[0102] In an example embodiment, if there is a logged-in account in the target device in a logout state, the device credential corresponding to the target device is deleted from the device credential set, and the set version is updated.

[0103] The specific details of the device connection control method applied to the server have been described in the method part of the embodiment, and the undisclosed details can be referred to the embodiment of the method part, and thus will not be described again.

[0104] It should be noted that the above-described figures are only schematic illustrations of the processes included in the method according to the example embodiments of the present disclosure, and are not for limiting purposes. It is easy to understand that the processes shown in the above-described figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.

[0105] Further, referring to Figure 7 According to the example embodiments of the present disclosure, a device connection control apparatus 700 is provided, which includes a caching module 710, a receiving module 720 and a verification module 730.

[0106] Among them:

[0107] The caching module 710 is configured to obtain a device credential set corresponding to a logged-in account and a set version of the device credential set, to obtain cached device credential information, and the set version is determined according to the update of the device credential set;

[0108] The receiving module 720 is configured to receive a first device credential and a corresponding first credential version of a first device, and the first device credential and the first credential version are obtained when the first device logs in the logged-in account.

[0109] The verification module 730 is configured to verify the validity of the first device credential and the first credential version according to the cached device credential information, and control the connection process with the first device according to the verification result.

[0110] In an example embodiment, the verification module 730 is configured to verify the validity of the first device credential by using the device credential set, to verify the validity of the first credential version according to the set version, and to control the connection process with the first device based on the obtained verification result.

[0111] In an example embodiment, the verification module 730 is configured to determine that the first device credential is valid in response to the first device credential being included in the device credential set.

[0112] In an example embodiment, the verification module 730 is configured to control the first device to continue the connection process if the first device credential is valid.

[0113] In an example embodiment, the first credential version is determined according to a collection version of the device credential set after the first device logs in the logged-in account; the verification module 730 is configured to control the first device to continue the connection process in response to the first credential version being greater than the collection version if the first device credential is determined to be invalid by the device credential set; and stop the first device from performing the connection process if the first credential version is less than or equal to the collection version.

[0114] In an example embodiment, the apparatus further includes an updating module configured to update the cached device credential information according to the first device credential and the first credential version.

[0115] In an example embodiment, the caching module 710 is configured to periodically obtain the device credential set corresponding to the logged-in account and the collection version of the device credential set from the server at a predetermined period for updating the cached device credential information; wherein the device credential set in the server is updated according to the device credential corresponding to the device logging in the logged-in account.

[0116] In an example embodiment, the device credential set in the server is updated according to the login state of the logged-in account on the device, and the collection version of the device credential set in the server is monotonically increased according to the update of the device credential set in the server; wherein the device credential of the device corresponding to the logout state of the logged-in account does not exist in the device credential set in the server.

[0117] In an example embodiment, the apparatus further includes:

[0118] The sending module is configured to send the second device credential and the corresponding second credential version of the first device to the first device, the second device credential and the second credential version being obtained when logging in the logged-in account; and the connection establishment module is configured to establish a communication connection between the second device and the first device in response to the second device credential and the second credential version passing the validity verification of the first device based on the cached device credential information of the first device.

[0119] The specific details of the modules in the apparatus have been described in detail in the method part embodiments, and the undisclosed details can be referred to the method part embodiments, and thus will not be described again.

[0120] Reference Figure 8As shown, an exemplary embodiment of this disclosure provides a device connection control apparatus 800, including a credential determination module 810, an update module 820, and a sending module 830. Wherein:

[0121] The credential determination module 810 is used to determine the device credential and the corresponding credential version of the device in response to the logged-in account of the device login, and send the device credential and credential version to the device;

[0122] The update module 820 is used to update the device credential set based on the device credentials, and to determine the set version of the device credential set based on the update status of the device credential set. The device credential set is generated based on the device credentials corresponding to the logged-in account.

[0123] The sending module 830 is used to send a device credential set and a set version to the device so that the device can obtain cached device credential information based on the device credential set and set version, and control the connection process with other devices according to the cached device credential information, device credential and credential version.

[0124] In one exemplary embodiment, the update module is further configured to: if a logged-in account is in an logged-out state on the target device, delete the device credential corresponding to the target device in the device credential set and update the set version.

[0125] The specific details of each module in the above-mentioned device have been described in detail in the method section of the implementation. For any undisclosed details, please refer to the implementation content of the method section, and therefore will not be repeated here.

[0126] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0127] An exemplary embodiment of this disclosure also provides an electronic device for the above-described method. This electronic device may be the aforementioned imaging device or a server. Generally, the electronic device includes at least a processor and a memory, the memory for storing executable instructions of the processor, and the processor configured to perform the above-described method by executing the executable instructions.

[0128] The following is based on Figure 9 Taking a mobile terminal 900 as an example, the construction of the electronic device in this disclosure embodiment will be described by way of example. Those skilled in the art will understand that, apart from components specifically designed for mobile purposes, Figure 9The configuration in the foregoing embodiments can also be applied to a fixed type device. In other embodiments, the mobile terminal 900 can include more or less components than shown, or combine certain components, or split the same, or have different arrangements of the components. The components shown can be implemented in hardware, software, or a combination of both hardware and software. The interface connections between the components are shown by lines for ease of drawing, and do not constitute a limitation on the structure of the mobile terminal 900. In other embodiments, the mobile terminal can also have different interface connections between the components, or a combination of multiple interface connections. Figure 9

[0129] As shown in FIG. 9, the mobile terminal 900 can specifically include a processor 901, a memory 902, a bus 903, a mobile communication module 904, an antenna 1, a wireless communication module 905, an antenna 2, a display screen 906, a camera module 907, an audio module 908, a power module 909, a sensor module 910, and a photovoltaic sensor module 911. Figure 9

[0130] The processor 901 can include one or more processing units, for example, the processor 901 can include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or a NPU (Neural-Network Processing Unit), etc.

[0131] An encoder can encode (i.e., compress) an image or video to reduce data size for storage or transmission. A decoder can decode (i.e., decompress) encoded data of an image or video to restore the image or video data. The mobile terminal 900 can support one or more encoders and decoders.

[0132] The processor 901 can form a connection with the memory 902 or other components through the bus 903.

[0133] The memory 902 can be used to store computer executable program codes, which include instructions. The processor 901 executes various functional applications and data processing of the mobile terminal 900 by running the instructions stored in the memory 902. The memory 902 can also store application data, such as cache device credential information, etc.

[0134] ​​The communication function of the mobile terminal 900 can be implemented by the mobile communication module 904, the antenna 1, the wireless communication module 905, the antenna 2, the modem processor, and the baseband processor, etc. The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. The mobile communication module 904 can provide a mobile communication solution applied to the mobile terminal 900, such as 3G, 4G, 5G, etc. The wireless communication module 905 can provide a wireless communication solution applied to the mobile terminal 900, such as wireless local area network, Bluetooth, near field communication, etc.

[0135] The display screen 906 is used to realize the display function, such as displaying the user interface, image, video, etc., and displaying the abnormal prompt information. The camera module 907 is used to realize the shooting function, such as shooting the image, video, etc., to collect the scene image. The audio module 908 is used to realize the audio function, such as playing the audio, collecting the voice, etc. The power module 909 is used to realize the power management function, such as charging the battery, powering the device, monitoring the battery state, etc. The sensor module 910 can include one or more sensors, which are used to realize the corresponding sensing detection function.

[0136] In addition, the exemplary embodiments of the present disclosure also provide a computer readable storage medium, which has a program product stored thereon, and the program product can realize the above-mentioned method of the present disclosure. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing the terminal device to execute the steps described in the above-mentioned “exemplary method” section according to various exemplary embodiments of the present disclosure when the program product is run on the terminal device.

[0137] It should be noted that the computer readable medium shown in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the above two. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0138] In this disclosure, a computer readable storage medium can be any tangible medium that can contain, or store computer readable program codes. In this disclosure, a computer readable signal medium can include a data signal traveling in baseband or traveling as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. Computer readable program code can be any suitable set of instructions implemented by any suitable code of any suitable language of any suitable action number that cause a system having a processor to perform a function. A computer readable medium can be any medium, that can be read and accessed directly by a machine. Such media can include, but is not limited to, memory cards, memory sticks, portable flash drives, RAM, ROM, and the like. Such media can also include, but not be limited to, storage devices including, but not limited to, hard drives, solid state drives, portable and non-portable media, and storage arrays. Such media can also include, but not be limited to, any medium that can store instructions for execution by a machine. Computer program code, when created, can include expressions using terms such as "library" in the programming language that the computer program code is written.

[0139] Also, program code implementing the operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).

[0140] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the present disclosure cover any and all variations of the disclosure including, but not limited to, variations of the disclosure comprising any of the additional or alternative steps (and / or steps performed in alternative orders). It is intended that the present disclosure cover any and all variations of the disclosure including, but not limited to, variations of the disclosure comprising any of the additional or alternative steps (and / or steps performed in alternative orders). It is intended that the present disclosure cover any and all variations of the disclosure including, but not limited to, variations of the disclosure comprising any of the additional or alternative steps (and / or steps performed in alternative orders). It is intended that the present disclosure cover any and all variations of the disclosure including, but not limited to, variations of the disclosure comprising any of the additional or alternative steps (and / or steps performed in alternative orders). The specification and examples given are intended as illustrative only and not restrictive of the true scope and spirit of the present disclosure.

Claims

1. A device connection control method characterized by comprising: The application is applied to a second device, comprising: Obtaining a device credential set corresponding to a logged-in account and a collection version of the device credential set, obtaining cached device credential information, wherein the collection version is determined according to the update of the device credential set; Receiving a first device credential and a corresponding first credential version of a first device, wherein the first device credential and the first credential version are obtained when the first device logs in the logged-in account; the logged-in account is an account that has been logged in on both the first device and the second device; the first credential version is determined according to the collection version of the device credential set after the first device logs in the logged-in account; Verifying the validity of the first device credential and the first credential version according to the cached device credential information, and controlling the connection process with the first device according to the verification result; Wherein, the verification of the validity of the first device credential and the first credential version according to the cached device credential information, and the control of the connection process with the first device according to the verification result, comprises: Verifying the validity of the first device credential by using the device credential set; If the first device credential is verified as invalid by using the device credential set, verifying the validity of the first credential version according to the collection version; In response to the first credential version being greater than the collection version, controlling the first device to continue the connection process; if the first credential version is less than or equal to the collection version, stopping the connection process with the first device.

2. The method of claim 1, wherein, The verification of the validity of the first device credential by using the device credential set comprises: In response to the first device credential being included in the device credential set, determining that the first device credential is valid.

3. The method of claim 2, wherein, The control of the connection process with the first device according to the verification result comprises: If the first device credential is valid, controlling the first device to continue the connection process.

4. The method of claim 1, wherein, The control of the first device to continue the connection process in response to the first credential version being greater than the collection version further comprises: Updating the cached device credential information according to the first device credential and the first credential version.

5. The method of claim 1, wherein, The obtaining of the device credential set corresponding to the logged-in account and the collection version of the device credential set to obtain the cached device credential information comprises: Periodically obtaining the device credential set corresponding to the logged-in account and the collection version of the device credential set from the server according to a predetermined period, for updating the cached device credential information; Wherein, the device credential set in the server is updated according to the device credential corresponding to the device that logs in the logged-in account.

6. The method of claim 5, wherein, The device credential set in the server is updated according to the login state of the logged-in account on the device, and the collection version of the device credential set in the server is monotonically increased according to the update of the device credential set in the server; Wherein, the device credential of the device corresponding to the exit login state does not exist in the device credential set in the server.

7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: The second device sends its own second device credential and corresponding second credential version to the first device, the second device credential and the second credential version being obtained when logging in the logged-in account; In response to the second device credential and the second credential version, the first device verifies the validity of the cached device credential information based on the first device, and establishes a communication connection with the second device.

8. A device connection control method characterized by comprising: Applied to a server, comprising: In response to a device logging in a logged-in account, determining a device credential and a corresponding credential version of the device, and sending the device credential and the credential version to the device; According to the device credential, updating a device credential set, and determining a collection version of the device credential set according to the update of the device credential set, the device credential set being generated according to the device credential corresponding to the logged-in account; the logged-in account being an account that has logged in the device; the credential version being determined according to the collection version of the device credential set after the device logs in the logged-in account; The device credential set and the collection version are sent to the device, so that the device obtains cached device credential information based on the device credential set and the collection version, and controls the connection process with other devices according to the cached device credential information, the device credential and the credential version; The device controls the connection process with other devices, including: Verifying the validity of the first device credential of the first device using the device credential set; If the first device credential is invalid by verifying the first device credential using the device credential set, verifying the validity of the first credential version of the first device according to the collection version; In response to the first credential version being greater than the collection version, controlling the first device to continue the connection process; if the first credential version is less than or equal to the collection version, stopping the connection process with the first device.

9. The method of claim 8, wherein, The method further comprises: If there is a logged-in account in the target device in the logged-out state, deleting the device credential corresponding to the target device in the device credential set, and updating the collection version.

10. An apparatus connection control device, characterized by comprising: Applied to a second device, comprising: A caching module for obtaining a device credential set corresponding to a logged-in account and a collection version of the device credential set, obtaining cached device credential information, and determining the collection version according to the update of the device credential set; A receiving module for receiving a first device credential and a corresponding first credential version of a first device, the first device credential and the first credential version being obtained when the first device logs in the logged-in account; the logged-in account being an account that has logged in both the first device and the second device; the first credential version being determined according to the collection version of the device credential set after the first device logs in the logged-in account; A verification module for verifying the validity of the first device credential and the first credential version according to the cached device credential information, and controlling the connection process with the first device according to the verification result; The verification module is configured to perform: Verifying the validity of the first device credential using the device credential set; if the first device credential is verified as invalid by the device credential set, verifying validity of the first credential version according to the set version; in response to the first credential version being greater than the set version, controlling the first device to continue performing the connection process; if the first credential version is less than or equal to the set version, stopping the first device from performing the connection process.

11. An apparatus connection control device, characterized by comprising: Applied to a server, comprising: A credential determination module is configured to determine a device credential and a corresponding credential version of the device in response to the device logging into a logged-in account, and send the device credential and the credential version to the device. An update module is configured to update a device credential set according to the device credential, and determine a set version of the device credential set according to an update of the device credential set, the device credential set being generated according to a device credential corresponding to the logged-in account, the logged-in account being an account logged into by the device, and the credential version being determined according to a set version of the device credential set after the device logs into the logged-in account. A sending module is configured to send the device credential set and the set version to the device, so that the device obtains cached device credential information based on the device credential set and the set version, and controls a connection process between the device and other devices according to the cached device credential information, the device credential, and the credential version. The device controls the connection process between the device and other devices, comprising: verifying validity of a first device credential of a first device by the device credential set; if the first device credential is verified as invalid by the device credential set, verifying validity of a first credential version of the first device according to the set version; in response to the first credential version being greater than the set version, controlling the first device to continue performing the connection process; if the first credential version is less than or equal to the set version, stopping the first device from performing the connection process.

12. An electronic device, comprising: comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method of any one of claims 1 to 9 by executing the executable instructions.

13. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Login authentication method, device, storage medium, and server

    CN109218326A

  • Information sharing method and electronic equipment

    CN111447208A