Summary of the invention
The present invention is directed to solve one of the technical problem in above-mentioned technology at least to a certain extent.
For this purpose, an object of the present invention is to provide a kind of means of communication of water purifier electric-controlled plate, using communication informationThe communication modes of middle band ID realize sending and receiving for communication information, to can not only guarantee the reliable of communication information transmissionProperty, it can also simplify communication program.
Second object of the present invention is to propose a kind of communication system of water purifier electric-controlled plate.
Third object of the present invention is to propose a kind of water purifier.
In order to achieve the above objectives, first aspect present invention embodiment proposes a kind of means of communication of water purifier electric-controlled plate,The water purifier electric-controlled plate includes information transmitting apparatus and information receiver, and the information transmitting apparatus and the information receiveCommunication connection is carried out between device, the means of communication the following steps are included: the information transmitting apparatus when first is defaultBetween to the information receiver send have ID information;The information transmitting apparatus is when sending the information for having IDJudge whether this sends information identical as last time transmission information;If it is determined that this sends information and last time sends information notTogether, then change this and send the ID value in information;The information receiver judges that the ID value in the information that this is received isID value in the no information received with last time is identical;If it is determined that the ID value in this information for receiving was received with last timeInformation in ID value it is different, then variable processing is carried out according to the information that this is received.
The means of communication of water purifier electric-controlled plate according to an embodiment of the present invention, it is default every first by information transmitting apparatusTime sends the information for having ID to information receiver, and information transmitting apparatus also judges when sending the information for having IDThis sends whether information is identical as last time transmission information, changes the ID value of this transmission information if different, protects if they are the sameIt is constant to hold ID value, while information receiver also judges what this was received when receiving information transmitted by information transmitting apparatusWhether the ID value in information identical as the ID value in the information that last time receives, the information received if different according to this intoRow variable processing, if they are the same then without processing, to save processing routine.It follows that the water purifier of the embodiment of the present inventionThe means of communication of electric-controlled plate realize sending and receiving for communication information using the communication modes in communication information with ID, not only may be usedTo guarantee the reliability of communication information transmission, and if receive communication information judge ID value in information that this is received withID value in the information that last time receives is identical, then without processing, is done directly information reception, enormously simplifies communication program.
In addition, the means of communication of the water purifier electric-controlled plate proposed according to that above embodiment of the present invention, can also have as followsAdditional technical characteristic:
According to one embodiment of present invention, the information transmitting apparatus is also sentenced when sending the information for having IDIt is disconnected currently whether to handle reception information, it is right after the completion of receiving information processing if being presently processing reception informationThe information with ID is sent.
According to one embodiment of present invention, the information with ID that the information transmitting apparatus is sent includes first code, letterCease length and check code, wherein the information receiver also carries out the first code when receiving the information for having IDVerification, if checked successfully, continues to remaining information;If verification failure, stops receiving this information.
Further, when the message length in the remaining information finishes receiving, the information receiver is also to instituteIt states check code to be checked, wherein if checked successfully, complete the reception of this information;If verification failure, stops receivingThis information.
According to one embodiment of present invention, the water purifier electric-controlled plate includes display board and power panel, wherein when describedWhen information transmitting apparatus is display board, the information receiver is power panel;When the information transmitting apparatus is power panel,The information receiver is display board.
In order to achieve the above objectives, second aspect of the present invention embodiment proposes a kind of communication system of water purifier electric-controlled plate,Including information transmitting apparatus and information receiver, communicated between the information transmitting apparatus and the information receiverConnection, wherein the information transmitting apparatus, for being sent to the information receiver with ID every the first preset timeInformation, and judge whether this transmission information is identical as last time transmission information when sending the information for having ID, Yi JiJudge that this sends information and last time transmission information does not change simultaneously this and sends the ID value in information;The information receives dressIt sets, for judging whether the ID value in information that this is received is identical as the ID value in the information that last time receives, and is sentencingThe letter received when ID value difference in the information that ID value in the information that this is received of breaking and last time receive according to thisBreath carries out variable processing.
The communication system of water purifier electric-controlled plate according to an embodiment of the present invention, it is default every first by information transmitting apparatusTime sends the information for having ID to information receiver, and information transmitting apparatus also judges when sending the information for having IDThis sends whether information is identical as last time transmission information, changes the ID value of this transmission information if different, protects if they are the sameIt is constant to hold ID value, while information receiver also judges what this was received when receiving information transmitted by information transmitting apparatusWhether the ID value in information identical as the ID value in the information that last time receives, the information received if different according to this intoRow variable processing, if they are the same then without processing, to save processing routine.It follows that the water purifier of the embodiment of the present inventionThe communication system of electric-controlled plate can realize sending and receiving for communication information using the communication modes in communication information with ID, noIt can only guarantee the reliability of communication information transmission, and if receiving the ID in the information that communication information judges that this is receivedValue is identical as the ID value in the information that last time receives, then without processing, is done directly information reception, enormously simplifies communication journeySequence.
In addition, the communication system of the water purifier electric-controlled plate proposed according to that above embodiment of the present invention, can also have as followsAdditional technical characteristic:
According to one embodiment of present invention, the information transmitting apparatus is also used when sending the information for having IDReception information whether is currently being handled in judgement, if being presently processing reception information, is being completed receiving information processingThe information with ID is sent afterwards.
According to one embodiment of present invention, the information with ID that the information transmitting apparatus is sent includes first code, letterCease length and check code, wherein the information receiver is also used to, when receiving the information for having ID, to the headCode is checked: if checked successfully, continuing to remaining information;If verification failure, stops receiving this information.
Further, when the message length in the remaining information finishes receiving, the information receiver is also to instituteIt states check code to be checked, wherein if checked successfully, complete the reception of this information;If verification failure, stops receivingThis information.
According to one embodiment of present invention, when the information transmitting apparatus is display board, the information receiverFor power panel;When the information transmitting apparatus is power panel, the information receiver is display board.
In order to achieve the above objectives, the invention also provides a kind of water purifiers comprising above-mentioned water purifier electric-controlled plate leads toNews system.
The water purifier proposed according to embodiments of the present invention can be used by the communication system of above-mentioned water purifier electric-controlled plateCommunication modes in communication information with ID realize sending and receiving for communication information, and can not only guarantee communication information transmission canBy property, and if receiving the ID in the information that the ID value in the information that communication information judges that this is received was received with last timeBe worth it is identical, then without processing, be done directly information reception, enormously simplify communication program.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to endSame or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attachedThe embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
The means of communication of water purifier electric-controlled plate, the water purification Electrical Control of it is proposed of the embodiment of the present invention described with reference to the accompanying drawingThe communication system of plate and water purifier with the communication system.
Fig. 1 is the block diagram of electric-controlled plate according to an embodiment of the invention.As shown in Figure 1, the electric-controlled plate 10 wrapsPower panel 101, display board 102 are included, power panel 101 can be information transmitting apparatus, be also possible to information receiver, display board102 can be information transmitting apparatus, be also possible to information receiver, and in other words, water purifier electric-controlled plate includes information transmitting apparatusAnd information receiver, and by communication connection between information transmitting apparatus and information receiver, communication type can be usedThe mode of UART (Universal Asynchronous Receiver/Transmitter, universal asynchronous receiving-transmitting transmitter).
In one embodiment of the invention, usually load and input signal may be provided on power panel 101, show and pressKey may be provided on display board 102.
Fig. 2 is the flow chart of the means of communication of water purifier electric-controlled plate according to an embodiment of the present invention.As shown in Fig. 2, this is netThe means of communication of water dispenser electric-controlled plate the following steps are included:
S1, information transmitting apparatus send the information for having ID every the first preset time to information receiver.
Wherein, information transmitting apparatus can be power panel, and corresponding information receiver is just display board, and information sends dressSetting may be display board, and corresponding information receiver is just power panel, and the first preset time can be carried out according to actual conditionsCalibration, for example can be Millisecond.
S2, information transmitting apparatus send have ID information when judge this send information whether with last time send informationIt is identical.
S3, if it is determined that this sends, information is different from last time transmission information, then changes this and send the ID value in information.
Wherein, change what the ID value in information can be performed such, when information transmitting apparatus judges that this sends letterWhen breath sent information difference with last time, this can be sent the ID value in information and add 1, if this has sent the ID value in informationWhen through reaching preset maximum value, ID value being reset, starting from scratch and counting again, information transmitting apparatus by ID value change after informationIt is sent to information receiver.When the information that information transmitting apparatus judges that this sends is identical as last time transmission information, protectHold this send information in ID value it is constant, information transmitting apparatus directly transmits information to information receiver.
S4, information receiver judge in the information whether the ID value in the information that this is received received with last timeID value is identical.
S5, if it is determined that the ID value in this information for receiving is different from the ID value in the information that last time receives, thenVariable processing is carried out according to the information that this is received.
Wherein, when information receiver judges in information that ID value in information that this is received and last time receivedWhen ID value difference, variable processing can be carried out to the information that this is received and is carried out at parsing for example, by using corresponding communication programThen reason receives information processing and completes.When information receiver judges that ID value and last time in information that this is received receiveTo information in ID value it is identical when, then without being handled, receive information processing and be done directly, it is logical so as to greatly simplifyInterrogate program.
According to one embodiment of present invention, information transmitting apparatus send have ID information when, also judge be currentlyIt is no to handle reception information, if being presently processing reception information, to ID after the completion of receiving information processingInformation is sent.
Wherein, information transmitting apparatus can be power panel, and information transmitting apparatus may be display board, information transmitting apparatusWhen sending the information for having ID, judge whether itself is handling reception information, if being presently processing reception information,Then the information with ID is sent after the completion of receiving information processing, it, can be direct if not receiving information in processingSent to the information of ID, so as to avoid sending and receiving information progress simultaneously and caused by communication information it is disorderlyDisorderly.
In one embodiment of the invention, it in order to guarantee the reliability communicated, avoids interfering, information transmitting apparatus is sentThe information with ID include first code, message length and check code, wherein information receiver is receiving the letter for having IDWhen breath, also first code is checked;If checked successfully, remaining information is continued to;If verification failure, stops receivingThis information.
Also, when the message length in remaining information finishes receiving, information receiver also checks check code,Wherein, if checked successfully, the reception of this information is completed;If verification failure, stops receiving this information.
In an embodiment of the present invention, by the verification to first code and check code, miscommunication can be effectively prevented and askedTopic improves the reliability of communication information transmission.
Wherein, information transmitting apparatus can be power panel, and corresponding information receiver is just display board, and information sends dressSetting may be display board, and corresponding information receiver is just power panel.
Specifically, in one embodiment of the invention, as shown in figure 3, information transmitting apparatus sends the process packet of informationInclude following steps:
S11 starts.
Information transmitting apparatus is ready for sending the information with ID.
Does S12 judge that the interval of the first preset time reaches?
Information transmitting apparatus judges according to the interval of the first preset time, if being spaced the first preset time, holdsRow step S13 terminates to send if it is not, executing step S18.
Does S13 judge that receiving information handles completion?
Information transmitting apparatus judges currently whether handling reception information, if being presently processing reception information,S18 is thened follow the steps, information processing completion to be received is waited to retransmit information;If receiving information processing to complete, then follow the stepsS14。
Is S14, the information for judging that this sends identical as the information that last time sends? if not, executing step S15;Such asFruit is to execute step S16.
S15 sends ID value in information and adds 1, and when ID value reaches preset maximum value, starts from scratch again cumulative.
S16 sends ID value in information and remains unchanged.
S17 sends information and completes.
S18 terminates.
Fig. 4 is the flow chart that information receiver according to an embodiment of the invention receives information, is specifically included followingStep:
S21 starts.
Information receiver starts to receive information.
Is S22 receiving information?
Information receives whether assembling device judgement is currently receiving information, step S23 is if it is transferred to, if otherwise turnedEnter step S29.
Does is S23 first code?
Information receiver carries out first code verification to the information received, checks successfully, determination is that first code is then transferred to stepS24, verification failure is not that first code is then transferred to step S29.
S24, it is determined that the beginning of information continues to, obtains message length.
S25 continues to information.
Does is S26 the last byte?
Information receiver judgement now it is received whether be message length the last byte, be if it is transferred to stepRapid S27 is not to come back to step S25.
Be S27, check code correct?
Information receiver carries out check code verification to the information received, checks successfully, check code enters correctly into stepS28, verification fails, and check code is incorrect to enter step S29.
S28 receives information and completes.
S29 terminates process.
Fig. 5 is the process that information receiver according to an embodiment of the invention handles the information receivedFigure, the specific steps are as follows:
S31 starts.
Information processing is received to start.
Does S32 receive information and completes?
Information receiver judges to receive whether information is completed, and completion is then transferred to step S33, unfinished then be transferred to stepS36。
Do S33, ID=last time receive information?
Information receiver judges that this receives the ID value whether the ID value in information is equal in last time reception information, ifEqual to thening follow the steps S35, not equal to thening follow the steps S34.
S34 carries out variable processing according to information is received.
Information receiver carries out variable processing to the information received, and step S35 is executed after being disposed.
S35 receives information processing and completes.
S36 terminates.
In conclusion the means of communication of water purifier electric-controlled plate according to an embodiment of the present invention, every by information transmitting apparatusThe information for having ID is sent to information receiver every the first preset time, and information transmitting apparatus is sending the letter for having IDAlso judge that this sends whether information is identical as last time transmission information when breath, change the ID value of this transmission information if different,Then keep ID value constant if they are the same, while information receiver also judges this when receiving information transmitted by information transmitting apparatusWhether the ID value in the secondary information received is identical as the ID value in the information that last time receives, according to this reception if differentThe information arrived carries out variable processing, if they are the same then without processing, to save processing routine.It follows that the present invention is implementedThe means of communication of the water purifier electric-controlled plate of example are realized the transmission of communication information using the communication modes in communication information with ID and are connectIt receives, can not only guarantee the reliability of communication information transmission, if but also judging this information received receiving communication informationIn ID value it is identical as the ID value in the information that last time receives, then without processing, be done directly information reception, enormously simplifyCommunication program.
The communication system of the water purifier electric-controlled plate proposed according to embodiments of the present invention, including information transmitting apparatus and information connectReceiving apparatus carries out communication connection between information transmitting apparatus and the information receiver, wherein information transmitting apparatus is for everyThe information for having ID is sent to the information receiver every the first preset time, and judges this when sending the information for having IDIt is identical whether secondary transmission information with last time sent information, and judge that this sends information and last time transmission information and do not change simultaneouslyBecome this and sends the ID value in information;Information receiver be used to judge the ID value in information that this is received whether with last timeID value in the information received is identical, and in judging information that ID value in information that this is received and last time receivedID value difference when the information that is received according to this carry out variable processing.
In one embodiment of the invention, as shown in Figure 1, information transmitting apparatus can be power panel 101, corresponding letterCeasing reception device is just display board 102, and information transmitting apparatus may be display board 102, and corresponding information receiver is justPower panel 101.
It specifically, can be by this when information transmitting apparatus judges that this sends information and last time transmission information differenceThe ID value sent in information adds 1, if this ID value for sending in information has reached preset maximum value, ID value is reset,Start from scratch and count again, the information after information transmitting apparatus changes ID value is sent to information receiver.When information is sentWhen the information that device judges that this sends is identical as last time transmission information, keep ID value in the information of this transmission constant, letterBreath sending device directly transmits information to information receiver.
Also, work as in the information that ID value and last time in the information that information receiver judges that this is received receivedWhen ID value difference, variable processing can be carried out to the information that this is received and is carried out at parsing for example, by using corresponding communication programThen reason receives information processing and completes.When information receiver judges that ID value and last time in information that this is received receiveTo information in ID value it is identical when, then without being handled, receive information processing and be done directly, it is logical so as to greatly simplifyInterrogate program.
According to one embodiment of present invention, information transmitting apparatus send have ID information when, also judge be currentlyIt is no to handle reception information, if being presently processing reception information, to ID after the completion of receiving information processingInformation is sent.
That is, information transmitting apparatus judges whether itself is handling reception when sending the information for having IDInformation sends the information with ID after the completion of receiving information processing, such as if being presently processing reception informationFruit does not receive information in processing, can directly send to the information with ID.
In one embodiment of the invention, it in order to guarantee the reliability communicated, avoids interfering, information transmitting apparatus is sentThe information with ID include first code, message length and check code, wherein information receiver is receiving the letter for having IDWhen breath, also first code is checked;If checked successfully, remaining information is continued to;If verification failure, stops receivingThis information.
Also, when the message length in remaining information finishes receiving, information receiver also checks check code,Wherein, if checked successfully, the reception of this information is completed;If verification failure, stops receiving this information.
That is, miscommunication problem can be effectively prevented by the verification to first code and check code, improve logicalInterrogate the reliability of information transmission.
Wherein, information transmitting apparatus can be power panel, and corresponding information receiver is just display board, and information sends dressSetting may be display board, and corresponding information receiver is just power panel.
The communication system of water purifier electric-controlled plate according to an embodiment of the present invention, it is default every first by information transmitting apparatusTime sends the information for having ID to information receiver, and information transmitting apparatus also judges when sending the information for having IDThis sends whether information is identical as last time transmission information, changes the ID value of this transmission information if different, protects if they are the sameIt is constant to hold ID value, while information receiver also judges what this was received when receiving information transmitted by information transmitting apparatusWhether the ID value in information identical as the ID value in the information that last time receives, the information received if different according to this intoRow variable processing, if they are the same then without processing, to save processing routine.It follows that the water purifier of the embodiment of the present inventionThe communication system of electric-controlled plate can realize sending and receiving for communication information using the communication modes in communication information with ID, noIt can only guarantee the reliability of communication information transmission, and if receiving the ID in the information that communication information judges that this is receivedValue is identical as the ID value in the information that last time receives, then without processing, is done directly information reception, enormously simplifies communication journeySequence.
In addition, as shown in fig. 6, the embodiment of the present invention also proposed a kind of water purifier 200 comprising above-mentioned water purifierThe communication system 100 of electric-controlled plate.
The water purifier proposed according to embodiments of the present invention can be used by the communication system of above-mentioned water purifier electric-controlled plateCommunication modes in communication information with ID realize sending and receiving for communication information, and can not only guarantee communication information transmission canBy property, and if receiving the ID in the information that the ID value in the information that communication information judges that this is received was received with last timeBe worth it is identical, then without processing, be done directly information reception, enormously simplify communication program.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically showThe description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or examplePoint is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are notIt must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in officeIt can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this fieldArt personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examplesIt closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importanceOr implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed orImplicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, threeIt is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includesIt is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portionPoint, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitableSequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the inventionEmbodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered useIn the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, forInstruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instructionThe instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or setIt is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or passDefeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipmentIt sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wiringsInterconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only depositsReservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitableMedium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other mediaHis suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentionedIn embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storageOr firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be usedAny one of art or their combination are realized: have for data-signal is realized the logic gates of logic function fromLogic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compileJourney gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carriesIt suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage mediumIn matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing moduleIt is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mouldBlock both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such asFruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computerIn read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching aboveThe embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the inventionSystem, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the inventionType.
In the description of the present invention, it is to be understood that, term " center ", " longitudinal direction ", " transverse direction ", " length ", " width "," thickness ", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outside", " up timeThe orientation or positional relationship of the instructions such as needle ", " counterclockwise ", " axial direction ", " radial direction ", " circumferential direction " be orientation based on the figure orPositional relationship is merely for convenience of description of the present invention and simplification of the description, rather than the device or element of indication or suggestion meaning mustThere must be specific orientation, be constructed and operated in a specific orientation, therefore be not considered as limiting the invention.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc.Term shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integral;It can be mechanical connectIt connects, is also possible to be electrically connected;It can be directly connected, can also can be in two elements indirectly connected through an intermediaryThe interaction relationship of the connection in portion or two elements.It for the ordinary skill in the art, can be according to specific feelingsCondition understands the concrete meaning of above-mentioned term in the present invention.
In the present invention unless specifically defined or limited otherwise, fisrt feature in the second feature " on " or " down " can be withIt is that the first and second features directly contact or the first and second features pass through intermediary mediate contact.Moreover, fisrt feature existsSecond feature " on ", " top " and " above " but fisrt feature be directly above or diagonally above the second feature, or be merely representative ofFirst feature horizontal height is higher than second feature.Fisrt feature can be under the second feature " below ", " below " and " below "One feature is directly under or diagonally below the second feature, or is merely representative of first feature horizontal height less than second feature.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is exampleProperty, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentionedEmbodiment is changed, modifies, replacement and variant.