Collaborative authentication method, device, electronic device and storage medium
By receiving the authentication information of the master device in the slave device and sending it to other slave devices to calculate the comparison authentication hash value, the collaborative authentication problem caused by insufficient performance of the slave device is solved, and fast and secure equipment collaborative authentication is achieved.
Patent Information
- Application Number
- CN202211022206.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-08-23
AI Technical Summary
During multi-device collaborative authentication, insufficient slave equipment performance leads to inability to perform complex equipment collaborative authentication calculations, resulting in problems such as the inability to provide collaborative services or the authentication time is too long.
By receiving the authentication information sent by the master device, including the authentication timestamp and the authentication hash value, sending the authentication timestamp to other slave devices, so that it can calculate and compare the authentication hash value, thereby completing collaborative authentication. If the performance of this device is insufficient, the authentication will be calculated. Leave it to other slave devices for processing.
When the performance of the slave device is insufficient, collaborative authentication is completed through other slave devices to ensure the fast and safe certification process and improve the overall experience of equipment collaboration.
Smart Images

Figure CN115378612B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of wireless communication and terminal technology, and specifically, relates to a collaborative authentication method, device, electronic device and storage medium. Background Art
[0002] The collaboration of multiple devices within the same local area network can effectively improve the business operation experience, ensure the multi-device sharing of the business, and realize the cross-terminal push of the business. In multi-device collaboration, the main device (such as IPTV interactive network TV set-top box) can call the slave device (such as camera, smart speaker, etc.) to perform device collaboration. Before the device collaboration, in order to ensure the security of the collaborative business, mutual identity authentication between devices is generally required.
[0003] However, during collaborative authentication of slave devices, there is a situation where the performance of the slave device is insufficient and relatively complex device collaborative authentication calculations cannot be performed. In this case, the collaborative authentication of the slave device cannot pass or the collaborative authentication time is too long, resulting in the inability to provide collaborative services. Summary of the invention
[0004] To solve the above technical problems, the embodiments of the present application provide a collaborative authentication method and device, an electronic device, and a computer-readable storage medium.
[0005] According to one aspect of an embodiment of the present application, a collaborative authentication method is provided, which is applied to a first slave device, and the method includes: receiving authentication information sent by a master device; wherein the authentication information includes an authentication timestamp and an authentication hash value; sending the authentication timestamp to a second slave device, so that the second slave device calculates a comparison authentication hash value based on the authentication timestamp; wherein the second slave device is a slave device other than the first slave device in a preset slave device list, and the slave device list includes slave devices in a local area network that establish an initial authentication link with the master device; and performing collaborative authentication based on the comparison authentication hash value and the authentication hash value returned by the second slave device.
[0006] In one embodiment, before receiving the authentication information sent by the master device, the method further includes:
[0007] In response to the first authentication information sent by the master device, prompt authentication information is returned to the master device;
[0008] Saving the master device parameters returned by the master device; wherein the master device parameters are sent by the master device after performing authentication confirmation processing on the prompt authentication information;
[0009] The slave device parameters of the first slave device are sent to the master device, so that the master device builds the slave device list based on the slave device parameters of the first slave device and slave device parameters sent by other slave devices.
[0010] In one embodiment, before sending the authentication timestamp to the second slave device so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp, the method further includes:
[0011] extracting a performance parameter of the first slave device in response to the authentication information;
[0012] If the performance parameter of the first slave device exceeds a preset performance value range, the authentication timestamp is sent to the second slave device, so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp;
[0013] If the performance parameter of the first slave device is within a preset performance value range, the comparison authentication hash value is calculated based on the authentication timestamp, so that the first slave device performs collaborative authentication based on the comparison authentication hash value and the authentication hash value.
[0014] In one embodiment, the calculating the comparison authentication hash value based on the authentication information so that the first slave device performs collaborative authentication based on the comparison authentication hash value and the authentication hash value includes:
[0015] Extracting the identification and address of the master device from pre-stored master device information;
[0016] Generating the comparison authentication hash value based on the identifier, the address and the authentication timestamp;
[0017] The comparison authentication hash value is compared with the authentication hash value to complete collaborative authentication.
[0018] In one embodiment, the performance parameter includes one or more of CPU occupancy, response time, and number of completed transactions per second.
[0019] In one embodiment, before sending the authentication timestamp to the second slave device so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp, the method further includes:
[0020] Sending a list request message to the master device;
[0021] Receive the slave device list returned by the master device in response to the list request information.
[0022] In one embodiment, the slave device list includes address information corresponding to each slave device; sending the authentication timestamp to the second slave device so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp includes:
[0023] Sending broadcast information carrying the authentication timestamp to the second slave device based on the address information corresponding to the second slave device, so that the second slave device verifies the performance parameters of the second slave device based on the broadcast information;
[0024] receiving failure information returned by the second slave device after the performance parameter verification fails;
[0025] The broadcast information is sent to a third slave device in the slave device list based on the failure information, so that the third slave device calculates and compares the authentication hash value based on the authentication timestamp after the performance parameter of the third slave device is successfully verified.
[0026] According to one aspect of an embodiment of the present application, a collaborative authentication device is provided, which is configured on a first slave device, and the terminal includes: an authentication information sending module, configured to receive authentication information sent by a master device; wherein the authentication information includes an authentication timestamp and an authentication hash value; a collaborative hash value acquisition module, configured to send the authentication timestamp to a second slave device, so that the second slave device calculates a comparison authentication hash value based on the authentication timestamp; wherein the second slave device is a slave device other than the first slave device in a preset slave device list, and the slave device list includes slave devices in a local area network that establish an initial authentication link with the master device; a collaborative authentication module, configured to perform collaborative authentication based on the comparison authentication hash value and the authentication hash value returned by the second slave device.
[0027] According to one aspect of an embodiment of the present application, there is provided an electronic device, comprising one or more processors; and a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the collaborative authentication method as described above.
[0028] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the collaborative authentication method as described above.
[0029] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the collaborative authentication method provided in the above various optional embodiments.
[0030] In the technical solution provided in the embodiments of the present application, after the slave device receives the authentication information sent by the master device, the collaborative authentication calculation can be delivered to other slave devices to complete, so that the collaborative authentication of the slave devices can be completed when the performance of the slave devices is insufficient.
[0031] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0033] Figure 1 It is a schematic diagram of an implementation environment involved in this application;
[0034] Figure 2 is a flowchart of a collaborative authentication method shown in an exemplary embodiment of the present application;
[0035] Figure 3 is a flowchart of a collaborative authentication method shown in another exemplary embodiment of the present application;
[0036] Figure 4 is a flowchart of a collaborative authentication method shown in another exemplary embodiment of the present application;
[0037] Figure 5 is a flowchart of the first authentication shown in an exemplary embodiment of the present application;
[0038] Figure 6 is a flowchart of a collaborative authentication method shown in another exemplary embodiment of the present application;
[0039] Figure 7 yes Figure 2 The flowchart of step S230 in the illustrated embodiment in an exemplary embodiment;
[0040] Figure 8is a schematic diagram of the structure of a collaborative authentication device shown in an exemplary embodiment of the present application;
[0041] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0042] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0043] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0044] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0045] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.
[0046] The collaborative authentication method and device, electronic device, and storage medium proposed in the embodiments of the present application are described in detail below.
[0047] First see Figure 1 , Figure 1 1 is a schematic diagram of an implementation environment involved in the present application. The implementation environment includes a slave device 100 and a master device 200, and the slave device 100 and the master device 200 communicate with each other via a wired or wireless network.
[0048] Of course, the slave device 100 and the master device 200 in this embodiment are located in the same local area network, and Figure 1The number of slave devices 100 and master devices 200 in the embodiment is merely exemplary, and other numbers of slave devices 100 and master devices 200 may be used in other embodiments.
[0049] The slave device 100 is a device such as a camera or a smart speaker that can provide related services, and the master device 200 can implement the services provided by the slave device 100 through the master device 200 after being collaboratively authenticated with the slave device 100 .
[0050] In this embodiment, when the master device 200 discovers the slave device 100 in the local area network, it can send the first authentication information to the slave device 100, so as to complete the first authentication process between the master device 200 and the slave device 100 through information exchange between the master device 200 and the slave device 100. After the first authentication, the master device parameters of the master device 200 are stored in the slave device 100, and the master device 200 stores the slave device parameters of the slave device 100 with which the first authentication link has been established, and builds a slave device list based on the slave device 100 with which the first authentication link has been established.
[0051] In this embodiment, the collaborative authentication method can be implemented when the master device 200 and the slave device 100 need to perform re-authentication after the first authentication link has been established between the master device 200 and the slave device 100.
[0052] Exemplarily, the collaborative authentication method can be specifically implemented in a slave device 100 that has insufficient performance and is unable to perform relatively complex device collaborative authentication calculations. The slave device 100 receives authentication information sent by the master device, wherein the authentication information includes an authentication timestamp and an authentication hash value. Since it is unable to perform device collaborative authentication calculations, the slave device 100 selects another slave device 100 from a preset slave device list and sends an authentication timestamp to the other slave device 100. The other slave device 100 can perform device collaborative authentication calculations. Therefore, the other slave device 100 calculates and compares the authentication hash value based on the authentication timestamp, and then returns the compared authentication hash value to the slave device 100 that is unable to perform device collaborative authentication calculations. The slave device 100 can then perform collaborative authentication based on the compared authentication hash value and the authentication hash value returned by the second slave device.
[0053] The slave device 100 may be a device terminal that can provide services, such as a camera or a smart speaker, and is not limited here. The master device 100 may be any terminal device that can call the slave device 100 for device collaboration, such as an IPTV set-top box, a smart phone, a tablet, a laptop, a computer, and is not limited here.
[0054] Figure 2 is a flowchart showing a collaborative authentication method according to an exemplary embodiment. The collaborative authentication method can be applied to Figure 1The implementation environment shown is specifically executed by a slave device 100 in the implementation environment, namely, the first slave device. It should be understood that the method can also be used in other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.
[0055] like Figure 2 As shown, in an exemplary embodiment, the method may include steps S210 to S250, which are described in detail as follows:
[0056] Step S210: Receive authentication information sent by the master device.
[0057] In this embodiment, after the first slave device has established the initial authentication link with the master device, when the first slave device needs to perform collaborative authentication again, the master device sends authentication information to the first slave device, and the authentication information includes an authentication timestamp and an authentication hash value.
[0058] Specifically, the authentication hash value is calculated by the master device according to the master device parameters and timestamp of the master device. Different authentication timestamps will calculate different hash values. In this way, secure collaborative authentication can be performed based on the authentication hash value.
[0059] In one embodiment, the authentication hash value is a hash value obtained by calculating the identifier (such as UUID, Universally Unique Identifier) and address (such as MAC address, Media Access Control Address) of the host device.
[0060] Step S230: Sending an authentication timestamp to the second slave device, so that the second slave device calculates and compares an authentication hash value based on the authentication timestamp.
[0061] In this embodiment, after the first slave device receives the authentication information, it will verify within a period of time whether the performance of the first slave device can complete the calculation of the collaborative authentication, that is, whether it can complete the calculation of the comparison authentication hash value. If so, the first slave device directly calculates the comparison authentication hash value from the locally pre-saved master device parameters and authentication timestamp. The calculation method of the comparison authentication hash value is the same as the calculation method of the authentication hash value, and the master device parameters saved in the first slave device are the ones saved locally when the initial collaborative authentication is established with the master device.
[0062] If the performance of the first slave device cannot complete the calculation of the authentication hash value, refer to Figure 3The first slave device obtains other trusted slave device information from a preset slave device list, where the slave device list includes slave devices that have established a first authentication link with the master device, that is, all slave devices in the slave device list have completed the first authentication with the master device that sent authentication information to the first slave device.
[0063] The slave device list includes the address of each slave device. The first slave device can obtain the address of the second slave device in the slave device list, and then broadcast information to the second slave device. The broadcast information includes the authentication timestamp sent by the master device, so that the second slave device can calculate and compare the authentication hash value based on the authentication timestamp and the master device parameters saved when the second slave device performs the first authentication with the master device.
[0064] Of course, there is also a situation where when the first slave device broadcasts information to the second slave device, the performance of the second slave device is also unable to complete the calculation of the comparison authentication hash value. At this time, the second slave device can return a failure message. After receiving the failure message, the first slave device can obtain other trusted slave device information from the slave device list and broadcast the information to other slave devices, and so on, until one of the slave devices can complete the calculation of the collaborative authentication of the first slave device.
[0065] In other embodiments, the first slave device may send information not only to the second slave device, but also to multiple slave devices or all slave devices in the slave device list. After one of the slave devices that receives the information sent by the first slave device performs collaborative authentication calculations and returns the calculation results to the first slave device, the first slave device stops broadcasting.
[0066] Of course, when the first slave device broadcasts the authentication timestamp to the second slave device, it can also broadcast the address of the first slave device and the master device parameters locally stored in the first slave device. In this way, when the second slave device calculates the comparison authentication hash value, it can directly extract the master device parameters and the authentication timestamp from the broadcast information to calculate the comparison authentication hash value. At the same time, after calculating the comparison authentication hash value, the comparison authentication hash value obtained based on the broadcast address of the first slave device can be returned to the first slave device.
[0067] Of course, there may be a situation where there are multiple master devices in a local area network. In this case, when the first master device searches for the second master device, it needs to search in the slave device list corresponding to the master device that sends authentication information to the first slave device. In order to ensure the correctness of the calculation of the authentication hash value, the master device parameters of the corresponding master device or the relevant information of the corresponding master device are sent at the same time when the authentication timestamp is sent to the second slave device, so that the second slave device can determine the master device parameters required for collaborative authentication calculations.
[0068] Step S250: Perform collaborative authentication based on the comparison authentication hash value and the authentication hash value returned by the second slave device.
[0069] After step S230, the first slave device will obtain a comparison authentication hash value, which is either calculated by the first slave device itself or calculated based on other slave devices in the slave device list and returned to the first slave device.
[0070] The first slave device compares the authentication hash value and the authentication hash value. If the two hash values are consistent, the collaborative authentication is successful. If they are inconsistent, the collaborative authentication fails, and information indicating that the collaborative authentication has failed can be returned to the master device.
[0071] In this embodiment, the information transmission between the master device and the slave device in the local area network can be based on any wireless or wired communication method. Since there may be slave devices with insufficient performance, at this time, the information transmission between the master device and the slave devices in the local area network can be transmitted through the CoAP (a computer protocol used in the Internet of Things) protocol. The CoAP protocol can save transmission overhead. Therefore, through the CoAP protocol, the slave device with insufficient performance can hand over the relatively complex device authentication calculation to other trusted high-performance slave devices, so as to obtain the calculation results for device authentication.
[0072] This embodiment proposes a collaborative authentication method. When a slave device with insufficient performance is unable to perform collaborative authentication calculations, it can hand over the complex calculations in device authentication to other trusted slave devices, so that collaborative authentication can be performed together through other slave devices without going through a third-party platform. It can perform relatively fast and secure device authentication, thereby improving the overall experience of device collaboration.
[0073] Figure 4 FIG. 1 is a flow chart showing a collaborative authentication method according to another exemplary embodiment. Figure 2 As shown, in an exemplary embodiment, the method is implemented before step S210, and may specifically include steps S410 to S450, which are described in detail as follows:
[0074] Step S410: In response to the first authentication information sent by the master device, prompt authentication information is returned to the master device.
[0075] This embodiment proposes a method for performing the first authentication between the master device and the slave device in the local area network. For details, please refer to Figure 5 .
[0076] After the master device finds the slave device in the local area network, it can send the first authentication information to multiple slave devices. The first authentication information includes the first authentication timestamp, the first authentication hash value, etc. Similarly, the first authentication hash value is calculated with the master device parameters and the first authentication timestamp.
[0077] After receiving the first authentication information, if there is relevant business, the slave device returns the prompt authentication information to the master device.
[0078] Step S430: Save the master device parameters returned by the master device.
[0079] During the first authentication, the master device needs to be manually confirmed to determine whether the master device is bound to the slave device.
[0080] Therefore, after the master device receives the prompt authentication information returned by the slave device, the user can manually confirm the binding of the slave device on the master device.
[0081] Of course, this can be done when the master device and the slave device perform the first authentication, that is, only one slave device is bound during the first authentication, which can reduce the user's erroneous operations during manual authentication on the master device.
[0082] After the master device segment performs the confirmation process, the master device unicasts the master device parameters to the bound slave device. The master device parameters are used to calculate the relevant hsah value when the slave device needs to collaborate again for authentication later. After receiving the master device parameters, the slave device saves and binds the master device parameters.
[0083] Step S450: Send the slave device parameters of the first slave device to the master device, so that the master device builds a slave device list based on the slave device parameters of the first slave device and the slave device parameters sent by other slave devices.
[0084] After saving the master device parameters, the slave device can unicast the slave device parameters to the master device. The slave device parameters may include the address of the slave device. Therefore, after receiving the slave device parameters, the master device saves the slave device and the slave device parameters in the slave device list, that is, all slave devices after the initial authentication with the master device are saved in the slave device list.
[0085] In one embodiment, the slave device may also again request information from the master device unicast list to request a list of trusted slave devices. At this time, the master device responds to the list request information and returns the slave device list to the slave device. In this way, when the performance of the slave device is insufficient, other trusted slave devices can be selected from the slave device list to enable other slave devices to perform collaborative authentication calculations.
[0086] Of course, the slave device list can also be obtained after the slave device receives the authentication information, detects that the slave device performance is insufficient, and then requests the master device for the slave device list.
[0087] The data in the slave device list may be updated as the number of slave devices that establish the first authentication with the master device increases. After the slave device list is updated, the master device may automatically send the updated slave device list to the slave device.
[0088] In this embodiment, it is proposed that after the master device and the slave device perform the first authentication, the master device saves the slave device parameters as a slave device list, so that when the slave device has insufficient performance in calculating collaborative authentication, other trusted slave devices can be selected from the slave device list to complete the collaborative authentication calculation through other slave devices.
[0089] Figure 6 FIG. 1 is a flow chart showing a collaborative authentication method according to another exemplary embodiment. Figure 6 As shown, in an exemplary embodiment, the method is implemented before step S230, and may specifically include steps S610 to S650, which are described in detail as follows:
[0090] Step S610: extracting performance parameters of the first slave device in response to the authentication information.
[0091] In this embodiment, when the first slave device performs collaborative authentication, performance parameter detection may be performed to verify whether the first slave device can complete the calculation of the collaborative authentication.
[0092] The performance parameters include one or more of CPU (central processing unit) occupancy, response time, and number of transactions completed per second. Of course, these are only some exemplary performance parameters. In other embodiments, there may be other parameters that can be used to indicate whether the first slave device can complete the collaborative authentication calculation.
[0093] Step S630: If the performance parameter of the first slave device exceeds a preset performance value range, an authentication timestamp is sent to the second slave device, so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp.
[0094] In this embodiment, different performance parameters correspond to different performance value ranges. For example, for the CPU occupancy rate and the number of transactions completed per second in the performance parameters, the performance value range may be greater than or equal to a certain value. When the CPU occupancy rate or the number of transactions completed per second is less than the value, the CPU occupancy rate or the number of transactions completed per second exceeds the preset performance value range, and the first slave device cannot complete the calculation of collaborative authentication. For the response time in the performance parameters, the performance value range may be less than or equal to a certain value. When the response time is greater than the value, the response time exceeds the preset performance value range, and the first slave device cannot complete the calculation of collaborative authentication.
[0095] When the performance parameter exceeds the preset performance value range, the first slave device cannot complete the collaborative authentication calculation, and other devices can be selected from the device list to enable the other devices to perform collaborative authentication calculation.
[0096] Step S650: If the performance parameter of the first slave device is within a preset performance value range, the authentication hash value is compared based on the authentication timestamp calculation, so that the first slave device performs collaborative authentication based on the comparison authentication hash value and the authentication hash value.
[0097] In this embodiment, if the performance parameter of the first slave device is within the preset performance value range, that is, the first slave device can complete the collaborative authentication calculation, then the slave device can perform the collaborative authentication calculation on its own.
[0098] Specifically, the first slave device can extract the master device's identification and address from the master device information pre-saved locally, and then generate a comparison authentication hash value based on the identification, address and authentication timestamp, and compare the comparison authentication hash value with the authentication hash value to complete collaborative authentication.
[0099] It should be noted that in the same local area network, the method of performing collaborative authentication calculations is the same, that is, whether it is a slave device that receives authentication information or other slave devices that perform collaborative authentication calculations for slave devices with insufficient performance, the authentication hash value is calculated by comparing the above method.
[0100] In this embodiment, by verifying the performance parameters of the first slave device, when the performance of the first slave device is insufficient, collaborative authentication calculations are performed through other trusted slave devices. When the performance is sufficient, the first slave device can directly calculate by itself, thereby ensuring the security and speed of collaborative authentication of the slave devices.
[0101] Figure 7 yes Figure 2 The flowchart of step S230 in the embodiment shown is in an exemplary embodiment. Figure 7 As shown, in an exemplary embodiment, the slave device list includes the corresponding address information of each slave device, and the process of sending the authentication timestamp to the second slave device so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp may include steps S710 to S750, which are described in detail as follows:
[0102] Step S710: sending broadcast information carrying an authentication timestamp to the second slave device based on the address information corresponding to the second slave device, so that the second slave device verifies the performance parameters of the second slave device based on the broadcast information.
[0103] In this embodiment, when the performance of the first slave device is insufficient, it can select other slave devices from the slave device list, thereby sending information to the other slave devices.
[0104] In a specific embodiment, the address information of the second slave device is obtained from the slave device list, and then a broadcast message carrying an authentication timestamp is sent to the second slave device based on the address information.
[0105] The second slave device may also have insufficient performance parameters and be unable to perform collaborative authentication calculations. Therefore, after receiving the broadcast information, the second slave device also verifies the performance parameters of the second slave device to confirm whether the second slave device can complete the collaborative authentication calculations.
[0106] In this embodiment, the performance parameter verification process of the second slave device can refer to Figure 6 The performance parameters of the first slave device are shown for verification.
[0107] Step S730: receiving failure information returned by the second slave device after the performance parameter verification fails.
[0108] When the performance parameter verification of the second slave device is successful, the second slave device can calculate the comparison authentication hash value and return the comparison authentication hash value to the first slave device; if the performance parameter verification of the second slave device is unsuccessful, the second slave device will also return a failure message to the first slave device, telling the first slave device that the performance of the second slave device cannot be calculated for collaborative authentication.
[0109] Step S750: Send broadcast information to the third slave device in the slave device list based on the failure information, so that the third slave device calculates and compares the authentication hash value based on the authentication timestamp after the performance parameter verification of the third slave device is successful.
[0110] After receiving the failure message, the first slave device will again select other slave devices that are different from the first slave device and the second slave device in the slave device list, and send the broadcast message to other slave devices again, and repeat steps S710 to S750 until the performance parameter verification of the third slave device is successful, that is, the third slave device can perform collaborative authentication calculations, and use the third slave device authentication timestamp to calculate and compare the authentication hash value.
[0111] In this embodiment, when the performance of the first slave device is insufficient and the collaborative authentication calculation is handed over to other slave devices, the performance parameters of the delivered slave devices can be verified to ensure that the other delivered slave devices can complete the collaborative authentication calculation.
[0112] Figure 8 FIG. 1 is a schematic diagram showing the structure of a collaborative authentication device according to an exemplary embodiment. Figure 8 As shown, in an exemplary embodiment, the device includes:
[0113] The authentication information sending module 810 is configured to receive authentication information sent by the master device; wherein the authentication information includes an authentication timestamp and an authentication hash value;
[0114] The collaborative hash value acquisition module 830 is configured to send an authentication timestamp to the second slave device, so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp; wherein the second slave device is a slave device other than the first slave device in a preset slave device list, and the slave device list includes slave devices in the local area network that establish an initial authentication link with the master device;
[0115] The collaborative authentication module 850 is configured to perform collaborative authentication based on the comparison authentication hash value and the authentication hash value returned by the second slave device.
[0116] The collaborative authentication apparatus proposed in this embodiment can be used for completing collaborative authentication from a slave device with insufficient performance.
[0117] In one embodiment, the collaborative authentication device further includes:
[0118] a prompt authentication information sending module, configured to return prompt authentication information to the main device in response to the first authentication information sent by the main device;
[0119] A master device parameter saving module, configured to save the master device parameters returned by the master device; wherein the master device parameters are sent by the master device after performing authentication confirmation processing on the prompt authentication information;
[0120] The slave device list acquisition module is configured to send the slave device parameters of the first slave device to the master device, so that the master device builds a slave device list based on the slave device parameters of the first slave device and the slave device parameters sent by other slave devices.
[0121] In one embodiment, the collaborative authentication device further includes:
[0122] The performance parameter extraction module is configured to extract the performance parameters of the first slave device in response to the authentication information; the performance parameters include one or more of CPU occupancy rate, response time, and number of completed transactions per second.
[0123] A first verification processing module is configured to send an authentication timestamp to a second slave device if the performance parameter of the first slave device exceeds a preset performance value range, so that the second slave device calculates and compares an authentication hash value based on the authentication timestamp;
[0124] The second verification processing module is configured to calculate and compare the authentication hash value based on the authentication timestamp if the performance parameter of the first slave device is within a preset performance value range, so that the first slave device performs collaborative authentication based on the comparison authentication hash value and the authentication hash value.
[0125] In one embodiment, the second verification processing module includes:
[0126] An identification and address kicking unit is configured to extract an identification and an address of a master device from pre-saved master device information;
[0127] A comparison authentication hash value generation unit configured to generate a comparison authentication hash value based on the identifier, the address, and the authentication timestamp;
[0128] The collaborative authentication unit is configured to compare the comparison authentication hash value with the authentication hash value to complete the collaborative authentication.
[0129] In one embodiment, the collaborative authentication device further includes:
[0130] A list request information sending module, configured to send list request information to the main device;
[0131] The slave device list acquisition module is configured to receive the slave device list returned by the master device in response to the list request information.
[0132] In one embodiment, the slave device list includes address information corresponding to each slave device; the collaborative hash value acquisition module includes:
[0133] a performance parameter verification unit, configured to send broadcast information carrying an authentication timestamp to the second slave device based on address information corresponding to the second slave device, so that the second slave device verifies the performance parameters of the second slave device based on the broadcast information;
[0134] a failure information receiving unit, configured to receive failure information returned by the second slave device after the performance parameter verification fails;
[0135] The third slave device calculation unit is configured to send broadcast information to the third slave device in the slave device list based on the failure information, so that the third slave device calculates and compares the authentication hash value based on the authentication timestamp after the performance parameter of the third slave device is successfully verified.
[0136] It should be noted that the collaborative authentication device provided in the above embodiment and the collaborative authentication method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here.
[0137] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the electronic device implements the collaborative authentication method provided in the above-mentioned embodiments.
[0138] Fig. 9A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0139] It should be noted that Fig. 9 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0140] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903, such as executing the method in the above embodiment. In the RAM 903, various programs and data required for system operation are also stored. The CPU 901, ROM 902 and RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0141] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.
[0142] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 909, and / or installed from a removable medium 911. When the computer program is executed by a central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.
[0143] It should be noted that the computer-readable medium shown in the embodiment of the present application 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 can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a 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. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0144] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0145] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0146] Another aspect of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the collaborative authentication method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0147] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the collaborative authentication method provided in each of the above embodiments.
[0148] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A collaborative authentication method, characterized in that: Applied to a first slave device, the method includes: Receive authentication information sent by the master device; wherein the authentication information includes an authentication timestamp and an authentication hash value; Sending the authentication timestamp to the second slave device, so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp; wherein the second slave device is a slave device other than the first slave device in a preset slave device list, and the slave device list includes slave devices in the local area network that establish an initial authentication link with the master device; Collaborative authentication is performed based on the compared authentication hash value returned by the second slave device and the authentication hash value.
2. The method according to claim 1, characterized in that Before receiving the authentication information sent by the main device, the method further includes: In response to the first authentication information sent by the master device, returning prompt authentication information to the master device; Saving the master device parameters returned by the master device; wherein the master device parameters are sent by the master device after performing authentication confirmation processing on the prompt authentication information; The slave device parameters of the first slave device are sent to the master device, so that the master device builds the slave device list based on the slave device parameters of the first slave device and slave device parameters sent by other slave devices.
3. The method according to claim 1, characterized in that: Before sending the authentication timestamp to the second slave device so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp, the method further includes: extracting a performance parameter of the first slave device in response to the authentication information; If the performance parameter of the first slave device exceeds a preset performance value range, the authentication timestamp is sent to the second slave device, so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp.
4. The method according to claim 3, characterized in that Also includes: If the performance parameter of the first slave device is within a preset performance value range, the comparison authentication hash value is calculated based on the authentication timestamp, so that the first slave device performs collaborative authentication based on the comparison authentication hash value and the authentication hash value.
5. The method according to claim 4, characterized in that The calculating the comparison authentication hash value based on the authentication timestamp so that the first slave device performs collaborative authentication based on the comparison authentication hash value and the authentication hash value includes: Extracting the identification and address of the master device from pre-stored master device information; Generating the comparison authentication hash value based on the identifier, the address and the authentication timestamp; The comparison authentication hash value is compared with the authentication hash value to complete collaborative authentication.
6. The method according to claim 3, characterized in that The performance parameters include one or more of CPU occupancy, response time, and number of completed transactions per second.
7. The method according to claim 1, characterized in that Before sending the authentication timestamp to the second slave device so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp, the method further includes: Sending a list request message to the master device; Receive the slave device list returned by the master device in response to the list request information.
8. The method according to claim 1, characterized in that The slave device list includes corresponding address information of each slave device; The sending the authentication timestamp to the second slave device so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp, comprises: Sending broadcast information carrying the authentication timestamp to the second slave device based on the address information corresponding to the second slave device, so that the second slave device verifies the performance parameters of the second slave device based on the broadcast information; receiving failure information returned by the second slave device after the performance parameter verification fails; The broadcast information is sent to a third slave device in the slave device list based on the failure information, so that the third slave device calculates and compares the authentication hash value based on the authentication timestamp after the performance parameter of the third slave device is successfully verified.
9. A collaborative authentication terminal, characterized in that: Configured in the first slave device, the terminal includes: An authentication information sending module, configured to receive authentication information sent by a master device; wherein the authentication information includes an authentication timestamp and an authentication hash value; A collaborative hash value acquisition module, configured to send the authentication timestamp to a second slave device, so that the second slave device calculates and compares the authentication hash value based on the authentication timestamp; wherein the second slave device is a slave device other than the first slave device in a preset slave device list, and the slave device list includes slave devices in a local area network that establish an initial authentication link with the master device; The collaborative authentication module is configured to perform collaborative authentication based on the comparison authentication hash value returned by the second slave device and the authentication hash value.
10. An electronic device, characterized in that: include: one or more processors; A storage device, used to store one or more computer programs, when the one or more computer programs are executed by the one or more processors, enables the electronic device to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 8.
