Authorization token refreshing method, home hub, server, device and medium

By receiving token expiration information from the IoT server through the home host, verifying the cloud status and updating the token using the message protocol server, the problem of the home host being unable to connect to the network after timeout is solved, automatic authorization updates are achieved, and the user experience is improved.

CN119892411BActive Publication Date: 2025-12-12GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411857760.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-12-12
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

The home console cannot connect to the internet after the timeout period, resulting in limited device operation and a poor user experience.

Method used

The home host receives token expiration information from the IoT server, verifies the cloud status through the message protocol server, and requests token renewal from the IoT server to achieve automatic refresh of the authorization token.

Benefits of technology

Improved security and user experience for license renewals in case of timeout, ensuring that home servers can automatically renew licenses when they fail.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892411B_ABST
    Figure CN119892411B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides an authorization token refreshing method, a home server, a server, equipment and a medium, comprising that the home server receives token invalidation information sent by an Internet of Things server; the home server receives authorization invalidation information sent to a message protocol server based on the token invalidation information; the message protocol server determines cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server; the home server sends a token update request to the Internet of Things server; the Internet of Things server feeds back update token information in response to the token update request when it is determined that the cloud state information is in invalidation and the authorization invalidation information is in invalidation; and the home server refreshes the authorization token according to the update token information. Through the embodiment of the application, the function of automatic authorization update can be completed in the case of authorization invalidation, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, and in particular to an authorization token refreshing method, a home hub, an Internet of Things server, an electronic device and a storage medium. BACKGROUND

[0002] With the continuous popularity of Internet of Things, the demand for using smart home in local area network is increasingly prominent, and the home hub product supporting the control of devices and scenes in the local area network emerges as the times require. As the home hub is a local storage and operation center, it needs to obtain cloud data and perform information security verification. In the related art, when the home hub is out of time, it cannot be used in networking, which limits the operation of related devices and causes poor user experience. SUMMARY

[0003] In view of the above problems, the present application is proposed to provide an authorization token refreshing method, a home hub, an Internet of Things server, an electronic device and a storage medium which overcome the above problems or at least partially solve the above problems.

[0004] To solve the above problems, in a first aspect of the present application, the present application discloses an authorization token refreshing method applied to a home hub, wherein the home hub is connected with an Internet of Things server and a message protocol server, and the method comprises the following steps.

[0005] Receiving token invalidation information sent by the Internet of Things server;

[0006] Based on the token invalidation information, sending authorization invalidation information to the message protocol server, wherein the message protocol server is configured to determine cloud state information based on the authorization invalidation information, and send the cloud state information and the authorization invalidation information to the Internet of Things server;

[0007] Sending a token update request to the Internet of Things server, wherein the Internet of Things server is configured to feed back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid;

[0008] Refreshing the authorization token according to the update token information.

[0009] Optionally, before the step of sending the authorization invalidation information to the message protocol server based on the token invalidation information, the method further comprises the following steps.

[0010] Refreshing the token interface; sending a refresh token request to the Internet of Things server through the token interface; the Internet of Things server is further configured to generate a refresh code overdue information based on the refresh token request; the refresh code overdue information is used to represent the authorization invalidation of the home hub.

[0011] Optionally, before the step of receiving the token invalidation information sent by the Internet of Things server, the method further comprises:

[0012] sending a home data request to the Internet of Things server, wherein the Internet of Things server is configured to feed back the token invalidation information based on the home data request.

[0013] Optionally, the step of authorizing token refreshing according to the updated token information comprises:

[0014] determining a target interface according to the updated token information;

[0015] calling the target interface to send a refresh code update request to the Internet of Things server, wherein the Internet of Things server is configured to feed back refresh code information in response to the refresh code update request;

[0016] authorizing token refreshing according to the refresh code information.

[0017] In a second aspect of the present application, an embodiment of the present application discloses a method for authorizing token refreshing, applied to an Internet of Things server, wherein the Internet of Things server is connected with a home host and a message protocol server, and the method comprises:

[0018] sending token invalidation information to the home host, wherein the home host is configured to receive the token invalidation information, send authorization invalidation information to the message protocol server based on the token invalidation information, and the message protocol server is configured to determine cloud state information based on the authorization invalidation information;

[0019] receiving the cloud state information and the authorization invalidation information sent by the message protocol server;

[0020] receiving a token update request sent by the home host;

[0021] when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid, generating updated token information in response to the token update request, and the home host is configured to authorize token refreshing according to the updated token information.

[0022] Optionally, the home host is further configured to refresh a token interface, and the method further comprises:

[0023] receiving a refresh token request sent by the home host through the token interface;

[0024] generating refresh code overdue information based on the refresh token request, wherein the refresh code overdue information is used to represent that the home host is invalid for authorization.

[0025] Optionally, the method further comprises:

[0026] receiving a home data request sent by the home host;

[0027] based on the home data request, feeding back the token invalidation information.

[0028] In a third aspect of the present application, an embodiment of the present application discloses a method for refreshing an authorization token, applied to a home Internet of Things architecture, the home Internet of Things architecture comprising a home host, an Internet of Things server and a message protocol server connected with each other, and the method comprising:

