Gateway-based data processing method and device and storage medium
By prioritizing the processing of control instructions in home gateway devices and generating target control instructions, the problem of insufficient task processing capabilities of gateway devices is solved, and the response speed and user experience of smart home systems are improved.
Patent Information
- Application Number
- CN202510223628.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-07-01
AI Technical Summary
Due to the limitation of hardware resources, existing home gateway equipment has limited task processing capabilities, which leads to the slow response speed of smart home systems when multiple pending tasks need to be executed in a short period of time, which affects the normal use of users.
By implementing a gateway-based data processing method in the gateway device, control instructions are obtained first and target control instructions are generated, broadcast to the home appliance device group, and the reporting task of home appliance attributes is performed after the target control instructions is issued.
The concurrent execution speed of multiple control instructions is improved, the data processing capability requirements for gateway devices are reduced, communication resources and data processing resources are saved, and the response speed and user experience of smart home systems are improved.
Smart Images

Figure CN120233692A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home, and more particularly, to a data processing method, apparatus, and storage medium based on a gateway. Background Art
[0002] With the development of science and technology and the improvement of people's living standards, more and more smart home devices have entered people's lives. Home gateway devices are responsible for connecting and managing various smart home devices, enabling them to work together and playing a key role in smart home application scenarios.
[0003] For existing home gateway devices, due to cost considerations, a single-core central processing unit with a relatively low main frequency is usually adopted. Limited by hardware resources, the ability of home gateway devices to process tasks is limited and can only be carried out in a single-threaded manner.
[0004] However, in actual home application scenarios, there are often situations where a home gateway device needs to execute multiple tasks to be processed within a short period of time. Due to the limited processing ability of the home gateway device, it can only execute each task to be processed one by one, resulting in a slow response speed of the smart home system and affecting the normal use of users. Summary of the Invention
[0005] This application provides a data processing method, apparatus, and storage medium based on a gateway to solve the problem of slow response speed of the smart home system due to limited hardware conditions of home gateway devices.
[0006] In a first aspect, this application provides a data processing method based on a gateway, which is applied to a first gateway device. The first gateway device can execute one task at the same time. The method includes:
[0007] Obtain a control instruction from tasks to be executed. The tasks to be executed include a task of issuing a control instruction and a task of reporting home appliance attributes. The execution priority of the issuing task is higher than that of the reporting task.
[0008] According to the control instruction in the task to be executed, obtain a target control instruction and a home appliance device group, and broadcast the target control instruction to enable the home appliance device group to perform corresponding actions. The target control instruction is determined according to at least two control instructions. The home appliance types and control actions of the home appliances controlled by the at least two control instructions are the same. The home appliance device group includes the home appliances controlled by each of the at least two control instructions.
[0009] After the target control instruction is issued, execute the reporting task of reporting the home appliance attributes to the cloud.
[0010] Optionally, obtaining a target control instruction and a home appliance device group according to the control instruction in the task to be executed includes:
[0011] Randomly obtain a first control instruction, and obtain the home appliance type and control action of the home appliance device to be controlled by the first control instruction;
[0012] Traverse the remaining control instructions to obtain a second control instruction with the same home appliance type and control action as those of the home appliance device controlled by the first control instruction;
[0013] Obtain the target control instruction and the home appliance device group according to the first control instruction and the second control instruction;
[0014] Repeat the above grouping process until the grouping of the home appliance devices corresponding to the last control instruction is completed.
[0015] Optionally, the target control instruction includes identification information and instruction information; the identification information includes the identification of each home appliance device in the home appliance device group, so that each home appliance device in the home appliance device group receives the broadcast target control instruction based on the identification; the instruction information includes the control action to be executed by each home appliance device in the home appliance device group.
[0016] Optionally, if there are at least two target control instructions, the method further includes:
[0017] Obtain the home appliance type of the home appliance device corresponding to each target control instruction;
[0018] The broadcasting the target control instruction includes:
[0019] Obtain the broadcast priority of each target control instruction according to the control priority corresponding to different home appliance types;
[0020] Broadcast the target control instructions in sequence according to the broadcast priority.
[0021] Optionally, the execution of the reporting task of reporting the home appliance attributes to the cloud includes:
[0022] Obtain the first reporting quantity of the home appliance attributes in the attribute reporting queue;
[0023] When the first reporting quantity is greater than a preset quantity, complete at least part of the reporting task through a second gateway device, where the device performance of the second gateway device is higher than that of the first gateway device.
[0024] Optionally, before completing at least part of the reporting task through the second gateway device, the method further includes:
[0025] Send an inquiry message to at least one second gateway device via a local area network, where the inquiry message is used to inquire about the idle level of the second gateway device;
[0026] Receive the inquiry feedback sent by the second gateway device, where the inquiry feedback carries the idle level;
[0027] Determine that the idle level of the second gateway device is higher than a preset level.
[0028] Optionally, the completing at least part of the reporting task through the second gateway device includes:
[0029] Determine a second reporting quantity of home appliance attributes to be reported through the second gateway device according to the idle level of the second gateway device; where, the more idle the second gateway device is, the larger the second reporting quantity is;
[0030] Transmit the home appliance attributes of the second reporting quantity to the second gateway device via a local area network.
[0031] In a second aspect, the present application provides a data processing device, where the data processing device includes:
[0032] An acquisition module, configured to acquire a control instruction in a to-be-executed task, where the to-be-executed task includes a control instruction issuing task and a home appliance attribute reporting task; where, the execution priority of the issuing task is higher than the execution priority of the reporting task; according to the control instruction in the to-be-executed task, acquire a target control instruction and a home appliance device group;
[0033] A control module, configured to broadcast the target control instruction so that the home appliance device group performs corresponding actions; where, the target control instruction is determined according to at least two control instructions, the home appliance types and control actions of the home appliances controlled by the at least two control instructions are the same, and the home appliance device group includes the home appliances controlled by each of the at least two control instructions;
[0034] A reporting module, configured to, after the target control instruction is issued, execute the reporting task of reporting the home appliance attributes to the cloud.
[0035] In a third aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, where, when the program runs, it executes the gateway-based data processing method as described in the first aspect.
[0036] In a fourth aspect, the present application provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to execute the gateway-based data processing method as described in the first aspect through the computer program.
[0037] Fifth aspect, the present application provides a computer program product, including a computer program which, when executed by a processor, implements the data processing method based on a gateway as described in the first aspect.
[0038] The present application provides a data processing method, apparatus and storage medium based on a gateway. By obtaining a control instruction in a task to be executed, the task to be executed includes a task of issuing a control instruction and a task of reporting home appliance attributes; wherein, the execution priority of the issuing task is higher than that of the reporting task; according to the control instruction in the task to be executed, obtaining a target control instruction and a home appliance device group, and broadcasting the target control instruction so that the home appliance device group performs corresponding actions; wherein, the target control instruction is determined according to at least two control instructions, the home appliance types and control actions of the home appliances controlled by the at least two control instructions are the same, and the home appliance device group includes the home appliances controlled by each of the at least two control instructions; after the target control instruction is issued, executing the reporting task of reporting the home appliance attributes to the cloud, saving communication resources and data processing resources, reducing the requirement for the data processing ability of the gateway device, and improving the concurrent execution speed of multiple control instructions. Description of the Drawings
[0039] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0040] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0041] Figure 1 is a schematic diagram of the hardware environment of a data processing method based on a gateway according to an embodiment of the present application;
[0042] Figure 2 is a flowchart of a data processing method based on a gateway according to an embodiment of the present application Figure 1 ;
[0043] Figure 3 is a flowchart of a data processing method based on a gateway according to an embodiment of the present application Figure 2 ;
[0044] Figure 4 is a flowchart of a data processing method based on a gateway according to an embodiment of the present application Figure 3 ;
[0045] Figure 5 It is a schematic structural diagram of a data processing device provided by an embodiment of the present application;
[0046] Figure 6 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0047] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0049] With the development of science and technology and the improvement of people's living standards, more and more smart home devices have entered people's lives. The home gateway device is responsible for connecting and managing various smart home devices, enabling them to work together, and playing a key role in smart home application scenarios.
[0050] For existing home gateway devices, due to cost considerations, a single-core central processing unit with a relatively low main frequency is usually adopted. Limited by hardware resources, the ability of home gateway devices to process tasks is limited and can only be single-threaded.
[0051] However, in actual home application scenarios, there are often situations where the home gateway device needs to execute multiple tasks to be processed within a short period of time. Limited by the processing ability, the home gateway device can only execute each task to be processed one by one, resulting in a slow response speed of the smart home system and affecting the normal use of users.
[0052] In view of the above problems, the present application proposes the following technical concepts: in a network application scenario of a smart home, the tasks to be executed by a gateway device include a task of issuing control instructions and a task of reporting the attributes of home appliances, and the gateway device gives priority to executing the task of issuing control instructions; first, the gateway device obtains the control instructions to be issued from each task to be executed in its task queue, and generates each target control instruction according to each similar control instruction group with the same type of home appliances and control action of the home appliances controlled therein; for each similar control instruction group, the home appliances controlled by each control instruction are used as the home appliance group corresponding to the similar control instruction group, and the target control instruction is broadcast in the home appliance group; after each target control instruction is issued, the gateway device executes the reporting task of reporting the attributes of the home appliances to the cloud, and by giving priority to executing the task of issuing control instructions, the timely issuance of control instructions is given priority, and by broadcasting the target control instruction in each home appliance group, multiple control instructions of the same control instruction group are issued in parallel, thereby improving the speed of concurrent execution of multiple control instructions, effectively improving the response speed in the scenario of smart home appliance control, and improving the user experience.
[0053] According to one aspect of an embodiment of the present application, a method for interacting with a smart home device is provided. The method for interacting with a smart home device is widely used in smart home, smart home, smart home device ecosystem, smart home ecosystem and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the method for interacting with the smart home device can be applied to Figure 1 The hardware environment shown in FIG. 1 is composed of a home appliance 101, a gateway device 102 and a cloud server 103. Figure 1 As shown, the gateway device 102 is connected to the home appliance 101 and the server 103 through the network, and the gateway device 102 obtains the control instruction in the task to be executed, and the task to be executed includes the task of issuing the control instruction and the task of reporting the home appliance attributes; wherein the execution priority of the issuing task is higher than the execution priority of the reporting task; the gateway device 102 obtains the target control instruction and the home appliance group according to the control instruction in the task to be executed, and broadcasts the target control instruction to enable the home appliance group to perform the corresponding action; wherein the target control instruction is determined according to at least two control instructions, the home appliance type and control action of the home appliance controlled by the at least two control instructions are the same, and the home appliance group includes the home appliance 101 controlled by the at least two control instructions respectively; after the target control instruction is issued, the gateway device 102 executes the reporting task of reporting the home appliance attributes to the cloud server 103.
[0054] The above network may include, but is not limited to, at least one of the following: a wired network, a wireless network. The above wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, a local area network. The above wireless network may include, but is not limited to, at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The home appliance device 101 may not be limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart drying rack, a smart curtain, a smart audio and video device, a smart socket, a smart speaker, a smart sound box, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart floor sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steam box, a smart microwave oven, a smart kitchen water heater, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0055] Figure 2 Flow schematic of a data processing method based on a gateway provided by an embodiment of the present application Figure 1 ; The execution subject of the method may be, for example, a first gateway device, and the first gateway device can execute one task at the same time. As Figure 2 shown, the data processing method based on a gateway provided by an embodiment of the present application includes:
[0056] S201: Obtain a control instruction from the tasks to be executed.
[0057] Among them, the tasks to be executed include a task of issuing a control instruction and a task of reporting home appliance attributes, and the execution priority of the issuing task is higher than the execution priority of the reporting task.
[0058] Specifically, the user sends control information of a home appliance device to the cloud through a smart home client on their user terminal, and the cloud forwards the control information sent by the user terminal to the first gateway device. After receiving the control information, the first gateway device determines a task of issuing a control instruction according to the control information and places it in the queue of tasks to be executed; the first gateway device reads the control instruction in each issuing task from the queue of tasks to be executed.
[0059] S202: Obtain a target control instruction and a home appliance device group according to the control instruction in the tasks to be executed, and broadcast the target control instruction so that the home appliance device group executes corresponding actions.
[0060] Among them, the target control instruction is determined according to at least two control instructions. The home appliance types and control actions of the home appliance devices controlled by the at least two control instructions are the same. The home appliance device group includes the home appliance devices controlled by each of the at least two control instructions. For example, the ceiling lamp in the dining room, the spotlight in the living room, and the floor lamp in the bedroom all belong to the lighting home appliance type, and the control action for turning on the above lighting home appliances is the same, which is the action of turning on the light. The rice cooker, the electric pressure cooker, and the oven all belong to the cooking home appliance type, and the control action for starting the above cooking home appliances is the same, which is the action of starting cooking.
[0061] Specifically, the first gateway device reads the home appliance type and control action of the home appliance device controlled by each control instruction from each control instruction, determines each group of control instructions with the same corresponding home appliance type and control action as each control instruction group, and takes each group of home appliances corresponding to each control instruction group as each home appliance device group. According to each control instruction group and its corresponding home appliance device group, each target control instruction is generated and the generated target control instruction is broadcast.
[0062] S203: After the target control instruction is sent successfully, perform the reporting task of reporting the home appliance attributes to the cloud.
[0063] Specifically, after all the target control instructions are sent successfully, the first gateway device reads and executes the reporting task of reporting the home appliance attributes to the cloud from the queue of tasks to be executed. After the home appliance attribute information is reported to the cloud, the cloud can send the reported home appliance attribute information to the user terminal. After the user terminal analyzes the home appliance attribute information, the corresponding home appliance attributes are displayed on the client for the user to view.
[0064] The data processing method based on the gateway provided by the embodiment of the present application divides the home appliance devices to be controlled into home appliance device groups according to the device type and control action of the home appliance devices to be controlled by each control instruction. The home appliance types and control actions of the home appliance devices controlled by the control instructions corresponding to each home appliance device group are the same. Each home appliance device group corresponds to the broadcast of a target control statement, so that each home appliance device in the home appliance device group executes the corresponding action after receiving the target control instruction. Compared with the method of unicasting to a single home appliance device, it saves communication resources and data processing resources, and reduces the requirement for the data processing ability of the gateway device.
[0065] Figure 3 It is a schematic flow of a data processing method based on the gateway provided by the embodiment of the present application Figure 2 ; The execution subject of the method can be, for example, the first gateway device, and the first gateway device can execute one task at the same time. As Figure 3 shown, the data processing method based on the gateway provided by the embodiment of the present application includes:
[0066] S301: Obtain a control instruction from the tasks to be executed.
[0067] Among them, the tasks to be executed include the task of issuing control instructions and the task of reporting home appliance attributes; the execution priority of the issuing task is higher than that of the reporting task.
[0068] The implementation manner of step S301 is similar to that of step S201, and will not be elaborated here in this embodiment.
[0069] S302: Randomly obtain a first control instruction from the control instructions in the tasks to be executed, and obtain the home appliance type and control action of the home appliance device to be controlled by the first control instruction.
[0070] Specifically, the first gateway device randomly obtains a first control instruction from the control instructions in the tasks to be executed, and reads the home appliance type and control action of the home appliance device controlled by the first control instruction.
[0071] S303: Traverse the remaining control instructions to obtain a second control instruction with the same home appliance type and control action as those of the home appliance device controlled by the first control instruction.
[0072] Specifically, the first gateway device traverses the remaining control instructions, determines and caches a second control instruction with the same home appliance type and control action as those of the home appliance device controlled by the first control instruction.
[0073] S304: Obtain the target control instruction and the home appliance device group according to the first control instruction and the second control instruction.
[0074] Among them, the target control instruction can be parsed and executed by each home appliance device in the home appliance device group.
[0075] Optionally, the target control instruction may include identification information and instruction information; the identification information includes the identification of each home appliance device in the home appliance device group, so that each home appliance device in the home appliance device group receives the broadcast target control instruction based on the identification; the instruction information includes the control action to be executed by each home appliance device in the home appliance device group.
[0076] Specifically, the first gateway device associates and stores the home appliance identifiers corresponding to the first control instruction and the second control instruction as the home appliance device group, and generates a target control instruction according to the first control instruction and the second control instruction in accordance with a preset standard instruction format.
[0077] S305: Repeat the above grouping process until the grouping of the home appliance devices corresponding to the last control instruction is completed.
[0078] Specifically, after obtaining the target control instruction and the home appliance device group, the first gateway device continues to randomly obtain a control instruction from the uncompleted grouped control instructions, and executes steps S303 to S304, repeating the above process until all control instructions are grouped.
[0079] S306: If there are at least two target control instructions, obtain the home appliance types of the home appliances corresponding to each target control instruction.
[0080] S307: According to the control priorities corresponding to different home appliance types, obtain the broadcast priority of each target control instruction.
[0081] Specifically, the first gateway device uses the control priority of the home appliance type corresponding to each target control instruction as the broadcast priority of each target control instruction according to the preset corresponding relationship between different home appliance types and different control priorities.
[0082] S308: Broadcast the target control instructions in sequence according to the broadcast priority.
[0083] Specifically, the first gateway device broadcasts the target control instructions in sequence according to the order of the broadcast priority from high to low. The home appliance device determines whether the identification information includes the identification of the home appliance device according to the identification information of the target control instruction. If so, the home appliance device receives the target control instruction.
[0084] S309: After the target control instruction is sent successfully, execute the reporting task of reporting the home appliance attributes to the cloud.
[0085] The implementation manner of step S309 is similar to that of step S203, and will not be elaborated herein in this embodiment.
[0086] The data processing method based on the gateway provided in the embodiment of the present application determines the broadcast priority of each target control instruction according to the control priorities of different home appliance types, so that when the capabilities of the gateway device are limited, the home appliance device with a higher control priority can preferentially receive the corresponding target control instruction, and thus its control response efficiency is higher than that of the home appliance device with a lower control priority, making the control of the intelligent home appliance system more in line with the user's usage habits and preferences and improving the user's usage experience.
[0087] Figure 4 It is a flowchart of a data processing method based on the gateway provided in the embodiment of the present application Figure 3 ; The execution subject of the method can be, for example, the first gateway device, and the first gateway device can execute one task at the same time. As Figure 4 shown, the data processing method based on the gateway provided in the embodiment of the present application includes:
[0088] S401: Obtain a control instruction from the tasks to be executed.
[0089] Among them, the tasks to be executed include the task of issuing control instructions and the task of reporting home appliance attributes; the execution priority of the issuing task is higher than that of the reporting task.
[0090] The implementation manner of step S401 is similar to that of step S201, and will not be elaborated here in this embodiment.
[0091] S402: According to the control instruction in the task to be executed, obtain a target control instruction and a home appliance device group, and broadcast the target control instruction so that the home appliance device group performs corresponding actions.
[0092] Among them, the target control instruction is determined according to at least two control instructions, the home appliance types and control actions of the home appliances controlled by the at least two control instructions are the same, and the home appliance device group includes the home appliances controlled by each of the at least two control instructions.
[0093] The implementation manner of step S402 is similar to that of step S202, and will not be elaborated here in this embodiment.
[0094] S403: After the target control instruction is issued, obtain the first reporting quantity of the home appliance attributes in the attribute reporting queue.
[0095] Specifically, after the target control instruction is issued, the first gateway device obtains the quantity of all home appliance attributes in the queue of the attribute reporting task as the first reporting quantity.
[0096] S404: When the first reporting quantity is greater than a preset quantity, send an inquiry message to at least one second gateway device through the local area network.
[0097] Among them, the inquiry message is used to inquire about the idle level of the second gateway device.
[0098] Specifically, the first gateway device compares the first reporting quantity with the preset quantity, and when the first reporting quantity is greater than the preset quantity, sends an inquiry message to at least one second gateway device through the local area network according to the preset communication protocol.
[0099] S405: Receive the inquiry feedback sent by the second gateway device.
[0100] Among them, the inquiry feedback carries the idle level.
[0101] S406: Determine that the idle level of the second gateway device is higher than the preset level.
[0102] S407: Complete at least part of the reporting task through the second gateway device.
[0103] Among them, the device performance of the second gateway device is higher than that of the first gateway device; Exemplarily, the first gateway device can be a zigbee gateway device with a CPU main frequency lower than 300Mhz, and the second gateway device can be a multi-core gateway device serving as the central control screen of the smart home system, with a CPU main frequency higher than 1Ghz.
[0104] Optionally, the first gateway device can dynamically allocate the second reporting quantity of each second gateway device according to the actual idle situation of the second gateway device, so as to make the real-time processing ability of the second gateway device match the quantity of the home appliance attributes to be reported, and further improve the efficiency and reliability of the home appliance attribute reporting service. The specific method can be as follows:
[0105] Determine the second reporting quantity of the home appliance attributes reported through the second gateway device according to the idle level of the second gateway device, and transmit the home appliance attributes of the second reporting quantity to the second gateway device through the local area network.
[0106] Among them, the more idle the second gateway device is, the larger the second reporting quantity is.
[0107] The data processing method based on the gateway provided by the embodiment of the present application, when the reporting pressure of the home appliance attributes in the smart home system is relatively large, sends an inquiry message to at least one second gateway device through the local area network, and when the inquiry feedback sent by the second gateway device indicates that it is in an idle state, completes at least part of the reporting task through the second gateway device, alleviates the reporting pressure of the first gateway device, and further improves the efficiency and reliability of the home appliance attribute reporting service.
[0108] Figure 5 It is a schematic structural diagram of a data processing device provided by an embodiment of the present application; as Figure 5 shown, the data processing device 500 provided by the embodiment of the present application includes:
[0109] An acquisition module 501, configured to acquire a control instruction in a to-be-executed task, where the to-be-executed task includes a control instruction issuance task and a home appliance attribute reporting task; among them, the execution priority of the issuance task is higher than that of the reporting task; according to the control instruction in the to-be-executed task, acquire a target control instruction and a home appliance device group.
[0110] The control module 502 is configured to broadcast the target control instruction so that the home appliance device group performs corresponding actions; wherein, the target control instruction is determined according to at least two control instructions, the home appliance types and control actions of the home appliances controlled by the at least two control instructions are the same, and the home appliance device group includes the home appliances controlled by each of the at least two control instructions;
[0111] The reporting module 503 is configured to perform a reporting task of reporting the home appliance attributes to the cloud after the target control instruction is sent successfully.
[0112] Optionally, the obtaining module 501 is specifically configured to randomly obtain a first control instruction, and obtain the home appliance type and control action of the home appliance to be controlled by the first control instruction; traverse the remaining control instructions to obtain a second control instruction whose home appliance type and control action are the same as those of the home appliance controlled by the first control instruction; obtain the target control instruction and the home appliance device group according to the first control instruction and the second control instruction; repeat the above grouping process until the home appliances corresponding to the last control instruction are grouped.
[0113] Optionally, the target control instruction includes identification information and instruction information; the identification information includes the identification of each home appliance in the home appliance device group, so that each home appliance in the home appliance device group receives the broadcast target control instruction based on the identification; the instruction information includes the control action to be performed by each home appliance in the home appliance device group.
[0114] Optionally, when there are at least two target control instructions, the obtaining module 501 is further configured to obtain the home appliance type of the home appliance corresponding to each target control instruction;
[0115] The control module 502 is specifically configured to obtain the broadcast priority of each target control instruction according to the control priority corresponding to different home appliance types; broadcast the target control instructions in sequence according to the broadcast priority.
[0116] Optionally, the reporting module 503 is specifically configured to obtain the first reporting quantity of the home appliance attributes in the attribute reporting queue; when the first reporting quantity is greater than a preset quantity, complete at least part of the reporting task through a second gateway device, wherein the device performance of the second gateway device is higher than that of the first gateway device.
[0117] Optionally, the reporting module 503 is further configured to send an inquiry message to at least one second gateway device through a local area network, where the inquiry message is used to inquire about the idle level of the second gateway device; receive the inquiry feedback sent by the second gateway device, where the inquiry feedback carries the idle level; determine that the idle level of the second gateway device is higher than a preset level.
[0118] Optionally, the reporting module 503 is specifically configured to determine a second reporting quantity of home appliance attributes reported through the second gateway device according to the idle level of the second gateway device; wherein, the more idle the second gateway device is, the larger the second reporting quantity is; and the home appliance attributes with the second reporting quantity are transmitted to the second gateway device through the local area network.
[0119] The data processing device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.
[0120] Figure 6 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As Figure 6 shown, the present application provides an electronic device 600, which includes: at least one processor 601 and a memory 602; in addition, the electronic device 600 may also have a communication interface 604 for receiving and sending instructions.
[0121] Among them, the processor 601, the memory 602 and the communication interface 604 are connected through a bus 603;
[0122] Among them, the computer program is stored in the memory 602 and is configured to be executed by the processor 601 to implement the Figures 2 - 4 data processing method based on the gateway provided in any embodiment corresponding to the present application;
[0123] Figure 6 The electronic device in the shown embodiment can be used to execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.
[0124] In addition, this embodiment also provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the data processing method based on the gateway in the above embodiment.
[0125] In several embodiments provided by the present invention, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0126] The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in various embodiments of the present invention may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a hardware plus software functional unit.
[0128] The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit stored in a storage medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0129] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the foregoing method embodiments and will not be elaborated here.
[0130] The above is only the preferred embodiment of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A gateway-based data processing method, characterized in that: Applied to a first gateway device, wherein the first gateway device can execute one task at the same time; the method comprises: Acquire control instructions from tasks to be executed, wherein the tasks to be executed include a task of issuing control instructions and a task of reporting home appliance attributes; wherein the execution priority of the issuing task is higher than the execution priority of the reporting task; According to the control instruction in the task to be executed, a target control instruction and a home appliance group are obtained, and the target control instruction is broadcasted so that the home appliance group performs a corresponding action; wherein the target control instruction is determined according to at least two control instructions, the home appliances controlled by the at least two control instructions have the same home appliance type and control action, and the home appliance group includes the home appliances controlled by the at least two control instructions respectively; After the target control instruction is issued, a reporting task of reporting the home appliance attributes to the cloud is executed.
2. The method according to claim 1, characterized in that The step of acquiring a target control instruction and a household appliance group according to the control instruction in the task to be executed includes: Randomly obtain a first control instruction, and obtain the home appliance type and control action of the home appliance to be controlled by the first control instruction; Traversing the remaining control instructions to obtain a second control instruction having the same home appliance type and control action as the home appliance controlled by the first control instruction; According to the first control instruction and the second control instruction, acquiring the target control instruction and the household electrical appliance group; The above grouping process is repeated until the household appliances corresponding to the last control instruction are grouped.
3. The method according to claim 1 or 2, characterized in that: The target control instruction includes identification information and instruction information; the identification information includes the identification of each home appliance in the home appliance group, so that each home appliance in the home appliance group receives the broadcast target control instruction based on the identification; The instruction information includes a control action to be executed by each household appliance in the household appliance group.
4. The method according to claim 1, characterized in that If there are at least two target control instructions, the method further includes: Obtain the home appliance type of the home appliance device corresponding to each target control instruction; The broadcasting of the target control instruction includes: According to the control priorities corresponding to different types of home appliances, the broadcast priority of each target control instruction is obtained; The target control instructions are broadcasted in sequence according to the broadcast priority.
5. The method according to claim 1, characterized in that The performing of the reporting task of reporting the home appliance attributes to the cloud includes: Obtain the first reported quantity of home appliance attributes in the attribute reporting queue; When the first reporting quantity is greater than a preset quantity, at least part of the reporting task is completed by a second gateway device, wherein the device performance of the second gateway device is higher than the device performance of the first gateway device.
6. The method according to claim 5, characterized in that Before completing at least part of the reporting task by the second gateway device, the method further includes: Sending an inquiry message to at least one second gateway device via a local area network, wherein the inquiry message is used to inquire about the idle level of the second gateway device; receiving an inquiry feedback sent by the second gateway device, where the inquiry feedback carries an idle level; It is determined that the idle level of the second gateway device is higher than a preset level.
7. The method according to claim 6, characterized in that The completing at least part of the reporting task by the second gateway device includes: Determining, according to the idle level of the second gateway device, a second reporting quantity of the home appliance attribute reported by the second gateway device; wherein the idler the second gateway device is, the larger the second reporting quantity is; The second reported quantity of home appliance attributes is transmitted to the second gateway device via the local area network.
8. A data processing device, characterized in that: The data processing device comprises: An acquisition module, used to acquire control instructions from tasks to be executed, wherein the tasks to be executed include tasks for issuing control instructions and tasks for reporting home appliance attributes; wherein the execution priority of the issuing task is higher than the execution priority of the reporting task; and to acquire target control instructions and a home appliance device group according to the control instructions in the tasks to be executed; a control module, configured to broadcast the target control instruction so that the home appliance group performs a corresponding action; wherein the target control instruction is determined according to at least two control instructions, the home appliances controlled by the at least two control instructions have the same home appliance type and control action, and the home appliance group includes the home appliances controlled by the at least two control instructions; The reporting module is used to execute the reporting task of reporting the attributes of the home appliance to the cloud after the target control instruction is issued.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the gateway-based data processing method according to any one of claims 1 to 7 is executed when the program is run.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the gateway-based data processing method according to any one of claims 1 to 7 through the computer program.
Citation Information
Cited By
Private cloud deployment wireless control system and method
CN120639826A