Equipment hosting method and device, equipment and storage medium
By using the matching mechanism of permission tokens and configuration instructions in the device hosting system, the problem of insufficient information security when the hosting platform manages devices is solved, and the legality and permission scope of configuration instructions are realized, which reduces the risk of information leakage and improves the reliability of permission recovery.
Patent Information
- Application Number
- CN202411966938.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-18
AI Technical Summary
When users manage equipment through the hosting platform, there is a problem of insufficient information security, especially the inability to fully verify the authenticity of the authority held by the engineer or engineer, resulting in a high risk of user information leakage.
By receiving authorization instructions, a permission token is generated and sent to the controlled device. The permission token includes a first platform identifier for characterizing the managed platform whose control permissions are authorized. At the same time, the configuration instruction is received with the second platform identifier sent by the target hosting platform, and the configuration instruction is executed only when it is determined in the controlled device that the first platform identifier is the same as the second platform identifier. When the preset permission termination condition is met, a recycling instruction for the permission token is generated to remove the stored permission token.
Through the use of permission tokens, the controlled device can determine that the configuration instructions are derived from the real target hosting platform, avoid executing configuration instructions for forged by third-party platforms, and reduce the risk of information leakage. At the same time, automatic permission recycling is realized, improving the reliability and information security of permission recycling.
Smart Images