[0029] the home host receiving token invalidation information sent by the Internet of Things server;

[0030] the home host sending authorization invalidation information to the message protocol server based on the token invalidation information;

[0031] the message protocol server determining cloud state information based on the authorization invalidation information, and sending the cloud state information and the authorization invalidation information to the Internet of Things server;

[0032] the home host sending a token update request to the Internet of Things server;

[0033] the Internet of Things server feeding back update token information in response to the token update request when determining that the cloud state information is invalid and the authorization invalidation information is invalid;

[0034] the home host refreshing the authorization token according to the update token information.

[0035] In a fourth aspect of the present application, an embodiment of the present application discloses a home host, the home host being connected with an Internet of Things server and a message protocol server, and the home host comprising:

[0036] a first receiving module, configured to receive token invalidation information sent by the Internet of Things server;

[0037] a first sending module, configured to send authorization invalidation information to the message protocol server based on the token invalidation information, the message protocol server being configured to determine cloud state information based on the authorization invalidation information, and send the cloud state information and the authorization invalidation information to the Internet of Things server;

[0038] a second sending module, configured to send a token update request to the Internet of Things server, the Internet of Things server being configured to feed back update token information in response to the token update request when determining that the cloud state information is invalid and the authorization invalidation information is invalid;

[0039] The refreshing module is configured to refresh the authorization token according to the update token information.

[0040] In a fifth aspect of the present application, an embodiment of the present application discloses an Internet of Things server, which is connected with a home host and a message protocol server, and comprises:

[0041] The third sending module is configured to send token invalidation information to the home host, and the home host is configured to receive the token invalidation information, send authorization invalidation information to the message protocol server based on the token invalidation information, and determine cloud state information based on the authorization invalidation information.

[0042] The second receiving module is configured to receive the cloud state information and the authorization invalidation information sent by the message protocol server.

[0043] The third receiving module is configured to receive a token update request sent by the home host.

[0044] The indicating module is configured to generate update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid, and the home host is configured to refresh the authorization token according to the update token information.

[0045] In a sixth aspect of the present application, an embodiment of the present application discloses an electronic device, which comprises a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and when the computer program is executed by the processor, the steps of the authorization token refreshing method described above are implemented.

[0046] In a seventh aspect of the present application, an embodiment of the present application discloses a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the authorization token refreshing method described above are implemented.

[0047] The embodiment of the present application has the following advantages:

[0048] The embodiment of the present application receives token invalidation information sent by the Internet of Things server through the home host; the home host receives the authorization invalidation information sent to the message protocol server based on the token invalidation information; the message protocol server determines the cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server; the home host sends a token update request to the Internet of Things server; the Internet of Things server feeds back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid; and the home host performs authorization token refreshing according to the update token information. When the home host is not connected to the network for a long time, the message protocol server sends the authorization invalidation information, the Internet of Things server can double-verify the cloud state information and the authorization invalidation information, the security of the request update token can be improved, the authenticity of the host and the business can be verified, the update token information is fed back, the home host can perform authorization update, the function of automatically completing authorization update in the case of authorization invalidation can be realized, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 is a step flow chart of an authorization token refreshing method embodiment of the present application;

[0050] Figure 2 is a step flow chart of an authorization token refreshing method embodiment of the present application;

[0051] Figure 3 is a step flow chart of another authorization token refreshing method embodiment of the present application;

[0052] Figure 4 is a step flow chart of an authorization token refreshing method example of the present application;

[0053] Figure 5 is a structure block diagram of a home host embodiment of the present application;

[0054] Figure 6 is a structure block diagram of an Internet of Things server embodiment of the present application;

[0055] Figure 7 is a structure block diagram of an electronic device provided by the embodiment of the present application;

[0056] Figure 8 is a structure block diagram of a storage medium provided by the embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0058] REFERENCE Figure 1, a step flow chart of an embodiment of an authorization token refreshing method of the application is shown, the authorization token refreshing method is applied to a home host, the home host is connected with an Internet of Things server and a message protocol server. The home host is a host device with the ability to connect various protocol devices and local storage and computing capacity, such as smart home electrical equipment. The Internet of Things server is a server associated with the home host in the same Internet of Things, used to store device information, room information, scene information and the like under the account, such as an IoT server. The message protocol server is a relay server for the message protocol used by the home host, such as an MQTT (Message Queuing Telemetry Transport) server. The home host, the Internet of Things server and the message protocol server are connected with each other.

[0059] The authorization token refreshing method can specifically include the following steps:

[0060] Step 101, receiving token invalidation information sent by the Internet of Things server;

[0061] When the Internet of Things server generates token invalidation information, it can send the token invalidation information to the home host. The token invalidation information is information representing the invalidation of the token of the home host. The token invalidation information can be received.

[0062] Step 102, based on the token invalidation information, sending authorization invalidation information to the message protocol server, the message protocol server being configured to determine cloud state information based on the authorization invalidation information, and sending the cloud state information and the authorization invalidation information to the Internet of Things server;

