CN109729154A - A kind of simple message subscription issuing service method based on controller - Google Patents
A kind of simple message subscription issuing service method based on controller Download PDFInfo
- Publication number
- CN109729154A CN109729154A CN201811528599.0A CN201811528599A CN109729154A CN 109729154 A CN109729154 A CN 109729154A CN 201811528599 A CN201811528599 A CN 201811528599A CN 109729154 A CN109729154 A CN 109729154A
- Authority
- CN
- China
- Prior art keywords
- terminal device
- controller
- data
- theme
- simple message
- 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.)
- Granted
Links
Abstract
The invention discloses a kind of, and the simple message based on controller subscribes to issuing service method, which comprises establishes the communication connection of the Intranet between controller and each terminal device based on Intranet communication protocol;The theme that each terminal device is subscribed to is obtained by controller, and parses the data requirements of each terminal device;Controller obtains multiple data of each terminal device publication;Controller chooses matched data from multiple data that each terminal device is issued according to the data requirements of each terminal device and is sent to corresponding terminal device;Each terminal device receives the data.The present invention passes through unified communication protocol, it establishes a set of simple message based on controller and subscribes to issuing service method flow, it can be in the case where remote server network disconnects, make that still simple message subscribing and publication can be completed based on controller between each terminal device, that is, realizes the autonomous communication between each terminal device under serverless network.
Description
Technical field
The present invention relates to fields of communication technology more particularly to a kind of simple message based on controller to subscribe to issuing service side
Method.
Background technique
The application extension for being considered as internet of Internet of Things, application innovation is the core of the development of Internet of Things, with user's body
Test the soul that the innovation for core is Internet of Things development.Internet of Things is by various sensing technologies (radio frequency discrimination RFID, sensing
Device, navigation GPS, video camera, laser scanner), various means of communications (wired, wireless, the long communication modes away from, short distance), will
Any object is connected with internet, to realize long-range monitoring, automatic alarm, control, diagnosis and maintenance, and then realize " management,
A kind of integrated network of control, operation ".
In recent years, as internet of things equipment is using more and more extensive, control and management to internet of things equipment are to realize
The important means of internet of things field intelligent Application.In order to realize the control function to internet of things equipment, need first to terminal with
Internet of things equipment is bound, while needing the network share of remote server, to realize the communication of each terminal device.
In existing technology of Internet of things, message subscribing between each terminal device, publication be based on remote server, it is short
Field communication device must be communicated by controller with remote server, it is necessary to which network is smooth.If network has some setbacks or goes out
The case where existing suspension, then it can not achieve the communication between each terminal device.
Summary of the invention
An object of the present invention at least that, for how to overcome the above-mentioned problems of the prior art, provide one kind
Simple message based on controller subscribes to issuing service method, can be in the case where remote server network disconnects, each end
Still simple message subscribing and publication can be completed based on controller between end equipment, realized autonomous under serverless network
Communication.
To achieve the goals above, the technical solution adopted by the present invention includes following aspects.
A kind of simple message subscription issuing service method based on controller, it is described to include:
The communication connection of the Intranet between controller and each terminal device, the Intranet communication protocols are established based on Intranet communication protocol
View include the fixing head of two bytes, the mailing address of two bytes, the function code of byte, the packet mark of two bytes,
The check code of the content of multibyte, two bytes;
It sets the controller being connected in Intranet communication connection and each terminal device to using unified clock, controller exists
The theme that each terminal device is subscribed to is obtained in first clock cycle, and parses each terminal from the theme that each terminal device is subscribed to
The data requirements of equipment;
Controller obtains multiple data of each terminal device publication within the second clock period;
Controller is chosen from multiple data that each terminal device is issued according to the data requirements of each terminal device and is counted therewith
Corresponding terminal device is sent to according to the data that demand matches;
Each terminal device receives the data, to realize message subscribing and the publication between each terminal device.
Preferably, the simple message based on controller is subscribed in issuing service method, and the controller is at first
The theme that each terminal is subscribed to is obtained in the clock period, is specifically included:
Controller obtains the theme that each terminal device needs to subscribe within the first clock cycle in such a way that timing is inquired;
Or controller reads the historical data of the subscription theme of each terminal device within the first clock cycle.
Preferably, the simple message based on controller is subscribed in issuing service method, and the terminal device includes: to pass
One of sensor, switchgear, LED display, single-lamp controller are a variety of.
In conclusion by adopting the above-described technical solution, the present invention at least has the advantages that
By unified communication protocol, establishes a set of simple message based on controller and subscribes to issuing service method flow,
It can make still complete based on controller between each terminal device simple in the case where remote server network disconnects
Message subscribing and publication, that is, realize the autonomous communication between each terminal device under serverless network.
Detailed description of the invention
Fig. 1 is that the simple message according to an exemplary embodiment of the present invention based on controller subscribes to issuing service method flow
Figure.
Specific embodiment
With reference to the accompanying drawings and embodiments, the present invention will be described in further detail, so that the purpose of the present invention, technology
Scheme and advantage are more clearly understood.It should be appreciated that described herein, specific examples are only used to explain the present invention, and does not have to
It is of the invention in limiting.
Fig. 1 shows a kind of simple message based on controller according to an exemplary embodiment of the present invention and subscribes to issuing service
Method.The method of the embodiment specifically includes that
The communication connection of the Intranet between controller and each terminal device, the Intranet communication protocols are established based on Intranet communication protocol
View include the fixing head of two bytes, the mailing address of two bytes, the function code of byte, the packet mark of two bytes,
The check code of the content of multibyte, two bytes;
It sets the controller being connected in Intranet communication connection and each terminal device to using unified clock, controller exists
The theme that each terminal device is subscribed to is obtained in first clock cycle, and parses each terminal from the theme that each terminal device is subscribed to
The data requirements of equipment;
Controller obtains multiple data of each terminal device publication within the second clock period;
Controller is chosen from multiple data that each terminal device is issued according to the data requirements of each terminal device and is counted therewith
Corresponding terminal device is sent to according to the data that demand matches;
Each terminal device receives the data, to realize message subscribing and the publication between each terminal device.
Specifically, to realize that the above-mentioned simple message based on controller is subscribed to or issued, need to establish controller and each end
Intranet communication connection between end equipment, the Intranet communication connection make between controller and each terminal device based on unified interior Netcom
Letter agreement is communicated, and as shown in table 1, the Intranet communication protocol includes the communication of the fixing head of two bytes, two bytes
Address, the function code of byte, the packet mark of two bytes, the content of multibyte, two bytes check code.
Project | Fixing head | Mailing address | Function code | Packet mark | Content-length | Content | CRC16 |
Size | 2B | 2B | 1B | 2B | 2B | NB | 2B |
Table 1
Wherein, mailing address is that 0x0000 indicates that controller address, non-zero x0000 indicate terminal device address.Packet mark is received
Send definition, responder's duplication.CRC16 indicates the test value (check code) generated from fixing head to content.To make controller
Communication exchanges can be carried out based on unified language between each terminal device.During specific communication exchanges, by Intranet
Controller and each terminal device in communication connection are set as setting controller in the first prefixed time interval using unified clock
Interior (such as half an hour) actively with each terminal device Communication, to obtain theme that each terminal device is subscribed to (in communication protocols
It is presented in the content of view, controller is needed to be parsed).Or note is subscribed to by the history that controller directly reads each terminal device
Record obtains the theme that each terminal device needs to subscribe to acquisition, if controller is obtained respectively in a manner of reading history and subscribing to record
The theme that terminal device is subscribed to, then need at the beginning by the setting of the theme of the subscription of each terminal device in the controller, so as to
The reading of follow-up.And the data requirements of each terminal device is parsed from the theme that each terminal device is subscribed to by controller.
Then controller can obtain the data of each terminal device publication within the second clock period, wherein each data
It is associated with a corresponding theme (associated theme can be parsed from data content).And " obtain each terminal device hair
This step of the data of cloth " is within 1-5 minute after the completion of the step for " obtain each terminal device and subscribe to theme ", this step
Can progress " obtain each terminal device subscribe to theme " the step for before 1-5 minute within.Then controller is according to parsing
The data requirements of each terminal device out is screened in the data of each terminal device publication, is selected and data requirements
What is matched is sent to corresponding terminal device.For example, controller parses it from the theme that terminal device-sensor is subscribed to
Data requirements be A, the data requirements that controller parses it from the theme that terminal device-switch is subscribed to is B;Then it obtains
Terminal device-sensor publication data, and include B in the multiple data of terminal device-sensor publication, then get
The multiple data of terminal device-switch publication, and include A in multiple data.Then directly according to terminal device-switch data need
It asks, terminal device-sensor publication data B is sent to terminal device-switch.And according to terminal device-sensor number
It is A according to demand, is sent to terminal device-sensor for A is selected in terminal device-switch publication data.Finally by each end
End equipment receives the data that controller is sent, and completes corresponding operation.
In above-described embodiment, by unified communication protocol and based on the transfer of controller, it can be realized a terminal and set
Information exchange and reception and registration between standby realize simple message subscribing and publication.
The above, the only detailed description of the specific embodiment of the invention, rather than limitation of the present invention.The relevant technologies
The technical staff in field is not in the case where departing from principle and range of the invention, various replacements, modification and the improvement made
It should all be included in the protection scope of the present invention.
Claims (3)
1. a kind of simple message based on controller subscribes to issuing service method, which is characterized in that described to include:
The communication connection of the Intranet between controller and each terminal device, the Intranet communication protocol packet are established based on Intranet communication protocol
Include the fixing head of two bytes, the mailing address of two bytes, the function code of byte, the packet mark of two bytes, multiword
The check code of the content of section, two bytes;
It sets the controller being connected in Intranet communication connection and each terminal device to using unified clock, controller is first
The theme that each terminal device is subscribed to is obtained in clock cycle, and parses each terminal device from the theme that each terminal device is subscribed to
Data requirements;
Controller obtains multiple data of each terminal device publication within the second clock period;
Controller is chosen data therewith according to the data requirements of each terminal device from multiple data that each terminal device is issued and is needed
The data to match are asked to be sent to corresponding terminal device;
Each terminal device receives the data, to realize message subscribing and the publication between each terminal device.
2. the simple message according to claim 1 based on controller subscribes to issuing service method, which is characterized in that described
Controller obtains the theme that each terminal is subscribed within the first clock cycle, specifically includes:
Controller obtains the theme that each terminal device needs to subscribe within the first clock cycle in such a way that timing is inquired;
Or controller reads the historical data of the subscription theme of each terminal device within the first clock cycle.
3. the simple message according to claim 1 based on controller subscribes to issuing service method, which is characterized in that described
Terminal device includes: one of sensor, switchgear, LED display, single-lamp controller or a variety of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811528599.0A CN109729154B (en) | 2018-12-13 | 2018-12-13 | Simple message subscription and publishing service method based on controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811528599.0A CN109729154B (en) | 2018-12-13 | 2018-12-13 | Simple message subscription and publishing service method based on controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109729154A true CN109729154A (en) | 2019-05-07 |
CN109729154B CN109729154B (en) | 2021-10-15 |
Family
ID=66296326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811528599.0A Active CN109729154B (en) | 2018-12-13 | 2018-12-13 | Simple message subscription and publishing service method based on controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109729154B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114650309A (en) * | 2022-03-08 | 2022-06-21 | 青岛瑰宝电子科技有限公司 | Control method and battery BMS system control method |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101170557A (en) * | 2006-10-27 | 2008-04-30 | 国际商业机器公司 | Access control within a publish/subscribe system |
US20090182574A1 (en) * | 2008-01-16 | 2009-07-16 | International Business Machines Corporation | Limiting proxy subscription propagation in a publish/subscribe message broker network |
US20100268716A1 (en) * | 2009-04-17 | 2010-10-21 | Degaugue Fabien G | System and methods of providing interactive expertized communications responses using single and multi-channel site-specific integration |
CN102377686A (en) * | 2010-08-10 | 2012-03-14 | 阿里巴巴集团控股有限公司 | Message subscription system, method and device |
US20130183949A1 (en) * | 2012-01-13 | 2013-07-18 | Hotlynx Llc | Systems and methods for hosting anonymous virtual phone calls, text (sms) messages, and multi-media (mms) messages |
CN104660489A (en) * | 2013-11-22 | 2015-05-27 | 国际商业机器公司 | Method and system for controlling message delivery in messaging system |
CN106230914A (en) * | 2016-07-26 | 2016-12-14 | 重庆锐畅科技有限公司 | A kind of electronic whiteboard data-sharing systems issued based on subscription information |
CN106911593A (en) * | 2015-12-23 | 2017-06-30 | 中国科学院沈阳自动化研究所 | A kind of industrial control network array dispatching method based on SDN frameworks |
CN107888499A (en) * | 2017-11-17 | 2018-04-06 | 北京邮电大学 | A kind of distribution subscription system and message forwarding method based on SDN |
-
2018
- 2018-12-13 CN CN201811528599.0A patent/CN109729154B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101170557A (en) * | 2006-10-27 | 2008-04-30 | 国际商业机器公司 | Access control within a publish/subscribe system |
US20090182574A1 (en) * | 2008-01-16 | 2009-07-16 | International Business Machines Corporation | Limiting proxy subscription propagation in a publish/subscribe message broker network |
US20100268716A1 (en) * | 2009-04-17 | 2010-10-21 | Degaugue Fabien G | System and methods of providing interactive expertized communications responses using single and multi-channel site-specific integration |
CN102377686A (en) * | 2010-08-10 | 2012-03-14 | 阿里巴巴集团控股有限公司 | Message subscription system, method and device |
US20130183949A1 (en) * | 2012-01-13 | 2013-07-18 | Hotlynx Llc | Systems and methods for hosting anonymous virtual phone calls, text (sms) messages, and multi-media (mms) messages |
CN104660489A (en) * | 2013-11-22 | 2015-05-27 | 国际商业机器公司 | Method and system for controlling message delivery in messaging system |
CN106911593A (en) * | 2015-12-23 | 2017-06-30 | 中国科学院沈阳自动化研究所 | A kind of industrial control network array dispatching method based on SDN frameworks |
CN106230914A (en) * | 2016-07-26 | 2016-12-14 | 重庆锐畅科技有限公司 | A kind of electronic whiteboard data-sharing systems issued based on subscription information |
CN107888499A (en) * | 2017-11-17 | 2018-04-06 | 北京邮电大学 | A kind of distribution subscription system and message forwarding method based on SDN |
Non-Patent Citations (1)
Title |
---|
张玉杰: "基于MQTT 的物联网系统消息发布/订阅方法研究", 《电视技术》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114650309A (en) * | 2022-03-08 | 2022-06-21 | 青岛瑰宝电子科技有限公司 | Control method and battery BMS system control method |
CN114650309B (en) * | 2022-03-08 | 2023-11-10 | 青岛瑰宝电子科技有限公司 | Control method and battery BMS system control method |
Also Published As
Publication number | Publication date |
---|---|
CN109729154B (en) | 2021-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109981668A (en) | Common apparatus Internet of Things communication means based on the extensive agreement of MQTT | |
CN110691034B (en) | Method and device for transmitting service flow of flexible Ethernet | |
CN101300534B (en) | Method and system for the transmission of cyclic and acyclic data | |
CN109768970B (en) | Configurable universal protocol generation method | |
US8761706B2 (en) | Passive RF devices that communicate using a wireless network protocol | |
CN110049014A (en) | A kind of OpenAPI converting system and method based on more Modbus bus protocols | |
CN108322437B (en) | Adaptive communication method and device for multiple protocol devices | |
CN105636161B (en) | Access method, apparatus, communication terminal and the wireless network access point of wireless network | |
CN108377250A (en) | Educational robot programing system | |
CN107404468A (en) | The control method and device that internet of things equipment based on visible light communication networks | |
EP2991300A1 (en) | Information transmission and forwarding method and apparatus | |
CN103023750B (en) | Terminal obtains the method for message | |
CN109729154A (en) | A kind of simple message subscription issuing service method based on controller | |
CN102684844B (en) | Beacon frame sending method, Beacon frame receiving method, access point (AP) and wireless client | |
CN107784097A (en) | A kind of database table data transmission method, system and client, service end | |
CN208174736U (en) | Educational robot programing system | |
CN108958781B (en) | Remote embedded firmware online upgrading method | |
KR20160117811A (en) | Vehicle network system and protocol communication method thereof | |
CN106533703A (en) | Method and system for remotely controlling startup of application program | |
KR20170107469A (en) | Methods, devices, objects and corresponding computer program products for connecting objects to users | |
CN106462146A (en) | Field device, method for operating a field device and cloud service | |
CN111141015A (en) | Remote air conditioner control method | |
CN108886484A (en) | Communication device, communication system and communication means | |
CN108112053A (en) | A kind of method and mobile terminal for automatically accessing wireless network | |
CN111614612B (en) | Communication protocol implementation method, device, network management server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |