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

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

Info

Publication number
CN105871992B
CN105871992B CN201510932082.8A CN201510932082A CN105871992B CN 105871992 B CN105871992 B CN 105871992B CN 201510932082 A CN201510932082 A CN 201510932082A CN 105871992 B CN105871992 B CN 105871992B
Authority
CN
China
Prior art keywords
message
wireless communication
communication module
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
CN201510932082.8A
Other languages
Chinese (zh)
Other versions
CN105871992A (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 CN201510932082.8A priority Critical patent/CN105871992B/en
Publication of CN105871992A publication Critical patent/CN105871992A/en
Application granted granted Critical
Publication of CN105871992B publication Critical patent/CN105871992B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering 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

Abstract

The invention provides a cloud access system and method based on a wireless communication module. The cloud access system based on the wireless communication module comprises the wireless communication module, cloud servers and a household appliance, wherein the wireless communication module comprises a serial data receiving and sending thread, a network data receiving and sending thread, a business logic thread used for carrying out information exchange with the serial data receiving and sending thread and the network data receiving and sending thread to control information received and sent by the serial data receiving and sending thread and the network data receiving and sending thread, a main thread used for controlling the serial data receiving and sending thread, the network data receiving and sending thread and the business logic thread, a first serial receiving data message queue, a first serial data receiving cache, a second serial receiving data message queue and a second serial data receiving cache. Through the cloud access system and method, a management effect of the message queues in a cloud server access process is effectively improved, so that the access processes of the multiple cloud servers and the household appliance are more efficient and convenient.

Description

Cloud access system and method based on wireless communication module
Technical field
The present invention relates to communication technical field, more particularly to a kind of cloud access system and side based on wireless communication module Method.
Background technology
Cloud Server is exactly by resource-sharing as a kind of hot technology in recent years and development trend, its cardinal principle To reach while reduces cost, 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 Need to access Cloud Server to provide the user with related service.
Therefore, it is necessary to realize that household electrical appliance are convenient with multiple Cloud Servers, 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 system based on wireless communication module, Neng Gouyou The management effect of message queue, makes the access procedure of multiple Cloud Servers and household electrical appliance in effect lifting Cloud Server access procedure It is more efficient, convenient.
It is another object of the present invention to propose a kind of cloud access method based on wireless communication module.
To reach above-mentioned purpose, the cloud access system based on wireless communication module that first aspect present invention embodiment is proposed System, 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 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, is received with to the serial data receiving or sending thread and the network data receiving or sending thread The message of hair is controlled;Main thread, the main thread is used for the serial data receiving or sending thread, network data receiving or sending thread It is controlled with service logic thread;First serial receives data-message queue, and the first serial receives data-message queue For receiving the message that the serial data receiving or sending thread sends, and it is supplied to the service logic thread to carry out the message Read;First serial data receiver is cached, and the first serial data receiver caching is received and caches the serial data transmitting-receiving The data that thread sends, and it is supplied to the service logic thread to be read out the data;Second serial receives data and disappears Breath queue, the second serial receives data-message queue is used to receiving the message that the service logic thread sends, and by institute Stating message is supplied to the serial data receiving or sending thread to be read out;And second serial data receiver caching, second string Mouth data receiver caching receives and caches the data that the service logic thread sends, and the data are supplied into the serial ports Data transmit-receive thread is read out.
The cloud access system based on wireless communication module that first aspect present invention embodiment is proposed, by 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 first serial receives data-message queue and receives the message that serial data receiving or sending thread sends, and Service logic thread is provided messages to be read out;First serial data receiver caching is received and caches serial data transmitting-receiving line The data that journey sends, and serve data to service logic thread and be read out;Second serial receives data-message queue and receives The message that service logic thread sends, and provide messages to serial data receiving or sending thread and be read out;Second serial data connect The data that caching is received and cache business logic thread sends are received, and serves data to serial data receiving or sending thread and read Take, can effectively lift the management effect of message queue in Cloud Server access procedure, make multiple Cloud Servers and household electrical appliance Access procedure it is more efficient, convenient.
To reach above-mentioned purpose, the cloud access side based on wireless communication module that second aspect present invention embodiment is proposed Method, including:Wireless communication module receives the first kind message that Cloud Server sends, 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 second aspect present invention embodiment is proposed, wireless communication module leads to Cross and receive the first kind message that Cloud Server sends, 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, realize household electrical appliance with multiple cloud services The access of device, effectively cloud access effect of the lifting based on wireless communication module.
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 practice of the invention.
Brief description of the drawings
The above-mentioned and/or additional aspect of the present invention 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 structural representation of the cloud access system 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 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. 4 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. 5 is radio communication mold bulk state switching schematic diagram in the embodiment of the present invention;
Fig. 6 is the schematic flow sheet of the cloud access method based on wireless communication module that another embodiment of the present invention is proposed;
Fig. 7 is the schematic flow sheet of the cloud access method based on wireless communication module that another embodiment of the present invention is proposed.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from start to finish Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached It is exemplary to scheme the embodiment of description, is only used for explaining the present invention, and is not considered as limiting the invention.Conversely, this Inventive embodiment includes all changes fallen into the range of the spiritual and intension of attached claims, modification and is equal to Thing.
Fig. 1 is the structural representation of the cloud access system based on wireless communication module that one embodiment of the invention is proposed, should The cloud that cloud access system based on wireless communication module is included wireless communication module 50, is in communication with each other by wireless communication module 50 Server 51 and household electrical appliance 52, wherein, wireless communication module 50 includes:Serial data receiving or sending thread 501, for family expenses Electrical equipment 52 is communicated;Network data receiving or sending thread 502, for being communicated with Cloud Server 51;Service logic thread 503, For carrying out message exchange with serial data receiving or sending thread 501, network data receiving or sending thread 502, line is received and dispatched with to serial data Journey 501 and the message of the transmitting-receiving of network data receiving or sending thread 502 are controlled;Main thread 504, main thread 504 is used for serial ports number It is controlled according to receiving or sending thread 501, network data receiving or sending thread 502 and service logic thread 503;First serial receives data and disappears Breath queue 505, first serial receives data-message queue 505 is used to receive the message of the transmission of serial data receiving or sending thread 501, and Service logic thread 503 is provided messages to be read out;First serial data receiver caching 506, first serial data receiver Caching 506 is received and caches the data of the transmission of serial data receiving or sending thread 501, and serves data to service logic thread 503 It is read out;Second serial receives data-message queue 507, and second serial receives data-message queue 507 to be used to receive business The message that logic thread 503 sends, and provide messages to serial data receiving or sending thread 501 and be read out;And second serial Data receiver caching 508, the data that second serial data receiver caching 508 is received and cache business logic thread 503 sends, and Serial data receiving or sending thread 501 is served data to be read out.
Cloud Server 51 as a kind of hot technology in recent years and development trend, its principle be exactly by resource-sharing with While reaching reduces cost, the efficiency of IT basic platform resilient expansions is improved.The construction of current Cloud Server 51 is it is intended that wide Large user provides service on demand.Cloud Server 51 carries a large amount of important operation systems and data, while different household electrics Device 52 needs to access Cloud Server 51 to provide the user with related service, thus Cloud Server 51 access exist many demands and Challenge.
In one embodiment of the invention, the cloud access system that should be based on wireless communication module includes wireless communication module 50。
In an embodiment of the present invention, wireless communication module 50 is specially wireless WIFI communication modules.
Wherein, wireless WIFI communication modules support Wi-Fi technology, for household electrical appliance 52.
Household electrical appliance 52 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 50 to realize mobile terminal by using family expenses Wi-Fi technology Wireless networking.
Further, for example in an embodiment of the present invention, user can also be by using wireless communication module 50 by family expenses Electrical equipment 52 is interconnected with corresponding Cloud Server 51, to realize the resource-sharing of household electrical appliance 52 and Cloud Server 51.
Fig. 2 is the hardware architecture diagram of wireless communication module 50 in the embodiment of the present invention, and Fig. 2 is U.S. with Cloud Server 51 Cloud and 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 are used to realize being based on M- The treatment logic of the service logic thread 503 of Smart systems, millet SDK22 is used to realize the protocol conversion file of millet cloud 25 Agreement in xm_profile.c, manufacturer bottom SDK23 is used to realize the bottom hardware logic of wireless communication module 50, beautiful cloud 24 and millet cloud 25 be used for cloud service resource is provided.
In one embodiment of the invention, should be based on the cloud access system of wireless communication module also includes passing through channel radio Cloud Server 51 and household electrical appliance 52 that letter module 50 is in communication with each other.
Wherein, Cloud Server 51 be a kind of simple efficient, safe and reliable, disposal ability can elastic telescopic calculating service. Cloud Server 51 is used to be provided the service of integrated service ability to all kinds of Internet users.Cloud Server 51 for example beautiful cloud, capital Eastern cloud, A Liyun, or millet cloud.
Cloud Server 51 has intelligent cloud access, intelligent cloud storage, and the function that intelligent information is pushed.When user passes through After using wireless communication module 50, household electrical appliance 52 are interconnected with corresponding Cloud Server 51, Cloud Server 51 can push away resource Household electrical appliance 52 are delivered to, user can be controlled by the application program of household electrical appliance in mobile terminal 52 to household electrical appliance 52 System.
For example, the use of microwave ovens function of U.S. has Cookbooks resource newly developed, micro-wave oven manufacturer is newly developed by this The storage of Cookbooks resource in the intelligent cloud storage of beautiful cloud, when user will be beautiful micro- by using wireless communication module 50 After ripple stove is interconnected with the cloud of U.S., 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 52 refer to the various Electrical and Electronic utensils used in family and similar site.Household electrical appliance 52 are for example Television set, refrigerator, or air-conditioner etc..
With continuous progressive and user's growth in the living standard, the energy of increasing household electrical appliance 52 of smart home technology Enough to realize intelligent operating, user can in the terminal install the application program of household electrical appliance 52, by application program control Household electrical appliance processed 52 are operated, and user can also be taken household electrical appliance 52 with corresponding cloud by using wireless communication module 50 Business device 51 is interconnected.
Specifically, the operation system and the household electrical appliance 52 of data that user will can need to obtain in Cloud Server 51 pass through Wireless communication module 50 accesses corresponding Cloud Server 51, to realize the shared of resource in Cloud Server 51.
For example, it is desired to it is beautiful air-conditioner to obtain the household electrical appliance 52 of operation system in Cloud Server 51 and data, it is beautiful Air-conditioner need to share the resource of agreement matching from beautiful Cloud Server 51, therefore, beautiful air-conditioner is passed through into channel radio Letter module 50 accesses the cloud of U.S., with realizing the air-conditioner of U.S. and the cloud of U.S. resource it is shared, or, it is also possible to by beautiful air-conditioning Device accesses millet cloud by wireless communication module 50, with air-conditioner and the millet cloud of realizing U.S. resource it is shared.
In one embodiment of the invention, wireless communication module 50 include serial data receiving or sending thread 501, for family Electrical appliance 52 is communicated.
Serial ports is serial line interface, is using the expansion interface of 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 a thread for standard is posted by Thread Id, current instruction pointer (PC) Storage set and storehouse are constituted.File management or Control on Communication of the thread suitable for server.
For example, when wireless communication module 50 receives the message of the transmission of household electrical appliance 52, to the message with serial communication Mode is processed, and the message after treatment is reported into Cloud Server 51.
In one embodiment of the invention, wireless communication module 50 also include network data receiving or sending thread 502, for Cloud Server 51 is communicated.
For example, when wireless communication module 50 receives the report that Cloud Server 51 sends by network data receiving or sending thread 502 Wen Shi, is processed the message, and the message after treatment is issued into household electrical appliance 52.
In one embodiment of the invention, wireless communication module 50 also include service logic thread 503, for serial ports Data transmit-receive thread 501, network data receiving or sending thread 502 carry out message exchange, with to serial data receiving or sending thread 501 and network The message of the transmitting-receiving of data transmit-receive thread 502 is controlled.
Wherein, the service logic thread 503 in the embodiment of the present invention is the service logic thread based on M-Smart systems 503.The service content that M-Smart open systems are specifically provided, M-Smart systems are for using third party cloud, using in U.S. Build cloud, unclouded three kinds of internet partners and open docking form.
Specifically, service logic thread 503 is received by M-Smart agreements with serial data receiving or sending thread 501, network data Hair line journey 502 carries out message exchange.
Alternatively, service logic thread 503 obtains Cloud Server 51 and sends to family expenses by network data receiving or sending thread 502 The first kind message of electrical equipment 52;Service logic thread 503 obtains the type information of Cloud Server 51, and will according to type information First kind message is converted to Second Type message;Service logic thread 503 passes through serial data receiving thread by Second Type Message is sent to household electrical appliance 52.
Wherein, message is exchange and the data cell transmitted, i.e. the website data block disposably to be sent in network.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 51 can such as cloud ID, different cloud ID marks are not With Cloud Server 51, cloud ID can be arranged in the heading of first kind message, can be that pre- in heading is write down characters Section, it is also possible to be arranged on other fields, the embodiment of the present invention does not carry out concrete restriction to this.
Alternatively, the type information of Cloud Server 51 is obtained, is specifically included:Wireless communication module 50 is obtained and Cloud Server The 51 Socket link informations being connected;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 502 in wireless communication module 50 gets cloud clothes Business device 51 is sent to the first kind message of household electrical appliance 52, and network data receiving or sending thread 502 creates network transceiving data bag Message queue, and by first kind message be added to network transceiving data bag message queue, in wireless communication module 50 based on The service logic thread 503 of M-Smart systems is received by the function interface of protocol conversion file in Cloud Server 51SDK from network First kind message is obtained in the corresponding network data transmitting-receiving buffer of hair data packet message queue, according to first kind message Cloud ID in heading, protocol conversion is carried out to first kind message, obtains Second Type message, by Second Type packet storage In the serial data transmitting-receiving buffer of cloud access system distribution, and the control of application affairs callback module is triggered based on M-Smart Second Type message is issued to household electrical appliance 52 by the service logic thread 503 of system by serial data receiving or sending thread 501.Its In, the protocol conversion file in Cloud Server 51SDK is for example, the protocol conversion file ali_ of Ali's cloud ali_sdk.c Profile.c, the protocol conversion file jd_profile.c of Jingdone district cloud jd_sdk.c, the protocol conversion text of millet cloud xm_sdk.c Part xm_profile.c, and the cloud md_sdk.c of U.S. protocol conversion file md_profile.c.
Alternatively, wireless communication module 50 receives the Second Type message that household electrical appliance 52 send, and obtains Second Type The corresponding destination address of message, and the type information of correspondence Cloud Server 51 is determined according to destination address;Wireless communication module 50 call corresponding translation-protocol according to the type information of Cloud Server 51;And wireless communication module 50 will according to translation-protocol Second Type message is converted to first kind message, and first kind message is sent to corresponding Cloud Server 51.
In an embodiment of the present invention, the corresponding destination address mark Cloud Server 51 of Second Type message, the destination Location can be arranged in the heading of Second Type message, can be the reserved field in heading, it is also possible to be arranged on other Field, the embodiment of the present invention does not carry out concrete restriction to this.
Specifically, reporting message exchanges flow for example, the serial data receiving or sending thread 501 in wireless communication module 50 is received After the Second Type message that household electrical appliance 52 send, serial data receiving or sending thread 501 creates serial ports transceiving data bag message queue, And by Second Type message added in serial ports transceiving data bag message queue, in wireless communication module 50 based on M-Smart The service logic thread 503 of system is by the function interface of protocol conversion file in Cloud Server 51SDK from serial ports transceiving data Second Type message is obtained in the corresponding serial data transmitting-receiving buffer of bag message queue, according to the heading of Second Type message The type information of the corresponding Cloud Server 51 of middle destination address, protocol conversion is carried out to Second Type message, obtains the first kind Message, by first kind packet storage in the network data transmitting-receiving buffer that cloud access system is distributed, and triggers application affairs First kind message is received and dispatched line by callback module service logic thread 503 of the control based on M-Smart systems by network data Journey 502 reports to Cloud Server 51.
In one embodiment of the invention, wireless communication module 50 also includes main thread 504, and it is right that main thread 504 is used for Serial data receiving or sending thread 501, network data receiving or sending thread 502 and service logic thread 503 are controlled.
Alternatively, main thread 504 is used to be managed the state machine of wireless communication module 50.
Main thread 504 is used to be managed the state machine of wireless communication module 50, specifically includes:Wireless communication module 50 Receive event message;Event message is distributed to corresponding state machine by the mode attribute according to event message, wherein, mode attribute It is any one in AP-Mode, STA-Mode, or System;According to event message and the State Transferring of corresponding state machine The state of mechanism control wireless communication module 50 is switched over.
Alternatively, main thread 504 flow embodiment that the state machine of wireless communication module 50 is managed is referred to Fig. 4 and Fig. 5 embodiments.
In one embodiment of the invention, wireless communication module 50 also includes that first serial receives data-message queue 505, first serial receives data-message queue 505 is used to receive the message of the transmission of serial data receiving or sending thread 501, and by message It is supplied to service logic thread 503 to be read out;First serial data receiver caching 506, first serial data receiver caching 506 The data of the transmission of serial data receiving or sending thread 501 are received and cached, and serves data to service logic thread 503 and read Take;Second serial receives data-message queue 507, and second serial receives data-message queue 507 to be used to receive service logic line The message that journey 503 sends, and provide messages to serial data receiving or sending thread 501 and be read out;And second serial data connect Receive caching 508, the data that second serial data receiver caching 508 is received and cache business logic thread 503 sends, and by data It is supplied to serial data receiving or sending thread 501 to be read out.
Specifically, during the reporting message of household electrical appliance 52, the serial data transmitting-receiving line in wireless communication module 50 After journey 501 receives the Second Type message that household electrical appliance 52 send, serial data receiving or sending thread 501 creates first serial and receives number According to message queue 505, and Second Type message is added in first serial reception data-message queue 505, radio communication mold The function that the service logic thread 503 based on M-Smart systems in block 50 passes through protocol conversion file in Cloud Server 51SDK Interface obtains Second Type in receiving the corresponding first serial data receiver caching 506 of data-message queue 505 from first serial Message, the type information of the corresponding Cloud Server 51 of destination address in the heading according to Second Type message, to Second Type Message carries out protocol conversion, obtains first kind message.
Further, during the issuing message of Cloud Server 51, in wireless communication module 50 based on M-Smart systems Service logic thread 503 disappeared from network transceiving data bag by the function interface of protocol conversion file in Cloud Server 51SDK First kind message, the cloud in heading according to first kind message are obtained in the corresponding network data transmitting-receiving caching of breath queue ID, protocol conversion is carried out to first kind message, obtains Second Type message, by Second Type packet storage in cloud access system The second serial of distribution is received in the corresponding second serial data receiver caching 508 of data-message queue 507, and is triggered and applied thing Part callback module service logic thread 503 of the control based on M-Smart systems receives and dispatches Second Type message by serial data Thread 501 is issued to household electrical appliance 52.
Alternatively, the data in first serial data receiver caching 506 and second serial data receiver caching 508 are read Afterwards, data are deleted in first serial data receiver caching 506 and second serial data receiver caching 508.
In one embodiment of the invention, wireless communication module 50 also includes Conversion Protocol Data storehouse 509, for storing The corresponding translation-protocol of Cloud Server 51.
In an embodiment of the present invention, the conversion association based on M-Smart systems is specifically included in Conversion Protocol Data storehouse 509 View.
For example, agreement in the protocol conversion file ali_profile.c of Ali's cloud ali_sdk.c, Jingdone district cloud jd_ The protocol conversion file xm_ of agreement, millet cloud xm_sdk.c in the protocol conversion file jd_profile.c of sdk.c Agreement in profile.c, and U.S. cloud md_sdk.c protocol conversion file md_profile.c in agreement.
In one embodiment of the invention, wireless communication module 50 also includes that first network receives data-message queue 5010, first network receives data-message queue 5010 is used for the message that receiving network data receiving or sending thread 502 sends, and will disappear Breath is supplied to service logic thread 503 to be read out;First network data receiver caching 5011, first network data receiver caching 5011 receive and data that buffer network data transmit-receive thread 502 sends, and serve data to service logic thread 503 and carry out Read;Second network receives data-message queue 5012, and the second network receives data-message queue 5012 and patrolled for receiving business The message that thread 503 sends is collected, and provides messages to network data receiving or sending thread 502 and be read out;And the second network number According to order caching 5013, the second network data order caching 5013 receives the data that simultaneously cache business logic thread 503 sends, and Network data receiving or sending thread 502 is served data to be read out.
Specifically, during the reporting message of household electrical appliance 52, service logic thread 503 passes through first kind message Second network receives data-message queue 5012 and stores in the second network data order caching 5013 of cloud access system distribution, And trigger the control of application affairs callback module and passed through first kind message based on the service logic thread 503 of M-Smart systems Network data receiving or sending thread 502 reports to Cloud Server 51.
Further, during the issuing message of Cloud Server 51, the first network in wireless communication module 50 receives number Cloud Server 51 is got according to message queue 5010 to be sent to the first kind of household electrical appliance 52 by network data receiving or sending thread 502 After type message, network data receiving or sending thread 502 creates first network data receiver caching 5011, and first kind message is added 5011 are cached to first network data receiver, and serves data to service logic thread 503 and be read out, so as to be based on M- Second Type message is issued to household electrical appliance by the service logic thread 503 of Smart systems by serial data receiving or sending thread 501 52。
Alternatively, the data in first network data receiver caching 5011 and the second network data order caching 5013 are read After taking, data are deleted in first network data receiver caching 5011 and the second network data order caching 5013.
In the present embodiment, disappeared with serial data receiving or sending thread, network data receiving or sending thread by service logic thread Breath is exchanged, and is controlled with to the message that serial data receiving or sending thread and network data receiving or sending thread are received and dispatched, and main thread is to serial ports Data transmit-receive thread, network data receiving or sending thread and service logic thread are controlled, and first serial receives data-message queue The message that serial data receiving or sending thread sends is received, and provides messages to service logic thread and be read out;First serial number The data of serial data receiving or sending thread transmission are received and cached according to order caching, and serves data to service logic thread is carried out Read;Second serial receives data-message queue and receives the message that service logic thread sends, and provides messages to serial ports number It is read out according to receiving or sending thread;The data that second serial data receiver caching is received and cache business logic thread sends, and will Data are supplied to serial data receiving or sending thread to be read out, and can effectively lift the pipe of message queue in Cloud Server access procedure Reason effect, makes the access procedure of multiple Cloud Servers and multiple household electrical appliance more efficient, convenient.
Fig. 3 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 main thread includes to the method that the state machine of wireless communication module is managed:
S301: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.
Current wireless communication module is used typically as receiving terminal, i.e., must rely on another network offer device (for example, Cable network) network connection electron device is provided.However, user is likely to wish that wireless communication module can be while have Other kinds of function.If bad corner or thering is the multiple to need to use the electronics of network for example, user's family has to collect mail Device, then may want to increase the scope that network signal is covered using wireless communication module;Or, it is also possible to think while making wireless Cable network is transformed into wireless network by communication module;Or, it is also possible to want to make wireless communication module as wireless base station (AP), Interconnect electronic installation.Wireless communication module in correlation technique is typically only capable to provide one of which network morphology or work( Energy.
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 passes through application affairs callback module control business by the main thread in wireless communication module Logic thread is generated, and WIFI callback events message is produced by application program.
Specifically, application affairs message can be the event of the upper layer application active generation of wireless communication module, for example, nothing Line communication module cancels ap mode, then can produce the application affairs message of AF_EVT_AP_STOP.
WIFI callback events message can be the event of the WIFI bottoms feedback of wireless communication module, for example, radio communication The ap mode of module is opened successfully, then can produce the WIFI callback events message of AF_EVT_AP_STARTED_SUCCESS.
Alternatively, before wireless communication module receives event message, also include:Configure the State Transferring of wireless communication module Mechanism.
S302:Event message is distributed to corresponding state machine by the mode attribute according to event message, wherein, mode attribute It is any one in AP-Mode, STA-Mode, or System.
Specifically, event message is distributed to according to the mode attribute of event message by state machine events distribution processor module Corresponding state machine, wherein, mode attribute is any one in AP-Mode, STA-Mode, or System.
Wireless communication module supports that focus (Access Point, AP) mode of operation AP-Mode, AP-Mode are applied 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, The central apparatus of suitable WLAN.Wireless communication module can also support workstation mode STA-Mode, it is understood that for certain A work station in grid is client.When a WIFI chip for wireless communication module provides STA-Mode functions, nothing Line communication module can be just connected in the middle of 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 in systems with the network connection state of 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.
S303:The state of the State Transferring mechanism control wireless communication module according to 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 Not busy three kinds of states, in the connection in STA-Mode state machines, have connected and idle three kinds of states;In System state machines Network does not set up, network has been set up and initializes three kinds of states.
Alternatively, the State Transferring mechanism according to event message and corresponding state machine controls the state of wireless communication module 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 STA-Mode state machines State Transferring mechanism 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 any one in AP-Mode, STA-Mode, or 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 cooperating operation of machine, effectively the condition managing effect of lifting wireless communication module.
Fig. 4 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 main thread includes to the method that the state machine of wireless communication module is managed:
S401:Configure the State Transferring mechanism of wireless communication module.
Specifically, by state machine events distribution processor module by AP-Mode state machines, STA-Mode state machines, 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 to identify the state of wireless communication module.
By this step, the plug-in in wireless communication module can be made to call the status attribute for having configured, made wireless Communication module can be switched between different states, realize three kinds of cooperating operations of state machine in wireless communication module.
S402:Application affairs message queue receives the application affairs message of service logic thread generation.
Wherein, application affairs message passes through application affairs callback module control business by the main thread in wireless communication module Logic thread is generated.
Specifically, application affairs message can be the event of the upper layer application active generation of wireless communication module, for example, nothing Line communication module cancels ap mode, then can produce the application affairs message of AF_EVT_AP_STOP.
S403:WIFI event call-backs submodule receives WIFI callback events message, and disappears WIFI callback events are received After breath, WIFI callback events message is added to application affairs message queue.
WIFI callback events message can be the event of the WIFI bottoms feedback of wireless communication module, for example, radio communication The ap mode of module is opened successfully, then can produce the WIFI callback events message of AF_EVT_AP_STARTED_SUCCESS.
S404:Read the application affairs message and WIFI callback events message in application affairs message queue.
Specifically, application affairs are read by state machine events distribution processor module by the main thread in wireless communication module Application affairs message and WIFI callback events message in message queue.
S405:Event message is distributed to corresponding state machine by the mode attribute according to event message, wherein, mode attribute It is any one in AP-Mode, STA-Mode, or System.
Specifically, event message is distributed to according to the mode attribute of event message by state machine events distribution processor module Corresponding state machine, wherein, mode attribute is any one in AP-Mode, STA-Mode, or System.
Wireless communication module supports that focus (Access Point, AP) mode of operation AP-Mode, AP-Mode are applied 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, The central apparatus of suitable WLAN.Wireless communication module can also support workstation mode STA-Mode, it is understood that for certain A work station in grid is client.When a WIFI chip for wireless communication module provides STA-Mode functions, nothing Line communication module can be just connected in the middle of 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 in systems with the network connection state of 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 Part realization aspect can strengthen the logicality of code structure, reduce the complexity of code development, be easy to later stage wireless communication module The Function Extension of hardware system.
S406:State according to event message and State Transferring mechanism control wireless communication module is switched over.
Specifically, as shown in figure 5, being radio communication mold bulk state switching schematic diagram in the embodiment of the present invention, wherein, bag Include:AP-Mode state machines 51, STA-Mode state machines 52, System state machines 53, state machine events distribution processor module 54, Application affairs message queue 55, AP-Mode state machine states switching flow 56, STA-Mode state machine states switching flow 57, And System state machine states switching flow 58.
Wireless communication module can be controlled according to the State Transferring mechanism of the content of event message and corresponding state machine State is switched over.
For example, as shown in figure 5, 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 run to cancel ap mode when wireless communication module is in AP 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 that the state of free time is switched to by the operating states of AP.
In the present embodiment, by configuring the State Transferring mechanism of wireless communication module, in can making wireless communication module Plug-in calls the status attribute for having configured, and wireless communication module is switched between different states, by basis Event message is distributed to corresponding state machine by the mode attribute of event message, wherein, mode attribute is AP-Mode, STA- Any one in Mode, or System, and it is wireless according to the control of the State Transferring mechanism of event message and corresponding state machine The state of communication module is switched over, and can realize three kinds of cooperating operations of state machine in wireless communication module, effectively lifts 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, Wireless communication module bottom hardware realization aspect can strengthen the logicality of code structure, reduce the complexity of code development, just In the Function Extension of later stage wireless communication module hardware system.
Fig. 6 is the schematic flow sheet of the cloud access method based on wireless communication module that another embodiment of the present invention is proposed, The cloud access method for being based on wireless communication module includes:
S601:Wireless communication module receives the first kind message that Cloud Server sends, and obtains the type of Cloud Server Information, wherein, wireless communication module is connected with multiple Cloud Servers.
Used as a kind of hot technology in recent years and development trend, its principle is exactly to reach by resource-sharing to Cloud Server While to reduces 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 Cloud Server is accessed to provide the user with related service, therefore Cloud Server is accessed and there is many demands and challenge.Therefore, have Necessity is realized that household electrical appliance are convenient with multiple Cloud Servers, is efficiently accessed.
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 beautiful cloud with Cloud Server 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 are used to realize being based on M- The treatment logic of the service logic thread of Smart systems, millet SDK22 is used to realize the protocol conversion file xm_ of millet cloud 25 Agreement in profile.c, manufacturer bottom SDK23 is used to realize the bottom hardware logic of 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 to be provided the service of integrated service ability to all kinds of Internet users.For example beautiful cloud of Cloud Server, 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, the use of microwave ovens function of U.S. has Cookbooks resource newly developed, micro-wave oven manufacturer is newly developed by this The storage of Cookbooks resource in the intelligent cloud storage of beautiful cloud, as user by using wireless communication module by beautiful microwave After stove is interconnected with the cloud of U.S., beautiful cloud can be by the Cookbooks resource supplying newly developed to beautiful micro-wave oven, so that user can Cookbooks resource newly developed is performed with 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 exchange and the data cell transmitted, i.e. the website data block disposably to be sent in network.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 does not carry out concrete restriction to this.
Alternatively, the type information for obtaining Cloud Server is specifically included:Wireless communication module is obtained and is connected with Cloud Server The Socket link informations for connecing;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 delivering to the first kind message of household electrical appliance, network data receiving or sending thread creates network transceiving data bag message queue, and will First kind message is added to network transceiving data bag message queue, the industry based on M-Smart systems in 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.
S602:Wireless communication module calls corresponding translation-protocol according to the type information of Cloud Server.
Wherein, the protocol conversion of translation-protocol corresponding with the type information of Cloud Server such as Ali's cloud ali_sdk.c It is agreement in file ali_profile.c, the agreement in the protocol conversion file jd_profile.c of Jingdone district cloud jd_sdk.c, small Agreement in the protocol conversion file xm_profile.c of rice cloud xm_sdk.c, and the protocol conversion of the cloud md_sdk.c of U.S. is literary Agreement in part md_profile.c.
S603: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, cloud ID of the wireless communication module 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 application affairs readjustment submodule service logic of the 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, the cloud access method that should be based on wireless communication module includes:Wireless communication module receives household electrical appliance hair The Second Type message for sending, 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 sends 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, and effectively cloud access of the lifting based on wireless communication module is imitated Really.
Fig. 7 is the schematic flow sheet of the cloud access method based on wireless communication module that another embodiment of the present invention is proposed, The cloud access method for being based on wireless communication module includes:
S701:Wireless communication module receives the Second Type message that household electrical appliance send, and obtains Second Type message pair The destination address answered, and the type information of correspondence Cloud Server is determined according to destination address.
In an embodiment of the present invention, the corresponding destination address mark Cloud Server of Second Type message, the destination address Can be arranged in the heading of Second Type message, can be the reserved field in heading, it is also possible to be arranged on other words Section, the embodiment of the present invention does not carry out concrete restriction to this.
Specifically, reporting message exchanges flow for example, the serial data receiving or sending thread in wireless communication module receives family expenses After the Second Type message that electrical equipment sends, serial data receiving or sending thread creates serial ports transceiving data bag message queue, and by second Type message is added in serial ports transceiving data bag message queue, the business based on M-Smart systems in wireless communication module Logic thread is corresponding from serial ports transceiving data bag message queue by the function interface of protocol conversion file in Cloud Server SDK Second Type message is obtained in serial data transmitting-receiving caching, and, destination address is true in the heading according to Second Type message The type information of fixed corresponding Cloud Server.
S702:Wireless communication module calls corresponding translation-protocol according to the type information of Cloud Server.
Wherein, the protocol conversion of translation-protocol corresponding with the type information of Cloud Server such as Ali's cloud ali_sdk.c It is agreement in file ali_profile.c, the agreement in the protocol conversion file jd_profile.c of Jingdone district cloud jd_sdk.c, small Agreement in the protocol conversion file xm_profile.c of rice cloud xm_sdk.c, and the protocol conversion of the cloud md_sdk.c of U.S. is literary Agreement in part md_profile.c.
S703: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, 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 Event call-back submodule service logic thread of the 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 send 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, realizes household electric Device and the access of multiple Cloud Servers, effectively lift the cloud access effect based on wireless communication module.
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 implying relative importance.Additionally, 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 in flow chart or herein is construed as, and expression includes It is one or more for realizing specific logical function or process the step of the module of code of executable instruction, fragment or portion Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussion suitable Sequence, including function involved by basis 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 invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In implementation method, 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 for example, realized with hardware, and in another embodiment, can be with well known in the art 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 The rapid hardware that can be by program to instruct correlation is completed, and 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.
Additionally, during each functional unit in each embodiment of the invention can be integrated in a processing module, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are 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 to realize in the form of software function module and as independent production marketing or when using, it is also possible to which storage is 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 spy that the embodiment or example are described Point is contained at least one embodiment of the invention or example.In this manual, to the schematic representation of above-mentioned term not Necessarily refer to identical embodiment or example.And, the specific features of description, structure, material or feature 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, changes, replacing and modification.

Claims (30)

1. a kind of cloud access system based on wireless communication module, the wireless communication module is used for household electrical appliance, and 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 to the message that the serial data receiving or sending thread and the network data receiving or sending thread are received and dispatched;
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;
First serial receives data-message queue, and the first serial receives data-message queue to be used to receive the serial data The message that receiving or sending thread sends, 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 is received and caches the serial data transmitting-receiving line The data that journey sends, 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 receives data-message queue to be used to receive the service logic The message that thread sends, 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 is received 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.
2. the cloud access system of wireless communication module is based on as claimed in claim 1, it is characterised in that also included:
Conversion Protocol Data storehouse, for storing the corresponding translation-protocol of the Cloud Server.
3. the cloud access system of wireless communication module is based on as claimed in claim 2, it is characterised in that also included:
The service logic thread obtains the Cloud Server and sends to the household electric by the network data receiving or sending thread The first kind message of device;
The service logic thread obtains the type information of the Cloud Server, and according to the type information by the first kind Type message is converted to Second Type message;
The service logic thread is sent to the family expenses Second Type message by the serial data receiving thread Electrical equipment.
4. the cloud access system of wireless communication module is based on as claimed in claim 2, it is characterised in that also included:
The wireless communication module receives the Second Type message that household electrical appliance send, and obtains the Second Type message correspondence Destination 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.
5. the cloud access system of wireless communication module is based on as claimed in claim 1, 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 Deleted in being cached according to order caching and second serial data receiver.
6. the cloud access system of wireless communication module is based on as claimed in claim 1, it is characterised in that the radio communication mold Also include in block:
First network receives data-message queue, and the first network receives data-message queue to be used to receive the network data The message that receiving or sending thread sends, 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 is received and caches the network data transmitting-receiving line The data that journey sends, and it is supplied to the service logic thread to be read out the data;
Second network receives data-message queue, and second network receives data-message queue to be used to receive the service logic The message that thread sends, 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 is received 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 system of wireless communication module is based on as claimed in claim 6, it is characterised in that in the first network Data receiver is cached after being read with the data of the second network data order caching, by the data in the first network number Deleted according in order caching and the second network data order caching.
8. the cloud access system of wireless communication module is based on as claimed in claim 1, it is characterised in that the main thread is used for State machine to the wireless communication module is managed.
9. the cloud access system of wireless communication module is based on as claimed in claim 8, it is characterised in that the main thread is used for State machine to the wireless communication module is managed, and specifically includes:
The wireless communication module receives event message;
The event message is distributed to corresponding state machine by the mode attribute according to the event message, wherein, the pattern Attribute is any one in AP-Mode, STA-Mode, or System;
State Transferring mechanism according to the event message and the corresponding state machine controls the shape of the wireless communication module State is switched over.
10. the cloud access system of wireless communication module is based on as claimed in claim 9, it is characterised in that the radio communication Before module receives event message, also include:
Configure the State Transferring mechanism of the wireless communication module.
The 11. cloud access systems based on wireless communication module as claimed in claim 10, 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.
The 12. cloud access systems based on wireless communication module as claimed in claim 10, 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.
The 13. cloud access systems based on wireless communication module as claimed in claim 9, 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 does not set up, network has been set up, And three kinds of states of initialization.
The 14. cloud access systems based on wireless communication module as claimed in claim 13, 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 that the state of the wireless communication module is not set up in network, network has been set up, And switched between three kinds of states of initialization.
The 15. cloud access systems based on wireless communication module as claimed in claim 9, 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:
Application affairs message queue receives the application affairs message of the service logic thread generation;
WIFI event call-backs submodule receives the WIFI callback events message, and is receiving the WIFI callback events message Afterwards, the WIFI callback events message is added to the application affairs message queue.
The 16. cloud access systems based on wireless communication module as claimed in claim 15, it is characterised in that also include:
Read the application affairs message and the WIFI callback events message in the application affairs message queue.
A kind of 17. cloud access methods based on wireless communication module, the wireless communication module is used for household electrical appliance, and its feature exists In comprising the following steps:
Wireless communication module receives the first kind message of Cloud Server transmission, 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;
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;
The wireless communication module receives the Second Type message that the household electrical appliance send, and obtains the Second Type message Corresponding destination address, and the type information of correspondence Cloud Server is determined according to the destination address;
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;
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 to the message that the serial data receiving or sending thread and the network data receiving or sending thread are received and dispatched;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;
First serial receives data-message queue, and the first serial receives data-message queue to be used to receive the serial data The message that receiving or sending thread sends, 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 is received and caches the serial data transmitting-receiving line The data that journey sends, 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 receives data-message queue to be used to receive the service logic The message that thread sends, 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 is received 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.
The 18. cloud access methods based on wireless communication module as claimed in claim 17, it is characterised in that described in the acquisition The type information of Cloud 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.
The 19. cloud access methods based on wireless communication module as claimed in claim 17, it is characterised in that in the described first string After the data of mouth data receiver caching and second serial data receiver caching are read, by the data in the first serial Deleted during data receiver is cached and second serial data receiver is cached.
The 20. cloud access methods based on wireless communication module as claimed in claim 18, it is characterised in that the radio communication Also include in module:
First network receives data-message queue, and the first network receives data-message queue to be used to receive the network data The message that receiving or sending thread sends, 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 is received and caches the network data transmitting-receiving line The data that journey sends, and it is supplied to the service logic thread to be read out the data;
Second network receives data-message queue, and second network receives data-message queue to be used to receive the service logic The message that thread sends, 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 is received 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.
The 21. cloud access methods based on wireless communication module as claimed in claim 20, it is characterised in that in first net Network data receiver is cached after being read with the data of the second network data order caching, by the data in the first network Data receiver is cached to be deleted with the second network data order caching.
The 22. cloud access methods based on wireless communication module as claimed in claim 17, it is characterised in that the main thread is used It is managed in the state machine to the wireless communication module.
The 23. cloud access methods based on wireless communication module as claimed in claim 22, it is characterised in that the main thread is used It is managed in the state machine to the wireless communication module, is specifically included:
The wireless communication module receives event message;
The event message is distributed to corresponding state machine by the mode attribute according to the event message, wherein, the pattern Attribute is any one in AP-Mode, STA-Mode, or System;
State Transferring mechanism according to the event message and the corresponding state machine controls the shape of the wireless communication module State is switched over.
The 24. cloud access methods based on wireless communication module as claimed in claim 23, it is characterised in that the radio communication Before module receives event message, also include:
Configure the State Transferring mechanism of the wireless communication module.
The 25. cloud access methods based on wireless communication module as claimed in claim 24, 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.
The 26. cloud access methods based on wireless communication module as claimed in claim 24, 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.
The 27. cloud access methods based on wireless communication module as claimed in claim 23, 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 does not set up, network has been set up, And three kinds of states of initialization.
The 28. cloud access methods based on wireless communication module as claimed in claim 27, 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 that the state of the wireless communication module is not set up in network, network has been set up, And switched between three kinds of states of initialization.
The 29. cloud access methods based on wireless communication module as claimed in claim 23, 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:
Application affairs message queue receives the application affairs message of the service logic thread generation;
WIFI event call-backs submodule receives the WIFI callback events message, and is receiving the WIFI callback events message Afterwards, the WIFI callback events message is added to the application affairs message queue.
The 30. cloud access methods based on wireless communication module as claimed in claim 29, it is characterised in that also include:
Read the application affairs message and the WIFI callback events message in the application affairs message queue.
CN201510932082.8A 2015-12-14 2015-12-14 Cloud access system and method based on wireless communication module Active CN105871992B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN105871992A CN105871992A (en) 2016-08-17
CN105871992B true CN105871992B (en) 2017-05-24

Family

ID=56623718

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN105871992B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454058A (en) * 2017-06-29 2017-12-08 广州视源电子科技股份有限公司 A kind of data transmission method for uplink, system, readable storage medium storing program for executing and computer equipment
CN108023897B (en) * 2018-01-05 2024-04-09 深圳有电物联科技有限公司 Communication port and electronic equipment with same
CN109842519B (en) * 2018-12-25 2022-07-22 视联动力信息技术股份有限公司 Method and device for previewing video stream
CN112835838A (en) * 2019-11-25 2021-05-25 广东博智林机器人有限公司 Serial port communication method, device, storage medium and computer equipment
CN112433977B (en) * 2020-12-11 2024-03-19 南京丹迪克科技开发有限公司 Communication method for multiple serial devices of electrical measurement system based on VB environment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981440A (en) * 2012-11-02 2013-03-20 武汉理工大学 Intelligent device monitoring and managing system based on software as a service (SaaS)
CN203965907U (en) * 2014-06-24 2014-11-26 北车大连电力牵引研发中心有限公司 track traffic communication system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9444899B2 (en) * 2012-12-26 2016-09-13 Microsoft Technology Licensing, Llc Use of internet information services logging to collect user information in an asynchronous manner
CN104243616A (en) * 2014-10-10 2014-12-24 广东志高空调有限公司 Wi-Fi (wireless fidelity) communication based cloud air conditioner system
CN204404559U (en) * 2015-01-18 2015-06-17 李俊楠 A kind of cloud water-heater system based on Wi-Fi communication

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981440A (en) * 2012-11-02 2013-03-20 武汉理工大学 Intelligent device monitoring and managing system based on software as a service (SaaS)
CN203965907U (en) * 2014-06-24 2014-11-26 北车大连电力牵引研发中心有限公司 track traffic communication system

Also Published As

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

Similar Documents

Publication Publication Date Title
Parvez et al. A survey on low latency towards 5G: RAN, core network and caching solutions
CN105871992B (en) Cloud access system and method based on wireless communication module
CN109412770B (en) Communication means and device
Liang et al. An integrated architecture for software defined and virtualized radio access networks with fog computing
JP5411985B2 (en) Equipment and method of base station dynamic clustering in mobile communication
CN103354993B (en) Promote equipment to equipment communication
US20100085916A1 (en) Systems and Methods for Hybrid Wired and Wireless Universal Access Networks
CN100466821C (en) Wireless switch-in network, method for grouped transmission and method for terminal switch
CN105871993B (en) Cloud access method and system based on wireless communication module
CN110401972A (en) Method, equipment and the system of route messages in the network of Multi net voting slice
CN1555635A (en) Network with several subnetworks
CN105871991B (en) Cloud access system and method based on wireless communication module
CN101848496A (en) Method and apparatus for carrier management
Li et al. Novel Resource and Energy Management for 5G integrated backhaul/fronthaul (5G-Crosshaul)
CN104363658A (en) Method and system for managing direct-connection communication resources
CN105791377B (en) Cloud access system and method based on wireless communication module
CN100461874C (en) Architecture for implementation of radio access bearer manager and packet data convergence protocol process
CN110521268A (en) Uplink resource for the communication of super reliable and low time delay
CN105578505B (en) State management method of wireless communication module and wireless communication module
CN101346905A (en) Radio access station apparatus and method of controlling call in portable internet system
CN109831809A (en) A kind of method and apparatus of scheduling
CN1984435B (en) Wireless telecommunication system and method for managing wireless resource and switching cell
CN110351671A (en) A kind of double frequency suitching type self-organized network communication method
CN106162753A (en) A kind of resource allocation methods and device
CN107205286B (en) A kind of RCC, RRS and distributed base station 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