[0063] Based on the token invalidation information, it can be determined that the token of itself is overdue and invalid, and the authorization invalidation information can be sent to the message protocol server to report the situation of the token of itself being overdue and invalid. The authorization invalidation information can be preset in the home host, and the sending is triggered when it is determined that the token is invalid.

[0064] After receiving the authorization invalidation information, the message protocol server updates its own state and determines the cloud state information. The message protocol server then forwards the cloud state information and the authorization invalidation information to the Internet of Things server.

[0065] Step 103, sending a token update request to the Internet of Things server, the Internet of Things server being configured to, when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid, respond to the token update request and feed back update token information;

[0066] After determining that the token of the home hub is expired, the home hub can send a token update request to the IoT server, and request the IoT server to renew the authorization token of the home hub through the token update request.

[0067] The IoT server can verify whether the cloud state information and the authorization expiration information are in the expired state. When the cloud state information is in the expired state and the authorization expiration information is in the expired state, it can be determined that the token of the home hub needs to be renewed. The IoT server can respond to the token update request and feed back the updated token information to the home hub.

[0068] In step 104, the authorization token is refreshed according to the updated token information.

[0069] The authorization token can be refreshed using the updated token information, so that the home hub can be used online.

[0070] Specifically, the step of refreshing the authorization token according to the updated token information includes: determining a target interface according to the updated token information; calling the target interface to send a refresh code update request to the IoT server; the IoT server is used to respond to the refresh code update request and feed back refresh code information; and refreshing the authorization token according to the refresh code information.

[0071] In actual application, the target interface can be determined from the interfaces of the home hub according to the interface identifier in the updated token information. Then the target interface is called to send a refresh code update request to the IoT server, and the refresh code corresponding to the interface is updated through the refresh code update request.

[0072] After receiving the refresh code update request, the IoT server can generate refresh code information in response to the refresh code update request. The refresh code information contains the corresponding refresh code. The refresh code information is fed back to the home hub.

[0073] The home hub can use the refresh code in the refresh code information to refresh the authorization token and renew the authorization token.

[0074] In an optional embodiment of the present application, before the step of receiving the token expiration information sent by the IoT server, the method further includes: sending a home data request to the IoT server, and the IoT server is used to feed back the token expiration information based on the home data request.

[0075] When the user uses the home hub, the home hub also sends a home data request to the IoT server. The home data request is used to obtain a corresponding control instruction to realize a related remote function. When the IoT server receives the home data request, it finds that the authorization of the home hub is expired, and then feeds back token expiration information to the home hub to inform the home hub that the authorization is expired.

[0076] In an optional embodiment of the present application, before the step of sending authorization invalidation information to the message protocol server based on the token invalidation information, the method further comprises: refreshing a token interface; sending a token refreshing request to the Internet of Things server through the token interface; the Internet of Things server is further configured to generate token refreshing code expiration information based on the token refreshing request; and the token refreshing code expiration information is used to represent that the home host authorization is invalid.

[0077] When receiving the token invalidation information, the home host can also verify whether the authorization timeout invalidation is real. The token interface corresponding to the current authorization token can be refreshed. A token refreshing request is sent to the Internet of Things server through the token interface, and the token refreshing request is used to request refreshing of the refreshing code. The Internet of Things server can generate token refreshing code expiration information in the case that the home host authorization is invalid after receiving the token refreshing request; and the token refreshing code expiration information is used to represent that the home host authorization is invalid. The token refreshing code expiration information can be fed back to the home host.

[0078] The embodiment of the present application receives token invalidation information sent by the Internet of Things server through the home host; the home host receives the token invalidation information and sends authorization invalidation information to the message protocol server based on the token invalidation information; the message protocol server determines cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server; the home host sends a token updating request to the Internet of Things server; the Internet of Things server feeds back updating token information in response to the token updating request when determining that the cloud state information is invalid and the authorization invalidation information is invalid; and the home host performs authorization token refreshing according to the updating token information. When the home host is not connected to the network for a long time, the message protocol server sends authorization invalidation information, the Internet of Things server can double-verify the cloud state information and the authorization invalidation information, the security of the token updating request can be improved, the authenticity of the host and the business can be verified, the updating token information is fed back, the home host can perform authorization updating, the function of automatically completing authorization updating in the case of authorization invalidation can be realized, and the user experience can be improved.

[0079] Reference Figure 2 Fig. 2 shows a step flowchart of another authorization token refreshing method embodiment of the present application, which is applied to an Internet of Things server connected with a home host and a message protocol server. The authorization token refreshing method can specifically include the following steps:

[0080] Step 201, sending token invalidation information to the home host, the home host being configured to receive the token invalidation information, send authorization invalidation information to the message protocol server based on the token invalidation information, and the message protocol server being configured to determine cloud state information based on the authorization invalidation information;

[0081] When the home host authorization is identified, the token invalidation information can be sent to the home host. After the home host receives the token invalidation information, it can determine that its token is overdue and invalid, and can send the authorization invalidation information to the message protocol server to report the token overdue and invalid situation.

[0082] The message protocol server determines the cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information.

[0083] In step 202, the cloud state information and the authorization invalidation information sent by the message protocol server are received.

