Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a method for controlling a home appliance, which solves the technical problem that the hardware cost of an intelligent home appliance cannot be reduced because the home appliance and a mobile terminal must be controlled by a remote controller before being bound in the prior art.
A second object of the present invention is to provide another control method for a home appliance.
A third object of the present invention is to provide a control device for a home appliance.
A fourth object of the present invention is to provide another control apparatus for a home appliance.
A fourth object of the present invention is to provide a home appliance.
A fifth object of the present invention is to provide a mobile terminal.
A fifth object of the invention is to propose a non-transitory computer-readable storage medium.
In order to achieve the above object, a first embodiment of the present invention provides a method for controlling a home appliance, including:
starting a network hotspot so that the mobile terminal is connected with the network hotspot;
receiving a first network request for requesting a page, which is sent by the mobile terminal, through the network hotspot;
redirecting the first page requested by the first network request to a set second page so that the mobile terminal acquires the second page;
receiving a second network request sent by the mobile terminal; the second network request is sent in response to user operation on the second page, and the second network request carries a control instruction;
and controlling the running of the household appliance according to the control instruction carried by the second network request.
In order to achieve the above object, a second embodiment of the present invention provides a method for controlling a home appliance, where the method includes:
accessing a network hotspot initiated by the household appliance equipment;
sending a first network request for requesting a page to the household appliance equipment through the network hotspot so that the household appliance equipment redirects the first page requested by the first network request to a set second page;
acquiring a second page to which the household appliance is redirected;
responding to the user operation of the second page, and sending a second network request to the household appliance; and the second network request carries a control instruction and is used for controlling the running of the household appliance.
In order to achieve the above object, a third aspect of the present invention provides a control apparatus for a home appliance, the apparatus including:
the connection module is used for opening a network hotspot so that the mobile terminal can be connected with the network hotspot;
the receiving module is used for receiving a first network request which is sent by the mobile terminal and used for requesting a page through the network hotspot;
the redirection module is used for redirecting the first page requested by the first network request to a set second page so that the mobile terminal can acquire the second page;
the receiving module is further configured to receive a second network request sent by the mobile terminal; the second network request is sent in response to user operation on the second page, and the second network request carries a control instruction;
and the control module is used for controlling the running of the household appliance according to the control instruction carried by the second network request.
In order to achieve the above object, a fourth aspect of the present invention provides a control apparatus for a home appliance, the apparatus including:
the connection module is used for accessing a network hotspot initiated by the household appliance equipment;
the sending module is used for sending a first network request for requesting a page to the household appliance through the network hotspot so that the household appliance redirects the first page requested by the first network request to a set second page;
the acquisition module is used for acquiring a second page to which the household appliance is redirected;
the sending module is further configured to send a second network request to the home appliance device in response to the user operation on the second page; and the second network request carries a control instruction and is used for controlling the running of the household appliance.
In order to achieve the above object, a fifth embodiment of the present invention provides a home appliance, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the control method according to the first aspect.
To achieve the above object, a sixth embodiment of the present invention provides a mobile terminal, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the mobile terminal implements the control method according to the first aspect.
To achieve the above object, a seventh embodiment of the present invention proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the control method according to the first aspect, or implements the control method according to the second aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the method comprises the steps of starting a network hotspot to enable a mobile terminal to be connected with the network hotspot, receiving a first network request which is sent by the mobile terminal and used for requesting a page through the network hotspot, redirecting the first page requested by the first network request to a set second page to enable the mobile terminal to obtain the second page, and receiving a second network request sent by the mobile terminal, wherein the second network request is sent in response to user operation on the second page, the second network request carries a control instruction, the operation of household appliance equipment is controlled according to the control instruction carried by the second network request, and the control instruction used for controlling the household appliance equipment is obtained through the redirection of the started network hotspot and an access page, so that the household appliance control can be realized without a remote controller, the household appliance cost is reduced, and the convenience of operation is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
A method and an apparatus for controlling a home appliance, and a mobile terminal according to embodiments of the present invention are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for controlling a home appliance according to an embodiment of the present invention.
As shown in fig. 1, the method comprises the steps of:
step 101, a network hotspot is opened so that the mobile terminal is connected with the network hotspot.
The execution subject of the embodiment is a home appliance.
As a possible implementation manner, a wireless network communication standard WiFi module is arranged in the household appliance, after the household appliance is powered on, a network hotspot can be established based on the wireless network communication standard WiFi module, and the mobile terminal can be connected to the network hotspot, so that the household appliance which starts the network hotspot and the mobile terminal connected to the network hotspot are in the same hotspot local area network, and the household appliance has a gateway function of the hotspot local area network and receives a network request sent by the mobile terminal.
It should be noted that, when the mobile terminal is connected to the network hotspot, the network hotspot may set password authentication, that is, the mobile terminal may be connected to the network hotspot only after the password authentication is completed.
Step 102, receiving a first network request for requesting a page, which is sent by a mobile terminal, through a network hotspot.
Specifically, the mobile terminal and the home appliance device are in the same wireless local area network, as a possible implementation manner, the mobile terminal and the home appliance device may establish a TCP or UDP connection, and through the TCP or UDP connection, the home appliance device receives a first network request for requesting a page, which is sent by a browser in the mobile terminal.
It should be noted that the first network request may be any network request sent by opening a browser of the mobile terminal, and in this embodiment, there are other network requests, where the network request may be a page request of http, and for convenience of distinction, the network request is referred to as a first network request, a second network request, and the like, where the first network request is earlier than the second network request.
Step 103, redirecting the first page requested by the first network request to a set second page, so that the mobile terminal acquires the second page.
Specifically, after a first network request sent by a client of a browser is received, regardless of what a first page requested by the first network request is, redirection of an access page is directly performed to a set second page, where the second page may be a specific page, for example, a control page for controlling a home appliance device, so that the mobile terminal obtains the second page, and through redirection of the access page, the mobile terminal is controlled to access only the set second page, thereby achieving redirection of a target page, and being simple and convenient to operate.
And 104, receiving a second network request sent by the mobile terminal, wherein the second network request is sent in response to the user operation on the second page, and the second network request carries a control instruction.
Specifically, the household appliance receives the second network request sent by the mobile terminal, and analyzes the second network request to obtain the control instruction of the household appliance carried by the second network request, so that the second network request carrying the control instruction can be sent to the household appliance based on the second page, the control function of a wireless remote controller of the traditional household appliance is replaced, the household appliance can be controlled when the remote controller is not equipped or the network is not configured, and the hardware cost of the household appliance is reduced.
And 105, controlling the running of the household appliance according to the control instruction carried by the second network request.
The second network request of the embodiment of the invention can carry different control instructions, and under a scene, the control instructions carry hot spot passwords, specifically, the household electrical appliance is controlled to execute the modification of the network access information according to the hot spot passwords carried by the control instructions, so that the household electrical appliance can be controlled without a remote controller, the hardware cost of the household electrical appliance is reduced, and the control safety of the household electrical appliance is ensured.
In another scenario, the control instruction carries an identifier of the mobile terminal, and specifically, according to the identifier of the mobile terminal carried by the control instruction, the home appliance is controlled to execute a binding process, so that the home appliance and the corresponding mobile terminal are bound, the bound mobile terminal can control the home appliance, no remote controller is provided, the home appliance can be controlled, and the hardware cost of the home appliance is reduced.
In another scenario, the control instruction carries an operation parameter for controlling the operation of the home appliance, and specifically, the home appliance device is controlled to modify the operation parameter according to the operation parameter carried by the control instruction and operates according to the modified operation parameter, so that the home appliance device can be controlled without a remote controller, and the hardware cost of the home appliance device is reduced.
In the control method of the household appliance, the household appliance starts a network hotspot, receives a first network request which is sent by a mobile terminal and used for requesting a page, redirects the first page requested by the first network request to a set second page, so that the mobile terminal acquires the second page and receives a second network request sent by the mobile terminal, wherein the second network request is sent in response to user operation on the second page and carries a control instruction.
To clearly illustrate the previous embodiment, this embodiment provides another method for controlling a home appliance, and fig. 2 is a schematic flow chart of another method for controlling a home appliance according to the embodiment of the present invention.
As shown in fig. 2, step 103 may include the following sub-steps:
step 1031, intercepting the first network request.
In this embodiment, after receiving the first network request sent by the mobile terminal, the home appliance device intercepts the first network request regardless of what the first page requested by the first network request is, because the page requested by the first network request is not necessarily the set second page, and if the first network request acquired each time is analyzed, the target page is redirected according to the identification result, which increases the analysis process of the page requested by the first network request and consumes time, so that all the first network requests are directly intercepted, the waiting time of the user can be reduced, and the client of the mobile terminal can be redirected to the set second page, thereby improving efficiency.
Step 1032, sending a redirection message to the mobile terminal, where the redirection message carries a network address and a network address of the second page, and the redirection message is used for the mobile terminal to access the storage space of the home appliance device to obtain the second page.
The redirection message also carries a network address carrying the second page and an error code of the first network request.
Specifically, a redirection message is sent to the mobile terminal, where the redirection message carries an error code of the first network request, for example, http302 or the like, so that a network address URL of a page to be visited is a network address of a second page according to the error code and a network address of the second page carried in the redirection message, where the second page is a page for controlling the home appliance device, and the network address is used for the mobile terminal to access a storage space of the home appliance device to obtain the second page, and obtain a control instruction based on the second page to control the home appliance device.
In the method for controlling the household appliance provided by the embodiment of the invention, after receiving any first network request, the network request is intercepted, and the redirected message is sent, so that the client of the mobile terminal redirects the webpage to be accessed and redirects the webpage to the webpage address of the webpage for controlling the household appliance to acquire the second page for controlling the household appliance, thereby reducing the hardware cost of the household appliance and improving the convenience of operation.
Based on the foregoing embodiment, this embodiment provides another method for controlling a home appliance, and fig. 3 is a schematic flow chart of the method for controlling a home appliance according to the embodiment of the present invention, and as shown in fig. 3, the method includes the following steps:
step 301, accessing a network hotspot initiated by the home appliance device.
The execution main body of the embodiment of the invention is a mobile terminal.
As a possible implementation manner, after password verification, the mobile terminal may be connected to a network hotspot initiated by the home appliance device, so that the home appliance device which opens the network hotspot and the mobile terminal connected to the network hotspot are in the same hotspot local area network, thereby implementing data interaction.
Step 302, a first network request for requesting a page is sent to the home appliance device through the network hotspot, so that the home appliance device redirects the first page requested by the first network request to a set second page.
The first page refers to a page requested by an arbitrary web browsing request triggered by a user at a browser end, and the set second page refers to a page resource stored in a storage space of the home appliance device, and the second page may be a control interface for controlling the home appliance device, so as to control the home appliance device.
As a possible implementation manner, after the mobile terminal is connected to the network hotspot of the home appliance device, the mobile terminal and the home appliance device may establish a connection of TCP or UDP, and through the connection of TCP or UDP, the browser client of the mobile terminal sends a first network request for requesting a page to the home appliance device, so that the home appliance device redirects a first page requested by the first network request to a set second page.
Step 303, acquiring a second page to which the home appliance is redirected.
Specifically, the browser client of the mobile terminal receives a redirection message sent by the home appliance device, where the redirection message carries a network address of the second page, and based on the network address carried in the redirection message, the mobile terminal accesses the storage space of the home appliance device to obtain the second page, and displays the second page at the browser client of the home appliance device.
Optionally, after receiving the redirection message sent by the home appliance device, the redirection message also carries an error code of the first network request, for example, the error code is 302 or 303, and the like, and the browser client of the mobile terminal may display the error code and remind the user that the page needs to be redirected, so as to remind the user of redirection, thereby avoiding confusion caused by direct redirection to the user and improving user experience.
And 304, responding to the user operation on the second page, and sending a second network request to the household appliance, wherein the second network request carries a control instruction for controlling the operation of the household appliance.
Specifically, the browser client of the mobile terminal displays a second page, where the second page may be a control interface for controlling the home appliance, the control interface includes a picture control, and the user sends a corresponding second network request, such as a GET request, a POST request, or a PUT request of http, to the home appliance device by triggering the corresponding control, and a control instruction carried in the second network request is used to control the operation of the home appliance device, so that a remote controller is replaced, and the hardware cost is reduced.
In the method for controlling the household appliance, the mobile terminal accesses a network hotspot initiated by the household appliance, sends a first network request for requesting a page to the household appliance through the network hotspot, so that the household appliance redirects the first page requested by the first network request to a set second page, further the mobile terminal loads preset webpage resources from a storage unit of the household appliance to obtain the second page, responds to the operation of a user in the second page, sends a second network request to the household appliance, the second network request carries a control instruction, so that the household appliance controls the operation of the household appliance based on the control instruction carried in the second network request, a remote controller is not needed, the hotspot started by the household appliance can be based on, and the control instruction is sent to the household appliance through the redirected second page, the running of the household electrical appliance is controlled, the running cost of the household electrical appliance is reduced, and meanwhile, the convenience of operation is improved.
In order to implement the above embodiments, the present invention further provides a control device for a home appliance, which is disposed in the home appliance.
Fig. 4 is a schematic structural diagram of a control device of a home appliance according to an embodiment of the present invention.
As shown in fig. 4, the apparatus includes: aconnection module 41, areception module 42, aredirection module 43 and acontrol module 44.
Theconnection module 41 is configured to open a network hotspot, so that the mobile terminal is connected to the network hotspot.
The receivingmodule 42 is configured to receive, through the network hotspot, a first network request for requesting a page sent by the mobile terminal.
The redirectingmodule 43 is configured to redirect the first page requested by the first network request to a set second page, so that the mobile terminal acquires the second page.
The receivingmodule 42 is further configured to receive a second network request sent by the mobile terminal; the second network request is sent in response to user operation on the second page, and the second network request carries a control instruction.
And thecontrol module 44 is configured to control operation of the home appliance device according to the control instruction carried by the second network request.
Further, in a possible implementation manner of the embodiment of the present invention, theredirection module 43 is specifically configured to:
intercepting the first network request;
sending a redirection message to the mobile terminal, wherein the redirection message carries the network address of the second page; and the network address is used for the mobile terminal to access the storage space of the household appliance equipment to obtain the second page.
As a possible implementation manner, the redirection packet also carries an error code of the first network request.
As a possible implementation manner, thecontrol module 44 is specifically configured to:
controlling the household appliance equipment to modify the network access information according to the hotspot password carried by the control instruction;
or controlling the household appliance equipment to execute the binding process according to the identifier of the mobile terminal carried by the control instruction;
or controlling the household appliance to modify the operation parameters according to the operation parameters carried by the control instruction.
It should be noted that the foregoing explanation of the embodiment of the method for controlling a home appliance is also applicable to the control apparatus of the home appliance of the embodiment, and the principle is the same, and is not repeated here.
In the control device of the home appliance in this embodiment, the home appliance starts a network hotspot, receives a first network request sent by a mobile terminal and used for requesting a page, redirects the first page requested by the first network request to a set second page, so that the mobile terminal acquires the second page, and receives a second network request sent by the mobile terminal, wherein the second network request is sent in response to a user operation on the second page and carries a control instruction, the operation of the home appliance is controlled according to the control instruction, and the mobile terminal is controlled to access only the page used for controlling the home appliance by accessing the redirection of the page.
In order to implement the above embodiments, an embodiment of the present invention further provides a control device for a home appliance, where the control device is disposed in a mobile terminal.
Fig. 5 is a schematic structural diagram of another control apparatus for a home appliance according to an embodiment of the present invention.
As shown in fig. 5, the apparatus includes: aconnection module 51, a sendingmodule 52 and anacquisition module 53.
Theconnection module 51 is configured to access a network hotspot initiated by the home appliance device.
The sendingmodule 52 is configured to send a first network request for requesting a page to the home appliance device through the network hotspot, so that the home appliance device redirects the first page requested by the first network request to a set second page.
And an obtainingmodule 53, configured to obtain a second page to which the home appliance is redirected.
The sendingmodule 52 is further configured to send a second network request to the home appliance device in response to the user operation on the second page; the second network request carries a control instruction and is used for controlling the running of the household appliance.
In a possible implementation manner of the embodiment of the present invention, the obtaining module includes a receiving unit and a display unit.
The receiving unit is used for receiving the redirection message sent by the household appliance; wherein, the redirection message carries the network address of the second page; and accessing the storage space of the household appliance to obtain a second page according to the network address.
And the display unit is used for displaying the error code.
It should be noted that the foregoing explanation of the embodiment of the method for controlling a home appliance is also applicable to the control apparatus of the home appliance of the embodiment, and the principle is the same, and is not repeated here.
In the control device of the household appliance of the embodiment of the invention, the mobile terminal is accessed to a network hotspot initiated by the household appliance, and sends a first network request for requesting a page to the household appliance through the network hotspot, so that the household appliance redirects the first page requested by the first network request to a set second page, and then the mobile terminal loads a preset webpage resource from a storage unit of the household appliance to obtain the second page, responds to the operation of a user in the second page, and sends a second network request to the household appliance, wherein the second network request carries a control instruction, so that the household appliance controls the operation of the household appliance based on the control instruction carried in the second network request, and realizes that the operation of the household appliance is controlled without a remote controller, and also based on the hotspot started by the household appliance and the redirected second page to send the control instruction to the household appliance, the running of the household electrical appliance is controlled, the running cost of the household electrical appliance is reduced, and meanwhile, the convenience of operation is improved.
In order to implement the foregoing embodiment, the present invention further provides a home appliance, and fig. 6 is a schematic structural diagram of a home appliance according to an embodiment of the present invention, as shown in fig. 6, ahome appliance 110 includes amemory 112, aprocessor 111, and acomputer program 113 stored in thememory 112 and capable of running on the processor, where when theprocessor 111 executes theprogram 113, the control method according to the foregoing method embodiment is implemented.
In order to implement the foregoing embodiment, the present invention further provides a mobile terminal, fig. 7 is a schematic structural diagram of a home appliance according to an embodiment of the present invention, as shown in fig. 7, amobile terminal 110 includes amemory 112, aprocessor 111, and acomputer program 113 stored in thememory 112 and capable of running on the processor, and when theprocessor 111 executes theprogram 113, the control method according to the foregoing method embodiment is implemented.
In order to implement the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a control method as described in the aforementioned method embodiments.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.