Disclosure of Invention
The invention aims to solve the technical problem that connection between a washing machine and a server is unstable in the prior art, and provides a washing machine sharing method, a washing machine sharing system and a storage medium.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a washing machine sharing method is applied to a washing machine sharing system, the washing machine sharing system comprises a server, an APP (application) terminal and a washing machine, the server is in communication connection with the APP terminal and the washing machine respectively, and the washing machine sharing method comprises the following steps:
the APP terminal receives a code scanning operation instruction of a user, acquires an ID of the washing machine and sends an unlocking request to the server;
when the server is stably connected with the washing machine, the APP terminal sends a payment success record to the server and sends a starting instruction to the washing machine, so that the washing machine executes unlocking after receiving the starting instruction;
when the server can not be connected with the washing machine, the APP end receives the encrypted Bluetooth instruction sent by the server, the APP end starts the Bluetooth module to be connected with the washing machine through Bluetooth, and the APP end forwards the Bluetooth instruction to the washing machine so that the washing machine receives the Bluetooth instruction and then executes unlocking.
The washing machine sharing method is characterized in that the ID is identification information of the washing machine, and the identification information is used for judging whether stable connection is carried out with the washing machine by the server.
The washing machine sharing method includes that the APP terminal receives a code scanning operation instruction of a user, acquires the ID of the washing machine and sends an unlocking request to the server, and the unlocking request specifically includes:
the APP terminal receives a code scanning operation instruction of a user, acquires an ID of the washing machine and sends an unlocking request to the server;
the APP terminal selects according to a washing mode provided by the washing machine, and ordering payment is carried out after the washing mode is selected;
and the server judges whether the washing machine is in a stable connection state with the server according to the identification information of the washing machine.
The washing machine sharing method comprises the following steps that when the server is stably connected with the washing machine, the APP terminal sends a payment success record to the server and sends a starting instruction to the washing machine, so that the washing machine executes unlocking after receiving the starting instruction and specifically comprises the following steps:
when the server is stably connected with the washing machine and the washing machine is in an idle state currently, the APP terminal sends a payment success record to the server and sends a starting instruction to the washing machine;
and after the washing machine receives the starting instruction sent by the server, unlocking and starting operation are carried out.
The washing machine sharing method comprises the following steps that when the server cannot be connected with the washing machine, the APP end receives an encrypted Bluetooth instruction sent by the server, the APP end starts the Bluetooth module to be connected with the washing machine in a Bluetooth mode, and forwards the Bluetooth instruction to the washing machine, so that the washing machine executes unlocking after receiving the Bluetooth instruction and specifically comprises the following steps:
when the server and the washing machine cannot be connected, the APP end receives the encrypted Bluetooth instruction sent by the server, and starts the Bluetooth module to be in Bluetooth connection with the washing machine;
when washing machine is in idle state at present, the APP end is forwarded the bluetooth instruction to washing machine, and washing machine receives behind the bluetooth instruction, the execution unblock begins the operation.
The washing machine sharing method is characterized in that a dynamic instruction library is added to the encrypted Bluetooth instruction according to the private protocol encryption.
The washing machine sharing method comprises the steps that a server is used for generating and maintaining the dynamic instruction library, the instructions of each mode in each version are controlled to be updated irregularly, the server pushes update notifications to the washing machines irregularly, the washing machines update the dynamic instruction library after receiving the update notifications, and then the dynamic instruction library is matched with a unique encryption key of each washing machine to be used as a secret key to encrypt and decrypt the instructions.
The washing machine sharing method is characterized in that when the server controls two washing machines through the dynamic instruction library, the instructions in the same time and the same washing mode are different; or controlling one washing machine, and the instructions are different at different time and under the same washing mode;
and the server collects and counts data of the selected washing modes of the APP terminal, and updates the washing modes suitable for the washing habits of the user according to the data every other preset period.
A laundry machine sharing system, wherein the laundry machine sharing system comprises:
the system comprises a server, an APP terminal and a washing machine;
the server is in communication connection with the APP end and the washing machine respectively;
the APP terminal receives a code scanning operation instruction of a user, acquires an ID of the washing machine and sends an unlocking request to the server;
when the server is stably connected with the washing machine, the APP terminal sends a payment success record to the server and sends a starting instruction to the washing machine, so that the washing machine executes unlocking after receiving the starting instruction;
when the server can not be connected with the washing machine, the APP end receives the encrypted Bluetooth instruction sent by the server, the APP end starts the Bluetooth module to be connected with the washing machine through Bluetooth, and the APP end forwards the Bluetooth instruction to the washing machine so that the washing machine receives the Bluetooth instruction and then executes unlocking.
A storage medium storing a washing machine sharing program that implements the washing machine sharing method when executed by a processor.
The invention discloses a washing machine sharing method, a washing machine sharing system and a storage medium, wherein the washing machine sharing method comprises the following steps: the APP terminal receives a code scanning operation instruction of a user, acquires an ID of the washing machine and sends an unlocking request to the server; when the server is stably connected with the washing machine, the APP terminal sends a payment success record to the server and sends a starting instruction to the washing machine, so that the washing machine executes unlocking after receiving the starting instruction; when the server can not be connected with the washing machine, the APP end receives the encrypted Bluetooth instruction sent by the server, the APP end starts the Bluetooth module to be connected with the washing machine through Bluetooth, and the APP end forwards the Bluetooth instruction to the washing machine so that the washing machine receives the Bluetooth instruction and then executes unlocking. When the server and the washing machine cannot be connected, the APP end starts the Bluetooth module to be in Bluetooth connection with the washing machine, the washing machine is controlled to be unlocked, the stability and the safety of information are improved by adding the dynamic password library and the encryption mode of the secret key, and meanwhile, the method is more suitable for the sharing mode of the washing machine, and is simple to operate, convenient and fast.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
As shown in fig. 1, a method for sharing a washing machine according to a preferred embodiment of the present invention includes the following steps:
s100, the APP end receives a code scanning operation instruction of a user, acquires the ID of the washing machine and sends an unlocking request to the server.
Specifically, the ID is identification information of the washing machine, and the identification information is used by the server to determine whether to perform stable connection with the washing machine.
Further, the step S100 specifically includes:
s101, an APP end receives a code scanning operation instruction of a user, acquires an ID of the washing machine and sends an unlocking request to a server;
s102, selecting by the APP terminal according to a washing mode provided by the washing machine, and paying for a bill after the washing mode is selected;
s103, the server judges whether the washing machine is in a stable connection state with the server according to the identification information of the washing machine.
In the embodiment of the invention, a user installs an APP corresponding to a washing machine on a mobile terminal (APP terminal) in advance, completes registration information, and after the registration is successful, namely the washing machine is bound with the APP terminal, the user obtains a unique account which is used for APP login and subsequent laundry payment operation; of course, by repeating the above registration method, the washing machine may be bound with a plurality of APP terminals, and similarly, one APP terminal may also be bound with a plurality of washing machines.
The server stores all account information after successful registration and forms a list, so that a user can conveniently obtain the state information of the washing machine, wherein the APP terminal can be a mobile phone or a tablet and the like; the registration information comprises a mobile phone number, recharging information and the like. The APP application comprises a laundry management interface, the laundry management interface comprises a laundry mode setting interface, a message notification interface and the like, the laundry mode comprises a dry cleaning mode, a standard mode, a reservation mode and other combined laundry modes, of course, different modes can be selected according to different categories of laundry, and the standard mode is adopted by the laundry machine by default.
Further, the user opens the APP end after the APP is applied, the camera is automatically opened, the unique two-dimensional code on one washing machine is scanned, the unique ID number of the washing machine, namely the identification code UUID (identification information), is obtained, an unlocking request is sent to the server, the unlocking request comprises basic information of the washing machine and a washing starting instruction request, and the basic information of the washing machine comprises the ID number, the model and the address information.
S200, when the server is stably connected with the washing machine, the APP terminal sends a payment success record to the server and sends a starting instruction to the washing machine through the server, so that the washing machine executes unlocking after receiving the starting instruction.
Further, the step S200 specifically includes:
s201, when the server is stably connected with the washing machine and the washing machine is in an idle state currently, the APP sends a payment success record to the server and the server sends a starting instruction to the washing machine;
and S202, after the washing machine receives the starting instruction sent by the server, unlocking and starting operation are executed.
In the embodiment of the invention, after the server receives the request signal sent by the APP terminal, the request signal is analyzed to obtain the ID number of the washing machine, and at the moment, the server searches whether the ID number is online and the corresponding state (idle state or running state) according to the ID number. The real time when the server is stably connected with the washing machine means that the washing machine and the server are connected through a GPRS module (2G communication connection) in the washing machine, GPRS (general Packet Radio service) is short for general Packet Radio service technology, which is a mobile data service available for GSM mobile phone users, belongs to the data transmission technology in the second generation mobile communication, GPRS is the continuation of GSM, and GPRS is different from the previous continuous channel transmission mode and is transmitted in a Packet (Packet) mode, so the cost borne by the users is calculated by the unit of transmission data of the users, the whole channel is not used, and the cost is lower theoretically.
Therefore, the intensity and the distance of the GPRS signal influence the intensity of communication connection, when the server detects that the communication connection with the washing machine is stable (2G communication connection is stable) and the washing machine is in an idle state at present, after the APP terminal selects a washing mode and performs ordering payment, different washing modes correspond to different prices, wherein the payment is divided into a far-end payment mode and a near-end payment mode; in addition, the payment mode comprises fingerprint identification, numbers, two-dimensional codes, face brushing (scanning by opening a camera), other person payment instead or a combination mode thereof, and payment is completed in the corresponding account.
S300, when the server can not be connected with the washing machine, the APP end receives the encrypted Bluetooth instruction sent by the server, the APP end starts the Bluetooth module to be connected with the washing machine through Bluetooth, and the APP end forwards the Bluetooth instruction to the washing machine so that the washing machine receives the Bluetooth instruction and then performs unlocking.
Further, the step S300 specifically includes:
s301, when the server and the washing machine cannot be connected, the APP end receives the encrypted Bluetooth instruction sent by the server, and starts the Bluetooth module to be in Bluetooth connection with the washing machine;
s302, when the washing machine is in an idle state at present, the APP terminal forwards the Bluetooth instruction to the washing machine, and the washing machine executes unlocking and starts to operate after receiving the Bluetooth instruction.
In the embodiment of the invention, after the server receives the APP payment success record, the server sends a response starting instruction to the corresponding washing machine according to two conditions: firstly, when the server is stably connected with the washing machine and the washing machine is idle at present, the washing machine directly receives the starting instruction and immediately executes corresponding washing operation according to the selected washing mode; secondly, when the server is examined and washing machine can't be connected (2G communication is unstable or can't be connected promptly), then the server sends the bluetooth instruction after encrypting to the APP end, and the APP end starts bluetooth module and carries out the bluetooth with washing machine and is connected, and the APP end is forwardded the bluetooth instruction is to washing machine, and washing machine receives execute the unblock behind the bluetooth instruction.
The improvement of the invention is that the low power consumption Bluetooth module is added for realizing data transmission in a long distance signal difference or without a network, reducing the power consumption to the maximum extent, saving the cost and prolonging the service time of the equipment.
In the embodiment of the invention, a Bluetooth module is Bluetooth Low Energy (BLE), which is a communication protocol with Low requirement on data transmission rate by adopting a simple layered protocol architecture mode, and defines that two communication parties carry out normal data transceiving process according to a common communication standard, the Bluetooth Low Energy communication protocol works in an unlicensed 2.4ghz ism radio frequency band, reduces power consumption to the maximum extent by utilizing a plurality of intelligent means, adopts a variable connection time interval, is in a non-connection state (Energy saving) when not used, and at the moment, two ends of a link only know each other, the link is opened only when necessary, and then the link is closed in a time as short as possible, so that Low power consumption transmission is realized.
In addition, the server sends the encrypted Bluetooth instruction to the APP terminal, and forwards the encrypted Bluetooth instruction to the washing machine through the APP terminal, so that the washing machine is controlled to execute a corresponding function according to the Bluetooth instruction; because the low-power-consumption Bluetooth module is started, all Bluetooth instructions are sent by the server and a dynamic instruction library is added on the basis that the encrypted Bluetooth instructions are encrypted according to a private protocol in order to ensure the safety of data transmission and the data accuracy.
The dynamic instruction library is generated and maintained by the server, comprises different versions of instructions in different modes, and is controlled by the dynamic instruction library to: when two different washing machines have different instructions in the same mode at the same time; or when one washing machine has different instructions at different time and in the same mode; therefore, the safety of the instruction is enhanced through the three-layer encryption mode of the dynamic instruction library, the unique ID number and the secret key (Bluetooth instruction), and the instruction is not easy to crack.
Further, after receiving the encrypted Bluetooth instruction, the APP end forwards the encrypted Bluetooth instruction to the washing machine through Bluetooth, and the washing machine decrypts the instruction and executes the instruction after receiving the encrypted Bluetooth instruction; meanwhile, updating a dynamic instruction library to the server, and then matching the unique encryption key of each washing machine as a key to carry out instruction symmetric encryption and decryption; like this, washing machine connects the unblock through the bluetooth automatically, and seamless joint need not user's manual input secret key, and the simplified operation improves user experience.
Further, the server can also collect data of selecting a washing mode by the user through the APP terminal, and updates the washing mode meeting the washing requirement of the user according to the data every other preset period (for example, seven days), so that multiple washing mode selections are provided for the user.
Example two
An embodiment of the present invention further provides a washing machine sharing system, as shown in fig. 2, the system includes:
aserver 100, anAPP end 200, and awashing machine 300;
theserver 100 is in communication connection with theAPP terminal 200 and thewashing machine 300 respectively;
theAPP terminal 200 receives a code scanning operation instruction of a user, acquires an ID of thewashing machine 300 and sends an unlocking request to theserver 100;
when theserver 100 is stably connected with thewashing machine 300, theAPP terminal 200 sends a payment success record to theserver 100 and sends a starting instruction to thewashing machine 300 through theserver 100, so that thewashing machine 300 executes unlocking after receiving the starting instruction;
when theserver 100 cannot be connected with thewashing machine 300, theAPP end 200 receives the encrypted bluetooth instruction sent by theserver 100, the APP end 200 starts a bluetooth module to perform bluetooth connection with thewashing machine 300, and the APP end 200 forwards the bluetooth instruction to thewashing machine 300, so that thewashing machine 300 executes unlocking after receiving the bluetooth instruction; as described above.
EXAMPLE III
The invention also provides a storage medium, wherein the storage medium stores a washing machine sharing program, and the washing machine sharing program realizes the washing machine sharing method when being executed by a processor; as described above.
In summary, the present invention provides a method, a system and a storage medium for sharing a washing machine, wherein the method for sharing a washing machine comprises: the APP terminal receives a code scanning operation instruction of a user, acquires an ID of the washing machine and sends an unlocking request to the server; when the server is stably connected with the washing machine, the APP terminal sends a payment success record to the server and sends a starting instruction to the washing machine, so that the washing machine executes unlocking after receiving the starting instruction; when the server can not be connected with the washing machine, the APP end receives the encrypted Bluetooth instruction sent by the server, the APP end starts the Bluetooth module to be connected with the washing machine through Bluetooth, and the APP end forwards the Bluetooth instruction to the washing machine so that the washing machine receives the Bluetooth instruction and then executes unlocking. When the server and the washing machine cannot be connected, the APP end starts the Bluetooth module to be in Bluetooth connection with the washing machine, the washing machine is controlled to be unlocked, the stability and the safety of information are improved by adding the dynamic password library and the encryption mode of the secret key, and meanwhile, the method is more suitable for the sharing mode of the washing machine, and is simple to operate, convenient and fast.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.