[0084] The cloud state information and the authorization invalidation information sent by the message protocol server can be received to verify whether the token is updated.

[0085] In step 203, the token update request sent by the home host is received.

[0086] The token update request sent by the home host can also be received.

[0087] In step 204, when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid, the token update request is responded to, and the update token information is generated; the home host updates the authorization token according to the update token information.

[0088] When it is determined that the cloud state information and the authorization invalidation information are invalid, the verification is passed. The token of the home host can be updated, the token update request can be responded to, and the update token information can be generated. The update token information is fed back to the home host. The home host can update the authorization token according to the update token information.

[0089] In an optional embodiment of the present application, the home host is also used to refresh the token interface; the method further comprises: receiving the refresh token request sent by the home host through the token interface; generating the refresh code overdue information based on the refresh token request; the refresh code overdue information is used to represent the authorization invalidation of the home host.

[0090] In the embodiment of the present application, the refresh token request sent by the home host through the token interface can also be received, and the refresh code overdue information corresponding to the refresh token request is generated when the authorization is invalid. The authorization invalidation of the home host is represented by the refresh code overdue information, and the home host can be fed back.

[0091] In an optional embodiment of the present application, the method further comprises: receiving the home data request sent by the home host; and feeding back the token invalidation information based on the home data request.

[0092] The home host can send a home data request to obtain relevant data to support its operation in daily operation. The Internet of Things server can receive the home data request. Upon receipt, it is determined whether the home host is authorized to expire, and upon authorization expiration, the home data request can be responded with token expiration information.

[0093] The home host receives token expiration information sent by the Internet of Things server; the home host receives token expiration information based on token expiration information and sends authorization expiration information to the message protocol server; the message protocol server determines cloud state information based on authorization expiration information, sends the cloud state information and authorization expiration information to the Internet of Things server; the home host sends a token update request to the Internet of Things server; the Internet of Things server responds to the token update request and feeds back update token information when it determines that the cloud state information is in invalid and the authorization expiration information is in invalid; the home host updates the authorization token according to the update token information. When the home host is not connected to the network for a long time, the message protocol server sends authorization expiration information, the Internet of Things server can verify the cloud state information and authorization expiration information, which can improve the security of the request to update the token, verify the authenticity of the host and the business, and feed back the update token information, so that the home host can update the authorization and realize the function of automatically completing the authorization update in the case of authorization expiration, improving the user experience.

[0094] Reference Figure 3 , shows a step flowchart of another embodiment of the authorization token refresh method of the application, which is applied to a home Internet of Things architecture, which includes a home host, an Internet of Things server and a message protocol server connected to each other. The authorization token refresh method can specifically include the following steps:

[0095] Step 301, the home host receives token expiration information sent by the Internet of Things server;

[0096] The home host can receive token expiration information sent by the Internet of Things server and determine the authorization token expiration of itself based on the token expiration information.

[0097] Step 302, the home host sends authorization expiration information to the message protocol server based on the token expiration information;

[0098] After the home host receives the token expiration information, it determines that the authorization token is expired, and can generate authorization expiration information based on the token expiration information and send authorization expiration information to the message protocol server.

[0099] Step 303, the message protocol server determines cloud state information based on the authorization expiration information, and sends the cloud state information and the authorization expiration information to the Internet of Things server;

[0100] The message protocol server updates the cloud state information based on the authorization invalidation information after receiving the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server.

[0101] In step 304, the home host sends a token update request to the Internet of Things server.

[0102] The home host also sends a token update request to the Internet of Things server after determining that the authorization token of the home host is overdue.

[0103] In step 305, the Internet of Things server feeds back update token information in response to the token update request when determining that the cloud state information is invalid and the authorization invalidation information is invalid.

[0104] The Internet of Things server can respond to the token update request, determine a new authorization token, generate update token information, and feed back the update token information to the home host when determining that the cloud state information and the authorization invalidation information are both invalid.

[0105] In step 306, the home host refreshes the authorization token according to the update token information.

[0106] The home host refreshes the authorization token based on the obtained update token information, and renews the authorization token of the home host.

[0107] The home host receives token invalidation information sent by the Internet of Things server, receives authorization invalidation information based on the token invalidation information, and sends the authorization invalidation information to the message protocol server. The message protocol server determines cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server. The home host sends a token update request to the Internet of Things server. The Internet of Things server feeds back update token information in response to the token update request when determining that the cloud state information is invalid and the authorization invalidation information is invalid. The home host refreshes the authorization token according to the update token information. When the home host is not connected to the network for a long time, the home host sends authorization invalidation information with the help of the message protocol server. The Internet of Things server can double-check the cloud state information and the authorization invalidation information, which can improve the security of the request for updating the token, verify the authenticity of the host and the business, feed back the update token information, and enable the home host to update the authorization, so that the home host can automatically complete the authorization update function in the case of authorization invalidation, and improve the user experience.

[0108] To enable those skilled in the art to clearly understand the implementation process of the embodiments of the present application, the following refers to specific embodiments of the present application. Figure 4 An example is used for illustration:

