Smart home device instruction processing method, apparatus, device, and smart home system
By defining preset categories and multi-dimensional importance of commands in a smart home system and dynamically adjusting priority queues, the problem of critical command delays in multi-device command processing is solved, improving user experience and system efficiency.
Patent Information
- Application Number
- CN202410987548.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-07-23
AI Technical Summary
When multiple smart home devices send commands simultaneously, traditional command processing methods cannot effectively distinguish the importance of commands, leading to delays in processing critical commands, which reduces user experience and system efficiency.
By determining the preset category of each instruction, its importance in dimensions such as real-time environment data, instruction type, device status, and user definition is obtained, and multiplied by the dimension coefficient to obtain the weighted importance. The overall importance is calculated, and priority queues are obtained by sorting according to the overall importance. The priorities are dynamically adjusted to adapt to real-time requirements.
Effectively distinguishing the importance of instructions ensures that critical instructions are processed in a timely manner, improving user experience and overall system efficiency, and dynamically adjusting priority queues to adapt to environmental changes.
Smart Images

Figure CN118938697B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, in particular to a smart home device instruction processing method, device and system. BACKGROUND
[0002] With the in-depth application of Internet of Things technology, smart home devices are increasingly popular, and communication and collaborative control between devices within the home become crucial. However, when multiple devices send instructions at the same time, the traditional instruction processing method often cannot effectively distinguish the importance of the instructions, leading to delayed processing of critical instructions, reducing user experience and overall system efficiency. SUMMARY
[0003] The present application provides a smart home device instruction processing method, device and system, which solves the problem that the traditional instruction processing method often cannot effectively distinguish the importance of the instructions when multiple devices send instructions at the same time, leading to delayed processing of critical instructions, reducing user experience and overall system efficiency.
[0004] In a first aspect, the present application provides a smart home device instruction processing method, comprising:
[0005] When receiving instructions sent by multiple devices, determining the preset category of each instruction;
[0006] For a first instruction of a first category, obtaining the dimension importance of the first instruction in each target dimension, the target dimension including at least one of real-time environmental data, instruction type, device state and user operation;
[0007] Multiplying the dimension importance by the corresponding dimension coefficient to obtain the weighted importance of each target dimension;
[0008] Calculating the overall importance of each first instruction, the overall importance being the sum of the weighted importance of all target dimensions of the first instruction;
[0009] According to the overall importance, the first instructions are sorted to obtain a priority queue of the first instructions.
[0010] In an embodiment, when the target dimension is real-time environmental data, the obtaining of the dimension importance of the first instruction in each target dimension comprises:
[0011] Obtaining each item of real-time environmental data;
[0012] Calculating the deviation value of each item of real-time environmental data from the corresponding set value, deviation value = (actual environmental data - set value) / set value;
[0013] determine a single importance degree corresponding to the deviation value based on a preset deviation value range, each deviation value range corresponding to a single importance degree, wherein the larger the deviation value range is, the larger the single importance degree is;
[0014] add up all the single importance degrees as the dimension importance degree of the first instruction in the real-time environment data dimension.
[0015] In one embodiment, when the target dimension is an instruction type, the obtaining of the dimension importance degree of the first instruction in each target dimension comprises:
[0016] obtaining a first field of a first preset position of the first instruction;
[0017] determining an instruction type of the first instruction according to the first field, the instruction type comprising at least one of a safety control instruction, an environment adjustment instruction and an entertainment control instruction;
[0018] determining an importance degree of the instruction type according to a preset type corresponding relationship, wherein the importance degree of the safety control instruction is greater than the importance degrees of the environment adjustment instruction and the entertainment control instruction;
[0019] adding up the importance degree of the instruction type as the dimension importance degree of the first instruction in the instruction type dimension.
[0020] In one embodiment, when the target dimension is a device state, the obtaining of the dimension importance degree of the first instruction in each target dimension comprises:
[0021] obtaining a second field of a second preset position of the first instruction;
[0022] determining a device state of a corresponding device of the first instruction according to the second field, the device state comprising at least one of an emergency state, a standby state and a running state;
[0023] determining an importance degree of the device state according to a preset state corresponding relationship, the importance degree of the emergency state being greater than the importance degree of the standby state, the importance degree of the standby state being greater than the importance degree of the running state;
[0024] adding up the importance degree of the device state as the dimension importance degree of the first instruction in the device state dimension.
[0025] In one embodiment, when the target dimension is a user definition, the obtaining of the dimension importance degree of the first instruction in each target dimension comprises:
[0026] obtaining a third field of a third preset position of the first instruction;
[0027] determine a trigger mode of the first instruction according to the third field, the trigger mode comprising at least one of user sending and conditional triggering;
[0028] determine an importance of the trigger mode according to a preset trigger correspondence relationship, the importance of the user sending being greater than the importance of the conditional triggering;
[0029] use the importance of the trigger mode as a dimension importance of the first instruction in a user-defined dimension.
[0030] In an embodiment, the method further comprises:
[0031] any two first instructions have the same dimension coefficient corresponding to a same target dimension;
[0032] Alternatively, a dimension coefficient corresponding to the first instruction is determined based on a preset coefficient correspondence relationship.
[0033] In an embodiment, the method further comprises:
[0034] for a second instruction of a preset category of a second category, a receiving time of the second instruction is obtained;
[0035] the second instructions are sorted according to the receiving time to obtain a priority queue of the second instructions, any second instruction having a priority greater than any first instruction.
[0036] In an embodiment, the method further comprises:
[0037] determining whether the instruction is a preset target instruction;
[0038] if not, the instruction is a first instruction; if yes, the instruction is a second instruction.
[0039] In an embodiment, the method further comprises:
[0040] processing the instructions according to the determined priority queue to obtain a control command, sending the control command to a corresponding target device, and receiving a result feedback of the target device;
[0041] if the result feedback indicates that the control command cannot be executed or fails to be executed, an abnormal processing mechanism is used for processing, the abnormal processing mechanism comprising resending and / or triggering an alarm.
[0042] In an embodiment, the method further comprises:
[0043] recalculating a total importance of a target first instruction every preset period, the target first instruction being an unprocessed first instruction in the priority queue of the first instructions;
[0044] adjust the order of the target first instruction in the priority queue based on the recalculated overall importance.
[0045] In a second aspect, the present application provides a smart home device instruction processing apparatus, comprising:
[0046] A preset category determination module is configured to determine a preset category of each instruction when receiving instructions sent by multiple devices.
[0047] A dimension importance acquisition module is configured to acquire a dimension importance of a first instruction in each target dimension for a first instruction with a preset category of a first category, the target dimension including at least one of real-time environment data, instruction type, device state and user operation.
[0048] A weighted importance determination module is configured to multiply the dimension importance by a corresponding dimension coefficient to obtain a weighted importance of each target dimension.
[0049] An overall importance calculation module is configured to calculate an overall importance of each first instruction, the overall importance being a sum of the weighted importance of all target dimensions of the first instruction.
[0050] A priority queue acquisition module is configured to sort the first instruction according to the overall importance to obtain a priority queue of the first instruction.
[0051] In a third aspect, the present application provides a smart home device instruction processing device, comprising:
[0052] The processing device comprises a memory and a processor, the memory storing program code executable on the processor, the program code being executed by the processor to implement the smart home device instruction processing method as described above.
[0053] In a fourth aspect, the present application provides a smart home system applying the smart home device instruction processing method as described above.
[0054] Compared with the prior art, the application has the advantages that when receiving the instructions sent by the plurality of devices, the preset category of each instruction is first determined, the dimension importance degree of the first instruction with the preset category being the first category in the target dimension is determined, then the dimension importance degree is multiplied by the corresponding dimension coefficient to obtain the weighted importance degree of each dimension, then the weighted importance degrees of all the dimensions are added to obtain the overall importance degree, and the first instruction is sorted based on the overall importance degree from large to small to obtain the priority queue of the first instruction. For the first instruction without the priority defined in advance, the priority queue thereof is determined according to the plurality of target dimensions including real-time environment data, the importance of the instruction can be effectively distinguished, the problem of delayed processing of the key instruction is solved, and the user experience and the overall efficiency of the system are improved. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only represent some of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0056] Figure 1 is a smart home device instruction processing method flowchart in an embodiment of the present application;
[0057] Figure 2 is a specific smart home device instruction processing method flowchart in an embodiment of the present application;
[0058] Figure 3 is a smart home device instruction processing device structure schematic diagram in an embodiment of the present application;
[0059] Figure 4 is a smart home device instruction processing device structure schematic diagram in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described in detail below in combination with the drawings and embodiments. Obviously, the described embodiments only represent some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.
[0061] The prior art defines the priority of each instruction in advance, but in actual use, the type of instruction sent by each device is too much, and if the priority of each type of instruction is defined, the workload is too large. In smart home, the number of devices controlled by the central controller is large, so it is not practical to define the priority of each type of instruction. Therefore, in practice, only the priority of some instructions representing safety is defined, and other instructions are processed in time sequence. However, this will cause poor user experience.
[0062] In addition, if the priority of each type of instruction is fixed, it will cause problems that do not meet the actual needs. For example, the same instruction for controlling air conditioning to cool down, when the current indoor environment temperature is 28℃, and when the current indoor environment temperature is 36℃, the priority should be different for the user. Therefore, the prior art of defining the priority of each type of instruction in advance not only consumes a lot of manual definition cost, but also may not meet the actual needs of the user in actual control.
[0063] Therefore, in order to solve the above technical problems, the present application will be further described below in combination with the drawings.
[0064] Figure 1 A flow chart of a smart home device instruction processing method is shown, as shown in Figure 1 The embodiment of the present application provides a smart home device instruction processing method, which comprises:
[0065] S110: When receiving instructions sent by multiple devices, determine the preset category of each instruction. Preferably, it is judged whether the instruction is a preset target instruction; if not, the instruction is a first instruction; if yes, the instruction is a second instruction. That is, in the embodiment of the present application, the second instruction is a target instruction preset by the user, when the received instruction is the target instruction, it is judged that the preset category is the second instruction, if it is not the target instruction, the preset category is the first instruction. Generally, the target instruction is some important fault warning / handling control instruction, therefore, for the second instruction with the second preset category, the receiving time of the second instruction is acquired; the second instruction is sorted in order from early to late according to the receiving time to obtain a priority queue of the second instruction, and the priority of any second instruction is higher than the priority of any first instruction. That is, the priority of the second instruction is the highest, and the second instruction is processed first when the second instruction exists. When the second instruction is processed or the second instruction does not exist, the first instruction is processed.
[0066] Among them, the second instruction can be regarded as the instruction with the highest priority preset by the user in advance, and the first instruction is the instruction whose priority is obtained by algorithm evaluation without being preset by the user in advance.
[0067] S120: For the first instruction of which the preset category is the first category, obtain a dimension importance degree of the first instruction in each target dimension, the target dimension including at least one of real-time environment data, instruction type, device state and user operation;
[0068] The first instruction generally evaluates its priority according to an algorithm, and the evaluation includes at least one of real-time environment data, instruction type, device state and user operation. It can be understood that the first instruction can be sorted based on any one of the four dimensions, but in fact, a single dimension is too single-sided and does not conform to the actual situation, so as a preferred implementation manner of the embodiment of the application, the target dimension includes four of real-time environment data, instruction type, device state and user operation.
[0069] When the target dimension is real-time environment data, the obtaining of the dimension importance degree of the first instruction in each target dimension includes:
[0070] Obtaining each item of real-time environment data; calculating a deviation value of each item of real-time environment data and a corresponding set value, the deviation value=(actual environment data-set value) / set value; determining a single-item importance degree corresponding to the deviation value based on a preset deviation value range, each deviation value range corresponding to a single-item importance degree, wherein the larger the deviation value range is, the larger the single-item importance degree is; and taking a sum of all single-item importance degrees as the dimension importance degree of the first instruction in the real-time environment data dimension.
[0071] The greater the deviation of real-time environment data and set value is, the less the current real-time environment data conforms to the user's experience. When this item is continuously combined with the environment condition instruction of the instruction type dimension, the comfortable environment can be quickly provided for the user.
[0072] When the target dimension is instruction type, the obtaining of the dimension importance degree of the first instruction in each target dimension includes:
[0073] Obtaining a first field of a first preset position of the first instruction; determining an instruction type of the first instruction according to the first field, the instruction type including at least one of a safety control instruction, an environment adjustment instruction and an entertainment control instruction; determining an importance degree of the instruction type according to a preset type corresponding relationship, wherein the importance degree of the safety control instruction is greater than the importance degrees of the environment adjustment instruction and the entertainment control instruction; and taking the importance degree of the instruction type as the dimension importance degree of the first instruction in the instruction type dimension.
[0074] The safety control instruction is the most important instruction type, and the system safety is determined at any time; the environmental condition instruction is for the user's physiological comfort, and the entertainment control instruction is for the user's psychological comfort, so under the condition of ensuring the safety control, the user's physiological or psychological comfort is as far as possible satisfied.
[0075] When the target dimension is the device state, the obtaining of the dimension importance of the first instruction in each target dimension comprises:
[0076] The second field of the second preset position of the first instruction is obtained; the device state of the corresponding device of the first instruction is determined according to the second field, the device state comprises at least one of an emergency state, a standby state and a running state; the importance of the device state is determined according to a preset state corresponding relationship, the importance of the emergency state is greater than the importance of the standby state, and the importance of the standby state is greater than the importance of the running state;
[0077] The importance of the device state is taken as the dimension importance of the first instruction in the device state dimension. In the emergency state, the device needs to be adjusted urgently to get rid of the emergency state, so the importance of the emergency state is the highest. In the standby state, the instruction is less, so once there is, it is relatively important. In the running state, the instruction is more, and the importance is generally the lowest. Most of them are used for storage and recording.
[0078] When the target dimension is user-defined, the obtaining of the dimension importance of the first instruction in each target dimension comprises:
[0079] The third field of the third preset position of the first instruction is obtained; the trigger mode of the first instruction is determined according to the third field, the trigger mode comprises at least one of user sending and condition triggering; the importance of the trigger mode is determined according to a preset trigger corresponding relationship, the importance of the user sending is greater than the importance of the condition triggering; and the importance of the trigger mode is taken as the dimension importance of the first instruction in the user-defined dimension. The user sending is generally relatively urgent, so the importance is greater than that of the condition triggering. The condition triggering can be event triggering, such as temperature greater than a preset temperature and humidity greater than a preset humidity. Or time triggering, such as reaching a preset time or running for a preset length of time. And in the case of these condition triggering, when the condition is set, a certain redundancy is generally provided. Even if it slightly exceeds the set condition, the influence is not great. Therefore, the importance is relatively low.
[0080] S130: multiplying the dimension importance by the corresponding dimension coefficient to obtain the weighted importance of each target dimension; when multiple target dimensions are adopted, since the influence degree of each target dimension on the final result is different, a dimension coefficient is adopted to feedback the influence degree of the target dimension on the final result.
[0081] In one embodiment, all instructions have the same dimensionality coefficient in the same target dimension. That is, any two first instructions have the same dimensionality coefficient in the same target dimension.
[0082] In another embodiment, the dimension coefficients corresponding to the first instruction are determined based on a preset coefficient correspondence. That is, different types of first instructions have different impacts on the overall result due to varying dimensional importance in the same target dimension, thus requiring different dimension coefficients. Specifically, the preset coefficient correspondence can be a set of dimension coefficients for each first instruction, or a set of dimension coefficients for a certain type of first instruction. The specific setting depends on actual needs.
[0083] S140: Calculate the overall importance of each first instruction, where the overall importance is the sum of the weighted importance of all target dimensions of the first instruction.
[0084] S150: Sort the first instructions according to the overall importance to obtain the priority queue of the first instructions.
[0085] Preferably, the first instructions are sorted in descending order of overall importance to obtain a priority queue for the first instructions.
[0086] It is understood that after obtaining the priority queues of the first and second instructions, the instructions are processed according to the determined priority queues to obtain control commands, the control commands are sent to the corresponding target devices, and the result feedback from the target devices is received; if the result feedback indicates that the control commands cannot be executed or have failed to be executed, then the exception handling mechanism is used to handle the exception, which includes resending and / or triggering an alarm.
[0087] In addition, as an optional implementation of this application embodiment, the overall importance of the target first instruction is recalculated every preset period, wherein the target first instruction is the first unprocessed instruction in the priority queue of the first instructions; the order of the target first instruction in the priority queue is adjusted based on the recalculated overall importance.
[0088] Because the current environmental data may have changed after a certain period of time, the previously calculated priority is no longer applicable. Therefore, it is necessary to recalculate the priority based on the current actual situation.
[0089] For example, when the indoor temperature is high, the user issues an air conditioning cooling instruction to set a target temperature, at this time the priority of the calculator is medium, and because there are many instructions with higher priority than this instruction, it is in the pending priority queue for a period of time, and at this time if the indoor temperature becomes high again (for example, the indoor temperature is getting higher because the indoor is cooking), the priority may be adjusted to high when recalculated. At this time, the indoor temperature becomes low (for example, the outdoor air temperature is low, the user opens the door and window, and the indoor temperature is reduced), and is equal to or lower than the set temperature, at this time the priority may be adjusted to low when recalculated.
[0090] The intelligent home equipment instruction processing method provided by the embodiments of the present application, when receiving the instructions sent by the plurality of devices, first determines the preset category of each instruction, determines the dimension importance degree of the target dimension for the first instruction of the first category of the preset category, then multiplies the dimension importance degree by the corresponding dimension coefficient to obtain the weighted importance degree of each dimension, and then adds the weighted importance degrees of all dimensions to obtain the overall importance degree, and sorts the first instruction based on the order from large to small of the overall importance degree to obtain the priority queue of the first instruction. For the first instruction whose priority is not defined in advance, the priority queue thereof is determined according to the plurality of target dimensions including real-time environmental data, which can effectively distinguish the importance of the instructions, solve the problem of delayed processing of key instructions, and improve the user experience and the overall efficiency of the system. Moreover, the order of the first instruction in the priority queue is adjusted every preset period, so as to make it more in line with the current actual demand.
[0091] Figure 2 A specific intelligent home equipment instruction processing method is shown, as shown in Figure 2 The specific implementation method of the present application is as follows:
[0092] 1. Instruction receiving and analysis: the central controller receives instruction signals from each intelligent home equipment in real time, and analyzes the received instructions to extract the content, target equipment, execution requirements and other key information of the instructions.
[0093] 2. Priority evaluation: based on the preset priority evaluation algorithm, the central controller evaluates the priority of the analyzed instructions. The evaluation algorithm considers various factors such as instruction type (such as safety control, environment adjustment, entertainment control, etc.), device state (such as emergency state, standby state, running state, etc.), user settings (such as custom priority, timing task, etc.), and real-time environmental data (such as indoor temperature, humidity, illumination, etc.), and assigns a corresponding priority label such as high, medium, and low to each instruction.
[0094] As a preferred implementation of the embodiments of the present application, the instruction type includes:
[0095] Emergency safety control instruction
[0096] When the home security system detects an intrusion event and sends an emergency alert instruction, this instruction will be marked as the highest priority. Because safety is the top concern in family life, any safety-related instruction needs to be responded to quickly. The central controller will immediately place this instruction at the top of the high-priority queue and execute it immediately, such as activating an alarm, notifying family members, or contacting external security agencies.
[0097] Environmental regulation instruction
[0098] In hot summer, family members request to lower indoor temperature through intelligent voice assistant. This instruction belongs to environmental regulation instruction, its priority is relatively low, but it still needs to be processed in time to ensure the comfort of residence. The central controller will evaluate the priority of the instruction according to the current indoor temperature, humidity and the comfort range set by the user. If the indoor temperature is much higher than the comfort range, the priority of the instruction will be increased accordingly to ensure that the air conditioning equipment can be started in time and adjust the indoor temperature.
[0099] Entertainment control instruction
[0100] When the family members are watching TV in the living room, they send a channel switching instruction through the remote control. This entertainment control instruction usually has a low priority because it does not directly affect the safety and comfort of family life. The central controller will put this instruction into the low-priority queue and wait for processing. If there is a high-priority instruction at this time, the execution of the entertainment control instruction may be temporarily delayed.
[0101] During the evaluation process, the central controller will also consider the user's custom priority settings and timing tasks. For example, if the user sets a prohibition on the use of entertainment devices during a specific time period, the corresponding entertainment control instruction will be temporarily lowered in priority or ignored.
[0102] It should be noted that the instruction type in the embodiments of the present application is distinguished by the field. Different values of the field are distinguished.
[0103] To better understand the scheme of the present application, a specific example is given below:
[0104] Different algorithm projects allocate threshold proportion, such as: instruction type 30%, device state 20%, user settings 30%, real-time environment data 20%. The total score and the full score of each project are one hundred, and the score of a single project is converted into the score of the project threshold proportion. For example, the instruction type is one hundred, and the proportion is thirty percent, so the score of this item is 30 points.
[0105] In the instruction type:
[0106] Safety control instruction: 100
[0107] Environmental regulation instruction: 50
[0108] Entertainment control instructions: 50
[0109] Device status:
[0110] Emergency state: 100
[0111] Standby state: 70
[0112] Running state: 50
[0113] User-defined:
[0114] If the command is set by the user: 100
[0115] If the command is triggered by scene linkage, etc.: 70
[0116] Real-time environmental data:
[0117] Each deviation from the set value exceeds 10% per 30 minutes until full score
[0118] According to the above score, sort according to the score.
[0119] Among them, it needs to be said that important fault warning / treatment control instructions are based on pre-set, and important safety control instructions have the highest priority in terms of arrival time.
[0120] It can be understood that the ranking of each score value here is only an example and not necessarily executed according to this.
[0121] 3. Priority queue management: The central controller places instructions into corresponding priority queues according to the priority labels of the instructions. Instructions in high-priority queues will be processed first. At the same time, the system also has the function of dynamically adjusting the position of instructions in the queue to adapt to the real-time changes in the environment and needs.
[0122] 4. Instruction execution and feedback: The central controller processes and sends instructions to the target device in order according to the priority queue. After the device executes the instruction, it will feedback the execution result to the central controller, which will then process accordingly based on the feedback, such as updating the device status, recording logs, etc.
[0123] 5. Exception handling and monitoring: For instructions that cannot be executed or fail to execute, the central controller will record error information and process accordingly according to the pre-set exception handling mechanism, such as resending instructions, triggering alarms, etc. At the same time, the system also has real-time monitoring function, which can monitor the running state of the device, the processing of instructions, etc. in real time, providing guarantee for the stable operation of the system.
[0124] The application provides a smart home device instruction priority management method, which aims to dynamically evaluate the priority of instructions, ensure that critical instructions are processed first, improve the response speed and operation efficiency of the smart home system, enhance the flexibility and intelligence of the smart home system, and enable the smart home system to dynamically adjust the processing order of instructions according to different scenes and needs.
[0125] Figure 3 An intelligent home device instruction processing device is shown, as shown in Figure 3 The application also provides an intelligent home device instruction processing device, which comprises:
[0126] A preset category determination module 310 is configured to determine the preset category of each instruction when receiving the instructions sent by multiple devices. The determination of the preset category of each instruction comprises:
[0127] determining whether the instruction is a preset target instruction;
[0128] If not, the instruction is a first instruction; if yes, the instruction is a second instruction.
[0129] A dimension importance acquisition module 320 is configured to acquire the dimension importance of the first instruction in each target dimension for the first instruction with the preset category being a first category, and the target dimension comprises at least one of real-time environment data, instruction type, device state and user operation.
[0130] When the target dimension is real-time environment data, the acquisition of the dimension importance of the first instruction in each target dimension comprises:
[0131] acquiring each item of real-time environment data;
[0132] calculating the deviation value of each item of real-time environment data and the corresponding set value, deviation value = (actual environment data - set value) / set value;
[0133] determining the single-item importance corresponding to the deviation value based on a preset deviation value range, each deviation value range corresponding to a single-item importance, wherein the larger the deviation value range is, the larger the single-item importance is;
[0134] the sum of all single-item importances is taken as the dimension importance of the first instruction in the real-time environment data dimension.
[0135] When the target dimension is the instruction type, the acquisition of the dimension importance of the first instruction in each target dimension comprises:
[0136] acquiring the first field of the first preset position of the first instruction;
[0137] determining an instruction type of the first instruction according to the first field, the instruction type comprising at least one of a safety control instruction, an environment adjustment instruction and an entertainment control instruction;
[0138] determining an importance of the instruction type according to a preset type correspondence relationship, wherein the importance of the safety control instruction is greater than the importance of the environment adjustment instruction and the importance of the entertainment control instruction;
[0139] taking the importance of the instruction type as a dimension importance of the first instruction in an instruction type dimension.
[0140] when the target dimension is a device state, the obtaining the dimension importance of the first instruction in each target dimension comprises:
[0141] obtaining a second field of a second preset position of the first instruction;
[0142] determining a device state of a device corresponding to the first instruction according to the second field, the device state comprising at least one of an emergency state, a standby state and a running state;
[0143] determining an importance of the device state according to a preset state correspondence relationship, wherein the importance of the emergency state is greater than the importance of the standby state, and the importance of the standby state is greater than the importance of the running state;
[0144] taking the importance of the device state as a dimension importance of the first instruction in a device state dimension.
[0145] when the target dimension is a user definition, the obtaining the dimension importance of the first instruction in each target dimension comprises:
[0146] obtaining a third field of a third preset position of the first instruction;
[0147] determining a triggering mode of the first instruction according to the third field, the triggering mode comprising at least one of a user sending and a conditional triggering;
[0148] determining an importance of the triggering mode according to a preset triggering correspondence relationship, wherein the importance of the user sending is greater than the importance of the conditional triggering;
[0149] taking the importance of the triggering mode as a dimension importance of the first instruction in a user definition dimension.
[0150] a weighted importance determining module 330, configured to multiply the dimension importance by a corresponding dimension coefficient to obtain a weighted importance of each target dimension;
[0151] Any two first instructions have the same dimension coefficient corresponding to the same target dimension.
[0152] Alternatively, based on a preset coefficient correspondence relationship, the dimension coefficient corresponding to the first instruction is determined.
[0153] The overall importance calculation module 340 is configured to calculate an overall importance of each first instruction, the overall importance being a sum of weighted importances of all target dimensions of the first instruction.
[0154] The priority queue acquisition module 350 is configured to sort the first instructions in descending order of the overall importance to obtain a priority queue of the first instructions.
[0155] As a preferred implementation manner of the embodiment of the present application, for a second instruction of a preset category being the second category, a receiving time of the second instruction is acquired.
[0156] The second instructions are sorted in early-to-late order of the receiving time to obtain a priority queue of the second instructions, and a priority of any second instruction is greater than a priority of any first instruction.
[0157] In addition, the method further includes processing the instructions according to the determined priority queue to obtain a control command, sending the control command to a corresponding target device, and receiving a result feedback of the target device.
[0158] If the result feedback indicates that the control command cannot be executed or fails to be executed, an abnormal processing mechanism is used for processing, the abnormal processing mechanism including resending and / or triggering an alarm.
[0159] As a preferred implementation manner of the embodiment of the present application, the method further includes:
[0160] The overall importance of a target first instruction is recalculated every preset period, the target first instruction being an unprocessed first instruction in the priority queue of the first instructions.
[0161] Based on the recalculated overall importance, the order of the target first instruction in the priority queue is adjusted.
[0162] The smart home device instruction processing apparatus provided in the embodiments of the present application can effectively distinguish the importance of instructions, solve the problem of delayed processing of key instructions, and improve user experience and overall efficiency of the system.
[0163] Figure 4 A structural diagram of a smart home device instruction processing device is shown, as shown in the figure, the processing device includes a memory 410 and a processor 420, the memory stores program code executable on the processor, and the program code is executed by the processor to implement the smart home device instruction processing method provided in the above embodiments. Figure 4
[0164] The smart home device instruction processing device provided in the embodiments of the present application stores program code executable on the processor in the memory, and when the program code is executed by the processor, the following can be achieved: when instructions sent by multiple devices are received, first, the preset category of each instruction is determined; for a first instruction of a first category, the dimension importance of the first instruction in each target dimension is obtained, the target dimension includes at least one of real-time environment data, instruction type, device state and user operation; the dimension importance is multiplied by the corresponding dimension coefficient to obtain the weighted importance of each target dimension; the overall importance of each first instruction is calculated, the overall importance is the sum of the weighted importance of all target dimensions of the first instruction; the priority queue of the first instruction is obtained by sorting the first instruction in descending order of the overall importance. For the first instruction whose priority is not defined in advance, the priority queue thereof is determined according to multiple target dimensions including real-time environment data; for a second instruction whose priority is preset in advance, the second instruction is processed in sequence according to the receiving time, the present application can effectively distinguish the importance of instructions, solve the problem of delayed processing of key instructions, and improve user experience and overall efficiency of the system.
[0165] In addition, the embodiments of the present application also provide a smart home system applying the smart home device instruction processing method provided in the above embodiments.
[0166] The smart home system provided by the embodiments of the present application can, by applying the smart home device instruction processing method provided by the above embodiments, when receiving instructions sent by multiple devices, first determine the preset category of each instruction, determine the dimension importance degree of the target dimension for the first instruction with the preset category being the first category, then multiply the dimension importance degree by the corresponding dimension coefficient to obtain the weighted importance degree of each dimension, then add the weighted importance degrees of all dimensions to obtain the overall importance degree, and sort the first instruction based on the overall importance degree from large to small to obtain the priority queue of the first instruction. For the first instruction without a predefined priority, the priority queue thereof is determined according to multiple target dimensions including real-time environment data, and for the second instruction with a predefined priority, the second instruction is processed in sequence according to the receiving time. The present application can effectively distinguish the importance of the instructions, solve the problem of delayed processing of key instructions, and improve the user experience and the overall efficiency of the system.
[0167] It should be noted that in the description of the present application, the terms "first", "second", etc. are only for the purpose of description, and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "multiple" is at least two.
[0168] In the description of the present specification, the description referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0169] Although the present application has been described with reference to the preferred embodiments, various modifications can be made to it and components thereof can be replaced with equivalents without departing from the scope of the present application. In particular, the technical features mentioned in each embodiment can be combined in any manner as long as there is no structural conflict. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for processing instructions for smart home devices, characterized in that, include: When receiving instructions from multiple devices, determine the preset category for each instruction; For a first instruction with a preset category of the first category, obtain the dimensional importance of the first instruction in each target dimension. The target dimension includes at least one of real-time environmental data, instruction type, device status, and user operation. The first instruction in the first category is an instruction different from the preset target instruction. Multiply the dimensional importance by the corresponding dimensional coefficient to obtain the weighted importance of each target dimension; Calculate the overall importance of each first instruction, whereby the overall importance is the sum of the weighted importance of all target dimensions of the first instruction; The first instructions are sorted according to their overall importance to obtain a priority queue for the first instructions; The method further includes: The overall importance of the target first instruction is recalculated every preset period, where the target first instruction is the first unprocessed instruction in the priority queue of the first instructions; The order of the target first instruction in the priority queue is adjusted based on the recalculated overall importance.
2. The method according to claim 1, characterized in that, When the target dimension is real-time environmental data, obtaining the dimensional importance of the first instruction in each target dimension includes: Obtain each current real-time environmental data item; Calculate the deviation between each real-time environmental data point and the corresponding set value. Deviation = (Actual environmental data - Set value) / Set value. The importance of an item is determined based on a preset range of deviation values. Each range of deviation values corresponds to an importance of an item. The larger the range of deviation values, the greater the importance of the item. The sum of the importance of all individual items is taken as the dimensional importance of the first instruction in the real-time environment data dimension.
3. The method according to claim 1, characterized in that, When the target dimension is an instruction type, obtaining the dimensional importance of the first instruction in each target dimension includes: Obtain the first field at the first preset position of the first instruction; The instruction type of the first instruction is determined based on the first field, and the instruction type includes at least one of security control instruction, environmental adjustment instruction, and entertainment control instruction; The importance of the instruction type is determined according to a preset type correspondence, wherein the importance of the safety control instruction is greater than that of the environmental adjustment instruction and the entertainment control instruction; The importance of the instruction type is taken as the dimensional importance of the first instruction in the instruction type dimension.
4. The method according to claim 1, characterized in that, When the target dimension is device state, obtaining the dimensional importance of the first instruction in each target dimension includes: Obtain the second field at the second preset position of the first instruction; The device status of the device corresponding to the first instruction is determined based on the second field, and the device status includes at least one of emergency status, standby status, and running status; The importance of the device status is determined according to a preset status correspondence, wherein the importance of the emergency status is greater than the importance of the standby status, and the importance of the standby status is greater than the importance of the running status. The importance of the device state is used as the dimensional importance of the first instruction in the device state dimension.
5. The method according to claim 1, characterized in that, When the target dimension is user execution, obtaining the dimension importance of the first instruction in each target dimension includes: Obtain the third field at the third preset position of the first instruction; The triggering method of the first instruction is determined based on the third field, and the triggering method includes at least one of user sending and condition triggering; The importance of the triggering method is determined according to a preset triggering correspondence, wherein the importance of the user-sent trigger is greater than the importance of the conditional trigger. The importance of the triggering method is taken as the dimensional importance of the first instruction in the user's execution dimension.
6. The method according to claim 1, characterized in that, Also includes: Any two first instructions have the same dimension coefficient corresponding to the same target dimension; Alternatively, the dimension coefficient corresponding to the first instruction can be determined based on a preset coefficient correspondence.
7. The method according to claim 1, characterized in that, Also includes: For a second instruction whose preset category is the second category, obtain the reception time of the second instruction; The second instruction of the second category is the same as the preset target instruction; The second instructions are sorted according to the received time to obtain a priority queue of the second instructions, wherein the priority of any second instruction is greater than the priority of any first instruction.
8. The method according to any one of claims 1-7, characterized in that, Also includes: The instructions are processed according to the determined priority queue to obtain control commands, the control commands are sent to the corresponding target device, and the result feedback from the target device is received. If the feedback indicates that the control command cannot be executed or fails to be executed, it will be handled according to the preset exception handling mechanism, which includes resending and / or triggering an alarm.
9. A smart home device instruction processing device, characterized in that, include: The preset category determination module is used to determine the preset category of each instruction when multiple instructions are received from multiple devices. The dimension importance acquisition module is used to acquire the dimension importance of the first instruction in each target dimension for a first instruction whose preset category is a first category. The target dimension includes at least one of real-time environmental data, instruction type, device status, and user operation. The first instruction in the first category is an instruction different from the preset target instruction. The weighted importance determination module is used to multiply the dimension importance by the corresponding dimension coefficient to obtain the weighted importance of each target dimension; The overall importance calculation module is used to calculate the overall importance of each first instruction, wherein the overall importance is the sum of the weighted importance of all target dimensions of the first instruction; The priority queue acquisition module is used to sort the first instruction according to the overall importance to obtain the priority queue of the first instruction.
10. A smart home device instruction processing device, characterized in that, include: The processing device includes a memory and a processor, wherein the memory stores program code that can run on the processor, and when the program code is executed by the processor, it implements the method as described in any one of claims 1-8.
11. A smart home system, characterized in that, The method described in any one of claims 1-8.
Citation Information
Patent Citations
Smart home and socialized service control system
CN104181902A