CN105871993B - Cloud access method and system based on wireless communication module - Google Patents

Cloud access method and system based on wireless communication module Download PDF

Info

Publication number
CN105871993B
CN105871993B CN201510932189.2A CN201510932189A CN105871993B CN 105871993 B CN105871993 B CN 105871993B CN 201510932189 A CN201510932189 A CN 201510932189A CN 105871993 B CN105871993 B CN 105871993B
Authority
CN
China
Prior art keywords
message
communication module
wireless communication
thread
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510932189.2A
Other languages
Chinese (zh)
Other versions
CN105871993A (en
Inventor
邹伟
卢伟山
鲜志雄
叶楚汉
罗伟民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Midea Group Co Ltd
Midea Smart Home Technology Co Ltd
Original Assignee
Midea Group Co Ltd
Midea Smart Home Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Midea Group Co Ltd, Midea Smart Home Technology Co Ltd filed Critical Midea Group Co Ltd
Priority to CN201510932189.2A priority Critical patent/CN105871993B/en
Publication of CN105871993A publication Critical patent/CN105871993A/en
Application granted granted Critical
Publication of CN105871993B publication Critical patent/CN105871993B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention proposes a kind of cloud access method and system based on wireless communication module, the cloud access method based on wireless communication module includes wireless communication module and receives the first kind message that Cloud Server is sent, and obtain the type information of Cloud Server, wherein, wireless communication module is connected with multiple Cloud Servers;Wireless communication module calls corresponding translation-protocol according to the type information of Cloud Server;And first kind message is converted to Second Type message by wireless communication module according to translation-protocol, and Second Type message is sent to corresponding household electrical appliance.By the present invention household electrical appliance can be made to be connected with corresponding Cloud Server, realize the access of household electrical appliance and multiple Cloud Servers, effectively cloud access effect of the lifting based on wireless communication module.

Description

Cloud access method and system based on wireless communication module
Technical field
The present invention relates to communication technical field, more particularly to a kind of cloud access method based on wireless communication module and it is System.
Background technology
Cloud Server is as a kind of hot technology in recent years and development trend, and its cardinal principle is exactly to pass through resource-sharing While reducing cost to reach, the efficiency of IT basic platform resilient expansions is improved.The construction of current Cloud Server is it is intended that wide Large user provides service on demand.Cloud Server carries a large amount of important operation systems and data, while different household electrical appliance Access Cloud Server is needed to provide the user with related service.
Therefore, it is necessary to realize that household electrical appliance and multiple Cloud Servers are convenient, efficiently access.
The content of the invention
It is contemplated that at least solving one of technical problem in correlation technique to a certain extent.
Therefore, it is an object of the present invention to propose a kind of cloud access method based on wireless communication module, can make Household electrical appliance are connected with corresponding Cloud Server, realize the access of household electrical appliance and multiple Cloud Servers, and effectively lifting is based on nothing The cloud access effect of line communication module.
It is another object of the present invention to propose a kind of cloud access system based on wireless communication module.
To reach above-mentioned purpose, the cloud access side based on wireless communication module that first aspect present invention embodiment is proposed Method, including:Wireless communication module receives the first kind message that Cloud Server is sent, and obtains the type letter of the Cloud Server Breath, wherein, the wireless communication module is connected with multiple Cloud Servers;The wireless communication module is according to the Cloud Server Type information call corresponding translation-protocol;And the wireless communication module according to the translation-protocol by the first kind Type message is converted to Second Type message, and the Second Type message is sent to corresponding household electrical appliance.
The cloud access method based on wireless communication module that first aspect present invention embodiment is proposed, wireless communication module leads to Cross and receive the first kind message that Cloud Server is sent, and obtain the type information of Cloud Server, wherein, wireless communication module with Multiple Cloud Servers are connected;Wireless communication module calls corresponding translation-protocol according to the type information of Cloud Server;And First kind message is converted to Second Type message by wireless communication module according to translation-protocol, and Second Type message is sent To corresponding household electrical appliance, household electrical appliance can be made to be connected with corresponding Cloud Server, household electrical appliance and multiple cloud services are realized The access of device, effectively cloud access effect of the lifting based on wireless communication module.
To reach above-mentioned purpose, the cloud access system based on wireless communication module that second aspect of the present invention embodiment is proposed System, including:Wireless communication module, the Cloud Server and household electrical appliance being in communication with each other by the wireless communication module, wherein, institute Stating wireless communication module includes:Serial data receiving or sending thread, for being communicated with the household electrical appliance;Network data is received and dispatched Thread, for being communicated with the Cloud Server;Service logic thread, for the serial data receiving or sending thread, described Network data receiving or sending thread carries out message exchange, with to the serial data receiving or sending thread and network data receiving or sending thread receipts The message of hair is controlled;And main thread, the main thread to the serial data receiving or sending thread, network data for receiving and dispatching Thread and service logic thread are controlled;Application affairs adjust back submodule, and the main thread is adjusted back by the application affairs Submodule controls the service logic thread;And application affairs message queue, for receiving event message, and supply the main line Journey is read, wherein, the event message includes application affairs message and WIFI callback events message;State machine events distribution processor Submodule, corresponding state machine is distributed to for the mode attribute according to the event message by the event message, wherein, institute Any of mode attribute is stated for AP-Mode, STA-Mode, or System, read in the application affairs message queue The application affairs message and WIFI callback events message, configure the State Transferring mechanism of the wireless communication module;State Machine, for controlling the state of the wireless communication module to switch over according to the event message and State Transferring mechanism.
The cloud access system based on wireless communication module that second aspect of the present invention embodiment is proposed, passes through service logic line Journey carries out message exchange with serial data receiving or sending thread, network data receiving or sending thread, with to serial data receiving or sending thread and network The message of data transmit-receive thread transmitting-receiving is controlled, and main thread is to serial data receiving or sending thread, network data receiving or sending thread and industry Business logic thread is controlled, and can realize the cooperating operation of multiple threads, effectively the line in lifting Cloud Server access procedure Journey dispatching effect, is easy to the Function Extension of later stage wireless communication module hardware system.Pass through the mode attribute according to event message Event message is distributed to corresponding state machine, wherein, mode attribute is times in AP-Mode, STA-Mode, or System One kind, and control the state of wireless communication module to be cut according to the State Transferring mechanism of event message and corresponding state machine Change, the cooperating operation of three kinds of state machines in the wireless communication module of household electrical appliance can be realized, wireless communication module is effectively lifted Condition managing effect.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Substantially and be readily appreciated that, wherein:
Fig. 1 is the schematic flow sheet for the cloud access method based on wireless communication module that one embodiment of the invention is proposed;
Fig. 2 is the hardware architecture diagram of wireless communication module in the embodiment of the present invention;
Fig. 3 is wireless communication module message exchange flow schematic diagram in the embodiment of the present invention;
Fig. 4 is the schematic flow sheet for the cloud access method based on wireless communication module that another embodiment of the present invention is proposed;
Fig. 5 is the structural representation for the wireless communication module that another embodiment of the present invention is proposed;
Fig. 6 is the method that the main thread that another embodiment of the present invention is proposed is managed to the state machine of wireless communication module Schematic flow sheet;
Fig. 7 is the method that the main thread that another embodiment of the present invention is proposed is managed to the state machine of wireless communication module Schematic flow sheet;
Fig. 8 is radio communication mold bulk state switching schematic diagram in the embodiment of the present invention;
Fig. 9 is the structural representation for the cloud access system based on wireless communication module that another embodiment of the present invention is proposed.
Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not considered as limiting the invention.On the contrary, this All changes in the range of spirit and intension that the embodiment of invention includes falling into attached claims, modification and equivalent Thing.
Fig. 1 is the schematic flow sheet for the cloud access method based on wireless communication module that one embodiment of the invention is proposed, should Cloud access method based on wireless communication module includes:
S101:Wireless communication module receives the first kind message that Cloud Server is sent, and obtains the type of Cloud Server Information, wherein, wireless communication module is connected with multiple Cloud Servers.
Cloud Server as a kind of hot technology in recent years and development trend, its principle be exactly by resource-sharing with up to To while reducing cost, the efficiency of IT basic platform resilient expansions is improved.The construction of current Cloud Server is it is intended that vast use Family provides service on demand.Cloud Server carries a large amount of important operation systems and data, while different household electrical appliance need Access Cloud Server is to provide the user with related service, therefore Cloud Server access has many demands and challenge.Therefore, have Necessity realizes that household electrical appliance and multiple Cloud Servers are convenient, efficiently access.
In an embodiment of the present invention, wireless communication module is specially wireless WIFI communication modules.
Wherein, wireless WIFI communication modules support Wi-Fi technology, for household electrical appliance.
Household electrical appliance such as air conditioner, refrigerator, and water heater etc..
For example, user's family Asymmetrical Digital Subscriber Line (Asymmetric Digital Subscriber Line, ADSL), partial wideband etc., can connect wireless communication module to realize the nothing of mobile terminal by using family expenses Wi-Fi technology Line is surfed the Net.
Further, for example in an embodiment of the present invention, user can also be by using wireless communication module by household electric Device is interconnected with corresponding Cloud Server, to realize the resource-sharing of household electrical appliance and Cloud Server.
Fig. 2 is the hardware architecture diagram of wireless communication module in the embodiment of the present invention, and Fig. 2 is using Cloud Server as beautiful cloud With millet cloud example.
Fig. 2 includes M-Smart SDKs (Software Development Kit, SDK) 21, millet SDK22, manufacturer bottom SDK23, beautiful cloud 24, and millet cloud 25.Wherein, M-Smart SDK21, which are used to realize, is based on M- The processing logic of the service logic thread of Smart systems, millet SDK22 is used for the protocol conversion file xm_ for realizing millet cloud 25 Agreement in profile.c, manufacturer bottom SDK23 is used for the bottom hardware logic for realizing wireless communication module, the beautiful He of cloud 24 Millet cloud 25 is used to provide cloud service resource.
Wherein, Cloud Server be a kind of simple efficient, safe and reliable, disposal ability can elastic telescopic calculating service.Cloud Server is used for the service that integrated service ability is provided to all kinds of Internet users.Cloud Server for example beautiful cloud, Jingdone district cloud, Ah In cloud, or millet cloud.
Cloud Server has intelligent cloud access, intelligent cloud storage, and the function that intelligent information is pushed.When user is by making After with wireless communication module, household electrical appliance are interconnected with corresponding Cloud Server, Cloud Server can be by resource supplying to household electric Device, user can be controlled by the application program of household electrical appliance in mobile terminal to household electrical appliance.
For example, beautiful use of microwave ovens function has Cookbooks resource newly developed, micro-wave oven manufacturer is newly developed by this Cookbooks resource be stored in the intelligent cloud storage of the cloud of U.S., as user by using wireless communication module by beautiful microwave After stove is interconnected with beautiful cloud, beautiful cloud can be by the Cookbooks resource supplying newly developed to beautiful micro-wave oven, so that user can To perform Cookbooks resource newly developed by the beautiful micro-wave oven of the application program controlling of the micro-wave oven of mobile terminal Sino-U.S..
Wherein, message is the data cell of exchange and transmission in network, i.e. the website data block disposably to be sent.Message The complete data message that will be sent is contained, its cause different in size, length is not limited and length is variable.By constantly by number Transmitted according to packet, bag, frame is packaged into.
In an embodiment of the present invention, the type information of Cloud Server can such as cloud ID, different cloud ID mark differences Cloud Server, cloud ID can be arranged in the heading of first kind message, can be the reserved field in heading, Other fields can be arranged on, the embodiment of the present invention is to this without concrete restriction.
Specifically, as shown in figure 3, being wireless communication module message exchange flow schematic diagram in the embodiment of the present invention.Including: Serial data receiving or sending thread 31, the service logic thread 32 based on M-Smart systems, network data receiving or sending thread 33, serial ports number According to transmitting-receiving caching 34, network data transmitting-receiving caching 35, the translation-protocol 36 based on M-Smart systems, Cloud Server 37, Yi Jijia Electrical appliance 38.
Alternatively, the type information for obtaining Cloud Server is specifically included:Wireless communication module is obtained to be connected with Cloud Server The Socket link informations connect;And wireless communication module determines type information according to Socket link informations.
Issuing message exchanges flow for example, the network data receiving or sending thread in wireless communication module gets Cloud Server hair After the first kind message for delivering to household electrical appliance, network data receiving or sending thread creates network transceiving data bag message queue, and will The industry based on M-Smart systems that first kind message is added in network transceiving data bag message queue, wireless communication module Business logic thread is corresponding from network transceiving data bag message queue by the function interface of protocol conversion file in Cloud Server SDK Network data transmitting-receiving caching in obtain first kind message, and obtain the cloud ID in the heading of first kind message.
S102:Wireless communication module calls corresponding translation-protocol according to the type information of Cloud Server.
Wherein, translation-protocol such as Ali cloud ali_sdk.c corresponding with the type information of Cloud Server protocol conversion It is agreement in file ali_profile.c, the agreement in Jingdone district cloud jd_sdk.c protocol conversion file jd_profile.c, small Agreement in rice cloud xm_sdk.c protocol conversion file xm_profile.c, and beautiful cloud md_sdk.c protocol conversion are literary Agreement in part md_profile.c.
S103:First kind message is converted to Second Type message by wireless communication module according to translation-protocol, and by Two type messages are sent to corresponding household electrical appliance.
For example, wireless communication module is according to the cloud ID in the heading of first kind message, and corresponding translation-protocol, Protocol conversion is carried out to first kind message, Second Type message is obtained, by Second Type packet storage in cloud access system point In the serial data transmitting-receiving caching matched somebody with somebody, and trigger service logic of the application affairs readjustment submodule control based on M-Smart systems Second Type message is issued to household electrical appliance by thread by serial data receiving or sending thread.
Alternatively, being somebody's turn to do the cloud access method based on wireless communication module includes:Wireless communication module receives household electrical appliance hair The Second Type message sent, and the corresponding destination address of Second Type message is obtained, and correspondence cloud is determined according to destination address The type information of server;Wireless communication module calls corresponding translation-protocol according to the type information of Cloud Server;And nothing Second Type message is converted to first kind message by line communication module according to translation-protocol, and by first kind message send to Corresponding Cloud Server.
In the present embodiment, wireless communication module obtains cloud clothes by receiving the first kind message that Cloud Server is sent The type information of business device, wherein, wireless communication module is connected with multiple Cloud Servers;Wireless communication module is according to Cloud Server Type information call corresponding translation-protocol;And wireless communication module is converted to first kind message according to translation-protocol Second Type message, and Second Type message is sent to corresponding household electrical appliance, household electrical appliance can be made to be taken with corresponding cloud Business device connection, realizes the access of household electrical appliance and multiple Cloud Servers, effectively cloud access effect of the lifting based on wireless communication module Really.
Fig. 4 is the schematic flow sheet for the cloud access method based on wireless communication module that another embodiment of the present invention is proposed, The cloud access method based on wireless communication module includes:
S401:Wireless communication module receives the Second Type message that household electrical appliance are sent, and obtains Second Type message pair The destination address answered, and according to the type information of destination address determination correspondence Cloud Server.
In an embodiment of the present invention, the corresponding destination address mark Cloud Server of Second Type message, the destination address In the heading that Second Type message can be arranged on, it can be the reserved field in heading, other words can also be arranged on Section, the embodiment of the present invention is to this without concrete restriction.
Specifically, as shown in figure 3, reporting message exchanges flow for example, the serial data in wireless communication module receives and dispatches line Journey is received after the Second Type message that household electrical appliance are sent, and serial data receiving or sending thread creates serial ports transceiving data bag message team Row, and by Second Type message be added to serial ports transceiving data bag message queue in, in wireless communication module based on M-Smart The service logic thread of system is by the function interface of protocol conversion file in Cloud Server SDK from serial ports transceiving data bag message Second Type message is obtained in the corresponding serial data transmitting-receiving caching of queue, and, according in the heading of Second Type message Destination address determines the type information of corresponding Cloud Server.
S402:Wireless communication module calls corresponding translation-protocol according to the type information of Cloud Server.
Wherein, translation-protocol such as Ali cloud ali_sdk.c corresponding with the type information of Cloud Server protocol conversion It is agreement in file ali_profile.c, the agreement in Jingdone district cloud jd_sdk.c protocol conversion file jd_profile.c, small Agreement in rice cloud xm_sdk.c protocol conversion file xm_profile.c, and beautiful cloud md_sdk.c protocol conversion are literary Agreement in part md_profile.c.
S403:Second Type message is converted to first kind message by wireless communication module according to translation-protocol, and by One type message is sent to corresponding Cloud Server.
For example, wireless communication module carries out protocol conversion according to corresponding translation-protocol to Second Type message, the is obtained One type message, by first kind packet storage in the network data transmitting-receiving caching that cloud access system is distributed, and triggers application Service logic thread of the event call-back submodule control based on M-Smart systems receives and dispatches first kind message by network data Thread reports to Cloud Server.
In the present embodiment, wireless communication module is by receiving Second Type message and Second Type report that household electrical appliance are sent The corresponding destination address of text, the type information of correspondence Cloud Server is determined according to destination address;And wireless communication module according to Second Type message is converted to first kind message by translation-protocol corresponding with the type information of Cloud Server, and by the first kind Type message is sent to corresponding Cloud Server, and household electrical appliance can be made to corresponding Cloud Server reporting message, household electric is realized The access of device and multiple Cloud Servers, effectively cloud access effect of the lifting based on wireless communication module.
Fig. 5 is the structural representation for the wireless communication module 50 that another embodiment of the present invention is proposed, the wireless communication module 50 include serial data receiving or sending thread 51, for being communicated with household electrical appliance;Network data receiving or sending thread 52, for being taken with cloud Business device is communicated;Service logic thread 53, for being disappeared with serial data receiving or sending thread 51, network data receiving or sending thread 52 Breath is exchanged, and is controlled with the message to serial data receiving or sending thread 51 and the transmitting-receiving of network data receiving or sending thread 52;And main line Journey 54, main thread 54 is used to carry out serial data receiving or sending thread 51, network data receiving or sending thread 52 and service logic thread 53 Control;Application affairs adjust back submodule 55, and main thread 54 adjusts back the control business logic thread 53 of submodule 55 by application affairs; And application affairs message queue 56, read for receiving event message, and for main thread 54, wherein, event message includes should With event message and WIFI callback events message;The case distribution of state machine 58 handles submodule 57, for according to event message Event message is distributed to corresponding state machine 58 by mode attribute, wherein, mode attribute be AP-Mode, STA-Mode, or Any of System, reads the application affairs message and WIFI callback events message in application affairs message queue 56, matches somebody with somebody Put the State Transferring mechanism of wireless communication module 50;State machine 58, for controlling nothing according to event message and State Transferring mechanism The state of line communication module 50 is switched over.
In one embodiment of the invention, wireless communication module 50 include serial data receiving or sending thread 51, for family Electrical appliance is communicated.
Serial ports is serial line interface, is the expansion interface using serial communication mode.Wherein, serial communication mode refers to one The communication modes that every data of information are transmitted in order by turn.
Thread is the minimum unit that program performs stream, and the thread of a standard is by Thread Id, and current instruction pointer (PC) is posted Storage set and storehouse composition.File management or Control on Communication of the thread suitable for server.
For example, when wireless communication module 50 receives the message of household electrical appliance transmission, to the message with serial communication side Formula is handled, and the message after processing is reported into Cloud Server.
In one embodiment of the invention, wireless communication module 50 also include network data receiving or sending thread 52, for Cloud Server is communicated.
For example, when wireless communication module 50 receives the message of Cloud Server transmission by network data receiving or sending thread 52 When, the message is handled, the message after processing is issued to household electrical appliance.
In one embodiment of the invention, wireless communication module 50 also includes service logic thread 53, is used for and serial ports Data transmit-receive thread 51, network data receiving or sending thread 52 carry out message exchange, with to serial data receiving or sending thread 51 and network number The message received and dispatched according to receiving or sending thread 52 is controlled.
Wherein, the service logic thread 53 in the embodiment of the present invention is the service logic thread 53 based on M-Smart systems. The service content that M-Smart open systems are specifically provided, M-Smart systems are directed to using third party cloud, using beautiful built-in cloud, Unclouded three kinds of internet partners open docking form.
Specifically, service logic thread 53 is received and dispatched by M-Smart agreements and serial data receiving or sending thread 51, network data Thread 52 carries out message exchange.
Alternatively, service logic thread 53 obtains Cloud Server by network data receiving or sending thread 52 and sent to household electrical appliance First kind message;Service logic thread 53 obtains the type information of Cloud Server, and according to type information by the first kind Message is converted to Second Type message;Service logic thread 53 by serial data receiving thread by Second Type message send to Household electrical appliance.
Wherein, message is the data cell of exchange and transmission in network, i.e. the website data block disposably to be sent.Message The complete data message that will be sent is contained, its cause different in size, length is not limited and length is variable.By constantly by number Transmitted according to packet, bag, frame is packaged into.
In an embodiment of the present invention, the type information of Cloud Server can such as cloud ID, different cloud ID mark differences Cloud Server, cloud ID can be arranged in the heading of first kind message, can be the reserved field in heading, Other fields can be arranged on, the embodiment of the present invention is to this without concrete restriction.
Alternatively, the type information of Cloud Server is obtained, is specifically included:Wireless communication module 50 is obtained and Cloud Server phase The Socket link informations of connection;And wireless communication module 50 determines type information according to Socket link informations.
Issuing message exchanges flow for example, the network data receiving or sending thread 52 in wireless communication module 50 gets cloud service Device is sent to the first kind message of household electrical appliance, and network data receiving or sending thread 52 creates network transceiving data bag message team Row, and first kind message is added to network transceiving data bag message queue, in wireless communication module 50 based on M-Smart The service logic thread 53 of system is disappeared by the function interface of protocol conversion file in Cloud Server SDK from network transceiving data bag Cease in the corresponding network data transmitting-receiving caching of queue and obtain first kind message, according to the cloud in the heading of first kind message ID, carries out protocol conversion to first kind message, Second Type message is obtained, by Second Type packet storage in cloud access system Distribution serial data transmitting-receiving caching in, and trigger application affairs readjustment submodule 55 control the business based on M-Smart systems Second Type message is issued to household electrical appliance by logic thread 53 by serial data receiving or sending thread 51.Wherein, Cloud Server SDK In protocol conversion file for example, Ali's cloud ali_sdk.c protocol conversion file ali_profile.c, Jingdone district cloud jd_ Sdk.c protocol conversion file jd_profile.c, millet cloud xm_sdk.c protocol conversion file xm_profile.c, and Beautiful cloud md_sdk.c protocol conversion file md_profile.c.
Alternatively, wireless communication module 50 receives the Second Type message that household electrical appliance are sent, and obtains Second Type report The corresponding destination address of text, and according to the type information of destination address determination correspondence Cloud Server;Wireless communication module 50 Corresponding translation-protocol is called according to the type information of Cloud Server;And wireless communication module 50 according to translation-protocol by Equations of The Second Kind Type message is converted to first kind message, and first kind message is sent to corresponding Cloud Server.
In an embodiment of the present invention, the corresponding destination address mark Cloud Server of Second Type message, the destination address In the heading that Second Type message can be arranged on, it can be the reserved field in heading, other words can also be arranged on Section, the embodiment of the present invention is to this without concrete restriction.
Specifically, reporting message exchanges flow for example, the serial data receiving or sending thread 51 in wireless communication module 50 is received After the Second Type message that household electrical appliance are sent, serial data receiving or sending thread 51 creates serial ports transceiving data bag message queue, and By Second Type message be added to serial ports transceiving data bag message queue in, in wireless communication module 50 based on M-Smart systems The service logic thread 53 of system is by the function interface of protocol conversion file in Cloud Server SDK from serial ports transceiving data bag message Second Type message is obtained in the corresponding serial data transmitting-receiving caching of queue, according to destination in the heading of Second Type message The type information of the corresponding Cloud Server in location, carries out protocol conversion to Second Type message, first kind message is obtained, by first Type message be stored in cloud access system distribution network data transmitting-receiving caching in, and trigger application affairs readjustment submodule 55 control First kind message is reported to cloud by service logic thread 53 of the system based on M-Smart systems by network data receiving or sending thread 52 Server.
In one embodiment of the invention, wireless communication module 50 also includes main thread 54, and main thread 54 is used for string Mouth data transmit-receive thread 51, network data receiving or sending thread 52 and service logic thread 53 are controlled.
In one embodiment of the invention, wireless communication module 50 also includes application affairs readjustment submodule 55, main line Journey 54 adjusts back the control business logic thread 53 of submodule 55 by application affairs.
In one embodiment of the invention, wireless communication module 50 also includes application affairs message queue 56, for connecing The application affairs message of the generation of service logic thread 53 is received, and is read for main thread 54.
For example, when Cloud Server issuing message, or during household electrical appliance reporting message, the generation correspondence of service logic thread 53 Application affairs message, application affairs message is added in application affairs message queue 56 by service logic thread 53, so that main Thread 54 read the application affairs message, and trigger application affairs readjustment submodule 55 control the business based on M-Smart systems First kind message is reported to Cloud Server by logic thread 53 by network data receiving or sending thread 52, or, thing is applied in triggering Part readjustment submodule 55 controls the service logic thread 53 based on M-Smart systems to receive Second Type message by serial data Hair line journey 51 is issued to household electrical appliance.
In one embodiment of the invention, wireless communication module 50 also includes the case distribution of state machine 58 processing submodule 57, event message is distributed to corresponding state machine 58 for the mode attribute according to event message, wherein, mode attribute is Any of AP-Mode, STA-Mode, or System, read the application affairs message in application affairs message queue 56 With WIFI callback events message, the State Transferring mechanism of wireless communication module 50 is configured.
In one embodiment of the invention, wireless communication module 50 also includes state machine 58, for according to event message The state for controlling wireless communication module 50 with State Transferring mechanism is switched over.
Alternatively, main thread 54 is used to be managed the state machine 58 of wireless communication module 50.
Main thread 54 is used to be managed the state machine 58 of wireless communication module 50, specifically includes:Wireless communication module 50 receive event message;Event message is distributed to by corresponding state machine 58 according to the mode attribute of event message, wherein, pattern Attribute is AP-Mode, STA-Mode, or any of System;According to event message and the shape of corresponding state machine 58 The state of state transformation mechanism control wireless communication module 50 is switched over.
Alternatively, the flow embodiment that main thread 54 is managed to the state machine 58 of wireless communication module 50 refers to Fig. 6 With Fig. 7 embodiments.
In one embodiment of the invention, wireless communication module 50 also includes first serial reception data-message queue 59, first serial receives the message that data-message queue 59 is used to receive the transmission of serial data receiving or sending thread 51, and message is carried Supply service logic thread 53 is read out;First serial data receiver caching 510, first serial data receiver caching 510 connects The data of the transmission of serial data receiving or sending thread 51 are received and cached, and serve data to service logic thread 53 and are read out;The Two serial ports receive data-message queue 511, and second serial receives data-message queue 511 and sent out for receiving service logic thread 53 The message sent, and provide messages to serial data receiving or sending thread 51 and be read out;And second serial data receiver caching 512, second serial data receiver caching 512 is used for the data that cache business logic thread 53 is sent, and serves data to string Mouth data transmit-receive thread 51 is read out.
Specifically, during household electrical appliance reporting message, the serial data receiving or sending thread in wireless communication module 50 51 receive after the Second Type message that household electrical appliance are sent, and serial data receiving or sending thread 51 creates first serial and receives data-message Queue 59, and Second Type message is received in data-message queue 59 added to first serial, in wireless communication module 50 Service logic thread 53 based on M-Smart systems is by the function interface of protocol conversion file in Cloud Server SDK from first Serial ports receives in the corresponding first serial data receiver caching 510 of data-message queue 59 and obtains Second Type message, according to the The type information of the corresponding Cloud Server of destination address in the heading of two type messages, carries out agreement to Second Type message and turns Change, obtain first kind message.
Further, during Cloud Server issuing message, in wireless communication module 50 based on M-Smart systems Service logic thread 53 is by the function interface of protocol conversion file in Cloud Server SDK from network transceiving data bag message queue First kind message is obtained in corresponding network data transmitting-receiving caching, the cloud ID in the heading of first kind message is right First kind message carries out protocol conversion, obtains Second Type message, and Second Type packet storage is distributed in cloud access system Second serial receive in the corresponding second serial data receiver caching 512 of data-message queue 511, and trigger application affairs and return Tune module 55 controls the service logic thread 53 based on M-Smart systems that Second Type message is received and dispatched into line by serial data Journey 51 is issued to household electrical appliance.
Alternatively, it is read in the data of first serial data receiver caching 510 and second serial data receiver caching 512 Afterwards, data are deleted in first serial data receiver caching 510 and second serial data receiver caching 512.
In one embodiment of the invention, wireless communication module 50 also includes first network reception data-message queue 513, first network, which receives data-message queue 513, is used for the message that receiving network data receiving or sending thread 52 is sent, and by message It is supplied to service logic thread 53 to be read out;First network data receiver caching 514, first network data receiver caching 514 The data that simultaneously buffer network data transmit-receive thread 52 is sent are received, and serve data to service logic thread 53 and are read out; Second network receives data-message queue 515, and the second network, which receives data-message queue 515, to be used to receive service logic thread 53 The message of transmission, and provide messages to network data receiving or sending thread 52 and be read out;And the second network data order caching 516, the data that the second network data order caching 516 is received and cache business logic thread 53 is sent, and serve data to Network data receiving or sending thread 52 is read out.
Specifically, during household electrical appliance reporting message, first kind message is passed through by service logic thread 53 Two networks receive data-message queue 515 and are stored in the second network data order caching 516 of cloud access system distribution, and touch Hair application affairs readjustment submodule 55 controls the service logic thread 53 based on M-Smart systems that first kind message is passed through into net Network data transmit-receive thread 52 reports to Cloud Server.
Further, during Cloud Server issuing message, the first network in wireless communication module 50 receives data Message queue 513 gets Cloud Server and sent by network data receiving or sending thread 52 to the first kind message of household electrical appliance Afterwards, network data receiving or sending thread 52 creates first network data receiver caching 514, and first kind message is added into the first net Network data receiver caching 514, and serve data to service logic thread 53 and be read out, so that based on M-Smart systems Second Type message is issued to household electrical appliance by service logic thread 53 by serial data receiving or sending thread 51.
Alternatively, it is read in the data of first network data receiver caching 514 and the second network data order caching 516 Afterwards, data are deleted in first network data receiver caching 514 and the second network data order caching 516.
In one embodiment of the invention, wireless communication module 50 also includes WIFI event call-backs submodule 517, is used for WIFI callback events are received, and after WIFI callback events are received, WIFI callback events are added to application affairs message Queue 56.
Wherein, WIFI callback events are produced by application program.Application program is specially the application in wireless communication module 50 Program.
For example, after WIFI event call-backs submodule 517 receives WIFI callback events, WIFI callback events are added To application affairs message queue 56, read for main thread 54.
In the present embodiment, disappeared by service logic thread with serial data receiving or sending thread, network data receiving or sending thread Breath is exchanged, and is controlled with the message to serial data receiving or sending thread and the transmitting-receiving of network data receiving or sending thread, main thread is to serial ports Data transmit-receive thread, network data receiving or sending thread and service logic thread are controlled, and can realize the cooperation fortune of multiple threads OK, the thread scheduling effect effectively in lifting Cloud Server access procedure, is easy to the work(of later stage wireless communication module hardware system Can extension.Event message is distributed to by corresponding state machine by the mode attribute according to event message, wherein, mode attribute is Any of AP-Mode, STA-Mode, or System, and according to event message and the State Transferring of corresponding state machine The state of mechanism control wireless communication module is switched over, and can realize three kinds of state machines in the wireless communication module of household electrical appliance Cooperating operation, effectively lifting wireless communication module condition managing effect.
Fig. 6 is the method that the main thread that another embodiment of the present invention is proposed is managed to the state machine of wireless communication module Schematic flow sheet, the method that the main thread is managed to the state machine of wireless communication module includes:
S601:Wireless communication module receives event message.
In an embodiment of the present invention, wireless communication module is specially wireless WIFI communication modules.
Wherein, wireless WIFI communication modules support Wi-Fi technology, for household electrical appliance.
Household electrical appliance such as air conditioner, refrigerator, and water heater etc..
For example, user's family Asymmetrical Digital Subscriber Line (Asymmetric Digital Subscriber Line, ADSL), partial wideband etc., can connect wireless communication module to realize the nothing of mobile terminal by using family expenses Wi-Fi technology Line is surfed the Net.Further, user can also be interconnected household electrical appliance with corresponding Cloud Server by using wireless communication module, with Realize the resource-sharing of household electrical appliance and Cloud Server.
Wireless communication module in current household electrical appliance is used typically as receiving terminal, i.e., must rely on another network and carry Network connection is provided to household electrical appliance for device (for example, cable network).However, user may want to utilize radio communication The scope that module increase network signal is covered;Or, it is also possible to think while making wireless communication module that cable network is transformed into nothing Gauze network;Or, it is also possible to want to make wireless communication module as wireless base station (AP), interconnect electronic installation.It is related The wireless communication module in household electrical appliance in technology is typically only capable to provide one of which network morphology or function.
Alternatively, event message includes application affairs message and WIFI callback events message, and wireless communication module receives thing Part message, including:Application affairs message queue receives the application affairs message of service logic thread generation;WIFI event call-backs Module receives WIFI callback events message, and after WIFI callback events message is received, WIFI callback events message is added Add to application affairs message queue.
Wherein, application affairs message adjusts back submodule by application affairs by the main thread in wireless communication module and controls industry Business logic thread generation, WIFI callback events message is produced by application program.
Specifically, the event that application affairs message can actively produce for the upper layer application of wireless communication module, for example, nothing Line communication module cancels ap mode, then can produce AF_EVT_AP_STOP application affairs message.
The event that WIFI callback events message can be fed back for the WIFI bottoms of wireless communication module, for example, radio communication The ap mode of module is opened successfully, then can produce AF_EVT_AP_STARTED_SUCCESS WIFI callback events message.
Alternatively, before wireless communication module reception event message, in addition to:Configure the State Transferring of wireless communication module Mechanism.
S602:Event message is distributed to by corresponding state machine according to the mode attribute of event message, wherein, mode attribute Any of for AP-Mode, STA-Mode, or System.
Specifically, event message is distributed according to the mode attribute of event message by state machine events distribution processor submodule Any of to corresponding state machine, wherein, mode attribute is AP-Mode, STA-Mode, or System.
Wireless communication module supports focus (Access Point, AP) mode of operation AP-Mode, AP-Mode to apply in nothing The addition of line local area network member-ship equipment (i.e. client), i.e. network downstream there is provided wirelessly set up WLAN WLAN, Suitable WLAN central apparatus.Wireless communication module can also support workstation mode STA-Mode, it is understood that be some A work station in grid is client.When the WIFI chips of a wireless communication module provide STA-Mode functions, nothing Line communication module can be just connected among an other network.AP-Mode is supplied to mobile terminal etc. to connect, and STA-Mode is used In the data uplink service for providing network.In addition, the grid state of system where wireless communication module, i.e. radio communication mold Block network connection state in systems with network user, can be described by system state dependency, correspondence by System state machines carry out the handover management between system mode.
Wherein, state machine includes AP-Mode state machines, STA-Mode state machines, and System state machines, mode attribute AP-Mode corresponding A P-Mode state machines, mode attribute STA-Mode correspondence STA-Mode state machines, and mode attribute System correspondence System state machines.
S603:The state for controlling wireless communication module according to the State Transferring mechanism of event message and corresponding state machine is entered Row switching.
Wherein, the state of wireless communication module include AP-Mode state machines in set up in AP, AP operation in, Yi Jikong In connection in not busy three kinds of states, STA-Mode state machines, connect and idle three kinds of states;In System state machines Network is not set up, network has been set up and initializes three kinds of states.
Alternatively, the state of wireless communication module is controlled according to the State Transferring mechanism of event message and corresponding state machine Switch over, including:If the mode attribute of event message is AP-Mode, AP-Mode state machines according to event message and The state of the State Transferring mechanism control wireless communication module of AP-Mode state machines in setting up AP, it is in AP operations and idle Switched between three kinds of states;If the mode attribute of event message is STA-Mode, STA-Mode state machines are according to thing Part message and the State Transferring mechanism of STA-Mode state machines control wireless communication module state in this connection, connected, with And switched between idle three kinds of states;If the mode attribute of event message be System, System state machines according to The state of the State Transferring mechanism control wireless communication module of event message and System state machines is not set up in network, network Switched between three kinds of states of foundation and initialization.
In the present embodiment, event message is distributed to by corresponding state machine by the mode attribute according to event message, its In, mode attribute is AP-Mode, STA-Mode, or any of System, and according to event message and corresponding state The state of the State Transferring mechanism control wireless communication module of machine is switched over, and can realize three kinds of states in wireless communication module The condition managing effect of the cooperating operation of machine, effectively lifting wireless communication module.
Fig. 7 is the method that the main thread that another embodiment of the present invention is proposed is managed to the state machine of wireless communication module Schematic flow sheet, the method that the main thread is managed to the state machine of wireless communication module includes:
S701:Configure the State Transferring mechanism of wireless communication module.
Wireless communication module is specially wireless WIFI communication modules.
Wherein, wireless WIFI communication modules support Wi-Fi technology, for household electrical appliance.
Specifically, by state machine events distribution processor submodule by AP-Mode state machines, STA-Mode state machines, with And the status attribute superposition of System state machines, to configure the State Transferring mechanism of wireless communication module.
Wherein, the status attribute of state machine is used for the state for identifying wireless communication module.
By this step, the plug-in in wireless communication module can be made to call the status attribute configured, made wireless Communication module can be switched between different states, realize the cooperating operation of three kinds of state machines in wireless communication module.
S702:Application affairs message queue receives the application affairs message of service logic thread generation.
Wherein, application affairs message adjusts back submodule by application affairs by the main thread in wireless communication module and controls industry Business logic thread generation.
Specifically, the event that application affairs message can actively produce for the upper layer application of wireless communication module, for example, nothing Line communication module cancels ap mode, then can produce AF_EVT_AP_STOP application affairs message.
S703:WIFI event call-backs submodule receives WIFI callback events message, and disappears receiving WIFI callback events After breath, WIFI callback events message is added to application affairs message queue.
The event that WIFI callback events message can be fed back for the WIFI bottoms of wireless communication module, for example, radio communication The ap mode of module is opened successfully, then can produce AF_EVT_AP_STARTED_SUCCESS WIFI callback events message.
S704:Read the application affairs message and WIFI callback events message in application affairs message queue.
Specifically, read by the main thread in wireless communication module by state machine events distribution processor submodule and apply thing Application affairs message and WIFI callback events message in part message queue.
S705:Event message is distributed to by corresponding state machine according to the mode attribute of event message, wherein, mode attribute Any of for AP-Mode, STA-Mode, or System.
Specifically, event message is distributed according to the mode attribute of event message by state machine events distribution processor submodule Any of to corresponding state machine, wherein, mode attribute is AP-Mode, STA-Mode, or System.
Wireless communication module supports focus (Access Point, AP) mode of operation AP-Mode, AP-Mode to apply in nothing The addition of line local area network member-ship equipment (i.e. client), i.e. network downstream there is provided wirelessly set up WLAN WLAN, Suitable WLAN central apparatus.Wireless communication module can also support workstation mode STA-Mode, it is understood that be some A work station in grid is client.When the WIFI chips of a wireless communication module provide STA-Mode functions, nothing Line communication module can be just connected among an other network.AP-Mode is supplied to mobile terminal etc. to connect, and STA-Mode is used In the data uplink service for providing network.In addition, the grid state of system where wireless communication module, i.e. radio communication mold Block network connection state in systems with network user, can be described by system state dependency, correspondence by System state machines carry out the handover management between system mode.
Wherein, state machine includes AP-Mode state machines, STA-Mode state machines, and System state machines, mode attribute AP-Mode corresponding A P-Mode state machines, mode attribute STA-Mode correspondence STA-Mode state machines, and mode attribute System correspondence System state machines.
Condition managing is carried out respectively by the way that event message is distributed into corresponding state machine, it is hard in wireless communication module bottom The logicality of code structure can be strengthened in terms of part realization, the complexity of code development is reduced, be easy to later stage wireless communication module The Function Extension of hardware system.
S706:Switched over according to the state of event message and State Transferring mechanism control wireless communication module.
Specifically, as shown in figure 8, being radio communication mold bulk state switching schematic diagram in the embodiment of the present invention, wherein, bag Include:AP-Mode state machines 81, STA-Mode state machines 82, System state machines 83, state machine events distribution processor submodule 84th, application affairs message queue 85, AP-Mode state machine states switching flow 86, STA-Mode state machine state switching flows 87, and System state machine states switching flow 88.
Wireless communication module can be controlled according to the content of event message and the State Transferring mechanism of corresponding state machine State is switched over.
For example, as shown in figure 8, wireless communication module cancellation ap mode, then can produce AF_EVT_AP_STOP application affairs Message, the content of the AF_EVT_AP_STOP application affairs message is cancels ap mode, when wireless communication module is in AP operations In state, and the main thread of wireless communication module is when reading the AF_EVT_AP_STOP application affairs message, AP-Mode shapes State machine controls wireless communication module to switch to idle state by the operating states of AP.
In the present embodiment, by configuring the State Transferring mechanism of wireless communication module, it can make in wireless communication module Plug-in calls the status attribute configured, wireless communication module is switched between different states, passes through basis Event message is distributed to corresponding state machine by the mode attribute of event message, wherein, mode attribute is AP-Mode, STA- Any of Mode, or System, and controlled wirelessly according to the State Transferring mechanism of event message and corresponding state machine The state of communication module is switched over, and can be realized the cooperating operation of three kinds of state machines in wireless communication module, effectively be lifted nothing The condition managing effect of line communication module.Condition managing is carried out respectively by the way that event message is distributed into corresponding state machine, The logicality of code structure can be strengthened in terms of the realization of wireless communication module bottom hardware, the complexity of code development is reduced, just In the Function Extension of later stage wireless communication module hardware system.
Fig. 9 is the structural representation for the cloud access system based on wireless communication module 91 that another embodiment of the present invention is proposed Figure, the cloud access system 90 based on wireless communication module 91 of being somebody's turn to do includes wireless communication module 91, passes through the phase of wireless communication module 91 The Cloud Server 92 and household electrical appliance 93 of mutual communication, wherein, wireless communication module 91 includes:Serial data receiving or sending thread, is used Communicated in household electrical appliance 93;Network data receiving or sending thread, for being communicated with Cloud Server 92;Service logic line Journey, for carrying out message exchange with serial data receiving or sending thread, network data receiving or sending thread, with to serial data receiving or sending thread and The message of network data receiving or sending thread transmitting-receiving is controlled;And main thread, main thread is for serial data receiving or sending thread, net Network data transmit-receive thread and service logic thread are controlled;Application affairs adjust back submodule, and main thread is returned by application affairs Tune module control traffic logic thread;And application affairs message queue, read for receiving event message, and for main thread Take, wherein, event message includes application affairs message and WIFI callback events message;State machine events distribution processor submodule, Event message is distributed to corresponding state machine for the mode attribute according to event message, wherein, mode attribute is AP- Any of Mode, STA-Mode, or System, read the application affairs message and WIFI in application affairs message queue Callback events message, configures the State Transferring mechanism of wireless communication module 91;State machine, for being turned according to event message and state The state for changing mechanism control wireless communication module 91 is switched over.
Cloud Server 92 as a kind of hot technology in recent years and development trend, its principle be exactly by resource-sharing with Reach while reduce cost, improve the efficiency of IT basic platform resilient expansions.The construction of current Cloud Server 92 is it is intended that wide Large user provides service on demand.Cloud Server 92 carries a large amount of important operation systems and data, while different household electrics Device 93 needs access Cloud Server 92 to provide the user with related service, thus the access of Cloud Server 92 exist many demands and Challenge.
In one embodiment of the invention, being somebody's turn to do the cloud access system based on wireless communication module 91 includes radio communication mold Block 91.
Wherein, the implementation of wireless communication module 91 such as Fig. 5 embodiments, will not be repeated here.
In one embodiment of the invention, being somebody's turn to do the cloud access system based on wireless communication module 91 is also included by wireless Cloud Server 92 and household electrical appliance 93 that communication module 91 is in communication with each other.
Wherein, Cloud Server 92 be a kind of simple efficient, safe and reliable, disposal ability can elastic telescopic calculating service. Cloud Server 92 is used for the service that integrated service ability is provided to all kinds of Internet users.The Cloud Server 92 such as cloud of U.S., capital Eastern cloud, A Liyun, or millet cloud.
Cloud Server 92 has intelligent cloud access, intelligent cloud storage, and the function that intelligent information is pushed.When user passes through After using wireless communication module 91, household electrical appliance 93 are interconnected with corresponding Cloud Server 92, Cloud Server 92 can push away resource Household electrical appliance 93 are delivered to, user can be controlled by the application program of household electrical appliance in mobile terminal 93 to household electrical appliance 93 System.
For example, beautiful use of microwave ovens function has Cookbooks resource newly developed, micro-wave oven manufacturer is newly developed by this Cookbooks resource be stored in the intelligent cloud storage of the cloud of U.S., when user will be beautiful micro- by using wireless communication module 91 After ripple stove is interconnected with beautiful cloud, beautiful cloud can be by the Cookbooks resource supplying newly developed to beautiful micro-wave oven, so that user Cookbooks resource newly developed can be performed by the beautiful micro-wave oven of the application program controlling of the micro-wave oven of mobile terminal Sino-U.S..
Household electrical appliance 93 refer to the various Electrical and Electronic utensils used in family and similar site.Household electrical appliance 93 are for example Television set, refrigerator, or air conditioner etc..
With the continuous progress and user's growth in the living standard of smart home technology, the increasing energy of household electrical appliance 93 Enough to realize intelligent operating, user can install the application program of household electrical appliance 93 in the terminal, pass through application program control Household electrical appliance 93 processed are operated, and user can also be taken household electrical appliance 93 with corresponding cloud by using wireless communication module 91 Business device 92 is interconnected.
Specifically, user can pass through the household electrical appliance 93 of the operation system needed in acquisition Cloud Server 92 and data Wireless communication module 91 accesses corresponding Cloud Server 92, to realize the shared of resource in Cloud Server 92.
For example, it is desired to it is beautiful air conditioner to obtain the household electrical appliance 93 of operation system in Cloud Server 92 and data, it is beautiful Air conditioner need to share the resource of agreement matching from beautiful Cloud Server 92, therefore, beautiful air conditioner is passed through into channel radio Letter module 91 accesses the cloud of U.S., with realize the air conditioner of U.S. with beautiful cloud resource it is shared, or, can also be by beautiful air-conditioning Device accesses millet cloud by wireless communication module 91, and resource is shared in the air conditioner and millet cloud to realize U.S..
In the present embodiment, disappeared by service logic thread with serial data receiving or sending thread, network data receiving or sending thread Breath is exchanged, and is controlled with the message to serial data receiving or sending thread and the transmitting-receiving of network data receiving or sending thread, main thread is to serial ports Data transmit-receive thread, network data receiving or sending thread and service logic thread are controlled, and can realize the cooperation fortune of multiple threads OK, the thread scheduling effect effectively in lifting Cloud Server access procedure, is easy to the work(of later stage wireless communication module hardware system Can extension.Event message is distributed to by corresponding state machine by the mode attribute according to event message, wherein, mode attribute is Any of AP-Mode, STA-Mode, or System, and according to event message and the State Transferring of corresponding state machine The state of mechanism control wireless communication module is switched over, and can realize three kinds of state machines in the wireless communication module of household electrical appliance Cooperating operation, effectively lifting wireless communication module condition managing effect.
It should be noted that in the description of the invention, term " first ", " second " etc. are only used for describing purpose, without It is understood that to indicate or imply relative importance.In addition, in the description of the invention, unless otherwise indicated, the implication of " multiple " It is two or more.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include Module, fragment or the portion of the code of one or more executable instructions for the step of realizing specific logical function or process Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not be by shown or discussion suitable Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In embodiment, the software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried Rapid to can be by program to instruct the hardware of correlation to complete, described program can be stored in a kind of computer-readable storage medium In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing module, can also That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.The integrated module is such as Fruit is realized using in the form of software function module and as independent production marketing or in use, can also be stored in a computer In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means to combine specific features, structure, material or the spy that the embodiment or example are described Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not Necessarily refer to identical embodiment or example.Moreover, specific features, structure, material or the feature of description can be any One or more embodiments or example in combine in an appropriate manner.
Although embodiments of the invention have been shown and described above, it is to be understood that above-described embodiment is example Property, it is impossible to limitation of the present invention is interpreted as, one of ordinary skill in the art within the scope of the invention can be to above-mentioned Embodiment is changed, changed, replacing and modification.

Claims (23)

1. a kind of cloud access method based on wireless communication module, the wireless communication module is used for household electrical appliance, its feature exists In comprising the following steps:
Wireless communication module receives the first kind message that Cloud Server is sent, and obtains the type information of the Cloud Server, Wherein, the wireless communication module is connected with multiple Cloud Servers;
The wireless communication module calls corresponding translation-protocol according to the type information of the Cloud Server;And
The first kind message is converted to Second Type message by the wireless communication module according to the translation-protocol, and will The Second Type message is sent to corresponding household electrical appliance;
Also include in the wireless communication module:
WIFI event call-back submodules, will for receiving WIFI callback events, and after the WIFI callback events are received The WIFI callback events are added to application affairs message queue, and the WIFI callback events are produced by application program;
The wireless communication module includes:
Serial data receiving or sending thread, for being communicated with the household electrical appliance;
Network data receiving or sending thread, for being communicated with the Cloud Server;
Service logic thread, for carrying out message exchange with the serial data receiving or sending thread, the network data receiving or sending thread, It is controlled with the message to the serial data receiving or sending thread and network data receiving or sending thread transmitting-receiving;And
Main thread, the main thread is used for the serial data receiving or sending thread, network data receiving or sending thread and service logic line Journey is controlled;
Also include in the wireless communication module:
Application affairs adjust back submodule, and the main thread adjusts back submodule by the application affairs and controls the service logic line Journey;And
Application affairs message queue, for receiving the application affairs message of the service logic thread generation, and supplies the main line Journey is read.
2. the cloud access method as claimed in claim 1 based on wireless communication module, it is characterised in that the acquisition cloud The type information of server is specifically included:
The wireless communication module obtains the Socket link informations being connected with the Cloud Server;And
The wireless communication module determines the type information according to the Socket link informations.
3. the cloud access method as claimed in claim 1 based on wireless communication module, it is characterised in that also include:
Wireless communication module receives the Second Type message that household electrical appliance are sent, and obtains the corresponding mesh of the Second Type message Address, and according to the destination address determine correspondence Cloud Server type information;
The wireless communication module calls corresponding translation-protocol according to the type information of the Cloud Server;And
The Second Type message is converted to first kind message by the wireless communication module according to the translation-protocol, and will The first kind message is sent to corresponding Cloud Server.
4. the cloud access method as claimed in claim 1 based on wireless communication module, it is characterised in that the radio communication mold Also include in block:
First serial receives data-message queue, and the first serial, which receives data-message queue, to be used to receive the serial data The message that receiving or sending thread is sent, and it is supplied to the service logic thread to be read out the message;
First serial data receiver is cached, and the first serial data receiver caching receives and caches the serial data transmitting-receiving line The data that journey is sent, and it is supplied to the service logic thread to be read out the data;
Second serial receives data-message queue, and the second serial, which receives data-message queue, to be used to receive the service logic The message that thread is sent, and it is supplied to the serial data receiving or sending thread to be read out the message;And
Second serial data receiver is cached, and the second serial data receiver caching receives and caches the service logic thread hair The data sent, and it is supplied to the serial data receiving or sending thread to be read out the data.
5. the cloud access method as claimed in claim 4 based on wireless communication module, it is characterised in that in the first serial After the data that data receiver is cached and second serial data receiver is cached are read, by the data in the first serial number According to deletion in order caching and second serial data receiver caching.
6. the cloud access method as claimed in claim 1 based on wireless communication module, it is characterised in that the radio communication mold Also include in block:
First network receives data-message queue, and the first network, which receives data-message queue, to be used to receive the network data The message that receiving or sending thread is sent, and it is supplied to the service logic thread to be read out the message;
First network data receiver is cached, and the first network data receiver caching receives and caches the network data transmitting-receiving line The data that journey is sent, and it is supplied to the service logic thread to be read out the data;
Second network receives data-message queue, and second network, which receives data-message queue, to be used to receive the service logic The message that thread is sent, and it is supplied to the network data receiving or sending thread to be read out the message;And
Second network data order caching, the second network data order caching receives and caches the service logic thread hair The data sent, and it is supplied to the network data receiving or sending thread to be read out the data.
7. the cloud access method as claimed in claim 6 based on wireless communication module, it is characterised in that in the first network After the data of data receiver caching and the second network data order caching are read, by the data in the first network number Deleted according in order caching and the second network data order caching.
8. the cloud access method as claimed in claim 1 based on wireless communication module, it is characterised in that the main thread is used for The state machine of the wireless communication module is managed.
9. the cloud access method as claimed in claim 8 based on wireless communication module, it is characterised in that the main thread is used for The state machine of the wireless communication module is managed, specifically included:
The wireless communication module receives event message;
The event message is distributed to by corresponding state machine according to the mode attribute of the event message, wherein, the pattern Attribute is AP-Mode, STA-Mode, or any of System;
The shape of the wireless communication module is controlled according to the State Transferring mechanism of the event message and the corresponding state machine State is switched over.
10. the cloud access method as claimed in claim 9 based on wireless communication module, it is characterised in that the radio communication Module is received before event message, in addition to:
Configure the State Transferring mechanism of the wireless communication module.
11. the cloud access method as claimed in claim 10 based on wireless communication module, it is characterised in that the state machine bag Include AP-Mode state machines, STA-Mode state machines, and System state machines, the mode attribute AP-Mode corresponding As P- Mode state machines, mode attribute STA-Mode correspondence STA-Mode state machines, and mode attribute System correspondences System state machines.
12. the cloud access method as claimed in claim 10 based on wireless communication module, it is characterised in that described in the configuration The State Transferring mechanism of wireless communication module, including:
The status attribute of the AP-Mode state machines, the STA-Mode state machines, and the System state machines is folded Plus, to configure the State Transferring mechanism of the wireless communication module.
13. the cloud access method as claimed in claim 9 based on wireless communication module, it is characterised in that the radio communication The state of module includes setting up in AP in AP-Mode state machines, in AP operations and idle three kinds of states, STA-Mode shapes In connection in state machine, connect and idle three kinds of states;Network in System state machines is not set up, network has been set up, And three kinds of states of initialization.
14. the cloud access method as claimed in claim 13 based on wireless communication module, it is characterised in that described in the basis The State Transferring mechanism of event message and the corresponding state machine controls the state of the wireless communication module to switch over, and wraps Include:
If the mode attribute of the event message is AP-Mode, AP-Mode state machines are according to the event message and described The State Transferring mechanism of AP-Mode state machines control the state of the wireless communication module in setting up AP, in AP operations and Switched between idle three kinds of states;
If the mode attribute of the event message is STA-Mode, STA-Mode state machines are according to the event message and institute State STA-Mode state machines State Transferring mechanism control the state of the wireless communication module in this connection, connected and Switched between idle three kinds of states;
If the mode attribute of the event message is System, System state machines are according to the event message and described The State Transferring mechanism of System state machines controls the state of the wireless communication module network is not set up, network has been set up, And switched between three kinds of states of initialization.
15. the cloud access method as claimed in claim 9 based on wireless communication module, it is characterised in that the event message Including application affairs message and WIFI callback events message, the wireless communication module receives event message, including:
The application affairs message queue receives the application affairs message of the service logic thread generation;
The WIFI event call-backs submodule receives the WIFI callback events message, and is receiving the WIFI callback events After message, the WIFI callback events message is added to the application affairs message queue.
16. the cloud access method as claimed in claim 15 based on wireless communication module, it is characterised in that also include:
Read the application affairs message and the WIFI callback events message in the application affairs message queue.
17. a kind of cloud access system based on wireless communication module, the wireless communication module is used for household electrical appliance, its feature exists In, including wireless communication module, the Cloud Server and household electrical appliance that are in communication with each other by the wireless communication module, wherein, institute Stating wireless communication module includes:
Serial data receiving or sending thread, for being communicated with the household electrical appliance;
Network data receiving or sending thread, for being communicated with the Cloud Server;
Service logic thread, for carrying out message exchange with the serial data receiving or sending thread, the network data receiving or sending thread, It is controlled with the message to the serial data receiving or sending thread and network data receiving or sending thread transmitting-receiving;
Main thread, the main thread is used for the serial data receiving or sending thread, network data receiving or sending thread and service logic line Journey is controlled;
Application affairs adjust back submodule, and the main thread adjusts back submodule by the application affairs and controls the service logic line Journey;And
Application affairs message queue, reads for receiving event message, and for the main thread, wherein, the event message bag Include application affairs message and WIFI callback events message;
State machine events distribution processor submodule, distributes the event message for the mode attribute according to the event message Any of to corresponding state machine, wherein, the mode attribute is AP-Mode, STA-Mode, or System, read The application affairs message and WIFI callback events message in the application affairs message queue, configure the radio communication mold The State Transferring mechanism of block;
State machine, for controlling the state of the wireless communication module to be cut according to the event message and State Transferring mechanism Change.
18. the cloud access system as claimed in claim 17 based on wireless communication module, it is characterised in that the radio communication Also include in module:
First serial receives data-message queue, and the first serial, which receives data-message queue, to be used to receive the serial data The message that receiving or sending thread is sent, and it is supplied to the service logic thread to be read out the message;
First serial data receiver is cached, and the first serial data receiver caching receives and caches the serial data transmitting-receiving line The data that journey is sent, and it is supplied to the service logic thread to be read out the data;
Second serial receives data-message queue, and the second serial, which receives data-message queue, to be used to receive the service logic The message that thread is sent, and it is supplied to the serial data receiving or sending thread to be read out the message;And
Second serial data receiver is cached, and the second serial data receiver caching receives and caches the service logic thread hair The data sent, and it is supplied to the serial data receiving or sending thread to be read out the data.
19. the cloud access system as claimed in claim 18 based on wireless communication module, it is characterised in that in the described first string After the data that mouth data receiver caching and second serial data receiver are cached are read, by the data in the first serial Data receiver is cached to be deleted with second serial data receiver caching.
20. the cloud access system as claimed in claim 17 based on wireless communication module, it is characterised in that the radio communication Also include in module:
First network receives data-message queue, and the first network, which receives data-message queue, to be used to receive the network data The message that receiving or sending thread is sent, and it is supplied to the service logic thread to be read out the message;
First network data receiver is cached, and the first network data receiver caching receives and caches the network data transmitting-receiving line The data that journey is sent, and it is supplied to the service logic thread to be read out the data;
Second network receives data-message queue, and second network, which receives data-message queue, to be used to receive the service logic The message that thread is sent, and it is supplied to the network data receiving or sending thread to be read out the message;And
Second network data order caching, the second network data order caching receives and caches the service logic thread hair The data sent, and it is supplied to the network data receiving or sending thread to be read out the data.
21. the cloud access system as claimed in claim 20 based on wireless communication module, it is characterised in that in first net After the data of network data receiver caching and the second network data order caching are read, by the data in the first network Data receiver is cached to be deleted with the second network data order caching.
22. the cloud access system as claimed in claim 17 based on wireless communication module, it is characterised in that the radio communication Also include in module:
WIFI event call-back submodules, will for receiving WIFI callback events, and after the WIFI callback events are received The WIFI callback events are added to the application affairs message queue.
23. the cloud access system as claimed in claim 22 based on wireless communication module, it is characterised in that the WIFI readjustments Event is produced by application program.
CN201510932189.2A 2015-12-14 2015-12-14 Cloud access method and system based on wireless communication module Active CN105871993B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510932189.2A CN105871993B (en) 2015-12-14 2015-12-14 Cloud access method and system based on wireless communication module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510932189.2A CN105871993B (en) 2015-12-14 2015-12-14 Cloud access method and system based on wireless communication module

Publications (2)

Publication Number Publication Date
CN105871993A CN105871993A (en) 2016-08-17
CN105871993B true CN105871993B (en) 2017-08-25

Family

ID=56623778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510932189.2A Active CN105871993B (en) 2015-12-14 2015-12-14 Cloud access method and system based on wireless communication module

Country Status (1)

Country Link
CN (1) CN105871993B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454201B (en) * 2017-07-07 2021-06-25 台州市吉吉知识产权运营有限公司 Information interaction method and system for intelligent equipment
CN108924066B (en) * 2018-06-20 2020-09-08 新华三技术有限公司 Message forwarding method and device
CN113726829A (en) * 2020-05-25 2021-11-30 青岛海尔洗衣机有限公司 Method and device for controlling household appliance, wireless terminal and storage medium
CN111901209B (en) * 2020-07-03 2022-08-16 惠州拓邦电气技术有限公司 Internet of things communication method, internet of things communication board, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102820988A (en) * 2012-08-01 2012-12-12 广东志高空调有限公司 Household appliance control method and system
CN103346938A (en) * 2013-06-25 2013-10-09 重庆邮电大学 Intelligent housing system based on cloud computing service
CN103941667A (en) * 2013-12-31 2014-07-23 海尔集团公司 Method, system and device for controlling household appliances

Also Published As

Publication number Publication date
CN105871993A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
CN105871992B (en) Cloud access system and method based on wireless communication module
CN109412770B (en) Communication means and device
CN106954267B (en) A kind of method for managing resource based on wireless network slice
CN105871993B (en) Cloud access method and system based on wireless communication module
CN103354993B (en) Promote equipment to equipment communication
CN100466821C (en) Wireless switch-in network, method for grouped transmission and method for terminal switch
CN104902424A (en) Control method, device and system for wireless intelligent equipment
CN104994530B (en) More Wi-Fi internet of things equipment grouping collective's control system and method based on group MAC Address
CN105359572A (en) Small cell network architecture for servicing multiple network operators
CN108370398A (en) The system and method that status of user equipment for multiple services configures
CN105871991B (en) Cloud access system and method based on wireless communication module
CN105353738B (en) The control method and system of household electrical appliance
CN106465471A (en) System and method for communicating wireless transmissions spanning both licensed and un-licensed spectrum
CN1984434B (en) Wireless telecommunication system and method for managing wireless resource and cell switching method
CN105406978A (en) Method and apparatus for configuring operating mode of data forwarding device
CN105578513A (en) Communication method, equipment and communication system
CN101841929A (en) Wireless control terminal of electrical appliance with networking capability
CN105791377B (en) Cloud access system and method based on wireless communication module
CN104363658A (en) Method and system for managing direct-connection communication resources
CN105578505B (en) State management method of wireless communication module and wireless communication module
CN106292312B (en) The control method and equipment of ZigBee pairing grouping
CN1984435B (en) Wireless telecommunication system and method for managing wireless resource and switching cell
CN106162753B (en) A kind of resource allocation methods and device
CN100563183C (en) The method of access network of WiMAX system and access core net
WO2022001332A1 (en) Networking device and method for nsa, and mobile communication system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20170315

Address after: 528311 Guangdong, Foshan, Beijiao, the United States, the United States and the United States on the avenue of the United States, the headquarters of the United States building B floor, District, 26-28

Applicant after: Midea Group Co., Ltd.

Applicant after: Midea Smart Home Technology Co., Ltd.

Address before: 528311 Guangdong, Foshan, Beijiao, the United States, the United States and the United States on the avenue of the United States, the headquarters of the United States building B floor, District, 26-28

Applicant before: Midea Group Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant