Device control method, apparatus, system, and storage medium
Patent Information
- Application Number
- CN202210999658.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-08-19
AI Technical Summary
As the functions of smart terminals and smart home devices increase, the amount of data in control commands increases, leading to a decrease in transmission efficiency.
By generating the first control command, the basic command of the controlled device is determined, and differential comparison is performed to obtain the target control command, thereby reducing the amount of data transmitted. The command is further compressed using a preset compression algorithm.
It improves the efficiency of control command transmission and reduces the amount of data transmitted.
Smart Images

Figure CN115268291B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of smart home, and in particular, to a device control method, device, system and storage medium. BACKGROUND
[0002] At present, when controlling smart home devices (for example, smart air conditioners, smart televisions, smart washing machines, etc.) through a smart terminal (for example, a mobile phone APP), the smart terminal usually needs to send complete instructions for controlling the above smart home devices to the smart home devices.
[0003] However, with the increase in device functions today, the data to be transmitted also increases in the process of transmitting control instructions from the smart terminal to the smart home device, which will result in reduced instruction transmission efficiency when the smart terminal controls the smart home device. SUMMARY
[0004] In view of this, in order to solve the above technical problem that with the increase in device functions today, the data to be transmitted also increases in the process of transmitting control instructions from the smart terminal to the smart home device, which will result in reduced instruction transmission efficiency when the smart terminal controls the smart home device, embodiments of the present application provide a device control method, device, system and storage medium.
[0005] In a first aspect, embodiments of the present application provide a device control method, which is applied to a control device, and the method comprises:
[0006] generating a first control instruction in response to a received control operation;
[0007] determining a controlled device according to the first control instruction, and determining a basic instruction of the controlled device;
[0008] differentially comparing the first control instruction with the basic instruction to obtain a target control instruction;
[0009] sending the target control instruction to the controlled device, so that the controlled device performs a corresponding operation according to the target control instruction.
[0010] In one possible implementation, the differentially comparing the first control instruction with the basic instruction to obtain a target control instruction comprises:
[0011] converting the first control instruction into a string format to obtain a first control instruction string, and converting the basic instruction into a string format to obtain a basic instruction string;
[0012] removing a part consistent with the basic instruction string in the first control instruction string to obtain a target control instruction string;
[0013] Converting the target control instruction string to obtain a target control instruction.
[0014] In one possible implementation, after the first control instruction is compared with the base instruction to obtain the target control instruction, the method further comprises:
[0015] Obtaining a current running state of the controlled device and determining a second control instruction corresponding to the current running state;
[0016] Comparing the second control instruction with the target control instruction to obtain a third control instruction, and taking the third control instruction as a new target control instruction to execute the step of sending the target control instruction to the controlled device.
[0017] In one possible implementation, the step of sending the target control instruction to the controlled device comprises:
[0018] Compressing the target control instruction according to a preset compression algorithm to obtain a feature array;
[0019] Sending the feature array to the controlled device.
[0020] In one possible implementation, the step of compressing the target control instruction according to a preset compression algorithm to obtain a feature array comprises:
[0021] Converting the target control instruction into a target binary array;
[0022] Dividing the target binary array into a plurality of binary arrays according to a preset arrangement order, each binary array having N bits, and N being an even number;
[0023] Performing operation on each binary array according to a preset first algorithm to obtain a first value;
[0024] Combining a plurality of first values according to the arrangement order to obtain a feature array.
[0025] In a second aspect, an embodiment of the present application provides a device control method, which is applied to a controlled device, and the method comprises:
[0026] Receiving a target control instruction sent by a control device, and determining a base instruction of the controlled device, the target control instruction being obtained by comparing a first control instruction with the base instruction;
[0027] Determining a first control instruction based on the target control instruction and the base instruction, and performing an operation corresponding to the first control instruction.
[0028] In a possible implementation, the determining the first control instruction based on the target control instruction and the basic instruction comprises:
[0029] converting the target control instruction into a string format to obtain a target control instruction string, and converting the basic instruction into a string format to obtain a basic instruction string;
[0030] merging the target control instruction string and the basic instruction string to obtain a first control instruction string;
[0031] performing format conversion on the first control instruction string to obtain the first control instruction.
[0032] In a possible implementation, after the determining the basic instruction of the controlled device, the method further comprises:
[0033] obtaining a current running state of the controlled device, and determining a second control instruction corresponding to the current running state;
[0034] the determining the first control instruction based on the target control instruction and the basic instruction comprises:
[0035] obtaining a fourth control instruction according to the second control instruction and the target control instruction, the target control instruction being obtained by differentiating the fourth control instruction from the second control instruction;
[0036] obtaining the first control instruction according to the basic instruction and the fourth control instruction, the fourth control instruction being obtained by differentiating the first control instruction from the basic instruction.
[0037] In a possible implementation, the receiving the target control instruction sent by the control device comprises:
[0038] receiving a feature array sent by the control device;
[0039] performing operation on each value in the feature array according to a preset second algorithm to obtain a plurality of binary arrays;
[0040] combining the plurality of binary arrays according to a preset arrangement order to obtain a target binary array;
[0041] performing conversion on the target binary array to obtain the target control instruction.
[0042] In a third aspect, an embodiment of the present application provides a device control apparatus, the apparatus being applied to a control device, and the apparatus comprising:
[0043] generating a first control instruction in response to the received control operation;
[0044] determining a controlled device according to the first control instruction and determining a basic instruction of the controlled device;
[0045] comparing the first control instruction with the basic instruction to obtain a target control instruction;
[0046] sending the target control instruction to the controlled device to enable the controlled device to perform a corresponding operation according to the target control instruction.
[0047] In one possible implementation, the comparing module is specifically configured to:
[0048] convert the first control instruction into a string format to obtain a first control instruction string and convert the basic instruction into a string format to obtain a basic instruction string;
[0049] remove a part consistent with the basic instruction string in the first control instruction string to obtain a target control instruction string;
[0050] convert the target control instruction string into a format to obtain a target control instruction.
[0051] In one possible implementation, the apparatus further includes:
[0052] an obtaining module configured to, after the comparing the first control instruction with the basic instruction to obtain a target control instruction, obtain a current running state of the controlled device and determine a second control instruction corresponding to the current running state;
[0053] a differential comparison module configured to compare the second control instruction with the target control instruction to obtain a third control instruction, and execute the step of sending the target control instruction to the controlled device by taking the third control instruction as a new target control instruction.
[0054] In one possible implementation, the sending module includes:
[0055] a compression submodule configured to compress the target control instruction according to a preset compression algorithm to obtain a feature array;
[0056] a sending submodule configured to send the feature array to the controlled device.
[0057] In one possible implementation, the compression submodule is specifically configured to:
[0058] convert the target control instruction into a target binary array;
[0059] divide the target binary array into a plurality of binary arrays according to a preset arrangement order, each binary array having N bits, where N is an even number;
[0060] perform operation on each binary array according to a preset first algorithm to obtain a first value;
[0061] combine the plurality of first values according to the arrangement order to obtain a feature array.
[0062] In a fourth aspect, an embodiment of the present application provides a device control apparatus, which is applied to a controlled device, and the apparatus comprises:
[0063] a receiving module, configured to receive a target control instruction sent by a control device, and determine a basic instruction of the controlled device, the target control instruction being obtained by differentiating and comparing a first control instruction with the basic instruction;
[0064] an executing module, configured to determine the first control instruction based on the target control instruction and the basic instruction, and execute an operation corresponding to the first control instruction.
[0065] In a possible implementation, the executing module is specifically configured to:
[0066] convert the target control instruction into a string format to obtain a target control instruction string, and convert the basic instruction into a string format to obtain a basic instruction string;
[0067] merge the target control instruction string and the basic instruction string to obtain a first control instruction string;
[0068] perform format conversion on the first control instruction string to obtain the first control instruction.
[0069] In a possible implementation, the apparatus further comprises:
[0070] a state obtaining module, configured to, after the basic instruction of the controlled device is determined, obtain a current running state of the controlled device, and determine a second control instruction corresponding to the current running state;
[0071] the executing module is specifically configured to:
[0072] obtain a fourth control instruction according to the second control instruction and the target control instruction, the target control instruction being obtained by differentiating and comparing the fourth control instruction with the second control instruction;
[0073] According to the basic instruction and the fourth control instruction, a first control instruction is obtained, wherein the fourth control instruction is obtained by differentiating the first control instruction from the basic instruction.
[0074] In a possible implementation, the receiving module is specifically configured to:
[0075] receive a feature array sent by a control device;
[0076] perform operation on each value in the feature array according to a preset second algorithm to obtain a plurality of binary arrays;
[0077] combine the plurality of binary arrays according to a preset arrangement order to obtain a target binary array;
[0078] convert the target binary array to obtain the target control instruction.
[0079] In a fifth aspect, an embodiment of the present application provides a control device, and the control device comprises:
[0080] a processor and a memory, wherein the processor is configured to execute a device control program stored in the memory to implement the device control method in the first aspect.
[0081] In a sixth aspect, an embodiment of the present application provides a controlled device, and the controlled device comprises:
[0082] a processor and a memory, wherein the processor is configured to execute a device control program stored in the memory to implement the device control method in the second aspect.
[0083] In a seventh aspect, an embodiment of the present application provides a device control system, and the system comprises:
[0084] a control device configured to implement the device control method in any one of the first aspect;
[0085] a controlled device configured to implement the device control method in any one of the second aspect.
[0086] In an eighth aspect, an embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the device control method in any one of the first aspect or the second aspect.
[0087] The technical scheme provided by the embodiment of the present application comprises the following steps: a control device generates a first control instruction in response to a received control operation; the control device determines a controlled device according to the first control instruction; the control device determines a basic instruction of the controlled device; the control device compares the first control instruction with the basic instruction, and obtains a target control instruction. The technical scheme compares the first control instruction with the basic instruction of the controlled device, and only sends the control instruction different from the basic instruction of the controlled device to the controlled device, thereby reducing the data amount of the transmitted control instruction, and improving the transmission efficiency of the control instruction. BRIEF DESCRIPTION OF DRAWINGS
[0088] Figure 1 A device control system architecture schematic diagram provided by the embodiment of the present application;
[0089] Figure 2 An embodiment flowchart of a device control method provided by the embodiment of the present application;
[0090] Figure 3 An embodiment flowchart of a target control instruction compression method provided by the embodiment of the present application;
[0091] Figure 4 An embodiment flowchart of another device control method provided by the embodiment of the present application;
[0092] Figure 5 An embodiment flowchart of still another device control method provided by the embodiment of the present application;
[0093] Figure 6 A flowchart of determining a target control instruction provided by the embodiment of the present application;
[0094] Figure 7 An embodiment flowchart of still another device control method provided by the embodiment of the present application;
[0095] Figure 8 An embodiment flowchart of still another device control method provided by the embodiment of the present application;
[0096] Figure 9 A flowchart of differentiating a complete instruction from a basic instruction provided by the embodiment of the present application;
[0097] Figure 10 An embodiment block diagram of a device control device applied to a control device provided by the embodiment of the present application;
[0098] Figure 11 An embodiment block diagram of a device control device applied to a controlled device provided by the embodiment of the present application;
[0099] Figure 12A structural schematic diagram of a control device provided by an embodiment of the present application is shown in the figure.
[0100] Figure 13 A structural schematic diagram of a controlled device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0101] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0102] Referring to Figure 1 A structural schematic diagram of a device control system provided by an embodiment of the present application is shown in the figure.
[0103] Figure 1 The device control system structure shown in the figure includes a control device 101, a controlled device 102, and a controlled device 103. The control device 101, the controlled device 102, and the controlled device 103 are connected through a network communication.
[0104] The control device 101 can be a remote controller or an electronic device with a display screen, including but not limited to a smart phone, a tablet computer, etc. Figure 1 In the embodiment, only a smart phone is taken as an example.
[0105] The controlled device 102 and the controlled device 103 can be smart air conditioners, smart televisions, smart refrigerators, smart washing machines, etc. used in daily home, Figure 1 In the embodiment, only the controlled device 102 is taken as a smart air conditioner and the controlled device 103 is taken as a smart television. Of course, in practice, the controlled device 102 and the controlled device 103 can also be the same type of devices, for example, the controlled device 102 and the controlled device 103 are both smart air conditioners, and the present application does not limit this.
[0106] In actual application, when the control device 101 controls the controlled device 102 and the controlled device 103, it needs to be paired with the controlled device 102 or the controlled device 103 first, and only after the matching is successful, the controlled device 102 or the controlled device 103 can be controlled to perform corresponding operations.
[0107] When the control device 101 controls the controlled device 102 or the controlled device 103 (hereinafter, taking the control device 101 controlling the controlled device 102 as an example for description), a complete control instruction of the controlled device 102 can be generated when a control operation of a user is received, and then the complete control instruction can be sent to the controlled device 102, so that the controlled device 102 identifies the complete control instruction and performs a corresponding operation.
[0108] However, the method that the control device 101 controls the controlled device 102 may have the technical problem that the transmission efficiency is reduced due to the large complete control instruction in the process of transmitting the complete control instruction.
[0109] To this end, the present application provides a device control method, which compares the complete control instruction generated by the control device with the basic instruction of the controlled device, removes the common part, and only transmits the specific control instruction of the complete control instruction relative to the basic instruction, so as to reduce the amount of data transmitted and improve the transmission efficiency.
[0110] The device control method provided by the present application will be further explained in detail in combination with the drawings and specific embodiments, and the embodiments do not constitute a limitation on the embodiments of the present application.
[0111] For the convenience of understanding, the device control method provided by the present application will be described in detail from the following aspects of the control device, the controlled device, and the interaction between the control device and the controlled device:
[0112] First, the device control method provided by the present application will be described from the aspect of the control device:
[0113] Referring to Figure 2 , an embodiment flowchart of the device control method provided by the present application is shown. As an embodiment, Figure 2 , the flowchart shown in the figure can be applied to the control device 101 in the above Figure 1 , as shown in Figure 2 , the flowchart can include the following steps:
[0114] Step 201, generating a first control instruction in response to a received control operation.
[0115] Taking the application scenario corresponding to the system architecture shown in Figure 1 as an example, different buttons can exist on the control device 101, and each button can correspond to a control instruction of a different function of the controlled device. Based on this, the user can click any button on the control device 101 according to actual needs, and the control device 101 can generate a first control instruction in response to the click operation of the user after receiving the click operation. The control operation can be a click operation, a double-click operation, or a voice operation, etc., which is not limited by the present application.
[0116] It should be noted that the first control command generated above is a complete control command that can be recognized by the controlled device (e.g., controlled device 102 or controlled device 103).
[0117] For example, if a user wants to control the indoor air conditioner to operate in cooling mode, the user can click the corresponding operating mode button on the control device 101. After receiving the user's operation, the control device 101 can generate a first control command to instruct the indoor air conditioner to operate in cooling mode.
[0118] Step 202: Determine the controlled device according to the first control instruction, and determine the basic instructions of the controlled device.
[0119] The basic instruction of the controlled device mentioned above is the common instruction of all control instructions corresponding to the controlled device. That is, all control instructions that the controlled device can recognize include this basic instruction. For example, if the controlled device is a smart air conditioner, assuming that the cooling control instruction of the smart air conditioner is AB, the heating control instruction is AC, the ventilation control instruction is AD, etc., it can be seen from the above that the smart air conditioner includes control instruction A among all control instructions. Therefore, A can be identified as the basic instruction of the smart air conditioner.
[0120] In practical applications, different smart home devices (hereinafter referred to as controlled devices) can correspond to different functions; therefore, the control commands corresponding to different controlled devices are also different. Based on this, the control device can further determine the controlled device according to the generated first control command.
[0121] by Figure 1 Taking the system architecture shown as an example, assuming the first control command generated by control device 101 is used to instruct the controlled device to set its working mode to cooling mode, then based on this first control command, the controlled device can be identified as a smart air conditioner, i.e., controlled device 102. Assuming the first control command generated by control device 101 is used to instruct the controlled device to set its volume to 10, then according to this first control command, the controlled device can be identified as a smart TV, i.e., controlled device 103.
[0122] In one embodiment, the control device may pre-store the basic instructions of all controlled devices. Based on this, after determining the controlled device according to the first control instruction, the control device can determine the basic instructions of the controlled device.
[0123] Step 203: Perform a differential comparison between the first control instruction and the basic instruction to obtain the target control instruction.
[0124] As can be known from the description in step 202, the control instructions recognizable by the controlled device all include the basic instruction. Based on this, the target control instruction can be obtained by differentiating and comparing the first control instruction with the basic instruction. Compared with the first control instruction, the target control instruction has reduced the basic instruction part, so that the data amount corresponding to the target control instruction is smaller than that of the first control instruction.
[0125] In an embodiment, the first control instruction can be converted into a string format to obtain a first control instruction string, and the basic instruction can be converted into a string format to obtain a basic instruction string. Then, the part consistent with the basic instruction string in the first control instruction string is removed to obtain a target control instruction string. Finally, the target control instruction string is format-converted to obtain the target control instruction.
[0126] Continuing to take the application scenario corresponding to the system architecture shown in Figure 1 For example, assuming that the control device 101 controls the controlled device 102, and the binary sequence corresponding to the basic instruction of the controlled device 102 is 100110, and the binary sequence corresponding to the first control instruction generated by the control device 101 for the first time is 100110110011. After the first control instruction and the basic instruction are converted into a string format and differentiated and compared, the common part is removed, and after format conversion, the target control instruction is obtained as 110011.
[0127] Further, to make the data amount corresponding to the target control instruction smaller, when the control device controls the controlled device, the data amount of the target control instruction can be further reduced according to the current running state of the controlled device. As for how to further reduce the data amount of the target control instruction according to the current running state of the controlled device, the flow shown in Figure 4 will be used for illustration, which will not be described in detail here.
[0128] Step 204: sending the target control instruction to the controlled device, so that the controlled device performs corresponding operations according to the target control instruction.
[0129] In an embodiment, the control device can directly send the target control instruction to the controlled device, so that the controlled device performs corresponding operations according to the target control instruction.
[0130] In another embodiment, when the target control instruction is sent to the controlled device, to make the data amount of the transmission minimum, the target control instruction can be further compressed according to a preset compression algorithm to obtain a feature array, and the feature array is sent to the controlled device as the target control instruction.
[0131] Specifically, when the target control instruction is compressed according to the preset compression algorithm, the target control instruction can be compressed according to, for example, Figure 3The flow shown is compressed. Referring to Figure 3 An embodiment flowchart of a target control instruction compression method provided by an embodiment of the present application is shown in FIG. 3, which can include the following steps: Figure 3
[0132] Step 301: Convert the target control instruction into a target binary array.
[0133] Step 302: Divide the target binary array into multiple binary arrays according to a preset arrangement order, with each group of N bits, where N is an even number.
[0134] The following is a unified description of steps 301 and 302:
[0135] The target control instruction can be a hexadecimal array or an octal array, which is not limited by the embodiments of the present application.
[0136] Based on this, in an embodiment, the target control instruction can be first converted into a target binary array. Then, the target binary array is divided into multiple binary arrays according to a preset arrangement order, with each group of N bits, where N is an even number. It should be noted that the value of N can be determined according to the device type of the controlled device. For example, if the controlled device is a smart air conditioner, N can be 8; if the controlled device is a smart TV, N can be 4. The above values of N are only exemplary descriptions, and the embodiments of the present application do not limit the value of N.
[0137] For example, assume that the target control instruction is converted into a target binary array, and the target binary array is 110010011010. Then, assume that the target binary array is divided into multiple binary arrays according to the left-to-right order, with each group of 4 bits, resulting in three binary arrays, 1100, 1001, and 1010.
[0138] Step 303: For each binary array, perform an operation according to a preset first algorithm to obtain a first value.
[0139] Step 304: Combine multiple first values according to the arrangement order to obtain a feature array.
[0140] The following is a unified description of steps 303 and 304:
[0141] The target binary array corresponding to the target control instruction can be obtained from step 302, and the target binary array is divided into a plurality of binary arrays. Then, for each binary array, a preset first algorithm is performed to obtain a first value, thereby obtaining a plurality of first values. The first algorithm can be a modulo operation, and the embodiment of the present application does not make any limitation in this regard.
[0142] Then, the plurality of first values are combined according to the arrangement order to obtain a feature array. The arrangement order can be from left to right or from right to left, and the embodiment of the present application does not make any limitation in this regard. It should be noted that the arrangement order in step 304 is consistent with the arrangement order in step 302.
[0143] Continuing with the example in step 302, after obtaining the binary arrays 1100, 1001 and 1010, it is assumed that the first values obtained by performing a modulo operation on each binary array are 0, 1 and 0 respectively, then the three first values are combined according to the arrangement order of the binary arrays, and the feature array 010 can be obtained.
[0144] In actual applications, the basic instruction of the controlled device can be determined by the module development, and the mobile development module can be used to determine the first control instruction generated by the control device in response to the received control operation. As shown in Figure 9 , the mobile development module can agree on the complete instruction when issuing a scene, that is, the first control instruction, and the module development module can formulate the basic instruction on the communication module, that is, the basic instruction of the controlled device. The complete instruction and the basic instruction are compared by difference, and the target control instruction is obtained, so that the feature array corresponding to the first control instruction is obtained by using the flow shown in Figure 3 , and the feature array is sent to the controlled device.
[0145] Thus far, the description of the flow shown in Figure 2 is completed.
[0146] The technical solution provided by the embodiment of the present application generates a first control instruction by the control device in response to the received control operation, determines the controlled device according to the first control instruction, determines the basic instruction of the controlled device, and compares the first control instruction with the basic instruction by difference to obtain the target control instruction. This technical solution compares the first control instruction with the basic instruction of the controlled device by difference, only sends the control instruction different from the basic instruction of the controlled device to the controlled device, reduces the data amount of the transmitted control instruction, and thus improves the transmission efficiency of the control instruction.
[0147] Referring to Figure 4 , an embodiment flowchart of another device control method provided by the embodiment of the present application is shown. As an embodiment, Figure 2The flowchart shown can be applied to the control device 101 in the above Figure 1 The flowchart shown in Figure 1 The flowchart shown in Figure 4 The flowchart shown in
[0148] Step 401, in response to the received control operation, generating a first control instruction.
[0149] Step 402, determining the controlled device according to the first control instruction, and determining the base instruction of the controlled device.
[0150] Step 403, differentiating the first control instruction from the base instruction to obtain a target control instruction.
[0151] The detailed description of steps 401-403 can be referred to the description in steps 201-203, which will not be repeated here.
[0152] Step 404, obtaining the current running state of the controlled device, and determining the second control instruction corresponding to the current running state.
[0153] Step 405, differentiating the second control instruction from the target control instruction to obtain a third control instruction.
[0154] Step 406, sending the third control instruction as a new target control instruction to the controlled device, so that the controlled device performs corresponding operations according to the target control instruction.
[0155] The following describes steps 404-406:
[0156] In an embodiment, in order to make the data amount of the target control instruction smaller, when the control device controls the controlled device, the target control instruction can be further differentiated from the control instruction corresponding to the current running state (for the sake of description, the control instruction corresponding to the current running state of the controlled device is referred to as the second control instruction) to obtain a new target control instruction, and the new target control instruction is sent to the controlled device, so that the controlled device performs corresponding operations according to the target control instruction.
[0157] Specifically, first, the current running state of the controlled device can be obtained, and the second control instruction corresponding to the current running state can be determined.
[0158] Then, the second control instruction is differentiated from the target control instruction to obtain a third control instruction, and the third control instruction is taken as a new target control instruction.
[0159] As a possible implementation manner, the second control instruction can be first compared with the basic instruction in a differential manner to obtain a fifth control instruction, and then the target control instruction can be compared with the fifth control instruction in a differential manner to obtain a third control instruction.
[0160] Taking the application scenario corresponding to the system architecture shown in FIG. 1 as an example, it is assumed that the control device 101 controls the controlled device 102, and the binary sequence corresponding to the basic instruction of the controlled device 102 is 100110. The binary sequence corresponding to the first control instruction generated by the control device 101 for the first time is 100110110011. The first control instruction is compared with the basic instruction in a differential manner, and the common part is removed to obtain the target control instruction 110011. Figure 1
[0161] It is assumed that the control device 101 generates the first control instruction for the second time, and the binary sequence corresponding to the first control instruction is 100110110000. The first control instruction is compared with the basic instruction in a differential manner to obtain the target control instruction 110000. The current running state of the controlled device 102 is obtained, and the second control instruction corresponding to the current running state of the controlled device 102 is 100110110011. The second control instruction is compared with the basic instruction in a differential manner to obtain the fifth control instruction 110011.
[0162] Then, the target control instruction 110000 is compared with the fifth control instruction 110011 in a differential manner. If the values at the same bit position are the same, the value of the third control instruction corresponding to the bit position is set to 0. If the values at the same bit position are different, the value of the third control instruction corresponding to the bit position is set to 1. In this way, the third control instruction is 000011. The 0 in the first four bits of the third control instruction is removed, and the new target control instruction is finally obtained as 11. It can be seen that the data amount corresponding to the target control instruction is further reduced.
[0163] Then, the third control instruction can be taken as a new target control instruction and sent to the controlled device, so that the controlled device performs corresponding operations according to the target control instruction.
[0164] The technical scheme provided by the embodiment of the present application comprises the following steps: after obtaining a target control instruction, the current running state of a controlled device is acquired, a second control instruction corresponding to the current running state is determined, the second control instruction is compared with the target control instruction, a third control instruction is obtained, and the third control instruction is sent to the controlled device as a new target control instruction, so that the controlled device performs corresponding operations according to the target control instruction. Through the comparison between the target control instruction and the second control instruction corresponding to the current running state of the controlled device, the new target control instruction can be obtained, the data amount corresponding to the transmission of the control instruction is further reduced, and the transmission efficiency of the control instruction is improved.
[0165] Then, the device control method provided by the present application is described from the perspective of the controlled device.
[0166] Referring to Figure 5 , an embodiment flowchart of another device control method provided by the embodiment of the present application is shown. As an embodiment, Figure 5 The flowchart shown can be applied to the controlled device 102 or the controlled device 103 in the above Figure 1 . As shown in Figure 5 , the flowchart can comprise the following steps:
[0167] Step 501: receiving a target control instruction sent by a control device, and determining a basic instruction of the controlled device, wherein the target control instruction is obtained by comparing a first control instruction with the basic instruction.
[0168] The first control instruction is a control instruction generated by the control device in response to a received control operation.
[0169] As described in step 202, there can be a fixed basic instruction for each controlled device, and the basic instruction is included in the plurality of control instructions corresponding to the controlled device. In the embodiment of the present application, after the control device generates the first control instruction in response to the received control operation, the first control instruction is compared with the basic instruction to obtain the target control instruction, and the target control instruction is sent to the controlled device.
[0170] Based on this, in an embodiment, after receiving the target control instruction sent by the control device, the controlled device can determine the basic instruction of the controlled device.
[0171] As a possible implementation manner, if the controlled device receives a control instruction, the control instruction can be directly taken as the target control instruction.
[0172] As another possible implementation manner, if the controlled device receives an array, the array can be taken as a feature array, and the feature array is compared with the basic instruction according to Figure 6The flow shown performs operations to obtain the target control instruction. Referring to Figure 6 A flow chart for determining a target control instruction is provided for an embodiment of the present application, as shown in Figure 6 The flow can include the following steps:
[0173] Step 601, receiving a feature array sent by a control device.
[0174] Step 602, performing operations on each value in the feature array according to a preset second algorithm to obtain a plurality of binary arrays.
[0175] Step 603, combining the plurality of binary arrays according to a preset arrangement order to obtain a target binary array.
[0176] Step 604, converting the target binary array to obtain a target control instruction.
[0177] The following uniformly describes steps 601 to 604:
[0178] The above-mentioned second algorithm is the inverse operation of the first algorithm preset in the control device, for example, if the first algorithm preset in the control device is a modulo operation, then the second algorithm is the inverse operation of the modulo operation.
[0179] In an embodiment, after receiving the feature array sent by the control device, the controlled device can perform operations on each value in the feature array according to the second algorithm to obtain a plurality of binary arrays. The plurality of binary arrays can be combined according to a preset arrangement order to obtain a target binary array. After converting the target binary array, a target control instruction can be obtained.
[0180] It should be noted that the above-mentioned preset arrangement order is consistent with the arrangement order when the control device converts the target control instruction into the feature array.
[0181] Continuing to take the application scenario corresponding to the system architecture shown in Figure 1 As an example, assuming that the feature array received by the controlled device 102 is 010, performing operations on 0, 1, and 0 according to the second algorithm respectively can obtain binary arrays 1100, 1001, and 1010 respectively.
[0182] Then, combining the plurality of binary arrays according to a preset arrangement order, for example, from left to right, can obtain a target binary array 110010011010. Converting the target binary array can obtain a target control instruction.
[0183] Step 502, determining a first control instruction based on the target control instruction and the basic instruction, and performing an operation corresponding to the first control instruction.
[0184] As described in step 501, the target control instruction is obtained by differentially comparing the first control instruction with the basic instruction. Based on this, the first control instruction can be determined based on the target control instruction and the basic instruction.
[0185] Specifically, first, the target control instruction is converted into a string format to obtain the target control instruction string, and the base instruction is also converted into a string format to obtain the base instruction string. Then, the target control instruction string and the base instruction string are merged to obtain the first control instruction string. Finally, the first control instruction string can be formatted to obtain the first control instruction.
[0186] Continue with Figure 1 Taking the application scenario corresponding to the system architecture shown as an example, assume that the control device 101 controls the controlled device 102. It is known that the binary sequence corresponding to the basic instruction of the controlled device 102 is 100110, and the binary sequence corresponding to the target control instruction received by the controlled device 102 is 110011. After converting the basic instruction and the target control instruction into string format and merging them, the binary sequence corresponding to the first control instruction can be obtained as 100110110011.
[0187] In one embodiment, if the amount of data corresponding to the target control command received by the controlled device is small, the first control command can be determined based on the current operating state of the controlled device. The specific method for determining the first control command based on the current operating state of the controlled device will be explained below. Figure 7 The process shown will be explained in detail here.
[0188] The technical solution provided by this invention receives a target control command sent by a control device and determines a basic command for the controlled device. The target control command is obtained by differentially comparing a first control command with the basic command. Based on the target control command and the basic command, a first control command is determined, and an operation corresponding to the first control command is executed. This technical solution allows the controlled device to obtain the first control command from its basic command after receiving the target control command. This enables the controlled device to reconstruct the first control command from the target control command (after differential comparison with the basic command) and execute the corresponding operation, indirectly reducing the amount of data transmitted for control commands and thus improving the transmission efficiency of control commands.
[0189] See Figure 7 This is a flowchart illustrating another embodiment of the device control method provided by the present invention. As one embodiment, Figure 7 The flowchart shown can be applied to the above. Figure 1 On the controlled device 102 or controlled device 103. This process is...Figure 5 The flow shown in FIG. 7 is based on the flow shown in FIG. 6. As shown in FIG. 7, the flow can include the following steps: Figure 7
[0190] Step 701: receiving a target control instruction sent by a control device, and determining a basic instruction of a controlled device.
[0191] The detailed description of step 701 can refer to the description in step 501, which will not be repeated here.
[0192] Step 702: obtaining a current running state of the controlled device, and determining a second control instruction corresponding to the current running state.
[0193] Step 703: obtaining a fourth control instruction according to the second control instruction and the target control instruction, wherein the target control instruction is obtained by differentiating the fourth control instruction from the second control instruction.
[0194] Step 704: obtaining a first control instruction according to the basic instruction and the fourth control instruction, wherein the fourth control instruction is obtained by differentiating the first control instruction from the basic instruction.
[0195] Step 705: performing an operation corresponding to the first control instruction.
[0196] The following uniformly describes steps 702-705:
[0197] As described in the description of step 702, in order to make the data amount corresponding to the target control instruction smaller, the target control instruction can be further differentiated from a control instruction corresponding to the current running state, i.e., the second control instruction, to obtain a new target control instruction when the control device controls the controlled device. Figure 4 Based on this, after the controlled device receives the target control instruction sent by the control device and determines the basic instruction of the controlled device, the controlled device can obtain the current running state of the controlled device and determine a control instruction (for the sake of description, it can be called a second control instruction) corresponding to the current running state. Then, according to the second control instruction and the target control instruction, a fourth control instruction can be obtained; and according to the basic instruction and the fourth control instruction, a first control instruction can be obtained. It is known that the target control instruction is obtained by differentiating the fourth control instruction from the second control instruction, and the fourth control instruction is obtained by differentiating the first control instruction from the basic instruction.
[0198]
[0199] The second control instruction can be compared with the basic instruction to obtain a sixth control instruction, a new target control instruction with the same bit number as the sixth control instruction is obtained by supplementing the front of the target control instruction with a second value (for example, 0), and a fourth control instruction is obtained according to the sixth control instruction and the new target control instruction.
[0200] Finally, the controlled device can perform an operation corresponding to the first control instruction.
[0201] Continuing to take the application scenario corresponding to the system architecture shown in Figure 1 For example, assuming that the control device 101 controls the controlled device 102, the binary sequence corresponding to the basic instruction of the controlled device 102 is 100110, and the target control instruction sent by the control device is 11. At this time, the second control instruction corresponding to the current running state of the controlled device is obtained as 100110110000, the second control instruction is compared with the basic instruction to obtain a sixth control instruction as 110000.
[0202] Then, the front of the target control instruction is supplemented with 0 to obtain a new target control instruction with the same bit number as the second control instruction as 000011. The fourth control instruction is obtained by performing an AND operation on the sixth control instruction and the new target control instruction as 110011.
[0203] Finally, the fourth control instruction is combined with the basic instruction of the controlled device to obtain the first control instruction 100110110011.
[0204] The technical scheme provided by the embodiment of the application comprises the following steps: receiving a target control instruction sent by a control device, determining a basic instruction of a controlled device, obtaining a current running state of the controlled device, and determining a second control instruction corresponding to the current running state; obtaining a fourth control instruction according to the second control instruction and the target control instruction, wherein the target control instruction is obtained by comparing the second control instruction and the fourth control instruction; obtaining a first control instruction according to the basic instruction and the fourth control instruction, wherein the fourth control instruction is obtained by comparing the first control instruction and the basic instruction, and performing an operation corresponding to the first control instruction. This technical scheme can obtain the first control instruction according to the basic instruction and the current running state of the controlled device after the controlled device receives the target control instruction, which is obtained by comparing the basic instruction with the target control instruction, and can restore the target control instruction to the first control instruction and perform the corresponding operation, thereby indirectly reducing the data amount of the transmission control instruction and improving the transmission efficiency of the control instruction.
[0205] Finally, the device control method provided by the application is described from the perspective of interaction between the control device and the controlled device:
[0206] Referring to Figure 8 Another embodiment of the method for controlling a device is provided in the present application. As an embodiment, Figure 8 The flowchart shown can be applied to the control device 101, the controlled device 102 or the controlled device 103 in the above-mentioned Figure 1 , and the flowchart can include the following steps as shown in Figure 8 .
[0207] Step 801: The control device generates a first control instruction in response to a received control operation.
[0208] Step 802: The control device determines a controlled device according to the first control instruction, and determines a basic instruction of the controlled device.
[0209] Step 803: The control device differentiates the first control instruction from the basic instruction to obtain a target control instruction.
[0210] Step 804: The control device sends the target control instruction to the controlled device, so that the controlled device performs a corresponding operation according to the target control instruction.
[0211] Detailed descriptions of steps 801-804 can be found in the descriptions of steps 201-204, which will not be repeated here.
[0212] Step 805: The controlled device receives the target control instruction sent by the control device, and determines a basic instruction of the controlled device, wherein the target control instruction is obtained by differentiating the first control instruction from the basic instruction.
[0213] Step 806: The controlled device determines the first control instruction based on the target control instruction and the basic instruction, and performs an operation corresponding to the first control instruction.
[0214] Detailed descriptions of steps 805 and 806 can be found in the descriptions of steps 501 and 502, which will not be repeated here.
[0215] The technical scheme provided by the embodiment of the present application comprises the following steps: a control device generates a first control instruction in response to a received control operation, determines a controlled device according to the first control instruction, determines a basic instruction of the controlled device, and differentiates the first control instruction from the basic instruction to obtain a target control instruction. Then, the controlled device receives the target control instruction sent by the control device, determines the basic instruction of the controlled device, differentiates the target control instruction from the basic instruction to obtain the first control instruction, and executes an operation corresponding to the first control instruction. This technical scheme differentiates the first control instruction from the basic instruction of the controlled device, and only sends the control instruction different from the basic instruction of the controlled device to the controlled device. After receiving the target control instruction, the controlled device can obtain the first control instruction according to the basic instruction and execute a corresponding operation, thereby reducing the data amount of the transmitted control instruction and improving the transmission efficiency of the control instruction.
[0216] Reference is made to Figure 10 An embodiment block diagram of a device control apparatus applied to a control device is provided in the embodiment of the present application. As shown in the figure, Figure 10 The apparatus comprises:
[0217] A generating module 1001 is configured to generate a first control instruction in response to a received control operation.
[0218] A determining module 1002 is configured to determine a controlled device according to the first control instruction, and determine a basic instruction of the controlled device.
[0219] A comparing module 1003 is configured to differentiate the first control instruction from the basic instruction to obtain a target control instruction.
[0220] A sending module 1004 is configured to send the target control instruction to the controlled device, so that the controlled device executes a corresponding operation according to the target control instruction.
[0221] In a possible implementation, the comparing module 1003 is specifically configured to:
[0222] convert the first control instruction into a string format to obtain a first control instruction string, and convert the basic instruction into a string format to obtain a basic instruction string;
[0223] remove a part consistent with the basic instruction string in the first control instruction string to obtain a target control instruction string;
[0224] convert the target control instruction string into a format to obtain a target control instruction.
[0225] In a possible implementation, the apparatus further includes (not shown in the figure):
[0226] The acquisition module is configured to acquire a current running state of the controlled device after the first control instruction is compared with the basic instruction to obtain the target control instruction, and determine a second control instruction corresponding to the current running state;
[0227] The differential comparison module is configured to compare the second control instruction with the target control instruction to obtain a third control instruction, and execute the step of sending the target control instruction to the controlled device by taking the third control instruction as a new target control instruction.
[0228] In a possible implementation, the sending module 1004 includes:
[0229] The compression submodule is configured to compress the target control instruction according to a preset compression algorithm to obtain a feature array;
[0230] The sending submodule is configured to send the feature array to the controlled device.
[0231] In a possible implementation, the compression submodule is specifically configured to:
[0232] convert the target control instruction into a target binary array;
[0233] divide the target binary array into a plurality of binary arrays according to a preset arrangement order, each binary array having N bits, and N being an even number;
[0234] perform an operation on each binary array according to a preset first algorithm to obtain a first value;
[0235] combine a plurality of the first values according to the arrangement order to obtain a feature array.
[0236] Referring to Figure 11 FIG. 1 is an embodiment block diagram of a device control apparatus applied to a controlled device according to an embodiment of the present application. As shown in the figure, the apparatus includes: Figure 11
[0237] The receiving module 1101 is configured to receive a target control instruction sent by a control device, and determine a basic instruction of the controlled device, the target control instruction being obtained by comparing a first control instruction with the basic instruction;
[0238] The execution module 1102 is configured to determine the first control instruction based on the target control instruction and the basic instruction, and execute an operation corresponding to the first control instruction.
[0239] In a possible implementation, the execution module 1102 is specifically configured to:
[0240] convert the target control instruction into a string format to obtain a target control instruction string, and convert the basic instruction into a string format to obtain a basic instruction string;
[0241] merge the target control instruction string and the basic instruction string to obtain a first control instruction string;
[0242] perform format conversion on the first control instruction string to obtain a first control instruction.
[0243] In a possible implementation, the apparatus further includes (not shown in the figure):
[0244] a state acquisition module configured to, after determining the basic instruction of the controlled device, acquire a current running state of the controlled device, and determine a second control instruction corresponding to the current running state;
[0245] the execution module is specifically configured to:
[0246] obtain a fourth control instruction according to the second control instruction and the target control instruction, the target control instruction being obtained by differentiating and comparing the fourth control instruction and the second control instruction;
[0247] obtain a first control instruction according to the basic instruction and the fourth control instruction, the fourth control instruction being obtained by differentiating and comparing the first control instruction and the basic instruction.
[0248] In a possible implementation, the receiving module 1101 is specifically configured to:
[0249] receive a feature array sent by a control device;
[0250] perform operation on each value in the feature array according to a preset second algorithm to obtain a plurality of binary arrays;
[0251] combine the plurality of binary arrays according to a preset arrangement order to obtain a target binary array;
[0252] convert the target binary array to obtain the target control instruction.
[0253] Figure 12 a structural schematic diagram of a control device provided by an embodiment of the present application, Figure 12The electronic device 1200 as shown includes at least one processor 1201, a memory 1202, at least one network interface 1204, and a user interface 1203. The various components of the electronic device 1200 are coupled together by a bus system 1205, which is configured to permit communication between the components. The bus system 1205 includes a power bus, a control bus, and a status bus, among others. For purposes of illustration, the bus system 1205 is shown in the drawing as a single bus; however, it is understood that the bus system 1205 can include a number of buses operating in parallel. The various buses can be implemented using different types of technologies and can be configured to operate at different speeds. Figure 12 In the description that follows, various buses are referred to collectively as the bus system 1205.
[0254] The user interface 1203 can include a display, a keyboard or a pointing device (e.g., a mouse, a trackball, a touchpad, or a touchscreen), among other things.
[0255] It is understood that the memory 1202 in the embodiments of the present application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically EPROM (EEPROM), or flash memory, among others. The volatile memory can be random access memory (RAM), used as external cache. By way of example, and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM), among others. The memory 1202 described herein is intended to include, without being limited to, these and any other suitable types of memory.
[0256] In some embodiments, the memory 1202 stores elements, executable instructions, or data structures or a subset thereof, or an expanded set thereof, including an operating system 12021 and applications 12022.
[0257] The operating system 12021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application program 12022 includes various application programs, such as a media player, a browser, and the like, for implementing various application services. The program for implementing the method embodiments of the present application can be included in the application program 12022.
[0258] In the embodiments of the present application, by calling the program or instruction stored in the memory 1202, specifically, the program or instruction stored in the application program 12022, the processor 1201 is configured to execute the method steps provided by the various method embodiments, for example, including:
[0259] generating a first control instruction in response to the received control operation;
[0260] determining a controlled device according to the first control instruction, and determining a basic instruction of the controlled device;
[0261] differentially comparing the first control instruction with the basic instruction to obtain a target control instruction;
[0262] sending the target control instruction to the controlled device, so that the controlled device performs a corresponding operation according to the target control instruction.
[0263] The method disclosed by the embodiments of the present application can be applied to the processor 1201 or implemented by the processor 1201. The processor 1201 can be an integrated circuit chip having a signal processing capability. In the implementation process, the steps of the method can be completed by the integrated logic electric circuit or the instruction in the form of software in the processor 1201. The processor 1201 can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software units in the code processor for execution. The software unit can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the storage 1202, and the processor 1201 reads the information in the storage 1202, and combines the hardware to complete the steps of the above method.
[0264] It can be understood that the embodiments described herein can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units for executing the functions described in the present application or a combination thereof.
[0265] For software implementation, the technology described herein can be implemented by units performing the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0266] The control device provided in the embodiment can be the control device shown in Figure 12 , can execute all steps of the device control method in Figures 1-4 or Figure 9 , and further achieve the technical effects of the device control method shown in Figures 1-4 or Figure 9 . For details, refer to the related description in Figures 1-4 or Figure 9 . For brevity, details are not described herein.
[0267] Figure 13 A structural schematic diagram of a controlled device provided in the embodiment of the application is shown in Figure 13 , the controlled device 1300 includes at least one processor 1301, a memory 1302, at least one network interface 1304, and a user interface 1303. The various components in the controlled device 1300 are coupled together through a bus system 1305. It can be understood that the bus system 1305 is used to realize the connection and communication between the components. The bus system 1305 includes not only a data bus, but also a power supply bus, a control bus, and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 1305 in Figure 13 .
[0268] In the embodiment of the application, by invoking the program or instruction stored in the memory 1302, specifically, the program or instruction stored in the application program 13022, the processor 1301 is used to execute the method steps provided in the various method embodiments, for example, including:
[0269] receiving the target control instruction sent by the control device, and determining the basic instruction of the controlled device, the target control instruction being obtained by differentiating and comparing the first control instruction with the basic instruction;
[0270] determining the first control instruction based on the target control instruction and the basic instruction, and performing an operation corresponding to the first control instruction.
[0271] For the connection mode and functions of the components in the controlled device, refer to the related description in the above Figure 12 . Details are not described herein.
[0272] The controlled device provided in the embodiment can be the control device shown in Figure 13 , can execute all steps of the device control method in Figures 5-8 , and further achieve the technical effects of the device control method shown in Figures 5-8 . For details, refer to the related description in Figures 5-8 . For brevity, details are not described herein.
[0273] The embodiment of the present application also provides a storage medium (computer readable storage medium). The storage medium stores one or more programs. The storage medium can include a volatile memory such as a random access memory, and / or a non-volatile memory such as a read-only memory, a flash memory, a hard disk, or a solid state disk, and / or a combination thereof.
[0274] The one or more programs stored in the storage medium can be executed by one or more processors to implement the device control method described above, which is executed on the side of a control device or a controlled device.
[0275] The processor is configured to execute the device control program stored in the memory to implement the steps of the device fault visualization method described above, which is executed on the side of a control device or a controlled device.
[0276] In response to the received control operation, a first control instruction is generated.
[0277] According to the first control instruction, a controlled device is determined, and a basic instruction of the controlled device is determined.
[0278] The first control instruction is compared with the basic instruction to obtain a target control instruction.
[0279] The target control instruction is sent to the controlled device, so that the controlled device performs a corresponding operation according to the target control instruction.
[0280] Alternatively,
[0281] The target control instruction sent by the control device is received, and a basic instruction of the controlled device is determined, wherein the target control instruction is obtained by comparing a first control instruction with the basic instruction.
[0282] Based on the target control instruction and the basic instruction, the first control instruction is determined, and a corresponding operation of the first control instruction is performed.
[0283] Those skilled in the art should further appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in a general manner in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0284] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and
[0285] The above detailed description describes the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A device control method, characterized in that, The method is applied to a control device, and the method includes: In response to the received control operation, a first control command is generated; The controlled device is determined according to the first control instruction, and the basic instruction of the controlled device is determined; The first control instruction is differentially compared with the basic instruction to obtain the target control instruction; wherein, the target control instruction is the part of the first control instruction other than the basic instruction; The target control command is sent to the controlled device so that the controlled device performs the corresponding operation according to the target control command; After performing a differential comparison between the first control command and the basic command to obtain the target control command, the method further includes: Obtain the current operating status of the controlled device and determine the second control command corresponding to the current operating status; The second control command is differentially compared with the target control command to obtain a third control command, and the third control command is used as the new target control command to execute the step of sending the target control command to the controlled device.
2. The method according to claim 1, characterized in that, The step of performing a differential comparison between the first control command and the basic command to obtain the target control command includes: The first control instruction is converted into a string format to obtain the first control instruction string, and the basic instruction is converted into a string format to obtain the basic instruction string; Remove the portion of the first control instruction string that is identical to the basic instruction string to obtain the target control instruction string; The target control instruction string is formatted and converted to obtain the target control instruction.
3. The method according to claim 1, characterized in that, Sending the target control command to the controlled device includes: The target control command is compressed according to a preset compression algorithm to obtain a feature array; The feature array is sent to the controlled device.
4. The method according to claim 3, characterized in that, The target control command is compressed according to a preset compression algorithm to obtain a feature array, including: Convert the target control instructions into a target binary array; The target binary array is divided into multiple binary arrays according to a preset arrangement order, with each group consisting of N bits, where N is an even number; For each binary array, perform calculations according to a preset first algorithm to obtain the first value; The first values are combined in the order described above to obtain a feature array.
5. A device control method, characterized in that, The method is applied to a controlled device, and the method includes: The system receives a target control instruction sent by a control device and determines a basic instruction for the controlled device. The target control instruction is obtained by differentially comparing a first control instruction with the basic instruction. The target control instruction is the part of the first control instruction other than the basic instruction. Based on the target control command and the basic command, a first control command is determined, and an operation corresponding to the first control command is executed. After determining the basic instructions for the controlled device, the method further includes: Obtain the current operating status of the controlled device and determine the second control command corresponding to the current operating status; The step of determining the first control command based on the target control command and the basic command includes: A fourth control instruction is obtained based on the second control instruction and the target control instruction, wherein the target control instruction is obtained by differential comparison between the fourth control instruction and the second control instruction; A first control instruction is obtained based on the basic instruction and the fourth control instruction, and the fourth control instruction is obtained by differential comparison between the first control instruction and the basic instruction.
6. The method according to claim 5, characterized in that, The step of determining the first control command based on the target control command and the basic command includes: The target control instruction is converted into a string format to obtain a target control instruction string, and the basic instruction is converted into a string format to obtain a basic instruction string; The target control instruction string is merged with the basic instruction string to obtain the first control instruction string; The first control instruction string is formatted and converted to obtain the first control instruction.
7. The method according to claim 5, characterized in that, The target control command sent by the receiving control device includes: Receive the feature array sent by the control device; Each value in the feature array is processed according to a preset second algorithm to obtain multiple binary arrays; The multiple binary arrays are combined according to a preset arrangement order to obtain the target binary array; The target binary array is converted to obtain the target control instruction.
8. A device control apparatus, characterized in that, The device is used in a control device, and the device includes: The generation module is used to generate a first control command in response to the received control operation; The determining module is used to determine the controlled device according to the first control instruction, and to determine the basic instruction of the controlled device; The comparison module is used to perform a differential comparison between the first control instruction and the basic instruction to obtain a target control instruction; wherein, the target control instruction is the part of the first control instruction other than the basic instruction; The sending module is used to send the target control command to the controlled device, so that the controlled device performs a corresponding operation according to the target control command; After performing a differential comparison between the first control command and the basic command to obtain the target control command, the current operating state of the controlled device is obtained, and the second control command corresponding to the current operating state is determined. The second control command is differentially compared with the target control command to obtain a third control command, and the third control command is used as the new target control command to execute the step of sending the target control command to the controlled device.
9. A device control system, characterized in that, The device is applied to the controlled equipment, and the device includes: A receiving module is used to receive a target control instruction sent by a control device and determine the basic instruction of the controlled device. The target control instruction is obtained by differentially comparing a first control instruction with the basic instruction. The target control instruction is the part of the first control instruction other than the basic instruction. An execution module is configured to determine a first control instruction based on the target control instruction and the basic instruction, and to perform an operation corresponding to the first control instruction; After determining the basic instructions for the controlled device, the current operating state of the controlled device is obtained, and the second control instruction corresponding to the current operating state is determined; The step of determining the first control command based on the target control command and the basic command includes: A fourth control instruction is obtained based on the second control instruction and the target control instruction, wherein the target control instruction is obtained by differential comparison between the fourth control instruction and the second control instruction; A first control instruction is obtained based on the basic instruction and the fourth control instruction, and the fourth control instruction is obtained by differential comparison between the first control instruction and the basic instruction.
10. A control device, characterized in that, The control device includes: A processor and a memory, the processor being configured to execute a device control program stored in the memory to implement the device control method according to any one of claims 1 to 4.
11. A controlled device, characterized in that, The controlled device includes: A processor and a memory, the processor being configured to execute a device control program stored in the memory to implement the device control method according to any one of claims 5 to 7.
12. A device control system, characterized in that, The system includes: A control device for implementing the device control method according to any one of claims 1 to 4; The controlled device is used to implement the device control method according to any one of claims 5 to 7.
13. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the device control method according to any one of claims 1 to 4 or 5 to 7.
Citation Information
Patent Citations
Smart home control method and device, storage medium and electronic device
CN114244644A