Disclosure of Invention
In view of the above problems, the present invention provides a laundry control method, system, mobile terminal and terminal.
The invention provides a clothes washing control method which is applied to a mobile terminal and comprises the following steps:
acquiring washing machine model data corresponding to a target washing machine from a server;
determining a washing machine model according to washing machine model data;
and receiving a trigger instruction aiming at the washing machine model, converting the trigger instruction into a command aiming at the target washing machine, and issuing the command to the target washing machine.
Optionally, in the laundry control method of the present invention, the laundry machine model data includes one or more of the following data: device data, cartridge data, and program data.
Optionally, in the laundry control method of the present invention, in a case where the laundry model data includes the appliance data, determining the laundry model according to the laundry model data includes: obtaining a washing machine basic information data packet, a washing machine command data packet and a drum list according to the equipment data;
determining a washing machine model from the washing machine model data, in the case where the washing machine model data includes the drum data, including: according to the tube data, obtaining a tube basic information data packet, a tube command data packet, a group command number set and a tube program list of each tube in the tube list;
in the case where the laundry machine model data includes program data, determining a laundry machine model from the laundry machine model data includes: obtaining a program parameter data packet of each cylinder in a cylinder program list according to the program data; and the group command number set stores the data packet number of the program parameter data packet.
Optionally, in the laundry control method of the present invention, receiving a trigger instruction for a model of the laundry machine, and converting the trigger instruction into a command for a target laundry machine includes:
when the trigger instruction is a single command, searching a number corresponding to the single command trigger instruction in a washing machine command data packet or a drum command data packet, and finding out a command in the corresponding washing machine command data packet or drum command data packet according to the number;
when a group command triggering instruction is received, a group command number set corresponding to the group command triggering instruction is searched, program parameter data packets are traversed according to data packet numbers of the program parameter data packets stored in the group command number set, and commands corresponding to the program parameter data packet numbers are obtained in sequence.
Optionally, in the laundry control method of the present invention, after being issued to the target laundry machine, the method further includes the following steps:
when the target washing machine has state change, acquiring the state reported by the target washing machine;
and recursively analyzing the state according to the equipment state machine mode, and displaying an analysis result.
The present invention also provides a mobile terminal, comprising:
the acquisition module is used for acquiring washing machine model data corresponding to the target washing machine from the server;
the determining module is used for determining a washing machine model according to the washing machine model data;
and the processing module is used for receiving the trigger instruction aiming at the washing machine model, converting the trigger instruction into a command aiming at the target washing machine and sending the command to the target washing machine.
The invention also provides a laundry control system, which comprises the mobile terminal and the server.
Optionally, in the laundry control system of the present invention, the server is further configured to provide an input interface for updating the laundry model data, and notify the mobile terminal when the laundry model data is updated.
Optionally, in the laundry control system of the present invention, the server is a cloud platform.
The present invention also provides a terminal, including: a memory, a processor and a computer program stored on the memory and operable on the processor, the computer program when executed by the processor implementing the steps of the laundry control method as above.
The invention has the following beneficial effects:
the invention can solve the problems that the traditional adaptation mode in the prior art can not change well according to the change and the function increase and decrease of a protocol, can not really realize automatic adaptation, and can consume a large amount of time to debug an APP and a bottom plate when one washing machine model is added each time.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the problems that the traditional adaptation mode in the prior art cannot be better changed according to the change of a protocol and the increase and decrease of functions, the automatic adaptation cannot be really realized, and a large amount of time is consumed for debugging an APP and a bottom plate when a washing machine model is added each time, the invention provides a washing control method, a washing control system, a mobile terminal and a washing control terminal, and the invention is further described in detail with reference to the attached drawings and the embodiment. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
An embodiment of a method of the present invention provides a laundry control method applied to a mobile terminal, fig. 1 is a flowchart of the laundry control method according to the embodiment of the method of the present invention, as shown in fig. 1, the laundry control method according to the embodiment of the method of the present invention includes the following processes:
step 101: washing machine model data corresponding to the target washing machine is acquired from the server.
Specifically, the laundry machine model data includes one or more of the following data: device data, cartridge data, and program data.
Step 102: and determining a washing machine model according to the washing machine model data.
Specifically, in a case where the laundry machine model data includes the appliance data, determining the laundry machine model according to the laundry machine model data includes: obtaining a washing machine basic information data packet, a washing machine command data packet and a drum list according to the equipment data;
determining a washing machine model from the washing machine model data, in the case where the washing machine model data includes the drum data, including: according to the tube data, obtaining a tube basic information data packet, a tube command data packet, a group command number set and a tube program list of each tube in the tube list;
in the case where the laundry machine model data includes program data, determining a laundry machine model from the laundry machine model data includes: obtaining a program parameter data packet of each cylinder in a cylinder program list according to the program data; and the group command number set stores the data packet number of the program parameter data packet.
Step 103: and receiving a trigger instruction aiming at the washing machine model, converting the trigger instruction into a command aiming at the target washing machine, and issuing the command to the target washing machine.
Specifically, receiving a trigger instruction for a washing machine model and converting the trigger instruction into a command for a target washing machine includes:
and when the trigger instruction is a single command, searching a serial number corresponding to the single command trigger instruction in the washing machine command data packet or the drum command data packet, and finding out the command in the corresponding washing machine command data packet or the drum command data packet according to the serial number. Fig. 2 is a flowchart of obtaining a command corresponding to a trigger command according to a washing machine model when a single-command trigger command is received.
When a group command triggering instruction is received, a group command number set corresponding to the group command triggering instruction is searched, program parameter data packets are traversed according to data packet numbers of the program parameter data packets stored in the group command number set, and commands corresponding to the program parameter data packet numbers are obtained in sequence. Fig. 3 is a flowchart of obtaining a command corresponding to a trigger command according to a washing machine model when a group command trigger command is received.
The single-command trigger instruction comprises a switch trigger instruction of equipment, a pause trigger instruction of a barrel, a child lock trigger instruction, an alarm trigger and other trigger instructions.
As another embodiment of the laundry control method in the mobile terminal of the present invention, the method further includes the following steps:
when the target washing machine has state change, acquiring the state reported by the target washing machine;
and recursively analyzing the state according to the equipment state machine mode, and displaying an analysis result.
The invention provides a brand-new clothes washing control method for adapting commands and parameters of a plurality of different internet-of-things washing machine devices, a plurality of different functions and even different protocols, which not only makes the parameters of the washing machine such as: basic attributes such as a washing program (for example, cotton and linen) and washing time thereof are configured to the cloud, and functional logic attributes of the washing machine, such as commands of turning on and off the machine, starting pause, finishing washing and drying, and the like are configured; different groups of commands for each different model, etc.; different big analogies maintain the high in the clouds like different agreements such as impeller, cylinder, twin drum, twin impeller to initializing washing machine equipment, bucket, the corresponding basic attribute of procedure etc. can solve among the prior art traditional adaptation mode can not be better change, the function increase and decrease and change according to the agreement, can not really accomplish automatic adaptation, and increase a washing machine model at every turn and need consume the problem of a large amount of time debugging APP and bottom plate.
Corresponding to the method embodiment of the invention, the invention also provides a device embodiment. Fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the apparatus of the present invention, and as shown in fig. 4, the mobile terminal according to the embodiment of the apparatus of the present invention includes: the obtaining module 40, the determining module 42, and the processing module 44 are described in detail below.
Specifically, the obtaining module 40 is configured to obtain, from the server, laundry machine model data corresponding to the target laundry machine. In this embodiment, the obtaining module 40 is configured to obtain laundry machine model data corresponding to typeid of APP in the mobile terminal in the cloud platform. Specifically, the laundry machine model data includes one or more of the following data: device data, cartridge data, and program data.
A determination module 42 for determining a washing machine model from the washing machine model data.
Specifically, the determining module 42 is specifically configured to:
determining a washing machine model from the washing machine model data, in the case where the washing machine model data includes appliance data, including: obtaining a washing machine basic information data packet, a washing machine command data packet and a drum list according to the equipment data;
determining a washing machine model from the washing machine model data, in the case where the washing machine model data includes the drum data, including: according to the tube data, obtaining a tube basic information data packet, a tube command data packet, a group command number set and a tube program list of each tube in the tube list;
in the case where the laundry machine model data includes program data, determining a laundry machine model from the laundry machine model data includes: obtaining a program parameter data packet of each cylinder in a cylinder program list according to the program data; and the group command number set stores the data packet number of the program parameter data packet.
And the processing module 44 is configured to receive a trigger instruction for the washing machine model, convert the trigger instruction into a command for the target washing machine, and send the command to the target washing machine.
Specifically, the processing module 44 is specifically configured to:
when the trigger instruction is a single command, searching a number corresponding to the single command trigger instruction in a washing machine command data packet or a drum command data packet, and finding out a command in the corresponding washing machine command data packet or drum command data packet according to the number;
when a group command triggering instruction is received, a group command number set corresponding to the group command triggering instruction is searched, program parameter data packets are traversed according to data packet numbers of the program parameter data packets stored in the group command number set, and commands corresponding to the program parameter data packet numbers are obtained in sequence.
The mobile terminal of the embodiment of the invention also comprises a state analysis module and a display module:
the state analysis module is used for acquiring the state reported by the target washing machine when the state of the target washing machine changes, and recursively analyzing the state according to the equipment state machine mode to obtain an analysis result;
and the display module is used for displaying the analysis result.
The invention further provides a laundry control system which comprises the mobile terminal and the server of the device embodiment. And the server is used for acquiring the washing machine model data corresponding to the target washing machine and issuing the washing machine model data to the mobile terminal.
Further, the server is also used for providing an input interface for updating the washing machine model data and informing the mobile terminal when the washing machine model data is updated.
Specifically, the server is a cloud platform.
The present invention further provides a terminal comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the laundry control method according to the method embodiment of the present invention.
According to the invention, all parameters, all protocols, command parameters, states and group commands of the washing machine are maintained to the cloud, a new machine type is newly listed, and all parameter information of the protocols, the commands, the states, the group commands and the programs related to the machine type can be configured at the cloud. The method comprises the steps that when an APP terminal logs in user account equipment every time or binds the equipment, parameters and commands of the washing machine are obtained from a cloud end, so that equipment control or service display is conducted, when the state of bottom plate equipment changes, recursive analysis is conducted according to an equipment state machine mode, if the washing machine on-off state is analyzed firstly, and if the washing machine on-off state is shut down, other analysis is not conducted; if the device is started, the analysis device judges whether to alarm or not, so that the condition change is avoided to be analyzed every time, a large amount of time is saved, waste of useless resources is avoided, and the performance is improved.
In order to explain the laundry control method, the laundry control system, the mobile terminal and the terminal of the present invention in detail, example 1 is given. Fig. 5 is a system framework diagram of example 1 of the present invention, as in fig. 5, the present invention includes: cloud (also called cloud platform), mobile terminal (APP), and washing machine bottom plate. The cloud end mainly stores all protocols and all parameters of the washing machine, different washing machines are distinguished according to typeid, and different protocols are distinguished according to different protocols (different values in different protocol data lists); the APP downloads all protocols and parameters of corresponding equipment from the cloud, then instantiates each different equipment, correspondingly issues instructions and analyzes states, and completes control; the bottom plate receives the instruction issued by the APP, controls the washing machine to operate, and reports the corresponding instruction state to the APP; the modules are channels for transmission between the APP and the backplane.
Fig. 6 is a flowchart illustrating example 1 of the present invention converting the data list according to a preset conversion rule to obtain a washing machine model, and in fig. 6, all parameter sets of the traverse group command 1 may also be referred to as a number set of the traverse group command 1.
Fig. 7 is a flowchart illustrating issuing a command to a bottom plate of a washing machine, acquiring a command state reported by the bottom plate of the washing machine when the bottom plate of the washing machine has a state change, and performing analysis according to example 2 of the present invention, where in fig. 7, the right side is a flowchart illustrating issuing the command to the bottom plate of the washing machine, and the left side is a flowchart illustrating acquiring and performing analysis on the command state reported by the bottom plate of the washing machine when the bottom plate of the washing machine has a state change. When the state of the bottom plate of the washing machine changes, acquiring a command state reported by the bottom plate of the washing machine; analyzing the state on the equipment according to the command state, and if the state on the equipment is shutdown, not analyzing the state on the cylinder; if the state on the equipment is not the shutdown state, the state on the cylinder is continuously analyzed, if the state on the cylinder is the standby state, the state of the program is not analyzed, and if the state on the cylinder is not the standby state, the state of the program is continuously analyzed; and displaying the analyzed equipment state, the analyzed cylinder state and the analyzed program state.
The invention has the following beneficial effects:
all supported washing machine protocols and parameters are configured through the cloud, each washing machine model is dynamically analyzed and automatically adapted, and even if the protocols and the parameters of each washing machine are different, the washing machine can be completely and automatically adapted.
When the state of the bottom plate changes, the processing logic in the prior art needs to be completely analyzed and printed on the washing machine after the state changes.
The invention can directly use the control and analysis bottom plate as long as the cloud is configured according to the protocol and the parameters, and the APP end does not need extra workload, and the command and the parameters do not depend on whether the protocol is fixed or not.
The above is only an example of the present invention, and is not intended to limit the present invention, and it is obvious to those skilled in the art that various modifications and variations can be made in the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.