[0109] First, the home host requests home data from the IoT server, and the server returns information that the host token is invalid.

[0110] Second, the home host calls the interface of refreshing the token by refreshing the code, and requests a new token. The server returns that the refreshing code is overdue and the token is invalid.

[0111] Third, the home host reports the device state (authorization invalid) to the MQTT server, and the MQTT server pushes the host authorization invalid information to the IOT server.

[0112] Fourth, the home host calls the token replacement interface and requests to replace the token.

[0113] Fifth, the IoT server checks the host device state and the cloud state. When both are authorization invalid, and the host requests to replace the token, the new token is returned.

[0114] Sixth, the home host obtains the new token and calls the interface to replace the refreshing code by the new token. The IoT server returns the new refreshing code. The home host renews the token by the refreshing code after networking.

[0115] After obtaining the new token, the home host requests home data from the IoT server, and the IOT server returns the data. Thus, the entire token invalidation and refreshing process is completed.

[0116] It should be noted that, for the method embodiment, in order to simply describe, it is expressed as a series of action combinations, but those skilled in the art should know that the embodiment of the present application is not limited by the described action sequence, because according to the embodiment of the present application, some steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily necessary for the embodiment of the present application.

[0117] Referring to Figure 5 , a structure block diagram of a home host embodiment of the present application is shown, the home host is connected with an Internet of Things server and a message protocol server. The home host can specifically include the following modules:

[0118] The first receiving module 501 is used for receiving token invalidation information sent by the Internet of Things server;

[0119] The first sending module 502 is used for sending authorization invalidation information to the message protocol server based on the token invalidation information, and the message protocol server is used for determining cloud state information based on the authorization invalidation information, and sending the cloud state information and the authorization invalidation information to the Internet of Things server.

[0120] The second sending module 503 is used for sending a token update request to the Internet of Things server, and the Internet of Things server is used for feeding back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid.

[0121] The refreshing module 504 is used for refreshing the authorization token according to the update token information.

[0122] In an optional embodiment of the present application, the home host further comprises:

[0123] The interface calling module is used for refreshing a token interface, and sending a refresh token request to the Internet of Things server through the token interface; the Internet of Things server is further used for generating refresh code overdue information based on the refresh token request; and the refresh code overdue information is used for representing authorization invalidation of the home host.

[0124] In an optional embodiment of the present application, the home host further comprises:

[0125] The fourth sending module is used for sending a home data request to the Internet of Things server, and the Internet of Things server is used for feeding back the token invalidation information based on the home data request.

[0126] In an optional embodiment of the present application, the refreshing module 504 comprises:

[0127] The target interface determining sub-module is used for determining a target interface according to the update token information.

[0128] The calling sub-module is used for calling the target interface to send a refresh code update request to the Internet of Things server, and the Internet of Things server is used for feeding back refresh code information in response to the refresh code update request.

[0129] The refreshing sub-module is used for refreshing the authorization token according to the refresh code information.

[0130] The embodiment of the application receives token invalidation information sent by an Internet of Things server through a home host; the home host receives the token invalidation information and sends authorization invalidation information to a message protocol server based on the token invalidation information; the message protocol server determines cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server; the home host sends a token update request to the Internet of Things server; the Internet of Things server feeds back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid; and the home host refreshes an authorization token according to the update token information. When the home host is not connected to the network for a long time, the authorization invalidation information is sent through the message protocol server, the Internet of Things server can double-verify the cloud state information and the authorization invalidation information, the security of the request update token can be improved, the authenticity of the host and the service can be verified, the update token information is fed back, so that the home host can update the authorization, and the function of automatically completing the authorization update in the case of authorization invalidation is realized, and the user experience is improved.

[0131] Reference Figure 6 , a structure block diagram of an Internet of Things server embodiment of the application is shown, and the Internet of Things server is connected with a home host and a message protocol server. The Internet of Things server can specifically include the following modules:

[0132] A third sending module 601 is configured to send token invalidation information to the home host, and the home host is configured to receive the token invalidation information, send authorization invalidation information to the message protocol server based on the token invalidation information, and the message protocol server is configured to determine cloud state information based on the authorization invalidation information;

[0133] A second receiving module 602 is configured to receive the cloud state information and the authorization invalidation information sent by the message protocol server;

[0134] A third receiving module 603 is configured to receive a token update request sent by the home host;

[0135] An indication module 604 is configured to generate update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid, and the home host refreshes an authorization token according to the update token information.

[0136] In an optional embodiment of the application, the home host is further configured to refresh a token interface, and the Internet of Things server further includes:

[0137] A fourth receiving module is configured to receive a refresh token request sent by the home host through the token interface;

[0138] The generating module is configured to generate refresh code expiration information based on the refresh token request; the refresh code expiration information is used to represent authorization invalidation of the home server.

[0139] In an optional embodiment of the present application, the Internet of Things server further comprises:

[0140] The fifth receiving module is configured to receive a home data request sent by the home server.

[0141] The feedback module is configured to feed back the token invalidation information based on the home data request.

