Device control method and apparatus, control system, storage medium, and electronic device
By displaying authorization prompts in the browser and obtaining the user identifier and authorization token, the technology solves the problem that existing technologies can only control devices through terminal devices, and enables flexible control of devices through the browser.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2026-03-20
AI Technical Summary
Existing equipment control systems only allow control through application software in terminal devices, which cannot meet people's diverse control needs.
The browser outputs authorization prompts, the pre-bound application software obtains the user identifier and generates an authorization token, and sends it to the IoT system for storage. The IoT system verifies the permissions based on the authorization token and address information and then sends control commands to the device.
It enables control of devices through a browser, improving the flexibility and versatility of device control.
Smart Images

Figure CN115879078B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent control, in particular to a device control method and device, a control system, a storage medium and an electronic device. BACKGROUND
[0002] With the development of science and technology, people have higher requirements for diversified control of devices. However, in the existing device control system, only application software in a terminal device is allowed to control the device, which cannot meet the needs of people.
[0003] Therefore, how to provide a technical solution capable of controlling a device through a browser is a problem that needs to be solved in the field at present. SUMMARY
[0004] The present application provides a device control method and device, a control system, a storage medium and an electronic device, aiming to control a device through a browser.
[0005] In order to achieve the above purpose, the present application provides the following technical solutions:
[0006] A device control method applied to a browser, the method comprising:
[0007] outputting authorization prompt information for prompting the browser to be authorized by application software; the application software is pre-bound with a device to be controlled;
[0008] After the application software authorizes the browser, the user identifier of the application software is obtained, and an authorization token is generated;
[0009] The user identifier and the authorization token are sent to an Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token in a preset database;
[0010] receiving a control request, wherein the control request carries address information of a device to be controlled and a control instruction;
[0011] The control request and the authorization token are sent to the Internet of Things system to trigger the Internet of Things system to perform permission verification on the browser according to the authorization token and the address information by calling the database, and after the permission verification is passed, the control instruction is sent to the device to be controlled to control the device to be controlled.
[0012] The above method, optionally, the authorization prompt information includes an authorization two-dimensional code.
[0013] The above method, optionally, the determination that the application software authorizes the browser comprises:
[0014] polling a two-dimensional code state of the authorized two-dimensional code according to a preset polling interval;
[0015] determining whether the two-dimensional code state of the authorized two-dimensional code is an authorized state;
[0016] if the two-dimensional code state of the authorized two-dimensional code is the authorized state, determining that the application software authorizes the browser.
[0017] A device control apparatus applied to a browser, the apparatus comprising:
[0018] an output unit configured to output an authorization prompt information for prompting to authorize the browser by an application software; the application software is previously bound with a device to be controlled;
[0019] a first acquisition unit configured to acquire a user identifier of the application software and generate an authorization token after the application software authorizes the browser;
[0020] a first sending unit configured to send the user identifier and the authorization token to an Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token into a preset database;
[0021] a first receiving unit configured to receive a control request; the control request carries address information of a device to be controlled and a control instruction;
[0022] a second sending unit configured to send the control request and the authorization token to the Internet of Things system, so as to trigger the Internet of Things system to perform permission verification on the browser according to the authorization token and the address information by calling the database, and send the control instruction to the device to be controlled to control the device to be controlled after the permission verification is passed.
[0023] A device control method applied to an Internet of Things system, the method comprising:
[0024] receiving a control request and an authorization token sent by a browser; the control request carries address information of a device to be controlled and a control instruction;
[0025] determining whether a user identifier corresponding to the authorization token sent by the browser exists in a preset database;
[0026] if the user identifier exists, acquiring address information corresponding to a target user identifier which is previously stored; the target user identifier is a user identifier corresponding to the authorization token;
[0027] If the address information corresponding to the target user identifier is consistent with the address information carried in the control request, the control instruction is sent to the to-be-controlled device to control the to-be-controlled device.
[0028] The method can further include:
[0029] determining whether the authorization token sent by the browser matches an authorization token in the preset database;
[0030] If the authorization token exists, it is determined that the user identifier corresponding to the authorization token sent by the browser exists in the database.
[0031] A device control apparatus applied to an Internet of Things system, the apparatus comprising:
[0032] a receiving unit configured to receive a control request and an authorization token sent by a browser, the control request carrying address information of a to-be-controlled device and a control instruction;
[0033] a judging unit configured to determine whether a user identifier corresponding to the authorization token sent by the browser exists in a preset database;
[0034] a second obtaining unit configured to, if the authorization token exists, obtain address information corresponding to a target user identifier that is pre-stored, the target user identifier being the user identifier corresponding to the authorization token;
[0035] a third sending unit configured to, if the address information corresponding to the target user identifier is consistent with the address information carried in the control request, send the control instruction to the to-be-controlled device to control the to-be-controlled device.
[0036] A device control system comprising:
[0037] a browser, an Internet of Things system, and application software pre-bound with a to-be-controlled device;
[0038] the application software is configured to authorize the browser;
[0039] the browser is configured to execute the device control method;
[0040] the Internet of Things system is configured to execute the device control method.
[0041] A storage medium comprising stored instructions, wherein when the instructions are executed, the device where the storage medium is located executes the device control method.
[0042] An electronic device includes a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform the above-mentioned device control method by one or more processors.
[0043] Compared with the prior art, the present application has the following advantages:
[0044] The present application provides a device control method and device, a control system, a storage medium and an electronic device. By using the application software bound in advance with the to-be-controlled device, the browser is authorized. After the browser is authorized by the application software, the user identifier of the application software is obtained, the authorization token is generated, and the user identifier and the authorization token are sent to the Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token in the preset database correspondingly. Therefore, after receiving the control instruction, the address information and the authorization token, the Internet of Things system performs the permission verification on the browser by calling the database according to the authorization token and the address information sent by the browser, and then the control instruction is sent to the to-be-controlled device after the permission verification is passed, so that the to-be-controlled device is controlled through the browser. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.
[0046] Figure 1 A method flowchart of a device control method provided by the present application;
[0047] Figure 2 An example diagram of a device control method provided by the present application;
[0048] Figure 3 Another method flowchart of a device control method provided by the present application;
[0049] Figure 4 Still another method flowchart of a device control method provided by the present application;
[0050] Figure 5 A structure schematic diagram of a control system provided by the present application;
[0051] Figure 6 Still another example diagram of a device control method provided by the present application;
[0052] Figure 7 Still another example diagram of a device control method provided by the present application;
[0053] Figure 8 A structural schematic diagram of a device control apparatus provided by the present application is shown in the figure.
[0054] Figure 9 Another structural schematic diagram of a device control apparatus provided by the present application is shown in the figure.
[0055] Figure 10 A structural schematic diagram of an electronic device provided by the present application is shown in the figure. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0057] The term “comprising” and variations thereof as used in the present document are open-ended, that is, “including but not limited to”. The term “based on” is “at least partially based on”. The term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Related definitions of other terms will be given in the following description.
[0058] It should be noted that the terms “first”, “second”, and the like mentioned in the present disclosure are only used to distinguish different devices, modules or units, and do not limit the functions performed by these devices, modules or units or the mutual dependency relationship therebetween.
[0059] It should be noted that the modification of “one” or “multiple” in the present disclosure is illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as “one or more”.
[0060] The device control method provided by the embodiments of the present application can be applied in a browser, and a flowchart of the device control method is shown in Figure 1 The specific steps include:
[0061] S101, output authorization prompt information.
[0062] In the present embodiment, after the first user successfully logs in, the browser acquires authorization prompt information and outputs the authorization prompt information, wherein the authorization prompt information is used to prompt the browser to be authorized by the application software.
[0063] In this embodiment, the authorization prompt information can be an authorization two-dimensional code, and outputting the authorization prompt information includes outputting the authorization two-dimensional code, that is, displaying the authorization two-dimensional code.
[0064] In this embodiment, the browser includes a preset website and a user center system. After the first user successfully logs in the preset website in the browser, the preset website acquires authorization prompt information from the user center system and outputs the authorization prompt information, where the authorization prompt information is used to prompt the browser to be authorized by the application software, that is, used to prompt the preset website in the browser to be authorized by the application software.
[0065] In this embodiment, the Internet of Things system can include a main data system and an Internet of Things cloud system, and the application software is pre-bound with the to-be-controlled device, refer to Figure 2 , the specific binding process includes:
[0066] S201, the application software acquires the user identifier of the second user carried in the login request in response to the login request of the second user.
[0067] S202, the application software sends a login verification to the user center system according to the user identifier of the second user.
[0068] S203, the user center system performs login verification on the second user.
[0069] S204, the user center system generates an application software token after the login verification is passed.
[0070] S205, the user center system sends the application software token and the user identifier to the main data system.
[0071] S206, the user center system sends the application software token to the application software
[0072] S207, the main data system stores the application software token and the user identifier correspondingly after receiving the application software token and the user identifier sent by the user center system.
[0073] S208, the application software receives the address information of the to-be-controlled device input by the second user.
[0074] S209, the application software sends the address information and the application software token to the Internet of Things cloud system.
[0075] S210, the Internet of Things cloud system sends a verification request to the main data system according to the application software token.
[0076] S211, the main data system verifies the application software token according to the pre-stored application software token and the user identifier, that is, judges whether there is a token matched with the application software token, if yes, determines that the application software token passes the verification, and after determining that the application software token passes the verification, acquires the pre-stored user identifier corresponding to the application software token, and feeds back the user identifier to the Internet of Things cloud system.
[0077] S212, the Internet of Things cloud system stores the user identifier and the address information of the to-be-controlled device correspondingly, and completes the binding of the to-be-controlled device and the application software.
[0078] It should be noted that the first user and the second user can be the same user, or can be different users, the user identifier of the first user and the user identifier of the second user corresponding to the application software are different user identifiers, and the user identifier can be a user account.
[0079] In the embodiment, the address information can be a physical address MAC.
[0080] S102, it is judged whether the application software is authorized to the browser, if yes, S103 is executed, and if not, S102 is returned to be executed.
[0081] In the embodiment, it is judged whether the second user uses the application software to authorize the browser, that is, it is determined whether the application software is authorized to the browser, wherein the second user is a user who logs in the application software.
[0082] Referring to Figure 3 , the process of judging whether the application software is authorized to the browser specifically includes:
[0083] S301, the two-dimensional code state of the authorization two-dimensional code is polled at a preset polling interval.
[0084] In the embodiment, the browser polls the two-dimensional code state of the authorization two-dimensional code at a preset polling interval.
[0085] In the embodiment, the two-dimensional code state of the authorization two-dimensional code includes an unauthorized state and an authorized state, wherein before the second user uses the application software to authorize the browser, the two-dimensional code state is the unauthorized state, and after the user uses the application software to authorize the browser, the two-dimensional code state is the authorized state.
[0086] S302, it is judged whether the two-dimensional code state of the authorization two-dimensional code is the authorized state, if yes, step S303 is executed, and if not, S301 is returned to be executed.
[0087] S303, it is determined that the application software is authorized to the browser.
[0088] In this embodiment, if the two-dimensional code state of the authorized two-dimensional code is the authorized state, it is determined that the application software authorizes the browser.
[0089] In this embodiment, the second user can refresh the authorized two-dimensional code, so as to continue the authorization operation, that is, continue to authorize the browser through the application software.
[0090] S103, obtain the user identifier of the application software, and generate an authorization token.
[0091] In this embodiment, after determining that the application software authorizes the browser, the application software feeds back the user identifier of the application software, so as to obtain the user identifier of the application software and generate an authorization token.
[0092] Specifically, after the second user authorizes the preset website using the application software, the application software feeds back the user identifier of the application software to the user center system. After receiving the user identifier of the application software, the user center system generates an authorization token, and the preset website obtains the authorization token from the user center system.
[0093] S104, send the user identifier and the authorization token to the Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token in a preset database.
[0094] In this embodiment, the browser sends the user identifier and the authorization token to the Internet of Things system. After receiving the user identifier and the authorization token, the Internet of Things system stores the user identifier and the authorization token in a preset database. Specifically, the Internet of Things system stores the user identifier and the authorization token in the preset database correspondingly.
[0095] In this embodiment, the process of sending the user identifier and the authorization token to the Internet of Things system by the browser specifically includes: the user center system in the browser sends the user identifier and the authorization token to the main data system in the Internet of Things system, and the main data system stores the user identifier and the authorization token in the database correspondingly.
[0096] S105, receive a control request, wherein the control request carries address information of a to-be-controlled device and a control instruction.
[0097] In this embodiment, after obtaining the authorization token, the control request of the first user is received, the control request is responded, the address information of the to-be-controlled device and the control instruction carried in the control request are obtained, and specifically, the preset website in the browser receives the control request of the first user, and obtains the address information of the to-be-controlled device and the control instruction carried in the control request.
[0098] The control request is a request sent by the first user based on a control demand through a control instruction input interface of the browser.
[0099] S106, send the control request and the authorization token to the Internet of Things system to trigger the Internet of Things system to perform permission verification on the browser by calling the database according to the authorization token and the address information, and send the control instruction to the to-be-controlled device to control the to-be-controlled device after the permission verification is passed.
[0100] In this embodiment, the control request and the authorization token are sent to the Internet of Things system.
[0101] In this embodiment, the authorization token and the user identifier are pre-stored in the database of the Internet of Things system, and the user identifier and the address information are pre-stored in the database of the Internet of Things system. Therefore, after the Internet of Things system receives the control request and the authorization token, according to the pre-stored user identifier and address information, the authorization token and the address information sent by the browser, by calling the database, the permission verification on the browser can be realized, so that after the verification is passed, the control instruction is sent to the control device, and the control device is controlled.
[0102] The device control method provided by the embodiment of the application can authorize the browser by using the application software pre-bound with the to-be-controlled device, obtain the user identifier of the application software after the browser is authorized by the application software, generate an authorization token, and send the user identifier and the authorization token to the Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token in the preset database, so that the Internet of Things system performs permission verification on the browser according to the pre-stored user identifier and authorization token in the database and the authorization token and address information sent by the browser after receiving the control instruction, address information and authorization token, and then sends the control instruction to the to-be-controlled device after the permission verification is passed, so as to control the to-be-controlled device through the browser.
[0103] The embodiment of the application also provides a device control method, which can be applied in an Internet of Things system, and a flowchart of the device control method is as shown in Figure 4 The embodiment of the application also provides a device control method, which can be applied in an Internet of Things system, and a flowchart of the device control method is as shown in
[0104] S401, receive the control request and the authorization token sent by the browser.
[0105] In this embodiment, the Internet of Things system receives the control request and the authorization token sent by the browser, wherein the control request includes the address information and the control instruction of the to-be-controlled device.
[0106] Specifically, the main data system in the Internet of Things system receives the control request and the authorization token sent by the preset website in the browser.
[0107] S402, determine whether the user identifier corresponding to the authorization token sent by the browser exists in the preset database, if not, execute S403, and if yes, execute S404.
[0108] In this embodiment, the main data system in the Internet of Things system determines whether the user identifier corresponding to the authorization token sent by the browser exists in the database according to the pre-stored authorization token and user identifier in the data, specifically, determines whether the authorization token matching the authorization token sent by the browser exists in the pre-stored database, if the authorization token matching the authorization token sent by the browser exists in the database, it is determined that the user identifier corresponding to the authorization token sent by the browser exists in the database; if the authorization token matching the authorization token sent by the browser does not exist in the database, it is determined that the user identifier corresponding to the authorization token sent by the browser does not exist in the database.
[0109] S403, return the prompt information that the permission verification fails.
[0110] In this embodiment, if the user identifier corresponding to the authorization token sent by the browser does not exist in the database, it indicates that the browser does not have the permission to control the to-be-controlled device, the prompt information is generated, and the prompt information is fed back to the browser. The prompt information is used to prompt that the permission verification fails.
[0111] In this embodiment, if the user identifier corresponding to the authorization token sent by the browser exists in the database, but the address information corresponding to the user identifier does not match the address information carried in the control request, the browser is also returned the prompt information that the permission verification fails.
[0112] S404, obtain the pre-stored address information corresponding to the target user identifier.
[0113] In this embodiment, if the user identifier corresponding to the authorization token sent by the browser exists in the database, the Internet of Things system obtains the pre-stored address information corresponding to the target user identifier based on the target user identifier, wherein the target user identifier is the user identifier corresponding to the authorization token.
[0114] Specifically, if the user identifier corresponding to the authorization token sent by the browser exists in the database, the main data system in the Internet of Things system determines the user identifier corresponding to the authorization token sent by the browser in the database as the target user identifier, that is, determines the user identifier corresponding to the authorization token matching the authorization token sent by the browser in the database as the target user identifier, and sends the target user identifier to the Internet of Things cloud system in the Internet of Things system. The Internet of Things cloud system obtains the address information corresponding to the target user identifier based on the pre-stored user identifier and address information.
[0115] S405, determine whether the address information corresponding to the target user identifier matches the address information carried in the control request, if yes, execute S406, if no, execute S403.
[0116] S406, sending the control instruction to the device to be controlled to control the device to be controlled.
[0117] In the embodiment, when the address information corresponding to the target user identifier is consistent with the address information carried in the control request, the control instruction is sent to the device to be controlled, so as to control the device to be controlled.
[0118] Specifically, when the address information corresponding to the target user identifier is consistent with the address information carried in the control request, the Internet of Things cloud system in the Internet of Things system sends the control instruction to the device to be controlled to control the device to be controlled.
[0119] The device control method provided in the embodiment of the application stores the authorization token and the user identifier of the application software after the application software authorizes the browser, so that after receiving the authorization token and the control request sent by the browser, the authorization token and the address information sent by the browser are checked according to the corresponding stored authorization token and the user identifier of the application software and the pre-stored user identifier and address information, so that after the authorization token and the address information sent by the browser are both checked, the control instruction is sent to the device to be controlled, so as to control the device to be controlled through the browser.
[0120] Referring to Figure 5 The embodiment of the application further provides a control system 500, which comprises:
[0121] application software 501, a browser 502, an Internet of Things system 503,
[0122] The application software 501 authorizes the browser and feeds back the user identifier of the application software to the Internet of Things system.
[0123] The browser 502 outputs authorization prompt information for prompting the browser to be authorized by the application software, and after determining that the browser is authorized by the application software, acquires the user identifier of the application software, generates an authorization token, sends the user identifier and the authorization token to the Internet of Things, and after receiving the control request, sends the control request and the authorization token to the Internet of Things system, wherein the control request carries the control instruction and the address information of the device to be controlled.
[0124] The Internet of Things system 503 stores the user identifier and the authorization token corresponding to each other in a preset database after receiving the user identifier and the authorization token fed back by the browser, and judges whether the user identifier corresponding to the authorization token fed back by the browser exists in the preset database after receiving the control request and the authorization token, the user identifier and the address information stored in the preset database, judges whether the user identifier corresponding to the authorization token fed back by the browser exists in the preset database, and if so, acquires the address information corresponding to the target user identifier according to the user identifier and the address information stored in advance, and if the address information corresponding to the target user identifier is consistent with the address information carried in the control request, sends the control instruction to the device to be controlled, and controls the device to be controlled. The target user identifier is the user identifier corresponding to the authorization token.
[0125] The control system provided by the embodiment of the application authorizes the browser 502 by using the application software 501 bound with the device to be controlled in advance, stores the authorization token and the user identifier of the application software 501 in the database after the browser 502 is authorized by the application software 501, and thus verifies the authorization token and the address information fed back by the browser according to the authorization token and the user identifier of the application software stored in advance and the user identifier and the address information stored in advance after receiving the authorization token, the control instruction and the address information of the device to be controlled fed back by the browser 502, and sends the control instruction to the device to be controlled after the authorization token and the address information fed back by the browser pass the verification, thereby realizing the control of the device to be controlled by the browser.
[0126] Reference Figure 6 The specific implementation process of the device control method is exemplified as follows:
[0127] S601, the browser outputs authorization prompt information.
[0128] In the embodiment, the browser acquires the authorization prompt information and outputs the authorization prompt information, and the authorization prompt information is used to prompt the authorization of the browser by the application software. Optionally, the authorization prompt information can be an authorization two-dimensional code.
[0129] S602, the application software authorizes the browser.
[0130] In the embodiment, the user authorizes the browser by using the application software, and the application software authorizes the browser.
[0131] S603, the application software feeds back the user identifier of the application software to the browser.
[0132] In the embodiment, the application software feeds back the user identifier of the application software to the browser.
[0133] S604, the browser acquires the user identifier of the application software and generates an authorization token.
[0134] In this embodiment, after determining that the application software authorizes the browser, the browser acquires the user identifier of the application software and generates an authorization token. The process of determining that the application software authorizes the browser includes: polling the two-dimensional state of the authorization two-dimensional code according to a preset polling period, and determining that the application software authorizes the browser when the two-dimensional code state is an authorized state.
[0135] S605, the browser sends the authorization token and the user identifier to the Internet of Things system.
[0136] S606, the Internet of Things system stores the authorization token and the user identifier.
[0137] In this embodiment, after receiving the user identifier and the authorization token sent by the browser, the Internet of Things system stores the user identifier and the authorization token in a preset database. Optionally, the user identifier and the authorization token can be stored in the database correspondingly.
[0138] S607, the browser receives a control request.
[0139] In this embodiment, the browser receives the control request and responds to the control request to acquire the control instruction and the address information of the device to be controlled carried in the control request.
[0140] The control request is a request sent by a user based on a control demand through a control instruction input interface of the browser.
[0141] S608, the browser sends the control instruction, the address information, and the authorization token to the Internet of Things system.
[0142] S609, the Internet of Things system performs permission verification on the browser by calling the database according to the control request and the authorization token.
[0143] In this embodiment, the Internet of Things system performs permission verification on the browser by calling the database according to the control request and the authorization token. Specifically, it is judged whether the user identifier corresponding to the authorization token sent by the browser exists in the database. If it exists, the pre-stored address information corresponding to the target user identifier is acquired, the target user identifier is the user identifier corresponding to the authorization token sent by the browser, the pre-stored address information corresponding to the target user identifier is compared with the address information sent by the browser, and if the comparison is consistent, it is determined that the browser passes the permission verification. If the user identifier corresponding to the authorization token sent by the browser does not exist in the database, or the pre-stored address information corresponding to the target user identifier is inconsistent with the address information sent by the browser, it is determined that the browser does not pass the verification.
[0144] S610, the Internet of Things system sends a control instruction to the to-be-controlled device after the browser passes the permission check.
[0145] In this embodiment, the Internet of Things system sends a control instruction to the to-be-controlled device after the browser passes the permission check.
[0146] Optionally, if the browser does not pass the permission check, the browser is fed back prompt information that the permission check does not pass.
[0147] S611, the to-be-controlled device executes the control instruction.
[0148] In this embodiment, the to-be-controlled device executes the control instruction, thereby realizing control of the to-be-controlled device through the browser.
[0149] Optionally, in this embodiment, the authorization prompt information includes an authorization two-dimensional code, the browser includes a preset website and a user center system, the Internet of Things system includes a main data system and an Internet of Things cloud system, and refer to Figure 7 Another specific implementation process of the device control method is exemplified as follows:
[0150] S701, the preset website sends an authorization two-dimensional code acquisition request to the user center system.
[0151] After the user successfully logs in to the preset website, the preset website sends an authorization two-dimensional code acquisition request to the user center system.
[0152] S702, the user center system sends the authorization two-dimensional code to the preset website.
[0153] After receiving the authorization two-dimensional code acquisition request, the user center system acquires the authorization two-dimensional code and feeds back the authorization two-dimensional code to the preset website.
[0154] S703, output the authorization two-dimensional code.
[0155] After receiving the authorization two-dimensional code fed back by the user center system, the preset website outputs the authorization two-dimensional code and prompts authorization of the preset website through the application software.
[0156] S704, the application software authorizes the preset website.
[0157] The application software scans the authorization two-dimensional code for authorization.
[0158] S705, the application software feeds back a user identifier of the application software to the user center system.
[0159] After the application software authorizes the preset website, the user identifier of the application software is sent to the user center system.
[0160] Wherein, the state of the authorization two-dimensional code is changed to authorized state after the application software authorizes the preset website.
[0161] S706, the user center system receives the user identification and generates an authorization token.
[0162] The state of the authorization two-dimensional code is changed to authorized state after the application software authorizes the preset website, and the user center system receives the user identification and generates an authorization token.
[0163] S707, the user center system sends the authorization token to the preset website.
[0164] S708, the user center system sends the authorization token and the user identification to the main data system.
[0165] S709, the main data system stores the authorization token and the user identification in the database.
[0166] In this embodiment, the main data system stores the authorization token and the user identification in the database after receiving the authorization token and the user identification.
[0167] S710, the preset website receives the control request and obtains the address information and the control instruction carried in the control request.
[0168] In this embodiment, the preset website receives the control request and responds to the control request to obtain the control instruction and the address information of the device to be controlled carried in the control request.
[0169] Wherein, the control request is a request sent by the user based on the control demand through the control instruction input interface of the preset website.
[0170] S711, the preset website sends the authorization token, the address information and the control instruction to the Internet of Things cloud system.
[0171] S712, the Internet of Things cloud system sends an authorization token verification request to the main data system according to the authorization token.
[0172] The Internet of Things cloud system sends an authorization token verification request to the main data system according to the authorization token after receiving the authorization token, the address information and the control instruction sent by the preset website.
[0173] S713, the main data system verifies the authorization token.
[0174] The main data system receives the authorization token check request, acquires the authorization token carried in the authorization token check request, and checks the authorization token according to the authorization token and the user identifier pre-stored in the database. Specifically, it is determined whether the authorization token matching the authorization token exists in the database. If the authorization token exists, the authorization token is checked.
[0175] S714, the main data system feeds back the user identifier corresponding to the authorization token to the Internet of Things cloud system after the authorization token check is passed.
[0176] The main data system acquires the user identifier corresponding to the authorization token in the database after the authorization token check is passed, and feeds back the user identifier to the Internet of Things cloud system.
[0177] Optionally, if the authorization token fails the check, prompt information prompting that the authorization token fails the check is fed back.
[0178] S715, the Internet of Things cloud system checks the address information according to the user identifier.
[0179] The Internet of Things cloud system acquires the address information corresponding to the user identifier pre-stored, compares the address information corresponding to the user identifier pre-stored with the address information sent by the preset website, and passes the check if the comparison is consistent.
[0180] S716, the Internet of Things cloud system sends a control instruction to the device to be controlled after the address information passes the check.
[0181] The Internet of Things cloud system sends a control instruction to the device to be controlled after the address information passes the check.
[0182] It should be noted that if the address information fails the check or the prompt information prompting that the authorization token fails the check is received from the main data, prompt information prompting that the permission check fails is fed back to the preset website.
[0183] S717, the device to be controlled executes the control instruction.
[0184] The device to be controlled executes the control instruction, thereby realizing the control of the device to be controlled through the preset website.
[0185] It should be noted that although the operations are described in a specific order, this should not be understood as requiring the operations to be performed in the specific order shown or in a sequential order. In certain circumstances, multitasking and parallel processing can be advantageous.
[0186] It should be understood that each of the steps recited in the method embodiments disclosed herein can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the disclosure is not limited in this regard.
[0187] With Figure 1 Corresponding to the method, the embodiments of the present application also provide a device control apparatus for controlling Figure 1 The device control apparatus is applied to a browser, and a structure diagram thereof is shown in Figure 8 Specifically, the device control apparatus comprises:
[0188] An output unit 801 is configured to output an authorization prompt information for prompting to authorize the browser by an application software; the application software is pre-bound with a device to be controlled;
[0189] A first acquisition unit 802 is configured to acquire a user identifier of the application software and generate an authorization token after the application software authorizes the browser;
[0190] A first sending unit 803 is configured to send the user identifier and the authorization token to an Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token into a preset database;
[0191] A first receiving unit 804 is configured to receive a control request, wherein the control request carries address information of the device to be controlled and a control instruction;
[0192] A second sending unit 805 is configured to send the control request and the authorization token to the Internet of Things system, so as to trigger the Internet of Things system to perform permission verification on the browser by calling the database according to the authorization token and the address information, and send the control instruction to the device to be controlled to control the device to be controlled after the permission verification is passed.
[0193] The device control apparatus provided by the embodiments of the present application authorizes the browser by using the application software pre-bound with the device to be controlled, acquires the user identifier of the application software after the application software authorizes the browser, generates the authorization token, and sends the user identifier and the authorization token to the Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token into the preset database correspondingly, so that the Internet of Things system performs permission verification on the browser according to the user identifier and the authorization token pre-stored in the database and the authorization token and the address information sent by the browser after receiving the control instruction, the address information and the authorization token, and then sends the control instruction to the device to be controlled after the permission verification is passed, thereby realizing the control on the device to be controlled by the browser.
[0194] In an embodiment of the present application, based on the foregoing scheme, the authorization prompt information comprises an authorization two-dimensional code.
[0195] In an embodiment of the present application, based on the foregoing scheme, the first obtaining unit 802 is configured to determine that the application software is authorized to the browser, comprising that the first obtaining unit 802 is specifically configured to:
[0196] polling a two-dimensional code state of the authorization two-dimensional code at a preset polling interval;
[0197] determining whether the two-dimensional code state of the authorization two-dimensional code is an authorized state;
[0198] if the two-dimensional code state of the authorization two-dimensional code is the authorized state, determining that the application software is authorized to the browser.
[0199] and Figure 4 Corresponding to the method, the present application also provides a device control apparatus for implementing the method. Figure 4 The device control apparatus is applied to an Internet of Things system, and a structure diagram thereof is shown in FIG. 1, which specifically comprises: Figure 9
[0200] a receiving unit 901 configured to receive a control request and an authorization token sent by a browser; the control request carries address information of a device to be controlled and a control instruction;
[0201] a judging unit 902 configured to determine whether a user identifier corresponding to the authorization token sent by the browser exists in a preset database;
[0202] a second obtaining unit 903 configured to, if the user identifier exists, obtain address information corresponding to a target user identifier pre-stored; the target user identifier is the user identifier corresponding to the authorization token;
[0203] a third sending unit 904 configured to, if the address information corresponding to the target user identifier is consistent with the address information carried in the control request, send the control instruction to the device to be controlled to control the device to be controlled.
[0204] The device control apparatus provided by the present application, after the application software is authorized to the browser, stores an authorization token and a user identifier of the application software, so that, after receiving the authorization token and the control request sent by the browser, the authorization token and the address information sent by the browser are verified according to the corresponding stored authorization token and the user identifier of the application software and the pre-stored user identifier and address information, so that, after the authorization token and the address information sent by the browser are both verified, the control instruction is sent to the device to be controlled, thereby realizing the control of the device to be controlled through the browser.
[0205] In an embodiment of the present application, based on the foregoing scheme, the determining unit 902 is configured to determine whether the user identifier corresponding to the authorization token sent by the browser exists in the preset database, including that the determining unit 902 is specifically configured to
[0206] determine whether the authorization token matching the authorization token sent by the browser exists in the preset database;
[0207] if the authorization token exists, it is determined that the user identifier corresponding to the authorization token sent by the browser exists in the database.
[0208] The present application also provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device in which the storage medium is located performs the device control method.
[0209] The present application also provides an electronic device, a structural schematic diagram of which is shown in Figure 10 The electronic device specifically includes a memory 1001, and one or more instructions 1002, wherein the one or more instructions 1002 are stored in the memory 1001, and are configured to be executed by one or more processors 1003 to perform the following operations:
[0210] output an authorization prompt information, which is used to prompt the browser to be authorized by the application software; the application software is pre-bound with the to-be-controlled device;
[0211] after the browser is authorized by the application software, acquire the user identifier of the application software, and generate an authorization token;
[0212] send the user identifier and the authorization token to an Internet of Things system, so that the Internet of Things system stores the user identifier and the authorization token in a preset database;
[0213] receive a control request, wherein the control request carries address information of a to-be-controlled device and a control instruction;
[0214] send the control request and the authorization token to the Internet of Things system, so as to trigger the Internet of Things system to perform permission verification on the browser by calling the database according to the authorization token and the address information, and after the permission verification is passed, send the control instruction to the to-be-controlled device to control the to-be-controlled device.
[0215] Optionally, the electronic device can also be configured to perform the following operations:
[0216] receive a control request and an authorization token sent by a browser; the control request carries address information of a device to be controlled and a control instruction;
[0217] determine whether a user identifier corresponding to the authorization token sent by the browser exists in a preset database;
[0218] if the target user identifier corresponds to the address information carried in the control request, send the control instruction to the device to be controlled to control the device to be controlled.
[0219] if the target user identifier corresponds to the address information carried in the control request, send the control instruction to the device to be controlled to control the device to be controlled.
[0220] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
[0221] While several inventive embodiments have been described and illustrated herein, those of ordinary skill in the art will readily envision a variety of other means and / or techniques for performing the functions described and / or illustrated herein, and which do not depart from the spirit and scope of the present application. More generally, those skilled in the art will readily appreciate that all terms and phrases used herein can be translated freely from one language to another language. Furthermore, to the full extent permitted by law, this application claims priority to each of the following U.S. Patent Application No. 62 / 692, 1 10, filed on June 28, 2018, and U.S. Patent Application No. 62 / 692, 1 1 1, filed on June 28, 2018, the entire contents of each of which are incorporated herein by reference.
[0222] The foregoing description, for purposes of clarity, describes the present application in terms of specific embodiments thereof. However, it is to be understood that the specific embodiments described herein are merely exemplary and are not intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the present application, but rather it is intended to suggest any limitation on the scope of the present application. In the description specific embodiments are described in separate individual embodiments, however combinations of these embodiments are also possible and are also within the scope of this application. The description is not intended to suggest any limitation on the scope of the
Claims
1. A device control method, characterized in that, Applied to a browser, the method includes: The system outputs an authorization prompt message to prompt the user to authorize the browser through the application software. The application software is pre-bound to the device to be controlled. The authorization prompt message includes an authorization QR code. The QR code status of the authorization QR code is polled at a preset polling interval; it is determined whether the QR code status of the authorization QR code is authorized; if the QR code status of the authorization QR code is authorized, it is determined that the application software authorizes the browser. After determining that the application software has authorized the browser, the user identifier of the application software is obtained, and an authorization token is generated; The user identifier and the authorization token are sent to the Internet of Things (IoT) system so that the IoT system can store the user identifier and the authorization token in a preset database; Receive a control request, wherein the control request carries the address information of the device to be controlled and control instructions; The control request and the authorization token are sent to the Internet of Things (IoT) system to trigger the IoT system to perform permission verification on the browser by calling the database based on the authorization token and the address information. After the permission verification is successful, the IoT system sends the control command to the device to be controlled to control the device.
2. A device control system, characterized in that, Applied to a browser, the device includes: An output unit is used to output authorization prompt information, prompting the user to authorize the browser through the application software; the application software is pre-bound to the device to be controlled; the authorization prompt information includes an authorization QR code; The first acquisition unit is configured to poll the QR code status of the authorization QR code at a preset polling interval; determine whether the QR code status of the authorization QR code is an authorized status; if the QR code status of the authorization QR code is an authorized status, determine that the application software authorizes the browser; after determining that the application software authorizes the browser, acquire the user identifier of the application software and generate an authorization token. The first sending unit is used to send the user identifier and the authorization token to the Internet of Things (IoT) system, so that the IoT system can store the user identifier and the authorization token in a preset database; The first receiving unit is used to receive a control request, wherein the control request carries the address information of the device to be controlled and control instructions; The second sending unit is used to send the control request and the authorization token to the Internet of Things system, so as to trigger the Internet of Things system to perform permission verification on the browser by calling the database based on the authorization token and the address information, and after the permission verification is passed, send the control command to the device to be controlled to control the device.
3. A device control method, characterized in that, Applied to Internet of Things (IoT) systems, the method includes: The system receives a control request and an authorization token sent by a browser. The control request carries the address information of the device to be controlled and control instructions. The authorization token is generated by the browser based on the user identifier of the application software after determining that the application software has authorized the browser. Determining that the application software has authorized the browser includes: polling the QR code status of the authorization QR code at a preset polling interval; determining whether the QR code status of the authorization QR code is in an authorized state; if the QR code status of the authorization QR code is in an authorized state, then it is determined that the application software has authorized the browser. Determine whether a user identifier corresponding to the authorization token sent by the browser exists in the preset database; If it exists, retrieve the pre-stored address information corresponding to the target user identifier; the target user identifier is the user identifier corresponding to the authorization token. If the address information corresponding to the target user identifier matches the address information carried in the control request, then the control command is sent to the device to be controlled to control the device.
4. The method according to claim 3, characterized in that, The step of determining whether a user identifier corresponding to the authorization token sent by the browser exists in the preset database includes: Determine whether an authorization token matching the authorization token sent by the browser exists in the preset database; If it exists, then it is determined that a user identifier corresponding to the authorization token sent by the browser exists in the database.
5. A device control system, characterized in that, The device, used in an Internet of Things (IoT) system, includes: A receiving unit is configured to receive a control request and an authorization token sent by a browser; the control request carries the address information of the device to be controlled and control instructions; the authorization token is generated by the browser based on the user identifier of the application software after the browser determines that the application software has authorized the browser; determining that the application software has authorized the browser includes: polling the QR code status of the authorization QR code at a preset polling interval; determining whether the QR code status of the authorization QR code is an authorized state; if the QR code status of the authorization QR code is an authorized state, then determining that the application software has authorized the browser; The judgment unit is used to determine whether a user identifier corresponding to the authorization token sent by the browser exists in the preset database; The second acquisition unit is used to acquire, if present, pre-stored address information corresponding to the target user identifier; the target user identifier is the user identifier corresponding to the authorization token; The third sending unit is used to send the control command to the device to be controlled if the address information corresponding to the target user identifier matches the address information carried in the control request, thereby controlling the device to be controlled.
6. A device control system, characterized in that, include: Browsers, IoT systems, and application software pre-attached to the devices to be controlled; The application software is used to authorize the browser; The browser is used to execute the device control method as described in claim 1; The Internet of Things system is used to execute the device control method as described in any one of claims 3-4.
7. A storage medium comprising storage instructions, wherein, When the instruction is executed, it controls the device containing the storage medium to perform the device control method according to claim 1 and / or any one of claims 3-4.
8. An electronic device, comprising a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors using the device control method of claim 1 and / or any one of claims 3-4.
Citation Information
Patent Citations
Automatic operation and maintenance management method, device and equipment and readable storage medium
CN110221949A