Summary of the invention
The present invention is carried out to solve the problems referred to above, it is therefore intended that provide one allow monitoring
Terminal just can send, to all of device end, the packet come without complex configurations and solve
The data packet generating device analysed and the Internet of things system comprising this data packet generating device.
The invention provides a kind of data packet generating device, be arranged in device end, for root
Generate reported data bag according to the data collecting rule corresponding with device end, there is such spy
Levy, including: equipment side information storage part, the plurality of data of at least corresponding storage device terminal
Item and corresponding identifier;Information gathering portion, gathers data item based on data collecting rule
Currency;Equipment side retrieval acquisition unit, based on data collecting rule to equipment side information storage part
Carry out retrieving and obtaining the identifier of corresponding data item;Reported data bag generating unit, based on number
Reported data bag is become according to the currency that item is collected data item raw with the identifier being acquired.
In the data packet generating device that the present invention provides, it is also possible to have a feature in that it
In, identifier includes at least: data item coding, SIC code, data type coding, example
Coding and numerical value unit encoding.
Present invention also offers a kind of Internet of things system, have the feature that, including: at least
One device end, comprises respectively: data packet generating device and equipment side communication unit;And it is logical
Cross communication network and communicate the monitor terminal being connected with device end, comprise: monitoring side information is deposited
Storage portion, monitoring side communication unit and monitoring dissection process portion, side;Wherein, data packet generating device
For aforesaid data packet generating device, monitoring side information storage part storage has data item information to store
Table, trade information storage table, data type information storage table, example information storage table, numerical value
Unit information storage table, data item message store table correspondence storage has data item title, data item
Coding and data type name;Trade information storage table correspondence storage has film name and row
Industry encodes;Data type information storage table correspondence storage has data type name and data type
Coding;Example information storage table correspondence storage has instance name and example code;Numerical value unit
Message store table correspondence storage has organization and numerical value unit encoding, and equipment side communication unit leads to
Cross the reported data bag that data packet generating device generates by communication network to send to monitor terminal, prison
Control side communication unit receives device end by communication network and sends the reported data bag of coming, and monitors side
Dissection process portion is based on data item message store table, trade information storage table, data type information
Storage table, example information storage table and the upper count off to receiving of the numerical value unit information storage table
Carry out dissection process according to bag, thus the device end obtaining correspondence sends the reported data of coming.
In the Internet of things system that the present invention provides, it is also possible to have a feature in that wherein,
Each device end also comprises: equipment side dissection process portion and equipment side control portion, monitor terminal
Also comprise: picture storage part, input display part, monitoring side are retrieved acquisition unit and issue data
Bag generating unit, picture storage part storage has control command setting screen, input display part display control
Order setting screen processed, thus allow user's desired value according to demand to the data item of device end
Being set, monitoring side information is stored by retrieval acquisition unit in monitoring side based on the data item being set
Portion carries out retrieving and obtain corresponding identifier, issues packet generating unit at least based on being set
The desired value of fixed data item and identifier generate and issue packet, and monitoring side communication unit is by logical
Communication network sends issuing packet to corresponding device end, and equipment side communication unit is by logical
What communication network reception transmission came issues packet, the identification based on self of equipment side dissection process portion
Number carry out dissection process to issuing packet, thus obtain the desired value of the data item being set,
Equipment side control portion performs corresponding operation based on desired value control unit end.
The effect of invention and effect
According to data packet generating device involved in the present invention and Internet of things system, because setting
In standby terminal, information gathering portion can gather the currency of data item according to data collecting rule,
Equipment side retrieval acquisition unit can obtain from equipment side information storage part according to data collecting rule
Fetch data the corresponding identifier of item, and packet generating unit can currency based on data item
Generating reported data bag with identifier, equipment side communication unit can be by communication network by upper count off
Sending to monitor terminal according to bag, monitoring side communication unit can receive what transmission came by communication network
Reported data bag, monitoring dissection process portion, side can be based on data item message store table, industry letter
Breath storage table, data type information storage table, example information storage table and numerical value unit information
Storage table carries out dissection process to the reported data bag received, thus obtains the equipment of correspondence eventually
End sends the reported data of coming, so, present invention achieves and allow the monitor terminal can be to arbitrarily connecing
Enter communication network device end send come reported data bag resolve, monitor terminal without
The networking configuration of complexity is carried out for different device ends, simple and convenient, it is achieved thereby that set
The quick networking of standby terminal.
Detailed description of the invention
For the technological means making the present invention realize, creation characteristic, reach purpose and be prone to effect
Understanding and understand, following example combine accompanying drawing to the data packet generating device of the present invention and Internet of Things
Net system is specifically addressed.
<embodiment>
Fig. 1 is the structured flowchart of Internet of things system in embodiments of the invention.
As it is shown in figure 1, in the present embodiment, Internet of things system 100 includes a device end
10 and communicate the monitor terminal 30 of connection by communication network 20 device end 10.
In the present embodiment, communication network 20 can be wireless WIFI network, 3G network,
4G network or cable network etc.;This communication network 20 achieves device end 10 with monitoring eventually
Intercommunication is obtained between end 30.Specifically, on the one hand, device end 10 can be by communication
Network 20 is run the real-time running data produced and is sent to monitor terminal as reported data
30, thus allow user just can grasp the fortune of device end 10 the most in real time from monitor terminal 30
Market condition;On the other hand, user can input as the control issuing data from monitor terminal 30
System is ordered and is allowed it pass through communication network 20 and sends to corresponding device end 10, thus controls
This device end 10 performs to operate accordingly.
Fig. 2 is the structured flowchart of device end in embodiments of the invention.
As in figure 2 it is shown, device end 10 comprises equipment side information storage part 11, information gathering
Portion 12, equipment side retrieval acquisition unit 13, reported data bag generating unit 14, equipment side communication unit
15, equipment side dissection process portion 16, equipment side temporary storage part 17 and control above-mentioned each portion run
Equipment side control portion 18.Wherein, equipment side information storage part 11, information gathering portion 12,
Equipment side retrieval acquisition unit 13 and reported data bag generating unit 14 constitute packet and generate dress
Put 40.
Fig. 3 is the structured flowchart of monitor terminal in embodiments of the invention.
As it is shown on figure 3, monitor terminal 30 comprises monitoring side apparatus side information storage part 31, prison
Control side communication unit 32, monitoring dissection process portion, side 33, picture storage part 34, input display part
35, monitoring side is retrieved acquisition unit 36, is issued packet generating unit 37, monitoring side temporary storage part 38
And control the control portion, monitoring side 39 that above-mentioned each portion runs.
Information storage part 31 storage of monitoring side apparatus side has data item message store table, industry to believe
Breath storage table, data type information storage table, example information storage table, numerical value unit information are deposited
Storage table.
Fig. 4 is the schematic diagram of data item message store table in embodiments of the invention.
As shown in Figure 4, data item message store table 311 is for storing the whole of all industries
Data item title 311b of data item 311a, data item coding 311c and data item type
311d.Such as, in the diagram, data item name is referred to as the data item of " presence ", is used for
Representing gateway or the presence of equipment, its data item is encoded to " 6 ", data type is " cloth
Your number ", memonic symbol be " onlinestatus ".
Fig. 5 is the schematic diagram of trade information storage table in embodiments of the invention.
As it is shown in figure 5, trade information storage table 312 is used for storing all of category of employment 312a
Film name 312b and SIC code 312c.Such as, in Figure 5, as a example by agricultural,
Its film name 312b be " agriculture ", SIC code 312c be " 1 ".Further, since
There is multiple data item to be widely used in industry-by-industry, therefore, be provided with in category of employment
Universal, its film name 312b be " general ", SIC code 312c be " 0 ".
Fig. 6 is the schematic diagram of data type information storage table in embodiments of the invention.
As shown in Figure 6, data type information storage table 313 is used for storing all types of data
The data type name 313b of 313a, data type coding 313c, byte number 313d and
Data classification 313e.Such as, in figure 6, data type name 313b is " int "
Data, are used for representing signed integer, and its data type coding 313c is " 6 ", byte number
313d be " 4 bytes " and data classification 313e be " integer ".
Fig. 7 is the schematic diagram of example information storage table in embodiments of the invention.
As it is shown in fig. 7, example information storage table 314 is for storing the reality of each example 314a
Example coding 314b and instance name 314c.Such as, in the figure 7, example code 314b is
What " 0 " represented is first example, and what example code 314b represented for " 1 " is second
Example, by that analogy, is so easy to multiple phases simultaneous in a device end 10
Same data item makes a distinction.
Fig. 8 is the schematic diagram of numerical value unit information storage table in embodiments of the invention.
As shown in Figure 8, numerical value unit information storage table 315 is used for storing all of data unit
Organization 315b of 315a and unit encoding 315c.Such as, in fig. 8, with temperature list
As a example by Wei, for degree Celsius to represent the implication of Temperature numerical, its organization 315b is
" DEG C ", unit encoding 315c are " 3 ".
The corresponding storage of equipment side information storage part 11 has the facility information correspondence of device end 10
Table.
Fig. 9 is the schematic diagram of facility information correspondence table in embodiments of the invention.
As it is shown in figure 9, facility information correspondence table 10a stores the five of this device end 10
Individual data item 10b data item coding 311b, SIC code 312c, data type coding 313c,
Example code, unit encoding 315c and read-write mark 10c.Here, each data item 10b
Data item coding 311b, SIC code 312c, data type coding 313c, example code
And unit encoding 315c constitutes unique identifier of this data item 10b.
Such as, in fig .9, data item coding 311b is " 2048 ", SIC code 312c
For " 1 ", data type coding 313c be " 1 ", example code for " 0 " and unit volume
Code 315c for " 0 " represent be industry be agricultural, data item name be referred to as P in soil H-number, number
It is data item 10b that ubyte and data do not have unit according to type.It addition, as shown in Figure 9:
The read-write mark 10c of this data item 10b is " read-only ", represents that this data item 10b is corresponding
Actuator does not support that data write, and i.e., the real time data of this data item 10b can be by equipment
Terminal 10 sends to monitor terminal 30 and allows user check, and user cannot be from monitor terminal 30
Transmitting control commands controls the actuator that this data item 10b is corresponding.
Information gathering portion 12 gathers the currency of corresponding data item based on data collecting rule.
In the present embodiment, the rule of default setting during data collecting rule is device end 10.Example
As, P in soil H-number reports once per hour.Correspondingly, the soil that information gathering portion 12 collects
It can be 5 that earth pH value obtains currency.
Equipment side retrieves acquisition unit 13 based on data collecting rule from equipment side information storage part 11
The facility information correspondence table 10a of storage obtains the corresponding identifier of data item.Such as,
For P in soil H-number, the identifier that equipment side retrieval acquisition unit 13 gets is: data
Coding 311b be " 2048 ", SIC code 312c be that " 1 ", data type encode 313c
It is " 0 " for " 1 ", example code and unit encoding 315c is " 0 ".
The data item that reported data bag generating unit 14 collects based on information gathering portion 12 current
The identifier that value and equipment side retrieval acquisition unit 13 get generates reported data bag.Such as,
This reported data bag comprises: data item coding 311b " 2048 ", SIC code 312c " 1 ",
Data type coding 313c " 1 ", example code " 0 " and unit encoding 315c " 0 ",
Numerical value " 0x05 ".
Equipment side communication unit 15 is communicated with monitor terminal by communication network 20 and is connected, thus
Reported data bag reported data bag generating unit 14 generated sends to monitor terminal 30.
Monitoring side communication unit 32 is communicated with device end 10 by communication network 20 and is connected,
It is thus possible to receive device end 10 by communication network 20 to send the reported data bag of coming.
Monitoring dissection process portion, side 33 is based on storage in monitoring side apparatus side information storage part 31
Data item message store table 311, trade information storage table 312, data type information storage table
313, example information storage table 314 and numerical value unit information storage table 315, to monitoring side
The reported data bag that communication unit 32 receives carries out dissection process, thus obtains the equipment of correspondence
Terminal 10 sends the reported data of coming.
Specifically, according to data item message store table 311 to data item coding 311b " 2048 "
" P in soil H-number " is obtained after resolving;According to trade information storage table 312, industry is compiled
Code 312c " 1 " obtains " agriculture " after resolving;Table 313 is stored according to data type information
Data type coding 313c " 1 " obtains " ubyte " after resolving;According to example information
Storage table 314 obtains " first example " after resolving example code " 0 ";According to
Numerical value unit information storage table 315 obtains " nothing after resolving unit encoding 315c " 0 "
Unit ";Logarithm value " 0x05 " carries out parsing and obtains metric numerical value 5.
To sum up, the reported data bag carried out device end 10 transmission obtains after carrying out dissection process
: the P in soil H-number of agriculture field is 5.
Picture storage part 34 storage has control command setting screen.
Figure 10 is the schematic diagram of control command setting screen in embodiments of the invention.
As shown in Figure 10, control command setting screen 341 comprise device end choice box 341a,
Control command display box 341b, determine button 341c and cancel button 341d.Wherein, if
Show in the choice box of standby terminal choice box 341a that the equipment of all of device end 10 is compiled
Number, consequently facilitating device end 10 is selected by user according to device numbering.Control command
Display box 341b is for showing the control command that user inputs, and this control command comprises with selected
Data item that fixed device end 10 matches and the desired value of this data item.
Input display part 35 is used for showing control command setting screen 341, thus allow user from
Device end choice box 341a selects specific device end 10, and is controlling life further
Make the desired value inputting corresponding data item and this data item in display box 341b, the most really
Determine button 341c.In the present embodiment, selected in device end choice box 341a is to set
Unique device end 10 of standby numbering " 0x00001b1e027b ", control command can be
" fully open control valve ".
Monitoring side retrieval acquisition unit 36 is used for according to the data item being set from monitoring side apparatus side
Information storage part 31 obtains the identifier that this data item is corresponding.
Issue packet generating unit 37 for the data item according to the device end 10 being set
The desired value of identifier and data item generates and issues packet.
Monitoring side communication unit 32 will issue packet generating unit 37 by communication network 20 and generate
Issue packet send to corresponding device end 10.
Equipment side communication unit 15 in device end 10 receives monitoring eventually by communication network 20
What end 30 transmission came issues packet.
The identifier of equipment side dissection process portion 16 self storage based on device end 10 is to prison
What control terminal 30 was sent issue packet resolves, thus obtain the data item that is set with
And corresponding desired value, thus it is corresponding to allow equipment side control portion 18 control based on this desired value
Actuator perform corresponding operation.
The data item that equipment side temporary storage part 17 collects for temporarily storage information gathering portion 12
Reported data bag, monitor terminal 30 that currency, reported data bag generating unit 14 generate are sent
Issue packet, equipment side dissection process portion 16 packet resolves the number obtained by issuing
Desired value according to item.
Monitoring side temporary storage part 38 sends, for temporary transient storage device terminal 10, the reported data of coming
Bag, monitoring dissection process portion, side 33 are by resolving reported data, the use obtained in reported data bag
The device numbering of device end 10 and the identifier of data item and desired value that family sets, issue
What packet generating unit 37 generated issues packet.
Comprise for controlling information gathering portion 12 in equipment side control portion 18, equipment side retrieval obtains
Take portion 13, reported data bag generating unit 14, equipment side communication unit 15, equipment side dissection process
The computer program that portion 16 and equipment side temporary storage part 17 run.
Comprise for controlling monitoring side communication unit 32 in monitoring control portion, side 39, monitoring side resolves
Process portion 33, input display part 35, monitoring side are retrieved acquisition unit 36, are issued packet generation
The computer program that portion 37 and monitoring side temporary storage part 38 run.
Figure 11 is that in embodiments of the invention, device end sends reported data to monitor terminal
Action flow chart.
As shown in figure 11, in the Internet of things system 100 of the present embodiment, device end 10 is to prison
Control terminal 30 sends reported data and specifically includes following steps:
Step S1-1, information gathering portion 12 gathers corresponding data item based on data collecting rule
Currency, subsequently into step S1-2.
Step S1-2, equipment side retrieval acquisition unit 13 is believed from equipment side based on data collecting rule
The facility information correspondence table 10a of breath storage part 11 storage obtains the corresponding knowledge of data item
Alias, subsequently into step S1-3.
Step S1-3, reported data bag generating unit 14 collects based on information gathering portion 12
The identifier that the currency of data item and equipment side retrieval acquisition unit 13 get generates upper count off
According to bag, subsequently into step S1-4.
Step S1-4, equipment side communication unit 15 passes through communication network 20 by reported data Bao Sheng
The reported data bag that one-tenth portion 14 generates sends to monitor terminal 30, subsequently into step S1-5.
Step S1-5, monitoring side communication unit 32 receives device end 10 by communication network 20
Send the reported data bag of coming, subsequently into step S1-6.
Step S1-6, monitoring dissection process portion, side 33 based on data item message store table 311,
Trade information storage table 312, data type information storage table 313, example information storage table 314
And numerical value unit information storage table 315, the upper count off that monitoring side communication unit 32 is received
Carry out dissection process according to bag, thus obtain the reported data of correspondence, subsequently into step S1-7.
Step S1-7, input display part 35 shows, so resolving the reported data obtained
Rear entrance done state.
Figure 12 is that in embodiments of the invention, monitor terminal issues data to device end transmission
Action flow chart.
As shown in figure 12, in the Internet of things system 100 of the present embodiment, monitor terminal 30 is to setting
Standby terminal 10 sends and issues data and specifically include following steps:
Step S2-1, input display part 35 shows control command setting screen 341, allows user
From device end choice box 341a, select specific device end 10, control life further
Make the desired value inputting corresponding data item and this data item in display box 341b, and press
Under determine button 341c, subsequently into step S2-2.
Step S2-2, acquisition unit 36 is retrieved based on the data item being set from monitoring side in monitoring side
Equipment side information storage part 31 obtains the identifier that this data item is corresponding, subsequently into step
Rapid S2-3.
Step S2-3, issues packet generating unit 37 based on the device end 10 being set
The desired value of device numbering, the identifier of data item and data item generates and issues packet, so
Rear entrance step S2-4.
Step S2-4, equipment side communication unit 15 receives monitor terminal 30 by communication network 20
What transmission came issues packet, subsequently into step S2-5.
Step S2-5, equipment side dissection process portion 16 self storage based on device end 10
The identifier packet that issues that monitor terminal 30 is sent resolve, thus obtain being set
Fixed data item and corresponding desired value, subsequently into step S2-6.
Step S2-6, equipment side control portion 18 controls corresponding actuator based on this desired value
Perform corresponding operation, subsequently into done state.