[0142] The home server receives the token invalidation information sent by the Internet of Things server, and sends authorization invalidation information to the message protocol server based on the token invalidation information; the message protocol server determines cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server; the home server sends a token update request to the Internet of Things server; the Internet of Things server feeds back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid; and the home server performs authorization token refreshing according to the update token information. When the home server is not connected to the network for a long time, the message protocol server sends the authorization invalidation information, the Internet of Things server can perform double verification based on the cloud state information and the authorization invalidation information, the security of the request update token can be improved, the authenticity of the host and the business can be verified, the update token information is fed back, so that the home server can perform authorization updating, and the function of automatically completing authorization updating in the case of authorization invalidation can be realized, and the user experience is improved.

[0143] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts refer to the part of the method embodiment.

[0144] Reference Figure 7 The electronic device comprises:

[0145] The processor 701 and the storage medium 702, the storage medium 702 stores the computer program executable by the processor 701, when the electronic device control runs, the processor 701 executes the computer program, to realize the authorization token refreshing method as any one of the embodiments of the present application.

[0146] In a first aspect, the authorization token refreshing method is applied to a home server, the home server is connected with an Internet of Things server and a message protocol server, and the method comprises:

[0147] Receiving token invalidation information sent by the Internet of Things server;

[0148] sending authorization invalidation information to the message protocol server based on the token invalidation information, the message protocol server being configured to determine cloud state information based on the authorization invalidation information and send the cloud state information and the authorization invalidation information to the Internet of Things server;

[0149] sending a token update request to the Internet of Things server, the Internet of Things server being configured to feed back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid;

[0150] refreshing the authorization token according to the update token information.

[0151] Optionally, before the step of sending authorization invalidation information to the message protocol server based on the token invalidation information, the method further comprises:

[0152] a refresh token interface; sending a refresh token request to the Internet of Things server through the refresh token interface; the Internet of Things server is further configured to generate a refresh code expiration information based on the refresh token request; the refresh code expiration information is used to represent that the authorization of the home host is invalid.

[0153] Optionally, before the step of receiving the token invalidation information sent by the Internet of Things server, the method further comprises:

[0154] sending a home data request to the Internet of Things server, the Internet of Things server being configured to feed back the token invalidation information based on the home data request.

[0155] Optionally, the step of refreshing the authorization token according to the update token information comprises:

[0156] determining a target interface according to the update token information;

[0157] calling the target interface to send a refresh code update request to the Internet of Things server; the Internet of Things server is configured to feed back refresh code information in response to the refresh code update request;

[0158] refreshing the authorization token according to the refresh code information.

[0159] In a second aspect, an authorization token refreshing method is applied to an Internet of Things server, the Internet of Things server being connected with a home host and a message protocol server, and the method comprising:

[0160] sending token invalidation information to the home host, the home host being configured to receive the token invalidation information, send authorization invalidation information to the message protocol server based on the token invalidation information, and the message protocol server being configured to determine cloud state information based on the authorization invalidation information;

[0161] receiving the cloud state information and the authorization invalid information sent by the message protocol server;

[0162] receiving a token update request sent by the home host;

[0163] in response to the token update request, generating update token information when it is determined that the cloud state information is invalid and the authorization invalid information is invalid; and

[0164] Optionally, the home host is further configured to refresh a token interface; and the method further comprises:

[0165] receiving a refresh token request sent by the home host through the token interface;

[0166] generating refresh code expiration information based on the refresh token request; the refresh code expiration information is used to represent that the authorization of the home host is invalid.

[0167] Optionally, the method further comprises:

[0168] receiving a home data request sent by the home host;

[0169] based on the home data request, feeding back the token invalid information.

[0170] In a third aspect, a method for refreshing an authorization token is applied to a home Internet of Things architecture, the home Internet of Things architecture comprising a home host, an Internet of Things server and a message protocol server connected to each other, and the method comprises:

[0171] the home host receives token invalid information sent by the Internet of Things server;

[0172] the home host sends authorization invalid information to the message protocol server based on the token invalid information;

[0173] the message protocol server determines cloud state information based on the authorization invalid information, and sends the cloud state information and the authorization invalid information to the Internet of Things server;

[0174] the home host sends a token update request to the Internet of Things server;

[0175] the Internet of Things server feeds back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalid information is invalid;

[0176] the home host refreshes an authorization token according to the update token information.

[0177] The embodiment of the present application receives token invalidation information sent by the Internet of Things server through the home host; the home host receives authorization invalidation information sent to the message protocol server based on the token invalidation information; the message protocol server determines cloud state information based on the authorization invalidation information, and sends the cloud state information and the authorization invalidation information to the Internet of Things server; the home host sends a token update request to the Internet of Things server; the Internet of Things server feeds back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid; and the home host performs authorization token refreshing according to the update token information. When the home host is not connected to the network for a long time, the message protocol server sends authorization invalidation information, the Internet of Things server can double-verify the cloud state information and the authorization invalidation information, the security of the request for updating the token can be improved, the authenticity of the host and the service can be verified, the update token information is fed back, so that the home host can perform authorization updating, the function of automatically completing authorization updating in the case of authorization invalidation can be realized, and the user experience is improved.

