Control method and device, electronic equipment and storage medium
By introducing unique identification information encoding and a synchronization module feedback mechanism into the infrared transponder, the problem of infrared command confirmation in the control of non-intelligent infrared devices is solved, achieving accurate feedback of infrared control commands and fault location, and improving control reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
- Filing Date
- 2022-12-14
- Publication Date
- 2026-07-03
AI Technical Summary
In the control of non-intelligent infrared devices, it is impossible to confirm whether the infrared control command was successfully sent from the infrared repeater, making it impossible to accurately locate the fault.
By designing a feedback mechanism based on unique identifier information, the processor in the control device calls program code to confirm whether the infrared control command has been successfully sent. By utilizing the synchronous operation of the infrared transmitting module and the receiving module, the infrared receiving module feeds back to the core controller, sets the spin lock waiting time and the unique identifier information encoding rules, and realizes the confirmation of the success and failure of the infrared control command.
It achieves accurate feedback of infrared control commands, avoids environmental interference, can accurately locate faulty equipment, and improves the reliability and accuracy of non-intelligent infrared equipment control.
Smart Images

Figure CN118197030B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless Internet of Things (IoT), and more specifically to a control method, device, electronic device, and storage medium. Background Technology
[0002] With the development of 5G technology, the era of the Internet of Things has quietly arrived. As technology advances, the field of smart home control is no longer limited to controlling networked smart devices. Non-smart devices with simple functions like infrared and Bluetooth but unable to connect to the internet (traditional air conditioners, fans, and televisions) have also become an important part of smart control. When users fail to control non-smart infrared devices, it's impossible to confirm whether the infrared control command was successfully sent from the infrared repeater, making it difficult to accurately pinpoint the fault. Currently, there is no effective solution to this problem. Summary of the Invention
[0003] In view of this, the main objective of the present invention is to provide a control method, apparatus, electronic device and storage medium.
[0004] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0005] This invention provides a control method applied to a network device, the method comprising:
[0006] The network device receives first information sent by a first terminal; the first information includes a first identifier of the first terminal; the first information is used to instruct the network device to control the second terminal through the control device.
[0007] Based on the first information, a first request for infrared control of the second terminal is determined; the first request is sent to the control device; the first request includes infrared code information corresponding to the second terminal; the infrared code carries the first identifier; the first request is used to instruct the control device to send the infrared code information to the second terminal;
[0008] The control device receives feedback information based on the first request information; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0009] In the above scheme, the network device includes a database; the database stores the correspondence between the first information and the first request; determining the first request information for infrared control of the second terminal based on the first information includes:
[0010] Match the infrared code information corresponding to the first information in the database;
[0011] The first request information is determined based on the infrared code information corresponding to the first information and the first identifier.
[0012] This invention provides a control method applied to a control device, the method comprising:
[0013] The system receives a first request message sent by a network device; the first request message is determined based on first information sent by a first terminal; the first information includes a first identifier of the first terminal; the first request message includes infrared code information corresponding to a second terminal; the infrared code information carries the first identifier.
[0014] The infrared code information is sent to the second terminal according to the first request information;
[0015] The control device sends feedback information based on the first request information to the network device; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0016] In the above scheme, the control device includes a receiving module, and the method further includes:
[0017] Control the receiving module to receive the second information;
[0018] Determine whether the second information carries the second identifier;
[0019] If the second information carries the second identifier, it is determined whether the receiving module has received the infrared code information based on the second information;
[0020] If the second information does not carry the second identifier, the second information is discarded.
[0021] In the above scheme, the step of determining whether the receiving module has received the infrared code information based on the second information when the second information carries the second identifier includes:
[0022] Determine whether the second identifier is the same as the first identifier;
[0023] If the second identifier is the same as the first identifier, it is determined that the second information received by the receiving module is the infrared code information;
[0024] If the second identifier is different from the first identifier, it is determined that the second information received by the receiving module is not the infrared code information.
[0025] In the above scheme, the feedback information includes first feedback information indicating that the control device has successfully sent the infrared code information to the second terminal; the method further includes:
[0026] If the second information received by the receiving module is the infrared code information, the first feedback information is generated.
[0027] In the above scheme, the method further includes:
[0028] If the second information received by the receiving module is not the infrared code information, the waiting time for the spinlock to be released in the control device is obtained;
[0029] Determine whether the waiting time is greater than a preset time; the preset time is determined based on the first identifier;
[0030] If the waiting time is greater than or equal to the preset time, it is determined that the control device has failed to send the infrared code information.
[0031] In the above scheme, the method further includes:
[0032] If the waiting time is less than the preset time, the receiving module is controlled to re-receive the second information;
[0033] If it is determined that the second information received by the receiving module is not the infrared code information, the waiting time for the spinlock to be released in the control device is reacquired; if the reacquired waiting time is greater than or equal to the preset time, it is determined that the control device has not successfully sent the infrared code information.
[0034] In the above scheme, the infrared code information includes first encoding information and second encoding information; the second encoding information is set after the first encoding information; wherein, the first encoding information is used to locate the second encoding information; and the second encoding information is used to determine whether the receiving module has received the infrared code information.
[0035] This invention provides a control device applied to a network device, the device comprising:
[0036] A first receiving module is configured to receive first information sent by a first terminal; the first information includes a first identifier of the first terminal; the first information is used to instruct the network device to control the second terminal through a control device.
[0037] A first determining module is configured to determine, based on the first information, a first request information for infrared control of the second terminal; a first sending module is configured to send the first request information to the control device; the first request information includes infrared code information corresponding to the second terminal; the infrared code information carries the first identifier; the first request information is used to instruct the control device to send the infrared code information to the second terminal;
[0038] The second receiving module is used to receive feedback information from the control device based on the first request information; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0039] This invention provides a control device for use in control equipment, the device comprising:
[0040] The third receiving module is configured to receive first request information sent by a network device; the first request information is determined based on first information sent by a first terminal; the first information includes a first identifier of the first terminal; the first request information includes infrared code information corresponding to a second terminal; the infrared code information carries the first identifier.
[0041] The second sending module is used to send the infrared code information to the second terminal according to the first request information;
[0042] The third sending module is used to send feedback information based on the first request information to the network device; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0043] This invention provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the control method provided in this invention.
[0044] This invention provides a storage medium storing executable instructions, which, when executed by at least one processor, implement the control method described above.
[0045] This invention provides a control method, apparatus, electronic device, and storage medium applied to network devices. The method includes: receiving first information sent by a first terminal; the first information including a first identifier of the first terminal; the first information instructing the network device to control a second terminal through a control device; determining, based on the first information, the first request information for infrared control of the second terminal; sending the first request information to the control device; the first request information including infrared code information corresponding to the second terminal; the infrared code information carrying the first identifier; the first request information instructing the control device to send the infrared code information to the second terminal; and receiving feedback information from the control device based on the first request information; the feedback information indicating whether the control device successfully sent the infrared code information to the second terminal. By employing the technical solution of this invention, the feedback information from the control device based on the first request information indicates whether the control device successfully sent the infrared code information to the second terminal. In the event that the first terminal fails to control the second terminal using the first information, the feedback information can confirm whether the control device successfully sent the infrared code information, thereby accurately locating whether the faulty device is the control device or the second terminal. Attached Figure Description
[0046] Figure 1 This is a schematic diagram illustrating the implementation process of a control method according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram illustrating the implementation process of another control method according to an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the overall architecture of a control method for non-intelligent infrared device control feedback technology according to an embodiment of the present invention;
[0049] Figure 4 This is a schematic diagram illustrating the unique identifier information encoding rule of a control method according to an embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram of the control flow of a control method according to an embodiment of the present invention;
[0051] Figure 6 This is a schematic diagram of the composition of a control device according to an embodiment of the present invention;
[0052] Figure 7 This is a schematic diagram of the composition structure of another control device according to an embodiment of the present invention;
[0053] Figure 8 This is a schematic diagram of the hardware structure of a control device according to an embodiment of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on the present invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] In related technologies, intelligent control methods for non-intelligent devices can be mainly divided into the following categories:
[0056] The first control method: Infrared smart terminal controlling non-smart infrared devices. An infrared smart terminal refers to a user smart terminal with infrared functionality, such as a smartphone, tablet, or other smart terminal with infrared capabilities.
[0057] The first control method includes a first control approach, which allows direct control via a stored code library. Specifically, the control method involves storing an infrared code library in the infrared smart terminal before controlling a non-smart infrared device. Before controlling the non-smart infrared device, the infrared code is matched with the device's code. After matching, infrared control of the non-smart infrared device is implemented. This first control approach requires a certain amount of memory in the infrared smart terminal, but due to its limited capacity, it can only control a small number of non-smart infrared devices. Furthermore, this control method can only perform single-device control operations and cannot utilize basic smart home control capabilities such as scene linkage; it is a relatively low-level non-smart infrared control method.
[0058] The first control method also includes a second control approach, which uses a code library obtained from the cloud for control. Specifically, the infrared smart terminal interacts with the cloud to obtain the code library, and then controls non-smart infrared devices. The difference between the second and first control methods is that the infrared code library does not exist in the infrared smart terminal but is obtained from the cloud, thus expanding the infrared control range of the infrared smart terminal.
[0059] The second control method involves a smart terminal without infrared functionality controlling non-smart infrared devices.
[0060] To enable smart terminals without infrared functionality to control non-smart infrared devices, an infrared repeater needs to be added to the control process. The smart terminal without infrared functionality reports control information to the cloud, and the cloud sends the corresponding infrared control information to the infrared repeater. The repeater then sends infrared control commands to the non-smart infrared devices. Since smartphones with infrared functionality are not yet widespread, adding an infrared repeater is a commonly used infrared control method. The infrared repeater can be a dedicated infrared relay device or a smart device with infrared functionality, including routers, set-top boxes, smart speakers, and other smart devices used in the group's core business.
[0061] The third type of control: non-intelligent infrared devices controlling other non-intelligent infrared devices.
[0062] This control method also relies on an infrared repeater. The non-intelligent infrared device is a direct connection device to the infrared repeater, such as a set-top box remote control. The non-intelligent infrared device sends specific button presses or control information to the infrared repeater, which then controls the non-intelligent infrared device.
[0063] Most infrared products in related technologies follow the Infrared Data Association (IrDA) protocol, which is a half-duplex communication.
[0064] In the first related technology, infrared commands were sent to non-intelligent infrared devices. However, non-intelligent infrared devices, such as traditional household air conditioners, televisions, and fans, do not respond after receiving infrared control commands.
[0065] At this point, when a user fails to control a non-smart infrared device, it's impossible to confirm whether the infrared control command was successfully sent from the infrared repeater, making it impossible to accurately pinpoint the fault. Some smart products, such as speakers and mobile phones, may not accurately provide feedback on the control results after infrared control is implemented.
[0066] Related technology two uses the sound response of the controlled infrared appliance to determine whether the control is successful. This method has the following drawbacks: the real environment is noisy, and using sound as feedback is unreliable. Furthermore, currently available infrared appliances such as fans and televisions do not provide sound feedback during control.
[0067] To address the shortcomings of the aforementioned related technologies, embodiments of the present invention provide a control method, device, electronic device, and storage medium. By designing a feedback mechanism based on unique identification information, it is possible to confirm whether an infrared control command, including infrared code information, has been successfully transmitted from the infrared transponder. Furthermore, it is not easily affected by environmental interference and does not depend on the controlled electrical appliance.
[0068] This invention proposes a control method. The function implemented by this method can be achieved by the processor in the control device calling program code. Of course, the program code can be stored in a computer storage medium. It can be seen that the computing device includes at least a processor and a storage medium.
[0069] Figure 1 This is a schematic diagram illustrating the implementation process of a control method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method is applied to a network device, and the method includes:
[0070] Step 101: Receive first information sent by the first terminal; the first information includes a first identifier of the first terminal; the first information is used to instruct the network device to control the second terminal through the control device;
[0071] Step 102: Based on the first information, determine the first request information for infrared control of the second terminal; send the first request information to the control device; the first request information includes infrared code information corresponding to the second terminal; the infrared code information carries the first identifier; the first request information is used to instruct the control device to send the infrared code information to the second terminal;
[0072] Step 103: Receive feedback information from the control device based on the first request information; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0073] In step 101, the control method can be limited according to the actual situation, and is not limited here. 5. As an example, the control method can be a non-intelligent infrared device control feedback technology method.
[0074] The network device can be limited according to actual circumstances, and is not limited here. As an example, the network device can be a cloud, a server, etc., and the cloud can be a terminal used to match the first information with the first request information and send the first request information to the control device.
[0075] The first terminal can be limited according to the actual situation, and no limitation is made here. As an example, the first terminal can be a user operation terminal, etc., which can be a terminal operated by a user to send the first information to the network device.
[0076] The first information can be limited according to the actual situation, and is not limited here. As an example, the first information can be a control command, which can be used to control the second terminal.
[0077] The information includes at least identification information of the second terminal controlled by the user, and operation information performed by the second terminal under the user's control.
[0078] The method of receiving the first information sent by the first terminal can be limited according to the actual situation, and is not limited here. As an example, it can be achieved through Hypertext Transfer Protocol (HTTP) or Message Queuing Telemetry Transport (MQTT).
[0079] The system can receive the first information sent by the first terminal through various connection methods such as MQTT.
[0080] The first identifier can be limited according to the actual situation, but is not limited here. As an example,
[0081] The first identifier may be the unique identifier of the first terminal, and the unique identifier may be the identifier used to characterize the identity of the first terminal.
[0082] The first information is used to instruct the network device to control the second terminal through the control device.
[0083] After receiving the first information, the network device matches the first information to obtain a first request information, and sends the first request information to the second terminal through the control device, thereby...
[0084] The first information instructs the network device to control the second terminal through the control device.
[0085] In step 102, the first request information may be limited according to the actual situation, and no limitation is made here. As an example, the first request information may be an infrared control command obtained by matching the first information, and the first request information may also include at least the identity information of the second terminal.
[0086] The step of determining the first request information for infrared control of the second terminal based on the first information can be achieved by matching the first request information based on the first information. Specifically, based on the operation information performed by the second terminal under the user's control included in the first information, the infrared code information in the first request information is determined; based on the identification information of the second terminal controlled by the user included in the first information, the identity information of the second terminal in the first request information is determined; and based on the first identifier of the first terminal in the first information, the first identifier carried by the infrared code information in the first request information is determined.
[0087] The control device can be limited according to the actual situation, and is not limited here. As an example, the control device can be an infrared repeater, etc., and the infrared repeater can be a general-purpose remote control with infrared code information transmission function.
[0088] The second terminal can be limited according to the actual situation, and no limitation is made here. As an example, the second terminal can be a non-intelligent infrared device that has the function of receiving infrared code information and performing operations based on the infrared code information.
[0089] The infrared code information corresponding to the second terminal can be limited according to the actual situation, and is not limited here. As an example, the infrared code information corresponding to the second terminal can be infrared code information that can be received by the second terminal and can be used to control the second terminal.
[0090] The infrared code information can be limited according to the actual situation, and is not limited here. As an example, the infrared code information may at least include the control code of the control device, and the control code may at least include a preamble code, a system code, an identification code, a check code, and a tail code.
[0091] The control code is determined according to a preset standard, which can be limited according to actual circumstances and is not specified here. As an example, the preset standard can be the NEC IR transmission protocol. The NEC standard protocol includes NEC standard coding, which includes a preamble code, client code, data code, inverted data code, etc.
[0092] The first request information, which instructs the control device to send the infrared code information to the second terminal, can be implemented by the control device sending the infrared code information included in the first request information to the second terminal after receiving the first request information, thereby enabling the first request information to instruct the control device to send the infrared code information to the second terminal.
[0093] In step 103, the network device may make limitations upon receiving the feedback information, depending on the actual situation; however, no limitations are specified here. As an example, the feedback information may be stored in the network device; alternatively, it may be sent to the first terminal. The feedback information includes at least feedback information corresponding to the control device successfully sending the infrared code information to the second terminal and feedback information corresponding to the control device failing to successfully send the infrared code information to the second terminal.
[0094] By adopting the technical solution of this embodiment of the invention, the control device uses feedback information corresponding to the first request information to characterize whether the control device successfully sends the infrared code information to the second terminal; in the case that the first terminal fails to control the second terminal through the first information, the feedback information can confirm whether the control device successfully sends the infrared code information, thereby accurately locating whether the faulty device is the control device or the second terminal.
[0095] In an optional embodiment of the present invention, the network device includes a database; the database stores the correspondence between the first information and the first request; the step of determining the first request information for infrared control of the second terminal based on the first information includes:
[0096] Match the infrared code information corresponding to the first information in the database;
[0097] The first request information is determined based on the infrared code information corresponding to the first information and the first identifier.
[0098] In this embodiment, the database can be limited according to actual conditions, and no limitation is made here. As an example, the database can be an infrared code library set in the network device. Compared with the local code library set in the first device, the infrared code library can store more of the correspondence between the first information and the first request.
[0099] The step of matching the infrared code information corresponding to the first information in the database can be to determine the infrared code information corresponding to the first information in the database according to the correspondence between the first information and the first request.
[0100] The step of determining the first request information based on the infrared code information corresponding to the first information and the first identifier can be as follows: encoding the first identifier to obtain a unique identifier code for representing the identity of the first device and a unique identifier guide code for locating the unique identifier code; and determining the first request information based on the infrared code information corresponding to the first information, the unique identifier code, and the unique identifier guide code.
[0101] Figure 2 This is a schematic diagram illustrating the implementation process of another control method according to an embodiment of the present invention, as shown below. Figure 2 As shown, the method is applied to a control device, and the method includes:
[0102] Step 201: Receive first request information sent by the network device; the first request information is determined based on first information sent by the first terminal; the first information includes a first identifier of the first terminal; the first request information includes infrared code information corresponding to the second terminal; the infrared code information carries the first identifier;
[0103] Step 202: Send the infrared code information to the second terminal according to the first request information;
[0104] Step 203: Send feedback information based on the first request information to the network device; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0105] In step 201, the network device may be a cloud, a server, etc., and the cloud may be a terminal used to match the first information with the first request information and send the first request information to the control device.
[0106] The first terminal may be a user operation terminal, etc., and the user operation terminal may be a terminal operated by a user to send the first information to the network device.
[0107] The first information may be a control command, which may be information used to control the second terminal. The first information includes at least identification information of the second terminal controlled by the user, and operation information performed by the second terminal under the user's control.
[0108] The first identifier may be the unique identifier of the first terminal, and the unique identifier may be the identifier used to characterize the identity of the first terminal.
[0109] In some embodiments, the unlocking code of the spinlock in the control device is determined based on the first identifier.
[0110] The first request information may be an infrared control command obtained by matching the first information, and the first request information may also include at least the identity information of the second terminal.
[0111] The control device may be an infrared repeater, etc., and the infrared repeater may be a general-purpose remote control with infrared code information transmission function.
[0112] The second terminal may be a non-intelligent infrared device that has the function of receiving infrared code information and performing operations based on the infrared code information.
[0113] In step 202, sending the infrared code information to the second terminal according to the first request information can be: determining the second terminal to send the infrared code information based on the identity information of the second terminal included in the first request information; and sending the infrared code information included in the first request information to the second terminal.
[0114] In step 203, the feedback information can be limited according to the actual situation, and is not limited here. As an example, the feedback information can be based on whether the control device has received the first request information. The feedback information includes at least feedback information corresponding to the control device successfully sending the infrared code information to the second terminal and feedback information corresponding to the control device failing to successfully send the infrared code information to the second terminal.
[0115] In an optional embodiment of the present invention, the control device includes a receiving module, and the method further includes:
[0116] Control the receiving module to receive the second information;
[0117] Determine whether the second information carries the second identifier;
[0118] If the second information carries the second identifier, it is determined whether the receiving module has received the infrared code information based on the second information;
[0119] If the second information does not carry the second identifier, the second information is discarded.
[0120] In this embodiment, the receiving module can be limited according to actual conditions, and no limitation is made here. As an example, the receiving module can be an infrared receiving module that can receive the infrared code information at the same time as the control device sends the infrared code information.
[0121] The second information can be limited according to the actual situation, and is not limited here. As an example, the second information can be infrared code information emitted by the control device, infrared code information emitted by other devices, or non-infrared code information emitted by other devices.
[0122] The control of the receiving module to receive the second information can be achieved by controlling the receiving module to receive the second information when the control device sends infrared code information.
[0123] The second identifier can be limited according to the actual situation, and is not limited here. As an example, the second identifier may be the identifier corresponding to the user terminal that sent the second information.
[0124] If the second information carries the second identifier, it is determined that the second information received by the control device is at least infrared code information sent by the control device or infrared code information sent by other devices. It can be determined whether the receiving module has received the infrared code information based on the second information. If the second information does not carry the second identifier, it is determined that the second information received by the control device is non-infrared code information sent by other devices. The second information can be discarded.
[0125] In an optional embodiment of the present invention, determining whether the receiving module has received the infrared code information based on the second information when the second information carries the second identifier includes:
[0126] Determine whether the second identifier is the same as the first identifier;
[0127] If the second identifier is the same as the first identifier, it is determined that the second information received by the receiving module is the infrared code information;
[0128] If the second identifier is different from the first identifier, it is determined that the second information received by the receiving module is not the infrared code information.
[0129] In this embodiment, determining whether the second identifier is the same as the first identifier can be done by determining whether the unlock code in the second identifier is the same as the unlock code in the first identifier.
[0130] If the second identifier is the same as the first identifier, the second information received by the control device is determined to be infrared code information sent by the control device; if the second identifier is different from the first identifier, the second information received by the control device is determined to be infrared code information sent by the other device.
[0131] In an optional embodiment of the present invention, the feedback information includes first feedback information characterizing that the control device has successfully sent the infrared code information to the second terminal; the method further includes:
[0132] If the second information received by the receiving module is the infrared code information, the first feedback information is generated.
[0133] In this embodiment, when the second information received by the receiving module is the infrared code information, generating the first feedback information can be done by determining that the second information received by the control device is the infrared code information sent by the control device when the second identifier is the same as the first identifier, and then generating the first feedback information.
[0134] In an optional embodiment of the present invention, the method further includes:
[0135] If the second information received by the receiving module is not the infrared code information, the waiting time for the spinlock to be released in the control device is obtained;
[0136] Determine whether the waiting time is greater than a preset time; the preset time is determined based on the first identifier;
[0137] If the waiting time is greater than or equal to the preset time, it is determined that the control device has failed to send the infrared code information.
[0138] In this embodiment, the second information received by the receiving module that is not the infrared code information can be determined as follows: if the second identifier is different from the first identifier, the second information received by the control device is determined to be infrared code information sent by the other device; or if the second information does not carry the second identifier, the second information received by the control device is determined to be non-infrared code information sent by the other device.
[0139] The waiting time for the spinlock to be released in the control device can be limited according to the actual situation, and is not limited here. As an example, the waiting time can be the remaining time before the timeout limit of the spinlock.
[0140] The preset time can be limited according to the actual situation, and is not limited here. As an example, the preset time can be the timeout limit of the spinlock, and the timeout limit can be determined according to the unlocking code corresponding to the first identifier.
[0141] If the waiting time is greater than or equal to the preset time, it can be determined that the control device has failed to send the infrared code information. This can be achieved by determining that the spinlock is in a timeout release state if the waiting time is greater than or equal to the preset time, and thus determining that the control device has failed to send the infrared code information.
[0142] In some embodiments, the feedback information further includes second feedback information for characterizing that the control device failed to send the infrared code information to the second terminal; the method further includes: when the second information received by the receiving module is not the infrared code information, obtaining the waiting time for the spinlock to be released in the control device; and generating the second feedback information when the waiting time is greater than or equal to the preset time.
[0143] In some embodiments, the feedback information includes third feedback information for characterizing the control device control failure; the method further includes: when the receiving module does not receive the second information, obtaining the waiting time for the spinlock to be released in the control device; and when the waiting time is greater than or equal to the preset time, generating the third feedback information.
[0144] In some embodiments, when the second identifier is the same as the first identifier, determining that the second information received by the receiving module is the infrared code information can be done by determining that the spinlock is in a successfully matched release state when the second identifier is the same as the first identifier, and then determining that the second information received by the receiving module is the infrared code information.
[0145] In an optional embodiment of the present invention, the method further includes:
[0146] If the waiting time is less than the preset time, the receiving module is controlled to re-receive the second information;
[0147] If it is determined that the second information received by the receiving module is not the infrared code information, the waiting time for the spinlock to be released in the control device is reacquired; if the reacquired waiting time is greater than or equal to the preset time, it is determined that the control device has not successfully sent the infrared code information.
[0148] In this embodiment, the steps of controlling the receiving module to re-receive the second information, the received second information not being the infrared code information, and obtaining the waiting time for the spinlock to be released in the control device can be referred to the descriptions in the foregoing embodiments, and will not be repeated here.
[0149] In an optional embodiment of the present invention, the infrared code information includes first encoding information and second encoding information; the second encoding information is set after the first encoding information; wherein, the first encoding information is used to locate the second encoding information; and the second encoding information is used to determine whether the receiving module has received the infrared code information.
[0150] In this embodiment, the first encoding information may be a unique identifier guide code used to locate the unique identifier information of the first terminal, and the second encoding information may be a unique identifier code used to characterize the identity of the first terminal.
[0151] In some embodiments, the unlocking code of the spinlock in the control device is determined based on the second encoding information in the first identifier.
[0152] To understand the embodiments of the present invention, the following description uses a non-intelligent infrared device control feedback technology method as an example.
[0153] Figure 3 This is a schematic diagram of the overall architecture of a control method for non-intelligent infrared devices according to an embodiment of the present invention, as shown below. Figure 3 As shown, this embodiment differs from existing infrared control technologies. In this embodiment, the infrared repeater includes a synchronously operating infrared transmitting module and an infrared receiving module. When the infrared transmitting module sends infrared code information to a non-intelligent infrared device, the infrared receiving module synchronously receives the infrared code information and feeds back the valid infrared code information to the core controller in the infrared repeater. The advantage of this design is that the infrared transmitting module and the infrared receiving module work synchronously; the infrared transmitting module continuously performs the task of sending infrared code information, and the infrared receiving module continuously performs the task of receiving infrared code information. Furthermore, the operation of the infrared receiving module does not affect the continuous transmission of infrared code information by the infrared transmitting module.
[0154] To ensure the effectiveness of the feedback mechanism, when a user operates the terminal, they report a control command with unique identification information to the cloud. This control command is matched in the cloud to obtain an infrared control command, and the unique identification information is encoded in the cloud and sent along with the infrared control command to the infrared repeater. The infrared repeater attempts to spin-lock and wait for this unique identification information by setting a timeout period. When the infrared code information received by the infrared receiving module contains this unique identification information, the spinlock will release, and a first feedback message indicating successful transmission of the infrared control command will be sent to the cloud. If the spin-lock wait expires and no infrared code information is received from the infrared receiving module, a second feedback message indicating failure to transmit the infrared control command will be sent to the cloud.
[0155] To achieve the above solution, the infrared transmitting module must include unique identification information when sending infrared code information. This embodiment designs the following infrared encoding rules: Figure 4 This is a schematic diagram of a unique identifier information encoding rule for a control method according to an embodiment of the present invention, as shown below. Figure 4As shown, in this embodiment, unique identification information is appended to the general remote control system data information format. Taking the general air conditioner remote control system data information format as an example, the general air conditioner remote control system data information includes a preamble, system code, identification code, check code, and tail code. The data frame formed after encoding the unique identification information is followed by the tail code. The above encoding method will not affect the control of non-intelligent infrared devices by the infrared code information. This embodiment defines the unique identification information as an 8-bit unique identification preamble and an 8-bit unique identification code. After the core controller identifies the 8-bit unique identification preamble carried by the infrared code information, it extracts the 8-bit unique identification code following the 8-bit unique identification preamble. The core controller determines whether the spinlock needs to be released by judging whether the 8-bit unique identification code is the unlocking code held by the spinlock.
[0156] Figure 5 This is a schematic diagram of the control flow of a control method according to an embodiment of the present invention, as shown below. Figure 5 As shown in this embodiment, a control process for a non-intelligent infrared device is proposed, the process including:
[0157] Step 1: The user terminal sends a control command with a unique identifier to the cloud. This embodiment supports multiple connection methods such as HTTP and MQTT for reporting.
[0158] Step 2: Based on the reported control command, the cloud matches the first infrared code information corresponding to the control command in the database; and encodes the unique identification information into a second infrared code information including an 8-bit unique identification guide code and an 8-bit unique identification code; appends the second infrared code information to the back end of the first infrared code information to obtain the appended infrared code information; based on the infrared code information and the identification information of the non-intelligent infrared device included in the control command, the infrared control command to be sent to the infrared repeater is determined.
[0159] Step 3: After receiving the infrared control command, the core controller of the infrared transponder extracts the last 8 bits of the unique identifier code according to the encoding rules of the unique identifier information, and generates the spinlock of the core controller based on the 8-bit unique identifier code.
[0160] Step 4: Set the timeout limit for the spinlock. If the waiting time for the spinlock to be released exceeds the timeout limit and the receiving module does not receive any information, the spinlock will be released after the timeout, and the core processor will report the control failure feedback result to the cloud.
[0161] Step 5: The core controller drives the infrared transmitting module to send the infrared code information transmitted from the cloud to non-intelligent infrared devices.
[0162] Step 6: While the infrared transmitting module sends infrared code information to the non-intelligent infrared device, the core controller drives the infrared receiving module to receive the second information. The second information can be infrared code information transmitted by the current infrared repeater, infrared code information transmitted by other infrared repeaters, or non-infrared code information transmitted by other devices.
[0163] Step 7: After receiving the second information, the infrared receiving module checks whether it is valid infrared code information (i.e., infrared code information emitted by the current infrared repeater or infrared code information emitted by other infrared repeaters). The verification method is to check whether the second information contains a unique identifier encoded into an 8-bit unique identifier preamble. If the unique identifier information including the 8-bit unique identifier preamble is successfully parsed, the second information is determined to be valid infrared code information, and the second information including the unique identifier information is sent back to the core controller; if the unique identifier information including the 8-bit unique identifier preamble is not successfully parsed, the second information is determined to be non-infrared code information emitted by other devices, and this useless information is discarded.
[0164] Step 8: The core controller receives the second information, including unique identification information, from the infrared receiving module. It identifies the unique identification information, finds the 8-bit unique identification preamble, extracts the 8-bit unique identification code, and matches the 8-bit unique identification code with the 8-bit unique identification code of the spinlock. If the match is successful, the spinlock is released; if the match is unsuccessful, the spinlock continues to spin and wait until the timeout period expires.
[0165] Step 9: After the spinlock is released, the feedback result is sent to the cloud. If the spinlock is released after a timeout, an infrared control command carrying infrared code information is sent to indicate a failure. If the spinlock is released successfully after a match, an infrared control command carrying infrared code information is sent to indicate a success.
[0166] Step 10: After receiving the feedback information, the cloud will persistently store the corresponding results in the cloud, or it can send the feedback information back to the user's terminal.
[0167] In related technologies, infrared devices are controlled via smart speakers. The smart speaker functions as both a user terminal and an infrared repeater. After receiving the infrared control code, the speaker controls the infrared device, but the entire control flow is unidirectional. Therefore, users cannot receive actual control feedback from the control end (i.e., the speaker side). Furthermore, when users fail to control traditional non-smart home appliances via the speaker and file a complaint, backend support personnel cannot fully determine whether the infrared code was successfully sent, or whether the problem lies with the speaker or the traditional home appliance, making it difficult to quickly resolve such complaints.
[0168] This embodiment proposes a control feedback technology method for non-intelligent infrared devices. By adding a feedback mechanism based on unique identification information, the infrared transponder includes an infrared transmitting module, an infrared receiving module, and a core controller. When the infrared transmitting module sends infrared code information to the non-intelligent infrared device, the infrared receiving module synchronously receives the infrared code information and determines whether the infrared transmitting module has successfully sent the infrared code information by checking whether the infrared code information contains unique identification information. This solves the problem of not being able to determine whether the fault lies with the infrared transponder or the non-intelligent infrared device.
[0169] This invention provides a control device applied to network equipment. Figure 6 This is a schematic diagram of the composition structure of a control device according to an embodiment of the present invention, as shown below. Figure 6 As shown, the device 600 includes:
[0170] The first receiving module 601 is configured to receive first information sent by the first terminal; the first information includes a first identifier of the first terminal; the first information is used to instruct the network device to control the second terminal through the control device.
[0171] A first determining module 602 is used to determine a first request for infrared control of the second terminal based on the first information; a first sending module is used to send the first request to the control device; the first request includes infrared code information corresponding to the second terminal; the infrared code carries the first identifier; the first request is used to instruct the control device to send the infrared code to the second terminal;
[0172] The second receiving module 603 is used to receive feedback information from the control device based on the first request information; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0173] In other embodiments, the network device includes a database; the database stores the correspondence between the first information and the first request; the first determining module 602 is further configured to match the infrared code information corresponding to the first information in the database; and determine the first request information based on the infrared code information corresponding to the first information and the first identifier.
[0174] The description of the above device embodiments is similar to that of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the device embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding.
[0175] It should be noted that, in the embodiments of the present invention, if the above-described control method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a control device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of the present invention are not limited to any specific hardware and software combination.
[0176] This invention provides a control device for use in control equipment. Figure 7 This is a schematic diagram of the composition structure of another control device according to an embodiment of the present invention, as shown below. Figure 7 As shown, the device 700 includes:
[0177] The third receiving module 701 is configured to receive first request information sent by a network device; the first request information is determined based on first information sent by a first terminal; the first information includes a first identifier of the first terminal; the first request information includes infrared code information corresponding to a second terminal; the infrared code information carries the first identifier.
[0178] The second sending module 702 is used to send the infrared code information to the second terminal according to the first request information;
[0179] The third sending module 703 is used to send feedback information based on the first request information to the network device; the feedback information is used to indicate whether the control device has successfully sent the infrared code information to the second terminal.
[0180] In other embodiments, the control device includes a receiving module, and the apparatus 700 further includes: a first control module, a first judgment module, a second judgment module, and a discard module; wherein,
[0181] The first control module is used to control the receiving module to receive the second information;
[0182] The first determination module is used to determine whether the second information carries a second identifier;
[0183] The second determining module is used to determine whether the receiving module has received the infrared code information based on the second information when the second information carries the second identifier;
[0184] The discarding module is used to discard the second information if the second information does not carry the second identifier.
[0185] In other embodiments, the second determining module is further configured to determine whether the second identifier is the same as the first identifier; if the second identifier is the same as the first identifier, determine that the second information received by the receiving module is the infrared code information; if the second identifier is different from the first identifier, determine that the second information received by the receiving module is not the infrared code information.
[0186] In other embodiments, the feedback information includes first feedback information indicating that the control device has successfully sent the infrared code information to the second terminal; the device 700 further includes: a first generation module, configured to generate the first feedback information when the second information received by the receiving module is the infrared code information.
[0187] In other embodiments, the device 700 further includes: a first acquisition module, a third judgment module, and a second determination module; wherein,
[0188] The first acquisition module is used to acquire the waiting time for the spinlock to be released in the control device when the second information received by the receiving module is not the infrared code information;
[0189] The second judgment module is used to determine whether the waiting time is greater than a preset time; the preset time is determined based on the first identifier;
[0190] The second determining module is used to determine that the control device has failed to send the infrared code information if the waiting time is greater than or equal to the preset time.
[0191] In other embodiments, the device 700 further includes: a second control module and a second acquisition module; wherein,
[0192] The second control module is used to control the receiving module to re-receive the second information if the waiting time is less than the preset time;
[0193] The second acquisition module is used to reacquire the waiting time for the spinlock to be released in the control device when it is determined that the second information re-received by the receiving module is not the infrared code information; and to determine that the control device has not successfully sent the infrared code information when the re-acquired waiting time is greater than or equal to the preset time.
[0194] In other embodiments, the infrared code information includes first encoding information and second encoding information; the second encoding information is set after the first encoding information; wherein, the first encoding information is used to locate the second encoding information; and the second encoding information is used to determine whether the receiving module has received the infrared code information.
[0195] The description of the above device embodiments is similar to that of the above method embodiments, and has similar beneficial effects. For technical details not disclosed in the device embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding.
[0196] It should be noted that, in this embodiment of the invention, if the above-described control method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical embodiments of this invention are essentially, or rather, derivatives of existing...
[0197] The technical contributions can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to cause a control device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of the present invention are not limited to any specific hardware and software combination.
[0198] Correspondingly, this embodiment of the invention provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the control method provided by this embodiment of the invention.
[0199] Correspondingly, embodiments of the present invention provide a storage medium storing executable instructions. When the executable instructions are executed by at least one processor, the control method described above is implemented. It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the descriptions of the method embodiments of the present invention for understanding.
[0200] It should be noted that, Figure 8 This is a schematic diagram of a hardware entity structure of a control device according to an embodiment of the present invention, such as... Figure 8As shown, the hardware entity of the control device 800 includes a processor 801 and a memory 803. Optionally, the control device 800 may also include a communication interface 802.
[0201] It is understood that memory 803 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 803 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0202] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 801. Processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 801 or by instructions in software form. The processor 801 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 801 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of the present invention can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 803. Processor 801 reads the information in memory 803 and completes the steps of the aforementioned method in conjunction with its hardware.
[0203] In an exemplary embodiment, the control device may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0204] In the several embodiments provided by this invention, it should be understood that the disclosed methods and apparatus can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another observation, or some features may be ignored or not executed. In addition, the communication connections between the various components shown or discussed may be through some interfaces, indirect coupling or communication connections between devices or units, and may be electrical, mechanical, or other forms.
[0205] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0206] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0207] Alternatively, if the integrated units described above in the embodiments of the present invention are implemented as software functional units and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a control device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0208] The control method, apparatus, and computer storage medium described in this invention are only examples of embodiments of this invention, but are not limited thereto. Any control method, apparatus, and computer storage medium involved are within the protection scope of this invention.
[0209] The above description is merely an embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A control method, characterized in that, Applied to network devices, the method includes: The network device receives first information sent by a first terminal; the first information includes a first identifier of the first terminal; the first information is used to instruct the network device to control the second terminal through the control device. Based on the first information, a first request for infrared control of the second terminal is determined; the first request is sent to the control device; the first request includes infrared code information corresponding to the second terminal; the infrared code carries the first identifier; the first request is used to instruct the control device to send the infrared code information to the second terminal; The control device receives feedback information based on the first request information; the feedback information is used to indicate whether the control device successfully sent the infrared code information to the second terminal. The control device includes an infrared transmitting module and an infrared receiving module that operate synchronously. When the infrared transmitting module sends the infrared code information to the second terminal, the infrared receiving module simultaneously receives the infrared code information and feeds back valid infrared code information to the core controller in the control device. The control device also sets a timeout limit and performs a spinlock wait on the first identifier. When the infrared code information received by the infrared receiving module carries the first identifier, the spinlock is released, and the feedback information received by the network device is a first feedback information indicating that the control device has successfully sent the infrared code information to the second terminal. When the spinlock wait timeout limit expires and the core controller does not receive the infrared code information sent by the infrared receiving module, the feedback information received by the network device is a second feedback information indicating that the control device failed to send the infrared code information to the second terminal.
2. The method according to claim 1, characterized in that, The network device includes a database; the database stores the correspondence between the first information and the first request; The first request information for infrared control of the second terminal based on the first information includes: Match the infrared code information corresponding to the first information in the database; The first request information is determined based on the infrared code information corresponding to the first information and the first identifier.
3. A control method, characterized in that, Applied to control equipment, the method includes: The system receives a first request message sent by a network device; the first request message is determined based on first information sent by a first terminal; the first information includes a first identifier of the first terminal; the first request message includes infrared code information corresponding to a second terminal; the infrared code information carries the first identifier. The infrared code information is sent to the second terminal according to the first request information; The network device sends feedback information based on the first request information; the feedback information is used to indicate whether the control device successfully sent the infrared code information to the second terminal. The control device includes an infrared transmitting module and an infrared receiving module that operate synchronously. When the infrared transmitting module sends the infrared code information to the second terminal, the infrared receiving module simultaneously receives the infrared code information and feeds back valid infrared code information to the core controller in the control device. The control device also sets a timeout limit and performs a spinlock wait on the first identifier. When the infrared code information received by the infrared receiving module carries the first identifier, the spinlock is released, and the feedback information sent to the network device is a first feedback information indicating that the control device has successfully sent the infrared code information to the second terminal. When the spinlock wait timeout limit expires and the core controller does not receive the infrared code information sent by the infrared receiving module, the feedback information sent to the network device is a second feedback information indicating that the control device failed to send the infrared code information to the second terminal.
4. The method according to claim 3, characterized in that, The control device includes a receiving module, and the method further includes: Control the receiving module to receive the second information; Determine whether the second information carries the second identifier; If the second information carries the second identifier, it is determined whether the receiving module has received the infrared code information based on the second information; If the second information does not carry the second identifier, the second information is discarded.
5. The method according to claim 4, characterized in that, When the second information carries the second identifier, determining whether the receiving module has received the infrared code information based on the second information includes: Determine whether the second identifier is the same as the first identifier; If the second identifier is the same as the first identifier, it is determined that the second information received by the receiving module is the infrared code information; If the second identifier is different from the first identifier, it is determined that the second information received by the receiving module is not the infrared code information.
6. The method according to claim 5, characterized in that, The feedback information includes first feedback information indicating that the control device has successfully sent the infrared code information to the second terminal; the method further includes: If the second information received by the receiving module is the infrared code information, the first feedback information is generated.
7. The method according to claim 5, characterized in that, The method further includes: If the second information received by the receiving module is not the infrared code information, the waiting time for the spinlock to be released in the control device is obtained; Determine whether the waiting time is greater than a preset time; the preset time is determined based on the first identifier; If the waiting time is greater than or equal to the preset time, it is determined that the control device has failed to send the infrared code information.
8. The method according to claim 7, characterized in that, The method further includes: If the waiting time is less than the preset time, the receiving module is controlled to re-receive the second information; If it is determined that the second information received by the receiving module is not the infrared code information, the waiting time for the spinlock to be released in the control device is reacquired; if the reacquired waiting time is greater than or equal to the preset time, it is determined that the control device has not successfully sent the infrared code information.
9. The method according to claim 3, characterized in that, The infrared code information includes first encoding information and second encoding information; the second encoding information is set after the first encoding information; wherein, the first encoding information is used to locate the second encoding information; and the second encoding information is used to determine whether the receiving module has received the infrared code information.
10. A storage medium, characterized in that, The storage medium stores executable instructions, which, when executed by at least one processor, implement the control method according to any one of claims 1 to 2, or implement claim 3. The control method described in 9.