Figure CN119853986A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to, but is not limited to, the field of device management technology, and in particular to a device hosting method, apparatus, device, and storage medium. Background Art
[0002] Currently, there is a problem of insufficient information security when users manage equipment through hosting platforms. For example, contractors usually need to directly use user accounts or configure equipment through permissions shared by users. However, for users or equipment, it is usually impossible to fully verify the authenticity of the permissions held by contractors or contractors, resulting in a high risk of user information leakage. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The embodiments of the present application provide a device hosting method, apparatus, device and storage medium, which can improve information security.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a device hosting method, which is applied to a server, and the device hosting method includes: receiving an authorization instruction, generating an authority token based on the authorization instruction, wherein the authority token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform to which the control authority of the controlled device is authorized; sending the authority token to the controlled device so that the controlled device can store the authority token; receiving a configuration instruction carrying a second platform identifier sent by a target hosting platform, and sending the configuration instruction to the controlled device so that the controlled device can execute the configuration instruction when it is determined that the first platform identifier in the stored authority token is the same as the second platform identifier, wherein the second platform identifier is used to represent the target hosting platform; when a preset authority termination condition is met, generating a recovery instruction for the authority token, and sending the recovery instruction to the controlled device so that the controlled device can delete the stored authority token.
[0006] In some embodiments, the authorization instruction includes an authorization expiration time, and when a preset permission termination condition is met, a recovery instruction for the permission token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token, including: obtaining a trusteeship time, wherein the trusteeship time is the time between the sending time of the permission token and the current time; when the trusteeship time is greater than or equal to the authorization expiration time, a recovery instruction for the permission token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token; or when a permission termination request is received, a recovery instruction for the permission token is generated in response to the permission termination request, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token.
[0007] In some embodiments, sending the authority token to the controlled device includes: mapping based on the authority token to generate first mapping information; digitally signing the first mapping information based on preset first encryption information to obtain first signature information; sending the authority token and the first signature information to the controlled device, wherein the controlled device is configured with preset first decryption information, and the first decryption information is used to enable the controlled device to perform verification based on the authority token and the first signature information.
[0008] In some embodiments, after generating the permission token based on the authorization instruction, it also includes: generating a hosting identifier based on the authorization instruction, and storing the authorization instruction and the permission token in a hosting record database based on the hosting identifier; generating hosting notification information based on the hosting identifier and the authorization instruction, and sending the hosting notification information to the target hosting platform so that the target hosting platform can generate a session identifier in response to the hosting notification information; receiving the session identifier sent by the target hosting platform, and when the session identifier is verified successfully, reading the permission token associated with the hosting identifier from the hosting record database.
[0009] In some embodiments, the authorization instruction is sent by a user terminal, and when a preset permission termination condition is met, a recovery instruction for the permission token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token, comprising: obtaining server log information; receiving device log information sent by the controlled device, hosting log information sent by the target hosting platform, and user log information sent by the user terminal; and storing the server log information, the device log information, the hosting log information, and the user log information in the hosting record database based on the hosting identifier.
[0010] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present application also proposes a device hosting method, which is applied to a controlled device, and the device hosting method includes: receiving and storing a permission token sent by a server, wherein the permission token is generated by the server based on a received authorization instruction, and the permission token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform to which the control authority of the controlled device is authorized; receiving a configuration instruction sent by the server, and when the first platform identifier and the second platform identifier in the permission token are the same, executing the configuration instruction, wherein the configuration instruction is sent by the target hosting platform to the server, and the configuration instruction includes the second platform identifier, and the second platform identifier is used to represent the target hosting platform; receiving a recovery instruction of the permission token sent by the server to remove the stored permission token, wherein the recovery instruction is generated by the server, and the recovery instruction is used to indicate that a preset permission termination condition is met.
[0011] In some embodiments, the permission token includes multiple reference module identifiers and reference module states corresponding to the reference module identifiers, the configuration instruction includes a target module identifier and a target module state, and the execution of the configuration instruction includes: parsing based on the configuration instruction to obtain the target module identifier and the target module state; when the first platform identifier in the permission token is the same as the second platform identifier, and the target module identifier is the same as one of the multiple reference module identifiers, verifying the configuration instruction received by the controlled device based on the operation token sent by the server to determine the verification result, wherein the operation token is generated by the server based on the configuration instruction, and the operation token is used to indicate that the configuration instruction received by the controlled device is consistent with the configuration instruction sent by the target hosting platform; when the verification result indicates that the verification is successful, setting the controlled module corresponding to the target module identifier in the controlled device based on the target module state.
[0012] To achieve the above-mentioned purpose, the third aspect of the embodiment of the present application proposes a device hosting device, including: an authorization module, used to receive an authorization instruction, and generate an authority token based on the authorization instruction, wherein the authority token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform whose control authority of the controlled device is authorized; a sending module, used to send the authority token to the controlled device so that the controlled device can store the authority token; a forwarding module, used to receive a configuration instruction carrying a second platform identifier sent by a target hosting platform, and send the configuration instruction to the controlled device so that the controlled device can execute the configuration instruction when it is determined that the first platform identifier in the stored authority token is the same as the second platform identifier, wherein the second platform identifier is used to represent the target hosting platform; a recovery module, used to generate a recovery instruction for the authority token when a preset authority termination condition is met, and send the recovery instruction to the controlled device so that the controlled device can delete the stored authority token.
[0013] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the device hosting method described in the first aspect when executing the computer program.
[0014] To achieve the above-mentioned purpose, the fifth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, it implements the device hosting method described in the first aspect above.
[0015] The embodiments of the present application include at least the following beneficial effects: by receiving an authorization instruction, then generating an authorization token based on the authorization instruction, and the authorization token includes a first platform identifier, and then sending the authorization token to a controlled device so that the controlled device can store the authorization token for subsequent use, and then receiving a configuration instruction sent by a target hosting platform, and the configuration instruction carries a second platform identifier, and the second platform identifier is used to characterize the target hosting platform, and then sending the configuration instruction to the controlled device so that the controlled device can execute the configuration instruction when determining that the first platform identifier in the stored authorization token is the same as the second platform identifier, so that the controlled device can determine that the configuration instruction comes from the real target hosting platform, and because the first platform identifier is used to characterize the control of the controlled device The controlled device can determine the scope and authenticity of the control authority of the target hosting platform through the authority token, so that the controlled device can avoid executing the configuration instructions forged by the third-party platform and avoid the configuration instructions executed by the controlled device exceeding the legal authority scope, which can reduce the risk of information leakage and thus improve information security. In addition, when the preset authority termination conditions are met, a recovery instruction of the authority token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can remove the stored authority token, so that the configuration instructions of the target hosting platform can no longer control the controlled device. The authority recovery can be achieved without the participation of the hosting platform, which can improve the reliability of authority recovery and thus improve information security.
[0016] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0018] Figure 1 An optional flow chart of a device hosting method provided in an embodiment of the present application;
[0019] Figure 2 An optional flowchart of terminating authority provided in an embodiment of the present application;
[0020] Figure 3 An optional flowchart of a digital signature provided in an embodiment of the present application;
[0021] Figure 4 An optional specific flow chart of data management provided in an embodiment of the present application;
[0022] Figure 5 An optional flow chart of log management provided in an embodiment of the present application;
[0023] Figure 6 An optional flow chart of the device hosting method provided in the embodiment of the present application applied to a controlled device;
[0024] Figure 7 An optional flowchart of the permission and operation verification provided in the embodiment of the present application;
[0025] Figure 8 A schematic diagram of an optional process of initiating hosting by a user terminal provided in an embodiment of the present application;
[0026] Fig. 9 A schematic diagram of an optional process of a target hosting platform accepting hosting provided in an embodiment of the present application;
[0027] Fig.10 An optional framework diagram of a hosting system provided in an embodiment of the present application;
[0028] Fig.11 An optional structural diagram of a device hosting device provided in an embodiment of the present application;
[0029] Fig.12 A schematic diagram of an optional hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object such as target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. Among them, the target object can be a user. In addition, when the embodiment of the present application needs to obtain the target object attribute information, the target object's separate permission or separate consent will be obtained by means of a pop-up window or jumping to a confirmation page, etc., and after the separate permission or separate consent of the target object is clearly obtained, the necessary target object-related data for enabling the normal operation of the embodiment of the present application will be obtained.
[0032] In the description of this application, “several” means one or more, “more” means more than two, “greater than”, “less than”, “exceed”, etc. are understood to exclude the number, and “above”, “below”, “within”, etc. are understood to include the number.
[0033] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0034] Currently, there is a problem of insufficient information security when users manage equipment through hosting platforms. For example, contractors usually need to directly use user accounts or configure equipment through permissions shared by users. However, for users or equipment, it is usually impossible to fully verify the authenticity of the permissions held by contractors or contractors, resulting in a high risk of user information leakage.
[0035] In response to the problem of low information security, the present application provides a device hosting method, apparatus, device and storage medium, which is applied to a server. The device hosting method includes: receiving an authorization instruction, generating an authority token based on the authorization instruction, wherein the authority token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform whose control authority of the controlled device is authorized; sending the authority token to the controlled device so that the controlled device can store the authority token; receiving a configuration instruction carrying a second platform identifier sent by a target hosting platform, and sending the configuration instruction to the controlled device so that the controlled device can execute the configuration instruction when it is determined that the first platform identifier in the stored authority token is the same as the second platform identifier, wherein the second platform identifier is used to represent the target hosting platform; when a preset authority termination condition is met, generating a recovery instruction for the authority token, and sending the recovery instruction to the controlled device so that the controlled device can delete the stored authority token. According to the solution provided in the embodiment of the present application, an authorization instruction is received, and then an authority token is generated based on the authorization instruction, and the authority token includes a first platform identifier, and then the authority token is sent to the controlled device so that the controlled device can store the authority token for subsequent use, and then a configuration instruction sent by the target hosting platform is received, and the configuration instruction carries a second platform identifier, and the second platform identifier is used to characterize the target hosting platform, and then the configuration instruction is sent to the controlled device, so that the controlled device can execute the configuration instruction when it is determined that the first platform identifier in the stored authority token is the same as the second platform identifier, so that the controlled device can determine that the configuration instruction comes from the real target hosting platform, and because the first platform identifier is used to characterize the control authority of the controlled device It is limited to authorized hosting platforms, so the controlled device can determine the scope and authenticity of the control authority of the target hosting platform through the authority token, which can prevent the controlled device from executing configuration instructions forged by a third-party platform, and prevent the controlled device from executing configuration instructions that exceed the legal authority scope, which can reduce the risk of information leakage and thus improve information security; in addition, when the preset authority termination conditions are met, a recovery instruction for the authority token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can remove the stored authority token, so that the configuration instructions of the target hosting platform can no longer control the controlled device, and the authority recovery can be achieved without the participation of the hosting platform, which can improve the reliability of authority recovery and thus improve information security.
[0036] The device hosting method, apparatus, device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the device hosting method in the embodiments of the present application is described.
[0037] The device hosting method provided in the embodiment of the present application relates to the field of computer technology. The device hosting method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the device hosting method, etc., but is not limited to the above forms.
[0038] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0039] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0040] like Figure 1 As shown, Figure 1 An optional flow chart of a device hosting method provided in an embodiment of the present application, the device hosting method can be executed by a server, or can also be executed by a terminal, or can also be executed by a server in cooperation with a terminal, the device hosting method includes but is not limited to the following steps S110 to S140:
[0041] Step S110: receiving an authorization instruction, and generating an authorization token based on the authorization instruction.
[0042] Step S120: sending the authority token to the controlled device, so that the controlled device can store the authority token.
[0043] The permission token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform to which the control authority of the controlled device is authorized.
[0044] Among them, the target hosting platform can be an engineering contractor terminal, and the engineering contractor mainly provides services such as installation of equipment and deployment of networks, such as services for equipment such as cameras and video recorders, which are not limited in the embodiments of the present disclosure.
[0045] It should be noted that the authorization instruction is generated by the user terminal and sent to the server. The authorization instruction includes the device identification of the controlled device, the first platform identification, the authorization deadline and the control authority. The authorization instruction can be generated by the input of the user terminal. For example, the user has multiple controlled devices to be hosted. The user can select one or more controlled devices to generate one or more device identifications, and each device identification can be used to generate an authorization instruction; the user terminal can determine a target hosting platform from multiple candidate hosting platforms, and then generate a first platform identification corresponding to the target hosting platform. Since the first platform identification is associated with the control authority, the first platform identification is used to represent the hosting platform to which the control authority of the controlled device is authorized; the authorization deadline can be set to 24 hours; the user terminal can determine one or more target module identifications, and the target module identification corresponds to the control authority granted to the target hosting platform, that is, the controlled module in the controlled device that can be manipulated by the target hosting platform.
[0046] Among them, the device identification, the first platform identification, the authorization deadline, and the control authority of the authorization instruction are converted into the format specified by the authority token, and the first random number is added to obtain the authority token. The format specified by the authority token is not limited here.
[0047] The first random number is used to prevent replay attacks.
[0048] The controlled device may be a camera, or an electronic device such as a television, a refrigerator, or a washing machine, which is not limited in the embodiments of the present application.
[0049] It can be understood that the controlled device can determine the first platform identifier corresponding to the target hosting platform based on the permission token, and use this as the identity basis of the target hosting platform. It can also determine the control authority of the target hosting platform to ensure that the controlled device will only execute instructions generated by the target hosting platform determined by the user.
[0050] Step S130, receiving a configuration instruction carrying the second platform identifier sent by the target hosting platform, and sending the configuration instruction to the controlled device, so that the controlled device executes the configuration instruction when determining that the first platform identifier and the second platform identifier in the stored permission token are the same.
[0051] The second platform identifier is used to characterize the target hosting platform.
[0052] The configuration instruction includes a device identifier, a session identifier, a second platform identifier, a verification code, a timestamp, a target module identifier, and a target module status.
[0053] The session identifier is used to enable the server to determine whether the target hosting platform is in a valid login state. The server will associate the controlled device with the target hosting platform through the session identifier.
[0054] The checksum is a lightweight verification mechanism for data integrity, usually based on a hash value generated by a configuration instruction, and is used to quickly verify whether an error or damage occurs during transmission of the configuration instruction.
[0055] The timestamp is the time when the configuration instruction is generated and is used to prevent replay attacks.
[0056] Among them, the second platform identifier of the target hosting platform can be determined when the target hosting platform is registered on the server, or can be dynamically generated by the server based on the first platform identifier when the target hosting platform generates a configuration instruction; the first platform identifier and the second platform identifier can be the same or different. When the first platform identifier and the second platform identifier are different, the first platform identifier and the second platform identifier can mathematically satisfy a certain corresponding relationship. The controlled device can determine that the first platform identifier corresponds to the second platform identifier of the configuration instruction through the above-mentioned corresponding relationship to determine that the source of the configuration instruction is legal, which is not limited in the embodiments of the present disclosure.
[0057] Among them, after the server generates the authorization token, it will also send the authorization token to the target hosting platform. The target hosting platform generates corresponding controls based on the content of the authorization instruction in the authorization token, and only displays authorized controls. Each control can generate corresponding inputs for the engineering terminal to generate the target module identifier and target module status in the configuration instruction.
[0058] Among them, the target hosting platform can host multiple controlled devices at the same time. For example, the target hosting platform can select multiple controlled devices at the same time. When the controlled device is a camera, the controlled device loads the real-time video stream and displays the device status. The preview page contains the real-time picture and multiple controls for selecting specific configuration operations.
[0059] In one possible implementation, a P2P (Peer-to-Peer) connection is established between the controlled module and the target hosting platform through a server, which can reduce server load and instruction transmission delay; at this time, the server does not send the authority token to the controlled device, but sends the authority token to the target hosting platform, and sends the verification information of the authority token to the controlled device. The target hosting platform can directly send the configuration instruction and the authority token to the controlled device, so that the controlled device can verify the authority token with the hosting verification information. If the verification is successful, the controlled device will store the authority token to determine whether to execute the configuration instruction through the authority token.
[0060] The target module identifier corresponds one-to-one to the controlled module in the controlled device, and the target module state is the state of the controlled module expected by the target hosting platform.
[0061] In a possible implementation, the server may add an additional verification information header to the configuration instruction to ensure that the controlled device correctly executes the configuration instruction.
[0062] It can be understood that by verifying the consistency between the first platform identifier and the second platform identifier of the configuration instruction, it is ensured that only configuration instructions from a trusted source can be executed, thereby preventing instructions sent by unauthorized or malicious third parties from being mistakenly executed.
[0063] Step S140, when the preset permission termination condition is met, a permission token recovery instruction is generated, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token.
[0064] The recycling instruction may include a session identifier, and the controlled device may determine the permission token to be removed through the session identifier, which is not limited in the embodiments of the present disclosure.
[0065] Among them, after the controlled device removes the permission token, it generates a response message of permission expiration and sends the response message to the target hosting platform.
[0066] It can be explained that an enhanced verification mechanism is also set up: by detecting abnormal operations through behavioral analysis, such as abnormal logins, frequent incorrect attempts, unusual operation times, etc., the system can trigger an alarm and require additional identity verification or temporarily lock the account until manual review.
[0067] Based on this, by receiving the authorization instruction, then generating the permission token based on the authorization instruction, and the permission token includes the first platform identifier, and then sending the permission token to the controlled device, so that the controlled device can store the permission token for subsequent use, and then receive the configuration instruction sent by the target hosting platform, and the configuration instruction carries the second platform identifier, the second platform identifier is used to characterize the target hosting platform, and then send the configuration instruction to the controlled device, so that the controlled device can execute the configuration instruction when it is determined that the first platform identifier in the stored permission token is the same as the second platform identifier, so that the controlled device can determine that the configuration instruction comes from the real target hosting platform, and because the first platform identifier is used to characterize that the control authority of the controlled device is authorized Hosting platform, so the controlled device can determine the scope and authenticity of the control authority of the target hosting platform through the authority token, which can prevent the controlled device from executing configuration instructions forged by a third-party platform, and prevent the controlled device from executing configuration instructions that exceed the legal authority scope, which can reduce the risk of information leakage and thus improve information security; in addition, when the preset authority termination conditions are met, a recovery instruction for the authority token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can remove the stored authority token, so that the configuration instructions of the target hosting platform can no longer control the controlled device, and the authority recovery can be achieved without the participation of the hosting platform, which can improve the reliability of authority recovery and thus improve information security.
[0068] In addition, refer to Figure 2 In some embodiments, the authorization instruction includes the authorization expiration time. When the preset permission termination condition is met, a permission token recovery instruction is generated and sent to the controlled device so that the controlled device can remove the stored permission token, including but not limited to the following steps:
[0069] Step S210, obtaining the hosting duration.
[0070] Step S220: When the hosting duration is greater than or equal to the authorization expiration duration, a recovery instruction for the authority token is generated and sent to the controlled device so that the controlled device can delete the stored authority token.
[0071] Step S230, or when a permission termination request is received, in response to the permission termination request, a permission token recovery instruction is generated, and the recovery instruction is sent to the controlled device so that the controlled device deletes the stored permission token.
[0072] The hosting duration is the time between the sending time of the permission token and the current time.
[0073] The difference between the escrow duration and the authorization deadline can be determined by setting a timer when the authority token is sent. When the timer expires, it means that the escrow duration is greater than or equal to the authorization deadline.
[0074] The permission termination request may be sent by a user terminal, and the user terminal may initiate a permission termination request to the server at any time.
[0075] Based on this, the length of time that the target hosting platform holds the control authority can be controlled by controlling the authorization deadline and the hosting duration, or the control authority held by the target hosting platform can be terminated at any time through an authority termination request. This can achieve dynamic control authority expansion and contraction, ensure the security of the controlled device data, simplify the authority recovery process, and improve the efficiency of authority recovery.
[0076] In addition, refer to Figure 3 In some embodiments, sending the permission token to the controlled device includes but is not limited to the following steps:
[0077] Step S310: Mapping is performed based on the authority token to generate first mapping information.
[0078] Step S320: digitally sign the first mapping information based on the preset first encryption information to obtain first signature information.
[0079] Step S330: Send the authority token and the first signature information to the controlled device.
[0080] The controlled device is configured with preset first decryption information, and the first decryption information is used to enable the controlled device to perform verification based on the authority token and the first signature information.
[0081] It should be noted that SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash algorithm.
[0082] Among them, the permission token can be mapped by the SHA-256 method to obtain the first hash value of the permission token, that is, the first mapping information, and then the server is provided with a pre-generated private key and a public key. The private key can only be held by the server. The server sends the public key to the controlled device in advance, and the server digitally signs the first hash value by the private key to generate the first signature information. The controlled device can verify the received first signature information by the preset first decryption information to obtain the second hash value. At the same time, the controlled device maps the received permission token to obtain the third hash value. When the second hash value is consistent with the third hash value, it indicates that the permission token received by the controlled device has not been tampered with, that is, it is legal.
[0083] Based on this, the controlled device determines through the permission token and the first signature information that the received permission token has not been tampered with, thereby improving the data integrity and reliability of the permission token and preventing the use of a third party to forge the permission token. This can improve the security of the system as a whole, thereby enhancing the trust relationship between the target hosting platform and the controlled device, and is conducive to improving the configuration efficiency of the target hosting platform.
[0084] In addition, refer to Figure 4 In some embodiments, after the authorization token is generated based on the authorization instruction, the following steps are also included but not limited to:
[0085] Step S410, generating a trusteeship identifier based on the authorization instruction, and storing the authorization instruction and the authority token in a trusteeship record database in association with the trusteeship identifier.
[0086] Step S420: Generate hosting notification information based on the hosting identifier and the authorization instruction, and send the hosting notification information to the target hosting platform, so that the target hosting platform generates a session identifier in response to the hosting notification information.
[0087] Step S430, receiving the session identifier sent by the target hosting platform, and when the session identifier verification succeeds, reading the permission token associated with the hosting identifier from the hosting record database.
[0088] Among them, the server can simultaneously receive authorization instructions sent by multiple user terminals, and generate a corresponding hosting identifier for each authorization instruction. Each hosting identifier is different. For example, the hosting identifier can be generated using a random number, which is not limited in the embodiments of the present disclosure.
[0089] The session identifier can also be used to represent the authentication information of the target hosting platform.
[0090] Among them, a part of the multiple target module identifiers of the authorization instruction can be used together with the hosting identifier to construct the hosting notification information. Therefore, the hosting notification information includes a part of the multiple target module identifiers of the authorization instruction and the hosting identifier, instead of fully displaying all information to the target hosting platform that has not been trusted, which can improve the security of user information.
[0091] Among them, the user of the target hosting platform can determine whether to respond based on multiple target module identifiers in the hosting notification information. When the target hosting platform determines to respond, it generates a session identifier and sends the session identifier to the server; after receiving the server's response to the successful verification of the session identifier, the target hosting platform sends the hosting identifier back to the server so that the server can directly use the hosting identifier sent by the target hosting platform to read the permission token.
[0092] It should be noted that in the hosting record database, the hosting identity is also associated with the permission token, operation token and hosting duration.
[0093] Based on this, storing the key information of a hosting event through the hosting record database is conducive to the server to quickly read the corresponding information and improve the operating efficiency of the entire system. In addition, it is also conducive to the centralized management and tracking of information, which is conducive to improving the speed of resolving system failures.
[0094] In addition, refer to Figure 5 In some embodiments, the authorization instruction is sent by the user terminal. When the preset permission termination condition is met, a permission token recovery instruction is generated, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token. The steps include but are not limited to the following steps:
[0095] Step S510, obtaining server log information.
[0096] Step S520: receiving device log information sent by the controlled device, hosting log information sent by the target hosting platform, and user log information sent by the user terminal.
[0097] Step S530: storing the server log information, device log information, hosting log information and user log information in a hosting record database based on the hosting identifier.
[0098] Among them, the server log information can be obtained through the log acquisition interface preset by the server, and all operations executed by the server are recorded and auditable. In addition, the generation process of device log information, hosting log information and user log information is also similar to the generation process of server log information. The embodiments of the present disclosure are not limited here. For example, the target hosting platform can record the information of each configuration instruction as hosting log information.
[0099] Among them, server log information, device log information, hosting log information and user log information are all associated with the hosting identifier in the hosting record database.
[0100] Based on this, the server log information is obtained, and then the device log information sent by the controlled device, the hosting log information sent by the target hosting platform, and the user log information sent by the user terminal are received. The server log information, device log information, hosting log information, and user log information are stored in the hosting record database based on the hosting identifier. When the overall system fails and causes downtime, the fault can be quickly located through the log information, thereby quickly solving the fault problem, reducing the system downtime and reducing losses.
[0101] In addition, refer to Figure 6 , Figure 6Another optional flow chart of the device hosting method provided in the embodiment of the present application, the device hosting method is executed by the controlled device, and the device hosting method includes but is not limited to the following steps:
[0102] Step S610: receiving and storing the authorization token sent by the server.
[0103] Step S620: receiving a configuration instruction sent by the server, and executing the configuration instruction when the first platform identifier in the authority token is the same as the second platform identifier.
[0104] Step S630: receiving a permission token recovery instruction sent by the server to delete the stored permission token.
[0105] The authority token is generated by the server based on the received authorization instruction, and the authority token includes a first platform identifier, which is used to represent the hosting platform to which the control authority of the controlled device is authorized.
[0106] The configuration instruction is sent by the target hosting platform to the server, and the configuration instruction includes a second platform identifier, which is used to represent the target hosting platform.
[0107] The recovery instruction is generated by the server, and is used to indicate that a preset permission termination condition is met.
[0108] Based on this, the permission token sent by the server is received and stored, wherein the permission token is generated by the server based on the received authorization instruction, and the permission token includes a first platform identifier. Since the first platform identifier is used to represent the hosting platform to which the control authority of the controlled device is authorized, the controlled device can determine the scope and authenticity of the control authority of the target hosting platform through the permission token, and then receive the configuration instruction sent by the server, wherein the configuration instruction is sent to the server by the target hosting platform, and the configuration instruction includes a second platform identifier, which is used to represent the target hosting platform. Then, when it is determined that the first platform identifier in the stored permission token is the same as the second platform identifier, the configuration instruction is executed, so that the controlled device can determine that the configuration instruction comes from the real target hosting platform. Therefore, it can avoid the controlled device from executing the configuration instruction forged by the false hosting platform, and avoid the configuration instruction executed by the controlled device exceeding the legal authority scope, which can reduce the risk of information leakage, thereby improving information security; in addition, when the preset permission termination condition is met, the permission token recovery instruction sent by the server is received, so that the configuration instruction of the target hosting platform can no longer control the controlled device, and the permission recovery can be achieved without the participation of the hosting platform, which can improve the reliability of permission recovery, thereby improving information security.
[0109] In addition, refer to Figure 7In some embodiments, the permission token includes multiple reference module identifiers and reference module states corresponding to the reference module identifiers, the configuration instruction includes a target module identifier and the target module state, and executing the configuration instruction includes but is not limited to the following steps:
[0110] Step S710, performing parsing based on the configuration instruction to obtain a target module identifier and a target module status.
[0111] Step S720, when the first platform identifier in the authority token is the same as the second platform identifier, and the target module identifier is the same as one of the multiple reference module identifiers, the configuration instruction received by the controlled device is verified based on the operation token sent by the server to determine the verification result.
[0112] Step S730: When the verification result indicates that the verification is successful, the controlled module corresponding to the target module identifier in the controlled device is set based on the target module state.
[0113] The operation token is generated by the server based on the configuration instruction, and is used to indicate that the configuration instruction received by the controlled device is consistent with the configuration instruction sent by the target hosting platform.
[0114] It should be noted that the process of the server generating and sending an operation token is as follows: receiving a configuration instruction carrying a second platform identifier sent by the target hosting platform, generating an operation token based on the configuration instruction, performing mapping based on the operation token, generating second mapping information, digitally signing the second mapping information based on preset second encryption information, obtaining second signature information, and sending the configuration instruction, the operation token, and the second signature information to the controlled device.
[0115] The controlled device is configured with preset second decryption information, and the second decryption information is used to enable the controlled device to perform verification based on the operation token and the second signature information. Therefore, the operation token is robust and not easily tampered with.
[0116] Among them, the process of obtaining the second signature information is similar to the process of obtaining the first signature information, and the process of verifying the operation token and the second signature information through the second decryption information is similar to the process of verifying the authority token and the first signature information through the first decryption information. The embodiments of the present disclosure are not limited here.
[0117] The device identification, timestamp, target module identification and target module status of the configuration instruction are converted into the format specified by the operation token, and the validity period and the second random number are added to obtain the operation token. The format specified by the operation token is not limited here.
[0118] It should be noted that the configuration instructions received by the controlled device are consistent with the configuration instructions sent by the target hosting platform if the following conditions are met at the same time: the target module identifier of the operation token is consistent with the target module identifier of the configuration instruction, the target module state of the operation token is consistent with the target module state of the configuration instruction, the controlled device holds the operation token for no longer than the validity period, and the second random number does not appear repeatedly.
[0119] Among them, after the controlled module corresponding to the target module identifier in the controlled device is set based on the target module state, a response message is generated based on the setting result of the controlled module, and the response information is sent to the target hosting platform for the target hosting platform to generate the next configuration instruction. For example, the controlled device is a camera, and the target module identifier of the configuration instruction is to adjust the image optimization switch. The target module parameter is on, so that the image optimization switch of the controlled device can be turned on, a response message of successful opening is generated, and the response information is sent to the target hosting platform.
[0120] It is understandable that the life cycle of the permission token is longer than that of the operation token. After successfully verifying the permission token once, the controlled device does not need to re-verify when the control authority does not change. Then, the operation token can be verified multiple times within the life cycle of the permission token. Usually, the operation token will become invalid after the verification is completed to prevent the same configuration instruction from being maliciously or accidentally executed repeatedly. Each operation token is accompanied by a unique identifier, such as a second random number and a timestamp, which can be used to determine the source, time and execution result of the configuration instruction.
[0121] Based on this, the second signature information can be used to determine that the operation token has not been tampered with, thereby ensuring the reliability of the operation token. Then, the operation token can be used to determine that the configuration instructions have not been tampered with, which can prevent the use of a third party to forge configuration instructions. Overall, the security of the system can be improved, thereby enhancing the trust relationship between the target hosting platform and the controlled device, which is conducive to improving the configuration efficiency of the target hosting platform.
[0122] In one possible implementation, the controlled device can also generate an operation token. After receiving the configuration instruction, the device first verifies whether the configuration instruction meets the requirements of the permission token. When the configuration instruction meets the requirements of the permission token, the controlled device generates an operation token based on the configuration instruction. The operation token does not need to be digitally signed, but is verified internally by the device. The device attaches the operation token to the response message and returns it to the target hosting platform. The target hosting platform sends the operation token back to the device in the subsequent configuration instruction. The controlled device parses the configuration instruction and verifies the operation token, such as confirming the random number, validity period and operation type of the token. After successful verification, the configuration instruction is executed.
[0123] Among them, reference Figure 8 , Figure 8An optional flow chart of a user terminal initiating hosting provided in an embodiment of the present application, the process of a user terminal initiating hosting to a server is as follows: the authorization instruction includes a user ID, a device ID of a controlled device, a first platform ID, an authorization deadline, and a control authority. The user terminal logs in to the server through an account and password, generates a user ID, and then selects a controlled device for one-click hosting, generates a device ID, and enters the target hosting platform page. If the controlled device has been bound to the target hosting platform, the target hosting platform information is displayed, a first platform ID is generated, and then the user terminal sets the control authority. The above control authority can be multiple. For example, selecting multiple controlled modules is equivalent to granting the control authority of multiple controlled modules to the target hosting platform. The control permissions of multiple controlled modules are combined to make the configuration of control permissions flexible. Then, the authorization deadline is set, and an authorization instruction is generated based on the user ID, the device ID of the controlled device, the first platform ID, the authorization deadline and the control permission. The authorization instruction is sent to the server, and the server authenticates the authorization instruction. For example, the server can verify the user ID of the authorization instruction with the user ID pre-stored in the server. If the verification is successful, the user terminal receives feedback from the server, indicating that the hosting is successful, generates a hosting record, and finally prompts the engineering company; if the verification fails, the user is prompted that the hosting fails; on the other hand, if the controlled device is not bound to the target hosting platform, the user is prompted to bind the target hosting platform.
[0124] Among them, reference Fig. 9 , Fig. 9 An optional flow chart of the target hosting platform accepting hosting provided in an embodiment of the present application, the process of the target hosting platform accepting hosting is as follows: the target hosting platform receives the hosting notification information, and the target hosting platform generates a session identifier to the server for the server to verify the identity of the target hosting platform. If the verification fails, the target hosting platform prompts an identity abnormality; if the verification is successful, the target hosting platform enters the hosting details page, and then checks the control authority and the information of the controlled device. If the hosting is not confirmed, the list of hosting notification information is returned; if the hosting is confirmed, the configuration mode is entered, the configuration operation is performed according to the control authority, and then the hosting log information is recorded. If the user terminal issues a permission termination request, it means that the control authority is reclaimed and the target hosting platform exits the configuration; if the user terminal does not issue a permission termination request, the configuration continues until the hosting duration is greater than or equal to the authorization expiration duration, or until the user terminal actively initiates a permission termination request.
[0125] Among them, reference Fig.10 , Fig.10An optional architectural diagram of a hosting system provided for an embodiment of the present application, the architecture of the hosting system is as follows: first, a user terminal, the user terminal is provided with a user terminal interface, a hosting request module, a permission configuration module and an encrypted communication module, the user terminal interface is used to obtain user input information, the hosting request module is used to generate partial information of the authorization instruction from the user input information, such as the device identification, the first platform identification and the authorization deadline, the hosting request module is also used to pass the hosting request module to the permission configuration module, so that the permission configuration module configures the control permission based on the user input information, combines the partial information of the authorization instruction generated by the hosting request module and the configured control permission, generates an authorization instruction, and finally sends the authorization instruction to the server through the encrypted communication module; then the server, the server A notification module, a target hosting platform message queue, an authority verification module and a hosting record database are provided. The authority verification module verifies the authorization instruction. If the verification is successful, a notification is inserted into the target hosting platform message queue through the notification module to send a hosting notification information to the target hosting platform. On the other hand, the relevant information of the authorization instruction is stored in the hosting record database; finally, the target hosting platform is provided with a message receiving module, a hosting details page, a device debugging module and a log upload module. The target hosting platform receives the hosting notification information sent by the server through the message receiving module. After the hosting notification information is confirmed, the hosting details page is displayed, and then the device is configured through the device debugging module. The log upload module uploads the hosting log information to the server's hosting record database in real time.
[0126] Exemplarily, the encryption communication module can use the AES-256 (Advanced Encryption Standard - 256-bit) algorithm to symmetrically encrypt data to ensure efficient protection of sensitive information. At the same time, the dynamically generated AES (Advanced Encryption Standard) key is securely transmitted through asymmetric encryption. After the target receives the message through the platform, it verifies the identity through the server and decrypts the session key to further decrypt the hosted information.
[0127] In addition, refer to Fig.11 The present application also provides a device hosting apparatus 1100, which is applied to a server and includes:
[0128] The authorization module 1110 is used to receive an authorization instruction and generate an authorization token based on the authorization instruction, wherein the authorization token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform to which the control authority of the controlled device is authorized;
[0129] The sending module 1120 is used to send the authority token to the controlled device so that the controlled device can store the authority token;
[0130] The forwarding module 1130 is used to receive a configuration instruction carrying a second platform identifier sent by the target hosting platform, and send the configuration instruction to the controlled device, so that the controlled device executes the configuration instruction when it is determined that the first platform identifier and the second platform identifier in the stored permission token are the same, wherein the second platform identifier is used to characterize the target hosting platform;
[0131] The recycling module 1140 is used to generate a recycling instruction for the authority token when a preset authority termination condition is met, and send the recycling instruction to the controlled device so that the controlled device can delete the stored authority token.
[0132] It can be understood that the specific implementation of the device hosting apparatus 1100 is substantially the same as the specific implementation of the above-mentioned device hosting method, and will not be described in detail here.
[0133] In addition, refer to Fig.12 , Fig.12 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0134] The processor 1201 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0135] The memory 1202 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1202 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1202, and the processor 1201 calls and executes the device hosting method of the embodiment of this application.
[0136] Input / output interface 1203, used to implement information input and output;
[0137] The communication interface 1204 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0138] A bus 1205 that transmits information between various components of the device (e.g., the processor 1201, the memory 1202, the input / output interface 1203, and the communication interface 1204);
[0139] The processor 1201 , the memory 1202 , the input / output interface 1203 and the communication interface 1204 are connected to each other in communication within the device via the bus 1205 .
[0140] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned device hosting method.
[0141] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0142] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0143] It can be understood by those skilled in the art that Figures 1 to 12 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0144] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0146] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0147] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0148] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0149] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0152] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A device hosting method, characterized in that: Applied to a server, the device hosting method includes: receiving an authorization instruction, and generating an authority token based on the authorization instruction, wherein the authority token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform to which the control authority of the controlled device is authorized; Sending the authority token to the controlled device so that the controlled device stores the authority token; receiving a configuration instruction carrying a second platform identifier sent by a target hosting platform, and sending the configuration instruction to the controlled device, so that the controlled device executes the configuration instruction when determining that the first platform identifier and the second platform identifier stored in the permission token are the same, wherein the second platform identifier is used to characterize the target hosting platform; When the preset permission termination condition is met, a recovery instruction of the permission token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token.
2. The device hosting method according to claim 1, characterized in that: The authorization instruction includes an authorization expiration time. When a preset permission termination condition is met, a recovery instruction of the permission token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can remove the stored permission token, including: obtaining a trusteeship time, wherein the trusteeship time is the time between the sending time of the permission token and the current time; When the hosting duration is greater than or equal to the authorization expiration duration, generating a recovery instruction for the authority token, and sending the recovery instruction to the controlled device so that the controlled device can remove the stored authority token; Or when a permission termination request is received, in response to the permission termination request, a recovery instruction of the permission token is generated, and the recovery instruction is sent to the controlled device so that the controlled device can delete the stored permission token.
3. The device hosting method according to claim 1, characterized in that: The sending the permission token to the controlled device includes: Perform mapping based on the authority token to generate first mapping information; Digitally signing the first mapping information based on preset first encryption information to obtain first signature information; The authority token and the first signature information are sent to the controlled device, wherein the controlled device is configured with preset first decryption information, and the first decryption information is used to enable the controlled device to perform verification based on the authority token and the first signature information.
4. The device hosting method according to claim 1, characterized in that: After the authorization token is generated based on the authorization instruction, the method further includes: Generate a trusteeship identifier based on the authorization instruction, and associate and store the authorization instruction and the authority token in a trusteeship record database based on the trusteeship identifier; Generate hosting notification information based on the hosting identifier and the authorization instruction, and send the hosting notification information to the target hosting platform, so that the target hosting platform generates a session identifier in response to the hosting notification information; The session identifier sent by the target hosting platform is received, and when the session identifier is successfully verified, the permission token associated with the hosting identifier is read from the hosting record database.
5. The device hosting method according to claim 1, characterized in that: The authorization instruction is sent by the user terminal, and when the preset permission termination condition is met, a recovery instruction of the permission token is generated, and the recovery instruction is sent to the controlled device so that the controlled device deletes the stored permission token, including: Get server log information; Receiving device log information sent by the controlled device, hosting log information sent by the target hosting platform, and user log information sent by the user terminal; The server log information, the device log information, the hosting log information and the user log information are stored in the hosting record database based on the hosting identifier.
6. A device hosting method, characterized in that: Applied to a controlled device, the device hosting method includes: Receiving and storing a permission token sent by a server, wherein the permission token is generated by the server based on the received authorization instruction, and the permission token includes a first platform identifier, and the first platform identifier is used to represent the hosting platform to which the control authority of the controlled device is authorized; receiving a configuration instruction sent by the server, and executing the configuration instruction when the first platform identifier and the second platform identifier in the authority token are the same, wherein the configuration instruction is sent to the server by the target hosting platform, and the configuration instruction includes the second platform identifier, and the second platform identifier is used to represent the target hosting platform; A recovery instruction of the permission token sent by the server is received to remove the stored permission token, wherein the recovery instruction is generated by the server and is used to indicate that a preset permission termination condition is met.
7. The device hosting method according to claim 6, characterized in that: The authorization token includes a plurality of reference module identifiers and reference module states corresponding to the reference module identifiers, the configuration instruction includes a target module identifier and a target module state, and executing the configuration instruction includes: Parsing based on the configuration instruction to obtain the target module identifier and the target module status; When the first platform identifier and the second platform identifier in the permission token are the same, and the target module identifier is the same as one of the multiple reference module identifiers, verifying the configuration instruction received by the controlled device based on the operation token sent by the server to determine a verification result, wherein the operation token is generated by the server based on the configuration instruction, and the operation token is used to indicate that the configuration instruction received by the controlled device is consistent with the configuration instruction sent by the target hosting platform; When the verification result indicates that the verification is successful, the controlled module corresponding to the target module identifier in the controlled device is set based on the target module state.
8. A device hosting device, characterized in that: include: An authorization module, configured to receive an authorization instruction and generate an authorization token based on the authorization instruction, wherein the authorization token includes a first platform identifier, and the first platform identifier is used to represent a hosting platform to which the control authority of the controlled device is authorized; A sending module, used for sending the authority token to the controlled device, so that the controlled device can store the authority token; a forwarding module, configured to receive a configuration instruction carrying a second platform identifier sent by a target hosting platform, and send the configuration instruction to the controlled device, so that the controlled device executes the configuration instruction when determining that the first platform identifier and the second platform identifier stored in the permission token are the same, wherein the second platform identifier is used to characterize the target hosting platform; The recovery module is used to generate a recovery instruction for the authority token when a preset authority termination condition is met, and send the recovery instruction to the controlled device so that the controlled device can delete the stored authority token.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the device hosting method described in any one of claims 1 to 7 when executing the computer program.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the device hosting method according to any one of claims 1 to 7 is implemented.