[0178] The memory can include a random access memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0179] The aforementioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0180] Reference Figure 8 The embodiment of the present application further provides a computer readable storage medium 801, and the storage medium 801 stores a computer program. The computer program is run by a processor to execute the authorization token refreshing method according to any one of the embodiments of the present application.

[0181] In a first aspect, the authorization token refreshing method is applied to a home host, the home host is connected with an Internet of Things server and a message protocol server, and the method comprises the following steps.

[0182] receiving token invalidation information sent by the Internet of Things server;

[0183] sending authorization invalidation information to the message protocol server based on the token invalidation information, the message protocol server being configured to determine cloud state information based on the authorization invalidation information, and send the cloud state information and the authorization invalidation information to the Internet of Things server;

[0184] sending a token update request to the Internet of Things server, the Internet of Things server being configured to, in response to the token update request, feed back update token information when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid;

[0185] refreshing the authorization token according to the update token information.

[0186] Optionally, before the step of sending the authorization invalidation information to the message protocol server based on the token invalidation information, the method further comprises:

[0187] a refresh token interface; sending a refresh token request to the Internet of Things server through the refresh token interface; the Internet of Things server is further configured to generate a refresh code expiration information based on the refresh token request; the refresh code expiration information is used to represent that the authorization of the home host is invalid.

[0188] Optionally, before the step of receiving the token invalidation information sent by the Internet of Things server, the method further comprises:

[0189] sending a home data request to the Internet of Things server, the Internet of Things server being configured to feed back the token invalidation information based on the home data request.

[0190] Optionally, the step of refreshing the authorization token according to the update token information comprises:

[0191] determining a target interface according to the update token information;

[0192] calling the target interface to send a refresh code update request to the Internet of Things server; the Internet of Things server is configured to feed back refresh code information in response to the refresh code update request;

[0193] refreshing the authorization token according to the refresh code information.

[0194] In a second aspect, an authorization token refreshing method is applied to an Internet of Things server, the Internet of Things server being connected with a home host and a message protocol server, and the method comprises:

[0195] sending token invalidation information to the home hub, the home hub configured to receive the token invalidation information, and based on the token invalidation information, send authorization invalidation information to the message protocol server, the message protocol server configured to determine cloud status information based on the authorization invalidation information;

[0196] receiving the cloud status information and the authorization invalidation information sent by the message protocol server;

[0197] receiving a token update request sent by the home hub;

[0198] in response to the token update request, generating update token information when it is determined that the cloud status information is invalid and the authorization invalidation information is invalid; and the home hub performing authorization token refreshing according to the update token information.

[0199] Optionally, the home hub is further configured to refresh a token interface; and the method further comprises:

[0200] receiving a refresh token request sent by the home hub through the token interface;

[0201] generating a refresh code expiration information based on the refresh token request; the refresh code expiration information is used to represent that the home hub is authorization invalid.

[0202] Optionally, the method further comprises:

[0203] receiving a home data request sent by the home hub;

[0204] based on the home data request, feeding back the token invalidation information.

[0205] In a third aspect, a method for refreshing an authorization token is applied to a home Internet of Things architecture, the home Internet of Things architecture comprising a home hub, an Internet of Things server and a message protocol server connected to each other, and the method comprises:

[0206] the home hub receiving token invalidation information sent by the Internet of Things server;

[0207] the home hub sending authorization invalidation information to the message protocol server based on the token invalidation information;

[0208] the message protocol server determining cloud status information based on the authorization invalidation information, and sending the cloud status information and the authorization invalidation information to the Internet of Things server;

[0209] the home hub sending a token update request to the Internet of Things server;

[0210] The Internet of Things server feeds back update token information in response to the token update request when determining that the cloud state information is invalid and the authorization invalid information is invalid.

[0211] The home host performs authorization token refreshing according to the update token information.

[0212] The home host receives token invalid information sent by the Internet of Things server; the home host sends authorization invalid information to the message protocol server based on the token invalid information; the message protocol server determines cloud state information based on the authorization invalid information, and sends the cloud state information and the authorization invalid information to the Internet of Things server; the home host sends a token update request to the Internet of Things server; the Internet of Things server feeds back update token information in response to the token update request when determining that the cloud state information is invalid and the authorization invalid information is invalid; and the home host performs authorization token refreshing according to the update token information. When the home host is not connected to the network for a long time, the message protocol server sends authorization invalid information, the Internet of Things server can double-check the cloud state information and the authorization invalid information, the security of the token update request can be improved, the authenticity of the host and the service can be verified, update token information is fed back, and the home host can be authorized to update, so that the home host can automatically complete the authorization update function in the case of authorization invalidity, and the user experience is improved.

[0213] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be referred to each other.

[0214] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0215] The embodiments of the present application are described with reference to the flowchart illustrations and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0216] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal devices to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0217] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices, such that a series of operational steps are carried out on the computer or other programmable terminal devices to produce a computer implemented process so that the instructions executed on the computer or other programmable terminal devices provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0218] Although preferred embodiments of the present application have been described, those skilled in the art will be able to make additional modifications and variations to these embodiments without departing from the scope of the present application. Accordingly, the appended claims are intended to encompass all such modifications and variations as falling within the scope of the present application.

