Intelligent household control system, method, equipment and storage medium based on cloud computing
1. An intelligent home control system based on cloud computing is characterized by comprising a system server and a plurality of intelligent home units;
the intelligent home units comprise an initiating unit for initiating a calculation task and at least one arithmetic unit for receiving the calculation task;
the system server is used for scheduling tasks according to the computing tasks, and comprises the following steps:
receiving a calculation request sent by the initiating unit; the computing request comprises the computing task;
determining the intelligent home units in an idle state in the plurality of intelligent home units to obtain a candidate set;
according to the calculation task, at least one intelligent home unit meeting the task requirement is selected from the candidate set, and a set of the operation units is obtained;
according to the number of the operation units, decomposing the calculation task into a corresponding number of sub-calculation tasks, and distributing the sub-calculation tasks to the operation units;
obtaining the execution result of the calculation task according to the sub-calculation result returned by the operation unit;
and sending the execution result to the initiating unit.
2. The smart home control system according to claim 1, wherein the determining the smart home units in an idle state from among the plurality of smart home units to obtain a candidate set comprises:
acquiring working states of the plurality of intelligent household units; the intelligent home units which have received the system server allocation tasks and do not return results are marked as busy states; the intelligent home units which do not receive the tasks distributed by the system server or the intelligent home units which return the results are marked as idle states;
and adding the intelligent household units in the idle state into the candidate set.
3. The smart home control system according to claim 1, wherein the step of selecting at least one smart home unit meeting task requirements from the candidate set according to the calculation task to obtain the set of the operation units comprises:
determining a minimum configuration requirement required to perform the computing task;
selecting N intelligent household units meeting the lowest configuration requirement from the candidate set as the operation units; wherein N is a positive integer.
4. The smart home control system according to claim 3, wherein the N smart home units satisfying the lowest configuration requirement are selected from the candidate set as the operation unit, specifically:
and selecting N intelligent household units which meet the lowest configuration requirement and have the longest idle state time from the candidate set as the operation units.
5. The smart home control system according to claim 1, wherein the decomposing the calculation task into a corresponding number of sub-calculation tasks according to the number of the operation units comprises:
anonymizing the identification of the initiating unit in the computing task to obtain an anonymized computing task;
and decomposing the anonymized computing task into sub-computing tasks corresponding to the number of the computing units.
6. The smart home control system according to claim 1, wherein the obtaining of the execution result of the calculation task according to the sub-calculation result returned by the arithmetic unit comprises:
receiving the sub-calculation result returned by the arithmetic unit, and recording the workload of the arithmetic unit(ii) a Work loadThe following relationship is satisfied:;
wherein the content of the first and second substances,in order to be the workload of the arithmetic unit n,for the time when the system server receives the sub-calculation result of the arithmetic unit n,the time for which the system server sends the sub-computation task to the arithmetic unit n,a unit workload preset according to the configuration condition of the arithmetic unit n;
after sending the execution result to the initiating unit, the method further includes the following steps:
according to the total workload of the calculation task, deducting the workload of the initiating node; work load of deductionThe following relationship is satisfied:
。
7. the smart home control system of any one of claims 1 to 6, wherein each smart home unit comprises at least one smart home terminal and at least one controller; the at least one controller is used for controlling the intelligent home terminal, and the at least one controller is in communication connection with the system server.
8. A task scheduling method based on an intelligent home control system is applicable to a system server of the intelligent home control system according to any one of claims 1 to 7, and is characterized by comprising the following steps:
receiving a calculation request sent by the initiating unit; the computing request comprises the computing task;
determining the intelligent home units in an idle state in the plurality of intelligent home units to obtain a candidate set;
according to the calculation task, at least one intelligent home unit meeting the task requirement is selected from the candidate set, and a set of the operation units is obtained;
according to the number of the operation units, decomposing the calculation task into a corresponding number of sub-calculation tasks, and distributing the sub-calculation tasks to the operation units;
obtaining the execution result of the calculation task according to the sub-calculation result returned by the operation unit;
and sending the execution result to the initiating unit.
9. A cloud-computing-based smart home control device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the cloud-computing-based smart home control method as claimed in claim 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program; the device where the computer-readable storage medium is located is controlled to implement the cloud-computing-based smart home control method according to claim 8 when the computer program runs.
Background
With the development of science and technology, intelligent technology is widely applied to living homes. And because the intelligent decoration of whole house can better unified management intelligent house terminal, become an important development direction of modern house intellectuality.
In practical application, the inventor finds that the intelligent home terminal and the intelligent home control center in the house do not need to be in a working state all the time. For example, after task configuration of an intelligent home terminal such as an intelligent air conditioner and a floor sweeping robot is completed in an unmanned environment, or when a user directly takes over the intelligent home terminal, the control center of the intelligent home is actually in an idle state for a long time, which causes waste of computing resources. Under the condition that the whole house needs to be intelligently allocated, for example, the intelligent home terminal is started in advance according to the behavior habit of the resident, or the operation state of the intelligent home terminal is subjected to energy-saving adjustment, and the like, the problem of insufficient calculation force often occurs in the control center of the intelligent home due to large calculation amount, information is difficult to be effectively processed, and the intelligent level of decoration of the whole house is limited.
Disclosure of Invention
According to the cloud-computing-based intelligent home control system, method, equipment and storage medium provided by the embodiment of the invention, the residence is used as the unit to be connected into the cloud computing system, so that the computing resources of the intelligent home units are fully utilized, strong computing resources are provided for each intelligent home unit, and the intelligent level of decoration of the whole house is greatly improved.
The first embodiment of the invention provides an intelligent home control system based on cloud computing, which comprises a system server and a plurality of intelligent home units;
the intelligent home units comprise an initiating unit for initiating a calculation task and at least one arithmetic unit for receiving the calculation task;
the system server is used for scheduling tasks according to the computing tasks, and comprises the following steps:
receiving a calculation request sent by the initiating unit; the computing request comprises the computing task;
determining the intelligent home units in an idle state in the plurality of intelligent home units to obtain a candidate set;
according to the calculation task, at least one intelligent home unit meeting the task requirement is selected from the candidate set, and a set of the operation units is obtained;
according to the number of the operation units, decomposing the calculation task into a corresponding number of sub-calculation tasks, and distributing the sub-calculation tasks to the operation units;
obtaining the execution result of the calculation task according to the sub-calculation result returned by the operation unit;
and sending the execution result to the initiating unit.
As an improvement of the above scheme, the determining an intelligent home unit in an idle state from among the plurality of intelligent home units to obtain a candidate set includes:
acquiring working states of the plurality of intelligent household units; the intelligent home units which have received the system server allocation tasks and do not return results are marked as busy states; the intelligent home units which do not receive the tasks distributed by the system server or the intelligent home units which return the results are marked as idle states;
and adding the intelligent household units in the idle state into the candidate set.
As an improvement of the above scheme, the selecting, according to the calculation task, at least one smart home unit meeting task requirements from the candidate set to obtain the set of operation units includes:
determining a minimum configuration requirement required to perform the computing task;
selecting N intelligent household units meeting the lowest configuration requirement from the candidate set as the operation units; wherein N is a positive integer.
As an improvement of the above scheme, N smart home units meeting the minimum configuration requirement are selected from the candidate set as the operation unit, specifically:
and selecting N intelligent household units which meet the lowest configuration requirement and have the longest idle state time from the candidate set as the operation units.
As an improvement of the above solution, the decomposing the computation task into a corresponding number of sub-computation tasks according to the number of the operation units includes:
anonymizing the identification of the initiating unit in the computing task to obtain an anonymized computing task;
and decomposing the anonymized computing task into sub-computing tasks corresponding to the number of the computing units.
As an improvement of the above solution, the obtaining an execution result of the computation task according to a sub-computation result returned by the operation unit includes:
receiving the sub-calculation result returned by the arithmetic unit, and recording the workload of the arithmetic unit(ii) a Work loadThe following relationship is satisfied:;
wherein the content of the first and second substances,in order to be the workload of the arithmetic unit n,for the time when the system server receives the sub-calculation result of the arithmetic unit n,the time for which the system server sends the sub-computation task to the arithmetic unit n,a unit workload preset according to the configuration condition of the arithmetic unit n;
after sending the execution result to the initiating unit, the method further includes the following steps:
according to the total workload of the calculation task, deducting the workload of the initiating node; work load of deductionThe following relationship is satisfied:
。
as an improvement of the above scheme, each smart home unit includes at least one smart home terminal and at least one controller; the at least one controller is used for controlling the intelligent home terminal, and the at least one controller is in communication connection with the system server.
A second embodiment of the present invention provides a task scheduling method based on an intelligent home control system, which is applicable to a system server of the intelligent home control system, and includes the steps of:
receiving a calculation request sent by the initiating unit; the computing request comprises the computing task;
determining the intelligent home units in an idle state in the plurality of intelligent home units to obtain a candidate set;
according to the calculation task, at least one intelligent home unit meeting the task requirement is selected from the candidate set, and a set of the operation units is obtained;
according to the number of the operation units, decomposing the calculation task into a corresponding number of sub-calculation tasks, and distributing the sub-calculation tasks to the operation units;
obtaining the execution result of the calculation task according to the sub-calculation result returned by the operation unit;
and sending the execution result to the initiating unit.
The third embodiment of the invention provides a cloud computing-based smart home control device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the cloud computing-based smart home control method when executing the computer program.
A fourth embodiment of the present invention provides a computer-readable storage medium including a stored computer program; when the computer program runs, the device where the computer-readable storage medium is located is controlled to implement the cloud-computing-based smart home control method.
According to the cloud-computing-based intelligent home control system, the cloud-computing-based intelligent home control method, the cloud-computing-based intelligent home control equipment and the cloud-computing-based intelligent home control storage medium, the residences are used as units to access the cloud computing system, the system server receives computing tasks sent by the intelligent home units and distributes the computing tasks to the idle intelligent home units for processing, and idle computing resources of the intelligent home units are fully utilized. And through integrating the computing resources of the intelligent home units involved in the cloud computing system, strong computing power is provided for each intelligent home unit, and the whole-house intelligent home control with higher intelligent degree becomes possible.
Drawings
Fig. 1 is a schematic structural diagram of a cloud computing-based smart home control system according to a first embodiment of the present invention.
Fig. 2 is a flowchart illustrating a task scheduling process of a system server according to a first embodiment of the present invention.
Fig. 3 is a flowchart illustrating a task scheduling method based on an intelligent home control system according to a second embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a cloud-computing-based smart home control device according to a third embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides an intelligent home control system based on cloud computing. Referring to fig. 1, the smart home control system 100 includes a system server 110 and a plurality of smart home units 120. Each smart home unit 120 has at least one controller, and may specifically be a house having an intelligent controller, for example, a house configured with an intelligent home control center, and accesses the smart home control system 100 to serve as one smart home unit 100. It is understood that, in a case that a plurality of controllers are configured in a residence, the residence may be accessed to the smart home control system 100 as one smart home unit 100, or each controller and the smart home terminal controlled by the controller may be accessed to the smart home control system 100 as one smart home unit 100.
For each smart home unit 120, specifically, the user may allow the controller of his house to access to the smart home control system 100 by adding a cloud computing protocol, so as to serve as the smart home unit 120, and provide computing support for the system and enjoy the cloud computing service provided by the smart home control system 100.
The plurality of smart home units 120 include an initiating unit that initiates a calculation task and at least one computing unit that receives the calculation task. It can be understood that the initiating unit and the calculating unit are classified based on the calculation tasks, that is, each smart home unit 120 can serve as an initiating unit of one calculation task and also serve as a calculating unit of another calculation task. The following description relating to the calculation tasks refers to the same calculation task, and the initiation unit and the arithmetic unit refer to the initiation unit and the arithmetic unit divided based on the calculation task.
The system server 110 is configured to perform task scheduling according to the computing task. Referring to fig. 2, the task scheduling process includes steps S11 to S16.
S11, receiving the calculation request sent by the initiating unit; the computing request includes the computing task.
Any one of the smart home units 120 sends a calculation request to the system server 110, and the smart home unit 120 becomes a corresponding originating unit. The computing request comprises an identification of an initiating unit, basic data of the computing task and a task target. Preferably, the calculation request may further include a minimum configuration requirement for the arithmetic unit; in other cases, the minimum configuration requirements may also be determined by the system server 110 based on the base data and the task goals.
And S12, determining the intelligent household units 120 in the idle state from the plurality of intelligent household units 120 to obtain a candidate set.
Specifically, the working states of the smart home unit 120 may include a busy state and an idle state, and the step S12 may specifically include steps S12-1 to S12-2.
And S12-1, acquiring the working states of the plurality of intelligent household units 120. Wherein, the smart home units 120 that have received the assignment of the system server 110 and have not returned a result are marked as busy; the smart home units 120 that do not receive the tasks assigned by the system server 110, or the smart home units 120 that have returned results, are marked as idle.
More preferably, the working state flag of the smart home unit 120 may also be combined with each smart home unit 120 to report the current working state on its own based on step S12-1. For example, the smart home unit 120a does not receive the task assigned by the system server 110 and marks the task as an idle state in the system server 110, and at this time, the smart home unit 120a needs to perform local operation, and may report busy information to the system server 110 to mark the task as a busy state in the system server 110, and report idle information to the system server 110 after completing the local operation, so as to mark the task as an idle state again.
And S12-2, adding the intelligent household units 120 in the idle state into the candidate set.
And S13, according to the calculation task, selecting at least one intelligent household unit 120 meeting the task requirement from the candidate set to obtain the set of the operation units.
Preferably, step S13 may include steps S13-1 to S13-2.
S13-1, determining the minimum configuration requirement needed for executing the calculation task.
It will be appreciated that the minimum configuration requirements may be provided by the originating unit or analyzed by the system server 110 to determine based on the base data and the task goals. The minimum configuration requirement may specifically include one or more of configuration parameters such as the number of processor cores, processor frequency, processor architecture, memory size, memory frequency, system parameters, and the like.
S13-2, selecting N intelligent household units 120 meeting the lowest configuration requirement from the candidate set as the operation units. Wherein N is a positive integer.
The value of the positive integer N may be a preset fixed value, or may be a variation value determined by the system server 110 according to the number of the smart home units 120 in the candidate set. For example, by 3% of the number of the smart home units 120 in the candidate set, rounding down is performed to obtain a value of the positive integer N.
When the number of the smart home units 120 meeting the lowest configuration requirement in the candidate set is greater than N, the N smart home units 120 in the idle state with the longest time may be selected as the operation unit; when the number N is less than or equal to the number N, all the smart home units 120 meeting the minimum configuration requirement in the candidate set may be used as the operation units, and the process proceeds to step S14.
And S14, decomposing the computing task into a corresponding number of sub-computing tasks according to the number of the computing units, and distributing the sub-computing tasks to the computing units.
Wherein the decomposition of the computing task may include steps S14-1 to S14-2.
S14-1, anonymizing the identification of the initiating unit in the computing task to obtain an anonymized computing task.
Through anonymization processing, the privacy data of the initiating unit is prevented from being leaked, and effective guarantee is provided for the information security of the intelligent household unit 120.
S14-2, decomposing the calculation task into sub calculation tasks corresponding to the number of the calculation units.
And S15, obtaining the execution result of the calculation task according to the sub-calculation result returned by the operation unit.
In combination with step S14-2, reference may be made to the existing cloud computing task decomposition and composition technology for the decomposition process of the anonymized computing task and the composition process of the sub-computing result, which is not limited herein.
After receiving the sub-calculation result returned by the arithmetic unit, the following steps can be further executed: recording the workload of the arithmetic unit(ii) a Work loadThe following relationship is satisfied:。
wherein the content of the first and second substances,in order to be the workload of the arithmetic unit n,for the time when the system server 110 receives the sub-calculation result of the arithmetic unit n,for the time when the system server 110 sends the sub-calculation task to the arithmetic unit n,is a unit workload preset according to the configuration condition of the arithmetic unit n. For example, canSetting corresponding weight indexes for the processor parameters and other software and hardware parameters in advance, and calculating corresponding unit workload according to the processor parameters and other software and hardware parameters of the arithmetic unit n and by combining the weight indexesTo distinguish the operational capability between different operational units.
S16, sending the execution result to the initiating unit.
After step S16 is executed, the following steps may be further executed: and according to the total workload of the calculation task, deducting the workload of the initiating node. Work load of deductionThe following relationship is satisfied:。
specifically, in combination with the workload calculation, a certain amount of workload may be allocated to each smart home unit 120 when the smart home unit 120 accesses the smart home control system 100; after step S11, the remaining workload of the initiating unit may also be determined, and if the remaining workload of the initiating unit is lower than a preset threshold, for example, lower than zero, a reminder that the workload is insufficient is sent to the initiating unit, and the initiating unit is waited to cancel the computing task, or the initiating unit charges the workload and then performs subsequent processes. Therefore, the situation that the user occupies the operation resources of other intelligent household units 120 without control to cause excessive loss of the operation resources is avoided, and the operation resource allocation efficiency of cloud computing is improved.
In the cloud-computing-based smart home control system provided by the first embodiment of the invention, the residences are used as units to access the cloud computing system, the system server receives the computing tasks sent by the smart home units and distributes the computing tasks to the idle smart home units for processing, and idle computing resources of the smart home units are fully utilized. And through integrating the computing resources of the intelligent home units involved in the cloud computing system, strong computing power is provided for each intelligent home unit, and the whole-house intelligent home control with higher intelligent degree becomes possible.
A second embodiment of the present invention provides a task scheduling method based on an intelligent home control system, which is applicable to a system server of the intelligent home control system according to the first embodiment. Referring to fig. 3, the task scheduling method includes steps S21 to S26.
S21, receiving the calculation request sent by the initiating unit; the computing request includes the computing task.
And S22, determining the intelligent household units in the idle state in the plurality of intelligent household units to obtain a candidate set.
And S23, selecting at least one intelligent household unit meeting the task requirement from the candidate set according to the calculation task to obtain a set of the operation units.
And S24, decomposing the computing task into a corresponding number of sub-computing tasks according to the number of the computing units, and distributing the sub-computing tasks to the computing units.
And S25, obtaining the execution result of the calculation task according to the sub-calculation result returned by the operation unit.
S26, sending the execution result to the initiating unit.
The task scheduling method may be optimized according to steps S11 to S16 shown in the first embodiment, and corresponding effects are obtained, which are not described herein.
According to the task scheduling method based on the intelligent home control system, the residences are used as units to access the cloud computing system, the system server receives computing tasks sent by the intelligent home units and distributes the computing tasks to the idle intelligent home units for processing, and idle computing resources of the intelligent home units are fully utilized. And through integrating the computing resources of the intelligent home units involved in the cloud computing system, strong computing power is provided for each intelligent home unit, and the whole-house intelligent home control with higher intelligent degree becomes possible.
Referring to fig. 4, a schematic diagram of a cloud computing-based smart home control device 300 according to a third embodiment of the present invention is shown. The cloud-computing-based smart home control device 300 includes: a processor 310, a memory 320, and a computer program, such as a task scheduler, stored in the memory and operable on the processor. When the processor executes the computer program, the steps in the cloud-computing-based smart home control method embodiment, for example, the steps of the task scheduling method shown in fig. 3, are implemented. Or, the processor implements the functions of each unit in the system embodiments when executing the computer program, for example, the system server or the smart home unit in the first embodiment.
Illustratively, the computer program may be partitioned into one or more modules that are stored in the memory 320 and executed by the processor 310 to implement the present invention. The one or more modules can be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used for describing the execution process of the computer program in the intelligent household control terminal device. For example, S21, receiving a calculation request sent by the initiating unit; the computing request comprises the computing task; s22, determining the intelligent home units in the idle state in the plurality of intelligent home units to obtain a candidate set; s23, according to the calculation task, selecting at least one intelligent home unit meeting the task requirement from the candidate set to obtain a set of operation units; s24, decomposing the calculation task into a corresponding number of sub-calculation tasks according to the number of the operation units, and distributing the sub-calculation tasks to the operation units; s25, obtaining the execution result of the calculation task according to the sub-calculation result returned by the operation unit; s26, sending the execution result to the initiating unit.
The cloud-based smart home control device 300 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The cloud computing-based smart home control device 300 may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the schematic diagram is merely an example of the cloud computing-based smart home control device 300, and does not constitute a limitation of the cloud computing-based smart home control device 300, and may include more or less components than those shown, or combine some components, or different components, for example, the cloud computing-based smart home control device 300 may further include an input and output device, a network access device, a bus, and the like.
The Processor 310 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general processor may be a microprocessor or the processor may be any conventional processor, and the processor 310 is a control center of the cloud-based smart home control device 300, and various interfaces and lines are used to connect various parts of the entire smart home control terminal device.
The memory 320 may be configured to store the computer program or module, and the processor 310 implements various functions of the smart home control terminal device by operating or executing the computer program or module stored in the memory and calling data stored in the memory. The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The modules or units integrated with the cloud-computing-based smart home control device 300 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
In the cloud-computing-based smart home control device and the storage medium provided by the third embodiment of the present invention, the residences are used as units to access the cloud computing system, the system server receives the computing tasks sent by the smart home units, and the computing tasks are distributed to the idle smart home units for processing, so that the idle computing resources of the smart home units are fully utilized. And through integrating the computing resources of the intelligent home units involved in the cloud computing system, strong computing power is provided for each intelligent home unit, and the whole-house intelligent home control with higher intelligent degree becomes possible.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.