Device control method, device and computer-readable storage medium
By receiving voice control information to identify timing intentions and using timer services to implement device timing control, the problem of inflexible timing operations of traditional devices is solved, and flexible timing settings and multiple timing tasks of the device are realized.
Patent Information
- Application Number
- CN201910565292.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-26
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2039-06-26
AI Technical Summary
Traditional non-intelligent devices do not support friendly timing control, especially the time interval division is not flexible, and users cannot achieve precise timing operations through voice or remote control.
By receiving voice control information, identifying timing control intentions, generating control instructions and sending instructions to the device at the trigger time, using timer services for timing and callback, supporting infrared, Zigbee, Bluetooth and other communication methods, the timing control of the device is realized.
The timing setting capability of the controlled device is expanded, allowing users to operate at any time, supporting multiple timings and cyclic timings, and simplifying the user operation process.
Smart Images

Figure CN112147903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic control technology, and in particular to a device control method, device, and computer-readable storage medium. Background Art
[0002] Traditional, non-smart devices currently used by users lack support for timer control. For example, traditional devices like air conditioners and fans require remote controls for timer operation. This year, timer settings, such as half-hour and hourly intervals, will be implemented. However, most infrared devices like TVs and set-top boxes do not support timer switching or channel selection, making it difficult for users to control timer settings. Summary of the Invention
[0003] Embodiments of the present invention provide a device control method, apparatus, and computer-readable storage medium to solve one or more technical problems in the prior art.
[0004] In a first aspect, an embodiment of the present invention provides a method for controlling a device, including:
[0005] receiving voice control information from the first device;
[0006] identifying a timing control intention from the voice control information;
[0007] generating a first control instruction and a timer request according to the timing control intention, wherein the timer request includes a trigger time;
[0008] Control the first device to send a second control instruction to the second device according to the first control instruction at the trigger time.
[0009] In one embodiment, it further includes:
[0010] Sending the first control instruction and the timer request to a timer service;
[0011] A callback request sent by the timer service at the trigger time is received, where the callback request includes the first control instruction.
[0012] In one embodiment, it further includes:
[0013] caching the first control instruction;
[0014] Sending the timer request to a timer service;
[0015] receiving a callback request sent by the timer service at the trigger time;
[0016] Search for the first control instruction corresponding to the trigger time.
[0017] In one embodiment, it further includes:
[0018] Send token information to the timer service;
[0019] The callback request also includes information to be verified. After receiving the callback request sent by the timer service at the trigger time, the method further includes: verifying whether the information to be verified in the callback request is consistent with the token information.
[0020] In one embodiment, controlling the first device to send a second control instruction to the second device according to the first control instruction at the trigger time includes:
[0021] Obtaining an infrared code from the first control instruction;
[0022] An infrared control signal is sent to the second device according to the infrared code.
[0023] In one embodiment, it further includes:
[0024] Control information of the second device is acquired in advance, where the control information of the second device at least includes a name of the second device and a first control instruction.
[0025] In a second aspect, an embodiment of the present invention provides a device control apparatus, including:
[0026] An information receiving module, configured to receive voice control information from a first device;
[0027] An information recognition module, configured to recognize a timing control intention from the voice control information;
[0028] An instruction and request generating module, configured to generate a first control instruction and a timer request according to the timing control intention, wherein the timer request includes a trigger time;
[0029] An instruction sending module is used to control the first device to send a second control instruction to the second device according to the first control instruction at the trigger time.
[0030] In one embodiment, it further includes:
[0031] An instruction and request sending module, configured to send the first control instruction and the timer request to a timer service;
[0032] The callback request receiving module is configured to receive a callback request sent by the timer service at the trigger time, wherein the callback request includes the first control instruction.
[0033] In one embodiment, it further includes:
[0034] a cache module, configured to cache the first control instruction;
[0035] A timer request sending module, configured to send the timer request to a timer service;
[0036] A callback request receiving module, configured to receive a callback request sent by the timer service at the trigger time;
[0037] A control instruction search module is used to search for the first control instruction corresponding to the trigger time.
[0038] In one embodiment, it further includes:
[0039] Token information sending module, used to send token information to the timer service;
[0040] The verification module verifies whether the information to be verified included in the callback request is consistent with the token information when receiving the callback request sent by the timer service at the trigger time.
[0041] In one embodiment, the instruction sending module includes:
[0042] An infrared code acquisition module, configured to acquire an infrared code from the first control instruction;
[0043] The infrared control signal sending module is used to send an infrared control signal to the second device according to the infrared code.
[0044] In one embodiment, it further includes:
[0045] The control information pre-acquisition module of the second device is used to pre-acquire the control information of the second device, where the control information of the second device at least includes the name of the second device and the first control instruction.
[0046] In a third aspect, an embodiment of the present invention provides a device control apparatus, wherein the functions of the apparatus may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0047] In one possible design, the apparatus includes a processor and a memory, the memory being configured to store a program that supports the apparatus in executing the aforementioned device control method, and the processor being configured to execute the program stored in the memory. The apparatus may also include a communication interface for communicating with other devices or a communication network.
[0048] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer software instructions used by a control device of a device, which includes a program involved in executing a control method of the above-mentioned device.
[0049] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0050] One of the above technical solutions has the following advantages or beneficial effects: it can expand the capabilities of a controlled device that already supports timer settings. It can be operated at any time required by the user. It is not limited to setting timers in minutes or hours.
[0051] Another technical solution in the above technical solution has the following advantages or beneficial effects: it enables controlled devices that originally did not support scheduled tasks to support scheduled tasks. A controlled device can set multiple timers and / or recurring timers. Users can use smart voice devices to control scheduled tasks without using a remote control, which is faster and more convenient.
[0052] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed herein and should not be construed as limiting the scope of the invention.
[0054] Figure 1 A flow chart showing a method for controlling a device according to an embodiment of the present invention is shown.
[0055] Figure 2 A flow chart showing a method for controlling a device according to an embodiment of the present invention is shown.
[0056] Figure 3 A flow chart showing a method for controlling a device according to an embodiment of the present invention is shown.
[0057] Figure 4 A flow chart showing a method for controlling a device according to an embodiment of the present invention is shown.
[0058] Figure 5 A flow chart showing a method for controlling a device according to an embodiment of the present invention is shown.
[0059] Figure 6 A flow chart showing a method for controlling a device according to an embodiment of the present invention is shown.
[0060] Figure 7 A structural block diagram of a control device of a device according to an embodiment of the present invention is shown.
[0061] Figure 8 A structural block diagram of a control device of a device according to an embodiment of the present invention is shown.
[0062] Figure 9 A structural block diagram of a control device of a device according to an embodiment of the present invention is shown.
[0063] Figure 10 A structural block diagram of a control device of a device according to an embodiment of the present invention is shown.
[0064] Figure 11 A structural block diagram of a control device of a device according to an embodiment of the present invention is shown.
[0065] Figure 12 A structural block diagram of a control device of a device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0066] Hereinafter, only certain exemplary embodiments are briefly described. As will be appreciated by those skilled in the art, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and description are to be considered as illustrative in nature and not restrictive.
[0067] Figure 1 Flowchart showing a control method of a device according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0068] S101: Receive voice control information from a first device.
[0069] In an embodiment of the present invention, the first device includes a device that integrates a communication function and a voice function. Among them, the communication function may include infrared communication, Zigbee communication, Bluetooth communication, radio frequency communication, WiFi communication, etc. The voice function may include voice pickup, voice signal noise reduction, voice signal recognition, etc. The first device may include an intelligent voice speaker, an intelligent voice box, etc. After the user issues a voice to control the first device, the first device may receive the voice control information through a microphone or other sound pickup device. For example, the voice control information corresponding to the user's voice may include "turn off the bedroom air conditioner at 1 am tomorrow morning", "turn on the living room TV at 8 am every day", "set the air conditioner to automatic mode at 8 pm and turn off the air conditioner at 10 pm", etc. The first device may upload the voice control information it receives to the device control server.
[0070] In one example, in addition to receiving voice control information in audio form through a sound pickup device, the first device can also connect to a device such as a smartphone to receive voice control information in audio or text form sent by the user through a device such as a smartphone, and then upload the received voice control information to the device control server.
[0071] S102: Identifying a timing control intention from the voice control information.
[0072] The device control server identifies the user's timing control intention through voice recognition and semantic analysis. The timing control intention may include the controlled object, the action instruction of the controlled object, and the time to execute the action instruction.
[0073] The controlled object may be the second device described below. For example, the controlled object may include the bedroom air conditioner, the living room television, and so on. If there are multiple identical controlled objects, such as multiple air conditioners or televisions in a household, they can be distinguished by the model number or custom name of the controlled device. For example, if the controlled objects are multiple air conditioners, they may include: Brand A, Model X air conditioner, Brand B, Model Y air conditioner. Another example is if the controlled objects are multiple televisions, they may include: My TV, My wife's TV, and so on.
[0074] The action instructions of the controlled object may include turning off, turning on, raising the temperature by n degrees, switching to a certain TV station, lowering the volume by m%, etc.
[0075] The time for executing the action instruction may include a specific time, cycle, duration, etc., for example, 1:00 a.m. tomorrow, 3 minutes later, 8:00 a.m. every day, etc.
[0076] S103: Generate a first control instruction and a timer request according to the timing control intention, wherein the timer request includes a trigger time.
[0077] The first control instruction may be a specific control parameter for each action executed by the controlled object. After the device control server identifies the timed control intent, it converts it into specific control parameters. For example, if the timed control intent is "Turn off the bedroom air conditioner at 1:00 AM tomorrow," the device control server will query all control parameters of the bedroom air conditioner to find the control parameter corresponding to the shutdown action. The trigger time may be 1:00 AM tomorrow, as specified in the timed control intent.
[0078] If the controlled object in the timing control intention is unique, for example, "turn off the bedroom air conditioner at 1 a.m. tomorrow", the control parameters for turning off the bedroom air conditioner can be directly generated according to the timing control intention.
[0079] If the controlled objects in the timing control intention are not unique, for example, "turn off the air conditioner at 1 a.m. tomorrow", control parameters for turning off each air conditioner (in the home) can be generated separately.
[0080] If the action instructions in the timed control intent are not unique, for example, "Set the bedroom air conditioner to automatic mode at 8 pm and turn off the bedroom air conditioner at 10 pm," two control parameters are generated accordingly. The first control parameter includes the control parameter for setting the air conditioner to automatic mode at 8 pm. The second control parameter includes the control parameter for turning the air conditioner off at 10 pm.
[0081] The trigger time can be the same as the execution time of the action command, or it can be set based on the execution time of the action command. For example, if the execution time of the action command is a specific time "8 pm", the trigger time can be set to "8 pm". You can also set it to a certain time before the execution time of the action command. For example, the trigger time is 3 seconds before "8 pm". Setting the trigger time earlier than the execution time of the action command helps reduce delays and execute the action command in a timely manner.
[0082] S104: Control the first device to send a second control instruction to the second device according to the first control instruction at the trigger time.
[0083] When the trigger time arrives, the device control server sends the first control instruction to the first device. The first device modulates the first control instruction to generate a second control instruction, and then broadcasts the second control instruction. Broadcasting can be in the form of infrared broadcasting, Zigbee broadcasting, Bluetooth broadcasting, radio frequency broadcasting, or WiFi broadcasting. When using Bluetooth broadcasting or WiFi broadcasting, it is necessary to establish a network in advance before broadcasting. For example, the first device may establish a network with several second devices using Bluetooth or WiFi communication standards in advance. When the trigger time arrives, the device control server broadcasts the first control instruction via Bluetooth or WiFi.
[0084] The second device, the controlled object, takes a corresponding action after receiving the broadcast. For example, the bedroom air conditioner turns off after receiving the broadcast.
[0085] like Figure 2 As shown, in one embodiment, the method further includes the steps of:
[0086] S201: Send the first control instruction and the timer request to a timer service.
[0087] The timer service can be a separate network service, serving as a submodule of the device control server. A timer request can include a trigger time and a callback request. After executing the timing function until the trigger time is reached, the timer service can send the received first control instruction to the device control server via a callback request.
[0088] After generating a first control instruction and a timer request according to the timing control intention, the device control server sends the first control instruction and the timer request to the timer service.
[0089] The timer service performs timing, and when the trigger time in the timing request is reached, sends the first control instruction to the device control server according to the callback request.
[0090] S202: Receive a callback request sent by the timer service at the trigger time, where the callback request includes the first control instruction.
[0091] Through the above steps, the timer service is responsible for timing and storing the first control instruction. When the trigger time arrives, the first control instruction sent by the timer service is directly received and output. This can save working time and storage space of the device control server.
[0092] like Figure 3 As shown, in one embodiment, the method further includes the steps of:
[0093] S301: Cache the first control instruction.
[0094] After generating the first control instruction and the timer request based on the timing control intent, the device control server establishes an association between the two. For example, by establishing the same tag or mapping them to each other. The device control server caches the first control instruction in a storage database and loads the corresponding relationship information into the first control instruction and the timer request.
[0095] S302: Send the timer request to the timer service.
[0096] The timer request may include a trigger time and a callback request. The callback request may be used for the timer service to send the corresponding relationship information loaded in the timer request to the device control server when the timer service executes the timing function until the trigger time is reached.
[0097] S303: Receive a callback request sent by the timer service at the trigger time.
[0098] S304: Searching for the first control instruction corresponding to the trigger time.
[0099] Based on the information of the corresponding relationship, a first control instruction is found in the storage database.
[0100] Through the above steps, the data transmitted between the device control server and the timer service only includes the timer request and the callback request, and the amount of transmitted data is small, thereby saving bandwidth.
[0101] like Figure 4 As shown, in one embodiment, the method further includes the steps of:
[0102] S401: Send token information to the timer service.
[0103] The device control server creates a token. For example, it may create a token each time it identifies a timing control intent from the voice control information. When interacting with the timer service, the created token is transmitted to the timer service.
[0104] S402: The callback request also includes information to be verified. After receiving the callback request sent by the timer service at the trigger time, the method further includes: verifying whether the information to be verified in the callback request is consistent with the token information.
[0105] Through the above steps, a verification mechanism is added to ensure the consistency of the information sent by the device control server to the timer service and the information received from the timer service.
[0106] like Figure 5 As shown, in one embodiment, controlling the first device to send a second control instruction to the second device according to the first control instruction at the trigger time includes the steps of:
[0107] S501: Obtain an infrared code from the first control instruction.
[0108] S502: Send an infrared control signal to the second device according to the infrared code.
[0109] For example, the first device modulates the corresponding infrared pulse signal according to the infrared code of the first control instruction, and transmits the infrared pulse signal through the infrared transmitting tube.
[0110] In one embodiment, the steps are further included:
[0111] Control information of the second device is acquired in advance, where the control information of the second device at least includes a name of the second device and a first control instruction.
[0112] Acquisition methods can include pre-downloading or learning. For example, for an infrared-controlled TV of brand A, model X, you can pre-download the infrared code library for that model of TV, or learn the control codes by communicating with the TV's remote control. For smart devices controlled by other methods, such as Zigbee, Bluetooth, RF, or WiFi, you can download the control codes.
[0113] like Figure 6 As shown, in one embodiment, the process of the device control method includes the following steps:
[0114] S601: A user inputs a voice control command to a first device, such as "turn off the air conditioner at 1:00 AM tomorrow" or "turn on the TV at 8:00 AM every day." The first device may be a smart voice device.
[0115] S602: The first device sends the user's voice control instruction to the device control server.
[0116] S603: After performing voice recognition and semantic analysis, the device control server identifies the user's timed control intent. It then generates a corresponding control instruction code and timer request based on the time in the timed control intent. For example, if the controlled object is a traditional appliance with infrared control functionality, the corresponding instruction generated is an infrared control instruction code.
[0117] The infrared control command code is saved to the timer service. The timer request is used to inform the timer service to call back the device control server at the corresponding time. Calling back the device control server includes sending the infrared control command code back to the device control server at the predetermined time.
[0118] S604: When the scheduled time arrives, the timer service sends a request to the device control server.
[0119] S605: After receiving the timer service request, the device control server pushes the previously saved infrared control instruction code to the first device, such as an instruction to turn off the air conditioner, which includes an infrared code for turning off the air conditioner.
[0120] S606: After receiving the infrared control command code, the first device modulates the code and sends an infrared pulse signal. The controlled device responds to the infrared pulse signal. For example, the response may be turning off the air conditioner.
[0121] Figure 7 FIG. 1 shows a structural block diagram of a control device according to an embodiment of the present invention. Figure 7 As shown, the device includes:
[0122] The information receiving module 701 is configured to receive voice control information from a first device.
[0123] The information recognition module 702 is configured to recognize a timing control intention from the voice control information.
[0124] The instruction and request generating module 703 is configured to generate a first control instruction and a timer request according to the timing control intention, wherein the timer request includes a trigger time.
[0125] The instruction sending module 704 is configured to control the first device to send a second control instruction to the second device according to the first control instruction at the trigger time.
[0126] like Figure 8 As shown, in one embodiment, the device further includes:
[0127] The instruction and request sending module 801 is configured to send the first control instruction and the timer request to a timer service.
[0128] The callback request receiving module 802 is configured to receive a callback request sent by the timer service at the trigger time, wherein the callback request includes the first control instruction.
[0129] like Figure 9 As shown, in one embodiment, the device further includes:
[0130] The cache module 901 is configured to cache the first control instruction.
[0131] The timer request sending module 902 is configured to send the timer request to the timer service.
[0132] The callback request receiving module 903 is configured to receive the callback request sent by the timer service at the trigger time.
[0133] The control instruction search module 904 is configured to search for the first control instruction corresponding to the trigger time.
[0134] like Figure 10 As shown, in one embodiment, the device further includes:
[0135] Token information sending module 1001, used to send token information to the timer service;
[0136] The verification module 1002 , upon receiving the callback request sent by the timer service at the trigger time, verifies whether the information to be verified included in the callback request is consistent with the token information.
[0137] like Figure 11 As shown, in one embodiment, the instruction sending module 704 includes:
[0138] Infrared code acquisition module 7041, used to acquire the infrared code from the first control instruction;
[0139] The infrared control signal sending module 7042 is configured to send an infrared control signal to the second device according to the infrared code.
[0140] In one embodiment, the device further comprises:
[0141] The control information pre-acquisition module of the second device is used to pre-acquire the control information of the second device, where the control information of the second device at least includes the name of the second device and the first control instruction.
[0142] Figure 12 FIG. 1 shows a structural block diagram of a control device according to an embodiment of the present invention. Figure 12 As shown, the apparatus includes: a memory 1210 and a processor 1220. The memory 1210 stores a computer program that can be executed on the processor 1220. When the processor 1220 executes the computer program, the device control method in the above embodiment is implemented. The number of the memory 1210 and the processor 1220 can be one or more.
[0143] The device also includes:
[0144] The communication interface 1230 is used to communicate with external devices and perform data exchange transmission.
[0145] The memory 1210 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0146] If the memory 1210, the processor 1220, and the communication interface 1230 are implemented independently, the memory 1210, the processor 1220, and the communication interface 1230 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0147] Optionally, in a specific implementation, if the memory 1210, the processor 1220 and the communication interface 1230 are integrated on a chip, the memory 1210, the processor 1220 and the communication interface 1230 can communicate with each other through an internal interface.
[0148] An embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the program is executed by a processor, any of the methods described in the above embodiments is implemented.
[0149] An embodiment of the present invention provides a computer program product, including a computer program, which implements any of the methods described in the above embodiments when executed by a processor.
[0150] In the description of this specification, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and integrate different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless otherwise inconsistent.
[0151] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0152] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0153] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.
[0154] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0155] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0156] Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing module, each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules. If the integrated modules are implemented as software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc.
[0157] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various modifications and substitutions within the technical scope disclosed in the present invention, and such modifications and substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for controlling a device, characterized in that: include: Receiving voice control information from the first device; wherein the first device receives the voice control information in audio or text form sent by the user through the smartphone by connecting to the smartphone; Identifying a timing control intention from the voice control information; wherein the timing control intention includes a controlled object, an action instruction of the controlled object, and a time for executing the action instruction; generating a first control instruction and a timer request according to the timing control intention, wherein the timer request includes a trigger time; wherein the first control instruction is a specific control parameter corresponding to each action executed by the controlled object; the trigger time is earlier than the time for executing the action instruction; wherein the time for executing the action instruction includes a specific moment, cycle, and duration; Sending token information, a first control instruction, and the timer request to a timer service; wherein the timer service is a submodule of the device control server, and the timer request also includes a callback request. After the timer service executes a timing function until a trigger time is reached, the timer service sends the received first control instruction to the device control server via the callback request; Receiving a callback request sent by the timer service at the trigger time; the callback request including information to be verified, and after receiving the callback request sent by the timer service at the trigger time, further comprising: verifying whether the information to be verified in the callback request is consistent with token information; wherein token information is created each time a timed control intention is identified from the voice control information; Controlling the first device to send a second control instruction to the second device according to the first control instruction at the trigger time; The controlling the first device to send a second control instruction to the second device according to the first control instruction at the trigger time includes: Obtaining an infrared code from the first control instruction; Sending an infrared control signal to the second device according to the infrared code; sending an infrared control signal to the second device according to the infrared code includes: the first device modulating the corresponding infrared pulse signal according to the infrared code of the first control instruction, and transmitting the infrared pulse signal through the infrared transmitting tube; wherein, the infrared code is obtained by pre-downloading the infrared code library of the model device or communicating with the remote control of the model device.
2. The method according to claim 1, characterized in that The callback request also includes the first control instruction.
3. The method according to claim 1, characterized in that Also includes: caching the first control instruction; Sending the timer request to a timer service; receiving a callback request sent by the timer service at the trigger time; Search for the first control instruction corresponding to the trigger time.
4. The method according to claim 1, wherein Also includes: Control information of the second device is acquired in advance, where the control information of the second device at least includes a name of the second device and a first control instruction.
5. A control device for an equipment, characterized in that: include: An information receiving module, configured to receive voice control information from a first device; wherein the first device receives voice control information in audio or text form sent by a user via a smartphone by connecting to the smartphone; An information recognition module, configured to recognize a timing control intention from the voice control information; wherein the timing control intention includes a controlled object, an action instruction of the controlled object, and a time for executing the action instruction; an instruction and request generation module, configured to generate a first control instruction and a timer request according to the timing control intention, wherein the timer request includes a trigger time; wherein the first control instruction is a specific control parameter corresponding to each action performed by the controlled object; the trigger time is earlier than the time for executing the action instruction; wherein the time for executing the action instruction includes a specific moment, cycle, and duration; an instruction sending module, configured to control the first device to send a second control instruction to the second device according to the first control instruction at the trigger time; wherein the timer service is a submodule of the device control server, and the timer request also includes a callback request. After the timer service executes the timing function until the trigger time is reached, the timer service sends the received first control instruction to the device control server via the callback request; The instruction sending module includes: An infrared code acquisition module, configured to acquire an infrared code from the first control instruction; an infrared control signal sending module, configured to send an infrared control signal to the second device according to the infrared code; wherein sending the infrared control signal to the second device according to the infrared code comprises: the first device modulating an infrared pulse signal corresponding to the infrared code of the first control instruction, and transmitting the infrared pulse signal through an infrared transmitting tube; wherein the infrared code is obtained by pre-downloading an infrared code library of a model device or by communicating with a remote control of the model device; An instruction and request sending module, configured to send the first control instruction and the timer request to a timer service; A callback request receiving module, configured to receive a callback request sent by the timer service at the trigger time; Token information sending module, used to send token information to the timer service; A verification module verifies whether the information to be verified included in the callback request is consistent with the token information when receiving the callback request sent by the timer service at the trigger time; wherein, token information is created each time a timing control intention is identified from the voice control information.
6. The device according to claim 5, characterized in that The callback request also includes the first control instruction.
7. The device according to claim 5, characterized in that Also includes: a cache module, configured to cache the first control instruction; A timer request sending module, configured to send the timer request to a timer service; A callback request receiving module, configured to receive a callback request sent by the timer service at the trigger time; A control instruction search module is used to search for the first control instruction corresponding to the trigger time.
8. The device according to claim 5, characterized in that Also includes: The control information pre-acquisition module of the second device is used to pre-acquire the control information of the second device, where the control information of the second device at least includes the name of the second device and the first control instruction.
9. A control device for an equipment, characterized in that: include: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method according to any one of claims 1 to 4.
10. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Intelligent remote control system and control method thereof
CN102881286A
Timing task executing method and device
CN105677469A
Intelligent lamp capable of being delayed by voice or switched on / off regularly and intelligent lamp control system
CN106973470A
Smart home system and control method thereof
CN107204903A