[0219] Finally, it is to be understood that the phraseology or terminology such as "first" and "second" etc. used herein is merely intended to differentiate one entity or operation from another entity or operation, without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0220] The above provides a detailed description of the authorization token refreshing method, the home host, the Internet of Things server, the electronic device and the storage medium. The principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only used to help understand the method and the core idea of the present application. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the present application. In conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method for refreshing an authorization token, the method comprising: The method is applied to a home host connected with an Internet of Things server and a message protocol server, and comprises the following steps: Receiving token invalidation information sent by the Internet of Things server; Based on the token invalidation information, sending authorization invalidation information to the message protocol server, which is used to determine cloud state information based on the authorization invalidation information and send the cloud state information and the authorization invalidation information to the Internet of Things server; Sending a token update request to the Internet of Things server, which is used to feed back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid; According to the update token information, refreshing the authorization token.

2. The method of claim 1, wherein, Before the step of sending the authorization invalidation information to the message protocol server based on the token invalidation information, the method further comprises the following steps: Refreshing a token interface; sending a token refreshing request to the Internet of Things server through the token interface; the Internet of Things server is further used to generate a refresh code overdue information based on the token refreshing request; the refresh code overdue information is used to represent the authorization invalidation of the home host.

3. The method of claim 1, wherein, Before the step of receiving the token invalidation information sent by the Internet of Things server, the method further comprises the following steps: Sending a home data request to the Internet of Things server, which is used to feed back the token invalidation information based on the home data request.

4. The method of claim 1, wherein, The step of refreshing the authorization token according to the update token information comprises the following steps: According to the update token information, determining a target interface; Calling the target interface to send a refresh code update request to the Internet of Things server; the Internet of Things server is used to feed back refresh code information in response to the refresh code update request; According to the refresh code information, refreshing the authorization token.

5. A method for refreshing an authorization token, the method comprising: The method is applied to an Internet of Things server connected with a home host and a message protocol server, and comprises the following steps: Sending token invalidation information to the home host, which is used to receive the token invalidation information, send authorization invalidation information to the message protocol server based on the token invalidation information, and determine cloud state information based on the authorization invalidation information; Receiving the cloud state information and the authorization invalidation information sent by the message protocol server; Receiving a token update request sent by the home host; When it is determined that the cloud state information is invalid and the authorization invalidation information is invalid, generating update token information in response to the token update request; the home host refreshes the authorization token according to the update token information.

6. The method of claim 5, wherein, The home host is further used to refresh a token interface; the method further comprises the following steps: Receiving a token refreshing request sent by the home host through the token interface; Generating a refresh code overdue information based on the token refreshing request; the refresh code overdue information is used to represent the authorization invalidation of the home host.

7. The method of claim 5, wherein, The method further comprises the following steps: Receiving a home data request sent by the home host; Feeding back the token invalidation information based on the home data request.

8. A method for refreshing an authorization token, the method comprising: Applied to a home Internet of Things architecture comprising a home host, an Internet of Things server and a message protocol server connected to each other, the method comprises: The home host receives token invalidation information sent by the Internet of Things server; The home host sends authorization invalidation information to the message protocol server based on the token invalidation information; The message protocol server determines cloud state information based on the authorization invalidation information and sends the cloud state information and the authorization invalidation information to the Internet of Things server; The home host sends a token update request to the Internet of Things server; The Internet of Things server feeds back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid; The home host refreshes the authorization token according to the update token information.

9. A home server, characterized by The home host is connected to the Internet of Things server and the message protocol server, and comprises: A first receiving module for receiving token invalidation information sent by the Internet of Things server; A first sending module for sending authorization invalidation information to the message protocol server based on the token invalidation information, the message protocol server being configured to determine cloud state information based on the authorization invalidation information and send the cloud state information and the authorization invalidation information to the Internet of Things server; A second sending module for sending a token update request to the Internet of Things server, the Internet of Things server being configured to feed back update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid; A refreshing module for refreshing the authorization token according to the update token information.

10. An Internet of Things server, characterized by The Internet of Things server is connected to the home host and the message protocol server, and comprises: A third sending module for sending token invalidation information to the home host, the home host being configured to receive the token invalidation information, send authorization invalidation information to the message protocol server based on the token invalidation information, and the message protocol server being configured to determine cloud state information based on the authorization invalidation information; A second receiving module for receiving the cloud state information and the authorization invalidation information sent by the message protocol server; A third receiving module for receiving a token update request sent by the home host; An indicating module for generating update token information in response to the token update request when it is determined that the cloud state information is invalid and the authorization invalidation information is invalid, and the home host refreshing the authorization token according to the update token information.

11. An electronic device, comprising: A computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the authorization token refreshing method according to any one of claims 1-8.

12. A computer-readable storage medium, characterized in that, A computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the authorization token refreshing method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Cloud MQTT access authority control method

    CN114205112A

  • Resource access implementation method and device, electronic equipment and storage medium

    CN114764507A