CN111245867A - Sensor data analysis method and system - Google Patents

Sensor data analysis method and system Download PDF

Info

Publication number
CN111245867A
CN111245867A CN202010148407.4A CN202010148407A CN111245867A CN 111245867 A CN111245867 A CN 111245867A CN 202010148407 A CN202010148407 A CN 202010148407A CN 111245867 A CN111245867 A CN 111245867A
Authority
CN
China
Prior art keywords
internet
layer protocol
analysis
application layer
application server
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.)
Withdrawn
Application number
CN202010148407.4A
Other languages
Chinese (zh)
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.)
Li Bingyong
Original Assignee
Li Bingyong
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 Li Bingyong filed Critical Li Bingyong
Priority to CN202010148407.4A priority Critical patent/CN111245867A/en
Publication of CN111245867A publication Critical patent/CN111245867A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention belongs to the field of software, and provides a sensor data analysis method and a system, wherein the method comprises the following steps: the sink node sends the encapsulation packet corresponding to each Internet of things application layer protocol to the application server; the application server generates a model according to a preset analysis efficiency index, analysis time, analysis data volume, occupied memory and a preset weight value of a packaging packet corresponding to each Internet of things application layer protocol during analysis, and generates an analysis efficiency index of each Internet of things application layer protocol under the application server; the application server sends an analysis message to the sink node; the sink node determines the Internet of things application layer protocol with the largest analysis efficiency index as the Internet of things application layer protocol suitable for the application server; and the sink node packages the second sensor data sent by the cluster head node by adopting an Internet of things application layer protocol suitable for the application server, and sends the packaged second sensor data to the application server. The invention can improve the efficiency of the application server for analyzing the data of the second sensor.

Description

Sensor data analysis method and system
Technical Field
The invention relates to the field of software, in particular to a sensor data analysis method and system.
Background
The sensor nodes need to acquire and store sensor data in the production process, high-efficiency data service is provided for upper-layer applications such as process monitoring and optimization, benefit evaluation and management decision, the convergent nodes of the Internet of things can access application servers provided by various different manufacturers in the face of Internet of things applications in different environments of various industries, and the application servers can apply the sensor data after analyzing the sensor data packaged by the convergent nodes.
However, the conventional application server has the following problems in the process of analyzing sensor data, which are detailed as follows:
problem 1: and the application server is not compatible with an Internet of things application layer protocol adopted when the sink node encapsulates the sensor data. Because there are many internet of things application layer protocols, for example, the internet of things application layer protocol 1 is used, when the sink node uses the internet of things application layer protocol 1 to package sensor data, the application server is not compatible with the internet of things application layer protocol 1 due to different manufacturers or equipment models, and at this time, even if the sink node continues to use the internet of things application layer protocol 1, the application server cannot analyze the sensor data packaged by the internet of things application layer protocol 1, so that network resources between the sink node and the application server are wasted.
Problem 2: the application server is compatible with an Internet of things application layer protocol adopted when the sink node encapsulates the sensor data, but the efficiency of analyzing the sensor data is low. Because the current internet of things application layer protocols are all oriented to all application servers, the actual processing capacity of the application servers cannot be considered, so that the internet of things application layer protocols suitable for the application servers cannot be found out in various internet of things application layer protocols, and therefore, the efficiency of analyzing sensor data by the application servers is not improved.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method and a system for analyzing sensor data, which are used to solve the problem that the prior art is not favorable for improving the efficiency of analyzing sensor data by an application server.
To achieve the above and other related objects, the present invention provides a sensor data parsing method,
the sensor data analysis method comprises the following steps that a sink node and an application server which are applied to the Internet of things are provided, a plurality of protocol interfaces are configured in the sink node, each protocol interface corresponds to an Internet of things application layer protocol, the sink node is respectively connected with a cluster head node and the application server, and the sink node, the cluster head node and the application server form a sensor data analysis system, and the sensor data analysis method comprises the following steps:
the sink node receives first sensor data sent by the cluster head node through a wireless sensor network;
the sink node sends indication information to the application server;
the application server sends equipment information to the sink node according to the indication information, wherein the equipment information carries an equipment identifier of the application server and equipment type, equipment model, manufacturer ID and manufacturer name of the application server;
the sink node receives the device information sent by the application server according to the indication information, the first sensor data is respectively encapsulated through each Internet of things application layer protocol, encapsulation packets corresponding to each Internet of things application layer protocol are respectively generated, and the encapsulation packets corresponding to each Internet of things application layer protocol are sent to the application server;
the application server adds the analysis task of the encapsulation packet corresponding to each Internet of things application layer protocol to a service queue corresponding to each Internet of things application layer protocol;
the application server configures a data analysis thread corresponding to each Internet of things application layer protocol, and analyzes an analysis task of a packaging packet corresponding to each Internet of things application layer protocol in the service queue through the data analysis thread corresponding to each Internet of things application layer protocol;
the application server acquires the analysis time, the analysis data volume and the occupied memory of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis, and generates an analysis efficiency index of each Internet of things application layer protocol under the application server according to a preset analysis efficiency index generation model, the analysis time, the analysis data volume, the occupied memory and a preset weight of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis;
the application server calls a message sending interface, and sends an analysis message to the sink node through the message sending interface, wherein the analysis message carries an analysis result identifier and an analysis efficiency index of each Internet of things application layer protocol; the sink node receives and stores the analysis information sent by the application server, and identifies the analysis result identifier in the analysis information;
if the sink node recognizes that the analysis result identifier is a successful identifier, sequentially storing the analysis efficiency indexes of each Internet of things application layer protocol in an analysis efficiency index table from large to small, determining the Internet of things application layer protocol with the largest analysis efficiency index as the Internet of things application layer protocol suitable for the application server, and storing the equipment information and the Internet of things application layer protocol suitable for the application server in a protocol table;
and the sink node packages second sensor data sent by the cluster head node by adopting an Internet of things application layer protocol suitable for the application server, and sends the packaged second sensor data to the application server, wherein the generation time of the second sensor data is after that of the first sensor.
Preferably, the adding, by the application server, the parsing task of the encapsulation packet corresponding to each internet of things application layer protocol to the service queue corresponding to each internet of things application layer protocol specifically includes:
the method comprises the steps that an application server obtains an available memory space, whether the capacity of the available memory space is larger than a preset threshold value or not is judged, when the capacity of the available memory space is determined to be larger than the preset threshold value, a service queue corresponding to each Internet of things application layer protocol is established in the memory space, an analysis task of a packaging packet corresponding to each Internet of things application layer protocol is established, the analysis task of the packaging packet corresponding to each Internet of things application layer protocol is added to the service queue corresponding to each Internet of things application layer protocol, and each Internet of things application layer protocol corresponds to one service queue.
Preferably, the application server configures a data parsing thread corresponding to each internet of things application layer protocol, and parses an parsing task of an encapsulation packet corresponding to each internet of things application layer protocol in the service queue through the data parsing thread corresponding to each internet of things application layer protocol, specifically:
the method comprises the steps that the application server reads the working state of a processor, when the working state of the processor is in an idle state, the processor is used for configuring data analysis threads corresponding to each Internet of things application layer protocol, and the data analysis threads corresponding to each Internet of things application layer protocol are used for analyzing analysis tasks of encapsulation packets corresponding to each Internet of things application layer protocol in a service queue.
Preferably, after the sink node receives and stores the parsing information sent by the application server, and identifies the parsing result identifier in the parsing message, the method further includes:
and if the sink node identifies that the analysis result identifier is a failure identifier, retransmitting the encapsulation packet corresponding to each Internet of things application layer protocol to the application server, recording the retransmission times, and stopping the transmission until the retransmission times reach the preset times.
Preferably, after the sink node encapsulates, by using an internet of things application layer protocol suitable for the application server, the second sensor data sent by the cluster head node, and sends the encapsulated second sensor data to the application server, the method further includes:
and the sink node transmits the protocol table to other sink nodes to realize the sharing of the protocol table.
The invention provides a sensor data analysis system which comprises a sink node, a cluster head node and an application server, wherein a plurality of protocol interfaces are configured in the sink node, each protocol interface corresponds to an Internet of things application layer protocol, and the sink node is respectively connected with the cluster head node and the application server; the sink node includes: the device comprises a receiving module, a first sending module, a receiving module, an identification module, a storage module and a third sending module; the application server includes: the system comprises a second sending module, an adding module, an analyzing module, an obtaining module and a calling module;
the receiving module is used for the sink node to receive first sensor data sent by the cluster head node through a wireless sensor network;
the first sending module is configured to send, by the sink node, indication information to the application server;
the second sending module is configured to send, by the application server, device information to the sink node according to the indication information, where the device information carries a device identifier of the application server and a device type, a device model, a vendor ID, and a vendor name of the application server;
the receiving module is configured to receive, by the sink node, device information sent by the application server according to the indication information, respectively encapsulate the first sensor data through each internet of things application layer protocol, respectively generate an encapsulation packet corresponding to each internet of things application layer protocol, and send the encapsulation packet corresponding to each internet of things application layer protocol to the application server;
the adding module is used for the application server to add the analysis task of the encapsulation packet corresponding to each Internet of things application layer protocol into the service queue corresponding to each Internet of things application layer protocol;
the analysis module is used for configuring a data analysis thread corresponding to each Internet of things application layer protocol by the application server and analyzing an analysis task of a packaging packet corresponding to each Internet of things application layer protocol in the service queue through the data analysis thread corresponding to each Internet of things application layer protocol;
the obtaining module is used for the application server to obtain the analysis time, the analysis data volume and the occupied memory of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis, and generate an analysis efficiency index of each Internet of things application layer protocol under the application server according to a preset analysis efficiency index generation model, the analysis time, the analysis data volume, the occupied memory and a preset weight of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis;
the calling module is used for calling a message sending interface by the application server and sending an analysis message to the sink node through the message sending interface, wherein the analysis message carries an analysis result identifier and an analysis efficiency index of each Internet of things application layer protocol;
the identification module is used for the sink node to receive and store the analysis information sent by the application server and identify the analysis result identifier in the analysis information;
the storage module is used for sequentially storing the analysis efficiency indexes of each internet of things application layer protocol in an analysis efficiency index table from large to small if the sink node identifies that the analysis result identifier is a successful identifier, determining the internet of things application layer protocol with the largest analysis efficiency index as the internet of things application layer protocol suitable for the application server, and storing the equipment information and the internet of things application layer protocol suitable for the application server in a protocol table;
the third sending module is configured to encapsulate, by the sink node, second sensor data sent by the cluster head node by using an internet of things application layer protocol suitable for the application server, and send the encapsulated second sensor data to the application server, where generation time of the second sensor data is after generation time of the first sensor.
Preferably, in the system, the adding module is specifically configured to:
the method comprises the steps that an application server obtains an available memory space, whether the capacity of the available memory space is larger than a preset threshold value or not is judged, when the capacity of the available memory space is determined to be larger than the preset threshold value, a service queue corresponding to each Internet of things application layer protocol is established in the memory space, an analysis task of a packaging packet corresponding to each Internet of things application layer protocol is established, the analysis task of the packaging packet corresponding to each Internet of things application layer protocol is added to the service queue corresponding to each Internet of things application layer protocol, and each Internet of things application layer protocol corresponds to one service queue.
Preferably, in the system, the parsing module is specifically configured to:
the method comprises the steps that the application server reads the working state of a processor, when the working state of the processor is in an idle state, the processor is used for configuring data analysis threads corresponding to each Internet of things application layer protocol, and the data analysis threads corresponding to each Internet of things application layer protocol are used for analyzing analysis tasks of encapsulation packets corresponding to each Internet of things application layer protocol in a service queue.
Preferably, the system further comprises:
and the recording module is used for retransmitting the encapsulation packet corresponding to each Internet of things application layer protocol to the application server if the sink node identifies that the analysis result identifier is a failure identifier, and recording the retransmission times until the retransmission times reach the preset times.
Preferably, the system further comprises:
and the transmission module is used for transmitting the protocol table to other sink nodes by the sink node so as to realize the sharing of the protocol table.
As described above, the sensor data analysis method and system according to the present invention have the following two advantageous effects, which are detailed as follows:
on one hand, the sink node determines the Internet of things application layer protocol with the largest analysis efficiency index as the Internet of things application layer protocol corresponding to the application server, and finds out the Internet of things application layer protocol suitable for the application server;
on the other hand, the sink node encapsulates the second sensor data sent by the cluster head node by adopting an internet of things application layer protocol suitable for the application server, and due to pertinence, the operating load of the application server in the process of analyzing the second sensor data can be effectively reduced, the analysis time of the second sensor data is reduced, and the efficiency of analyzing the second sensor data by the application server is further improved.
Drawings
FIG. 1 is a schematic diagram of a sensor data analysis method according to the present invention.
FIG. 2 is a schematic diagram of a sensor data parsing system according to the present invention.
Detailed Description
The application provides a sensor data analysis method and system, is applied to convergent node, the application server of thing networking, dispose a plurality of agreement interfaces in the convergent node, every the agreement interface corresponds a thing networking application layer agreement, the convergent node connect respectively cluster head node with the application server, the convergent node cluster head node and the application server constitutes sensor data analysis system.
The Internet of things application layer protocol comprises MQTT, CoAP, XMPP and SoAP. The sink node is configured with four protocol interfaces which respectively correspond to MQTT, CoAP, XMPP and SoAP.
The MQTT (Message Queuing Telemetry Transport) is used for transmitting messages.
Among them, CoAP (Constrained Application Protocol).
Among them, XMPP (Extensible Messaging and Presence Protocol).
Among them, the SoAP (Simple Object Access Protocol).
Referring to fig. 1, the present invention provides a sensor data analysis method, which is detailed as follows:
s1, the cluster head node is connected with a plurality of sensor nodes in a downward mode, receives sensor data uploaded by the sensor nodes, fuses the sensor data uploaded by the sensor nodes to obtain first sensor data, and then sends the first sensor data to the sink node through the wireless sensor network;
s2, the sink node receives first sensor data sent by the cluster head node through a wireless sensor network;
s3, the sink node sends indication information to the application server;
s4, the application server sends equipment information to the sink node according to the indication information, wherein the equipment information carries the equipment identification of the application server and the equipment type, the equipment model, the manufacturer ID and the manufacturer name of the application server;
s5, the sink node receives the device information sent by the application server according to the indication information, encapsulates the first sensor data through each Internet of things application layer protocol, generates encapsulation packets corresponding to each Internet of things application layer protocol, and sends the encapsulation packets corresponding to each Internet of things application layer protocol to the application server;
it should be noted that the sink node receives the device information sent by the application server according to the indication information, matches the device identifier in the history with the device identifier of the application server, if the matching is unsuccessful, identifies the connection between the sink node and the application server as the initial connection, encapsulates the first sensor data respectively through each internet of things application layer protocol, generates each encapsulation packet corresponding to the internet of things application layer protocol, and sends each encapsulation packet corresponding to the internet of things application layer protocol to the application server.
Wherein, the device identifier in the history record is the device identifier of the accessed application server.
Since the sink node only targets the application server connected for the first time, and does not target all application servers, the sink node does not need to execute step S5 every time it is connected to one application server, thereby reducing the number of times of encapsulation and saving network traffic.
S6, the application server obtains an available memory space, judges whether the capacity of the available memory space is larger than a preset threshold value, when the capacity of the available memory space is determined to be larger than the preset threshold value, creates a service queue corresponding to each Internet of things application layer protocol in the memory space, creates an analysis task of a packaging packet corresponding to each Internet of things application layer protocol, adds the analysis task of the packaging packet corresponding to each Internet of things application layer protocol into the service queue corresponding to each Internet of things application layer protocol, and each Internet of things application layer protocol corresponds to one service queue;
and the corresponding relation between each Internet of things application layer protocol and the service queue is in one-to-one correspondence.
For convenience of description, 3 internet of things application layer protocols are taken as examples, and are detailed as follows:
the 3 Internet of things application layer protocols are respectively an Internet of things application layer protocol 1, an Internet of things application layer protocol 2 and an Internet of things application layer protocol 3;
service queues corresponding to the internet of things application layer protocol 1, the internet of things application layer protocol 2 and the internet of things application layer protocol 3 are respectively a service queue 1, a service queue 2 and a service queue 3;
the analysis task of the encapsulation packet corresponding to the internet of things application layer protocol 1 is added to the service queue 1, the analysis task of the encapsulation packet corresponding to the internet of things application layer protocol 2 is added to the service queue 2, and the analysis task of the encapsulation packet corresponding to the internet of things application layer protocol 3 is added to the service queue 3.
S7, the application server reads the working state of the processor, when the working state of the processor is an idle state, the processor is used for configuring a data analysis thread corresponding to each Internet of things application layer protocol, and the data analysis thread corresponding to each Internet of things application layer protocol is used for analyzing the analysis task of the encapsulation packet corresponding to each Internet of things application layer protocol in the service queue;
the method has the advantages that the problem that the analysis task of the encapsulation packet corresponding to each Internet of things application layer protocol in the service queue is analyzed by the data analysis thread corresponding to each Internet of things application layer protocol is avoided, the problem that the analysis conflict is generated by analyzing the analysis task of the encapsulation packet corresponding to one Internet of things application layer protocol in the service queue by the data analysis thread corresponding to different Internet of things application layer protocols is avoided, and meanwhile, one of the service queues is analyzed.
S8, the application server obtains the analysis time, the analysis data volume and the occupied memory of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis, and generates an analysis efficiency index of each Internet of things application layer protocol under the application server according to a preset analysis efficiency index generation model, the analysis time, the analysis data volume, the occupied memory and a preset weight of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis;
it should be noted that the analysis efficiency index generation model is as follows:
the analysis efficiency index of each internet of things application layer protocol is the ratio of preset time to the analysis time of each encapsulation packet corresponding to the internet of things application layer protocol during analysis, namely 0.25+ the ratio of preset data quantity to the analysis data quantity of each encapsulation packet corresponding to the internet of things application layer protocol during analysis, namely 0.5+ the ratio of preset memory to the occupied memory of each encapsulation packet corresponding to the internet of things application layer protocol during analysis, namely 0.25.
The analysis efficiency index is an index describing the level of analysis efficiency. A higher analysis efficiency index indicates a higher analysis efficiency, and a lower analysis efficiency index indicates a lower analysis efficiency.
The preset time, the preset data size and the preset memory are set by the user or are default by the system, and are not limited herein.
S9, the application server calls a message sending interface, and sends an analysis message to the sink node through the message sending interface, wherein the analysis message carries an analysis result identifier and an analysis efficiency index of each Internet of things application layer protocol;
it should be noted that the format of the analysis message is { Mac, Protocol, ID, index }, where Mac is the device identifier of the application server, Protocol is the internet of things application layer Protocol, ID is the analysis result identifier, and index is the analysis efficiency index.
In this way, the subsequent sink node can quickly identify the analysis result identifier in the analysis message through the format of the analysis message by setting the format of the analysis message.
S10, the sink node receives and stores the analysis information sent by the application server, and identifies the analysis result identifier in the analysis information;
s11, if the sink node identifies that the analysis result identifier is a successful identifier, sequentially storing the analysis efficiency indexes of each Internet of things application layer protocol in an analysis efficiency index table from large to small, determining the Internet of things application layer protocol with the largest analysis efficiency index as the Internet of things application layer protocol suitable for the application server, and storing the equipment information and the Internet of things application layer protocol suitable for the application server in a protocol table;
wherein, the analysis efficiency index table is a list for storing the analysis efficiency indexes.
The protocol table is a list for storing Internet of things application layer protocols suitable for the application server.
And establishing a corresponding relation between the equipment information and an Internet of things application layer protocol suitable for the application server, and storing the equipment information and the Internet of things application layer protocol in a protocol table.
The protocol table is divided into two columns, one column stores equipment information, and the other column stores the Internet of things application layer protocol corresponding to the equipment information and suitable for the application server.
S12, the sink node packages second sensor data sent by the cluster head node by adopting an Internet of things application layer protocol suitable for the application server, and sends the packaged second sensor data to the application server, wherein the generation time of the second sensor data is after that of the first sensor.
The application server can also adopt an internet of things application layer protocol suitable for the application server to analyze the packaged second sensor data.
For convenience of description, 3 internet of things application layer protocols are taken as examples, and are detailed as follows:
the 3 Internet of things application layer protocols are an Internet of things application layer protocol 1, an Internet of things application layer protocol 2 and an Internet of things application layer protocol 3 respectively;
the analysis efficiency indexes corresponding to the Internet of things application layer protocol 1, the Internet of things application layer protocol 2 and the Internet of things application layer protocol 3 are respectively an analysis efficiency index 1, an analysis efficiency index 2 and an analysis efficiency index 3;
taking the maximum number of the analysis efficiency index 3 in the analysis efficiency index 1, the analysis efficiency index 2 and the analysis efficiency index 3 as an example, since the analysis efficiency index corresponding to the internet of things application layer protocol 3 is the analysis efficiency index 3, the internet of things application layer protocol 3 is determined to be the internet of things application layer protocol suitable for the application server.
And the sink node packages the second sensor data sent by the cluster head node by adopting an Internet of things application layer protocol 3. Correspondingly, the application server adopts an internet of things application layer protocol 3 to analyze the packaged second sensor data.
Wherein a generation time of the second sensor data is subsequent to a generation time of the first sensor. The sensor data after the generation time of the first sensor are both second sensor data.
For example, the generation time of the first sensor is three pm, and after the three pm, the sensor data sent by the cluster head node is the second sensor data.
In the embodiment of the invention, the operation load of the application server in the process of analyzing the second sensor data can be effectively reduced, the analysis time of the second sensor data is reduced, and the efficiency of analyzing the second sensor data by the application server is further improved.
And if the sink node identifies that the analysis result identifier is a failure identifier, retransmitting the encapsulation packet corresponding to each Internet of things application layer protocol to the application server, recording the retransmission times, and stopping the transmission until the retransmission times reach the preset times.
Among them, such beneficial effect is: and retransmission of the encapsulation packet corresponding to the Internet of things application layer protocol is realized.
And the sink node transmits the protocol table to other sink nodes to realize the sharing of the protocol table.
Referring to fig. 2, the present invention provides a sensor data parsing system, including a cluster node, a cluster head node, and an application server, where the cluster head node is connected to a plurality of sensor nodes, the cluster node is configured with a plurality of protocol interfaces, each protocol interface corresponds to an internet of things application layer protocol, and the cluster node is connected to the cluster head node and the application server respectively; the sink node includes: the device comprises a receiving module, a first sending module, a receiving module, an identification module, a storage module and a third sending module; the application server includes: the system comprises a second sending module, an adding module, an analyzing module, an obtaining module and a calling module;
the receiving module is used for the sink node to receive first sensor data sent by the cluster head node through a wireless sensor network;
the first sending module is configured to send, by the sink node, indication information to the application server;
the second sending module is configured to send, by the application server, device information to the sink node according to the indication information, where the device information carries a device identifier of the application server and a device type, a device model, a vendor ID, and a vendor name of the application server;
the receiving module is configured to receive, by the sink node, device information sent by the application server according to the indication information, respectively encapsulate the first sensor data through each internet of things application layer protocol, respectively generate an encapsulation packet corresponding to each internet of things application layer protocol, and send the encapsulation packet corresponding to each internet of things application layer protocol to the application server;
the adding module is used for the application server to add the analysis task of the encapsulation packet corresponding to each Internet of things application layer protocol into the service queue corresponding to each Internet of things application layer protocol;
the analysis module is used for configuring a data analysis thread corresponding to each Internet of things application layer protocol by the application server and analyzing an analysis task of a packaging packet corresponding to each Internet of things application layer protocol in the service queue through the data analysis thread corresponding to each Internet of things application layer protocol;
the obtaining module is used for the application server to obtain the analysis time, the analysis data volume and the occupied memory of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis, and generate an analysis efficiency index of each Internet of things application layer protocol under the application server according to a preset analysis efficiency index generation model, the analysis time, the analysis data volume, the occupied memory and a preset weight of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis;
the calling module is used for calling a message sending interface by the application server and sending an analysis message to the sink node through the message sending interface, wherein the analysis message carries an analysis result identifier and an analysis efficiency index of each Internet of things application layer protocol;
the identification module is used for the sink node to receive and store the analysis information sent by the application server and identify the analysis result identifier in the analysis information;
the storage module is used for sequentially storing the analysis efficiency indexes of each internet of things application layer protocol in an analysis efficiency index table from large to small if the sink node identifies that the analysis result identifier is a successful identifier, determining the internet of things application layer protocol with the largest analysis efficiency index as the internet of things application layer protocol suitable for the application server, and storing the equipment information and the internet of things application layer protocol suitable for the application server in a protocol table;
the third sending module is configured to encapsulate, by the sink node, second sensor data sent by the cluster head node by using an internet of things application layer protocol suitable for the application server, and send the encapsulated second sensor data to the application server, where generation time of the second sensor data is after generation time of the first sensor.
Modifications and variations can be made to the above-described embodiments without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A sensor data analysis method is characterized in that a sink node and an application server which are applied to the Internet of things are provided, a plurality of protocol interfaces are configured in the sink node, each protocol interface corresponds to an Internet of things application layer protocol, the sink node is respectively connected with a cluster head node and the application server, the sink node, the cluster head node and the application server form a sensor data analysis system, and the method comprises the following steps:
the sink node receives first sensor data sent by the cluster head node through a wireless sensor network;
the sink node sends indication information to the application server;
the application server sends equipment information to the sink node according to the indication information, wherein the equipment information carries an equipment identifier of the application server and equipment type, equipment model, manufacturer ID and manufacturer name of the application server;
the sink node receives the device information sent by the application server according to the indication information, the first sensor data is respectively encapsulated through each Internet of things application layer protocol, encapsulation packets corresponding to each Internet of things application layer protocol are respectively generated, and the encapsulation packets corresponding to each Internet of things application layer protocol are sent to the application server;
the application server adds the analysis task of the encapsulation packet corresponding to each Internet of things application layer protocol to a service queue corresponding to each Internet of things application layer protocol;
the application server configures a data analysis thread corresponding to each Internet of things application layer protocol, and analyzes an analysis task of a packaging packet corresponding to each Internet of things application layer protocol in the service queue through the data analysis thread corresponding to each Internet of things application layer protocol;
the application server acquires the analysis time, the analysis data volume and the occupied memory of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis, and generates an analysis efficiency index of each Internet of things application layer protocol under the application server according to a preset analysis efficiency index generation model, the analysis time, the analysis data volume, the occupied memory and a preset weight of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis;
the application server calls a message sending interface, and sends an analysis message to the sink node through the message sending interface, wherein the analysis message carries an analysis result identifier and an analysis efficiency index of each Internet of things application layer protocol;
the sink node receives and stores the analysis information sent by the application server, and identifies the analysis result identifier in the analysis information;
if the sink node recognizes that the analysis result identifier is a successful identifier, sequentially storing the analysis efficiency indexes of each Internet of things application layer protocol in an analysis efficiency index table from large to small, determining the Internet of things application layer protocol with the largest analysis efficiency index as the Internet of things application layer protocol suitable for the application server, and storing the equipment information and the Internet of things application layer protocol suitable for the application server in a protocol table;
and the sink node packages second sensor data sent by the cluster head node by adopting an Internet of things application layer protocol suitable for the application server, and sends the packaged second sensor data to the application server, wherein the generation time of the second sensor data is after that of the first sensor.
2. The method according to claim 1, wherein the adding, by the application server, the parsing task of the encapsulation packet corresponding to each internet of things application layer protocol to the service queue corresponding to each internet of things application layer protocol specifically includes:
the method comprises the steps that an application server obtains an available memory space, whether the capacity of the available memory space is larger than a preset threshold value or not is judged, when the capacity of the available memory space is determined to be larger than the preset threshold value, a service queue corresponding to each Internet of things application layer protocol is established in the memory space, an analysis task of a packaging packet corresponding to each Internet of things application layer protocol is established, the analysis task of the packaging packet corresponding to each Internet of things application layer protocol is added to the service queue corresponding to each Internet of things application layer protocol, and each Internet of things application layer protocol corresponds to one service queue.
3. The method according to claim 1, wherein the application server configures a data parsing thread corresponding to each internet of things application layer protocol, and parses, through the data parsing thread corresponding to each internet of things application layer protocol, a parsing task of an encapsulation packet corresponding to each internet of things application layer protocol in the service queue, specifically:
the method comprises the steps that the application server reads the working state of a processor, when the working state of the processor is in an idle state, the processor is used for configuring data analysis threads corresponding to each Internet of things application layer protocol, and the data analysis threads corresponding to each Internet of things application layer protocol are used for analyzing analysis tasks of encapsulation packets corresponding to each Internet of things application layer protocol in a service queue.
4. The method according to claim 1, wherein after the sink node receives and stores the parsing information sent by the application server, and identifies the parsing result identifier in the parsing message, the method further comprises:
and if the sink node identifies that the analysis result identifier is a failure identifier, retransmitting the encapsulation packet corresponding to each Internet of things application layer protocol to the application server, recording the retransmission times, and stopping the transmission until the retransmission times reach the preset times.
5. The method according to claim 1, wherein after the sink node encapsulates the second sensor data sent by the cluster head node by using an internet of things application layer protocol suitable for the application server, and sends the encapsulated second sensor data to the application server, the method further comprises:
and the sink node transmits the protocol table to other sink nodes to realize the sharing of the protocol table.
6. A sensor data analysis system comprises a sink node, a cluster head node and an application server, wherein a plurality of protocol interfaces are configured in the sink node, each protocol interface corresponds to an Internet of things application layer protocol, and the sink node is respectively connected with the cluster head node and the application server; the sink node includes: the device comprises a receiving module, a first sending module, a receiving module, an identification module, a storage module and a third sending module; the application server includes: the system comprises a second sending module, an adding module, an analyzing module, an obtaining module and a calling module;
the receiving module is used for the sink node to receive first sensor data sent by the cluster head node through a wireless sensor network;
the first sending module is configured to send, by the sink node, indication information to the application server;
the second sending module is configured to send, by the application server, device information to the sink node according to the indication information, where the device information carries a device identifier of the application server and a device type, a device model, a vendor ID, and a vendor name of the application server;
the receiving module is configured to receive, by the sink node, device information sent by the application server according to the indication information, respectively encapsulate the first sensor data through each internet of things application layer protocol, respectively generate an encapsulation packet corresponding to each internet of things application layer protocol, and send the encapsulation packet corresponding to each internet of things application layer protocol to the application server;
the adding module is used for the application server to add the analysis task of the encapsulation packet corresponding to each Internet of things application layer protocol into the service queue corresponding to each Internet of things application layer protocol;
the analysis module is used for configuring a data analysis thread corresponding to each Internet of things application layer protocol by the application server and analyzing an analysis task of a packaging packet corresponding to each Internet of things application layer protocol in the service queue through the data analysis thread corresponding to each Internet of things application layer protocol;
the obtaining module is used for the application server to obtain the analysis time, the analysis data volume and the occupied memory of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis, and generate an analysis efficiency index of each Internet of things application layer protocol under the application server according to a preset analysis efficiency index generation model, the analysis time, the analysis data volume, the occupied memory and a preset weight of the encapsulation packet corresponding to each Internet of things application layer protocol during analysis;
the calling module is used for calling a message sending interface by the application server and sending an analysis message to the sink node through the message sending interface, wherein the analysis message carries an analysis result identifier and an analysis efficiency index of each Internet of things application layer protocol;
the identification module is used for the sink node to receive and store the analysis information sent by the application server and identify the analysis result identifier in the analysis information;
the storage module is used for sequentially storing the analysis efficiency indexes of each internet of things application layer protocol in an analysis efficiency index table from large to small if the sink node identifies that the analysis result identifier is a successful identifier, determining the internet of things application layer protocol with the largest analysis efficiency index as the internet of things application layer protocol suitable for the application server, and storing the equipment information and the internet of things application layer protocol suitable for the application server in a protocol table;
the third sending module is configured to encapsulate, by the sink node, second sensor data sent by the cluster head node by using an internet of things application layer protocol suitable for the application server, and send the encapsulated second sensor data to the application server, where generation time of the second sensor data is after generation time of the first sensor.
7. The system of claim 6, wherein the adding module is specifically configured to:
the method comprises the steps that an application server obtains an available memory space, whether the capacity of the available memory space is larger than a preset threshold value or not is judged, when the capacity of the available memory space is determined to be larger than the preset threshold value, a service queue corresponding to each Internet of things application layer protocol is established in the memory space, an analysis task of a packaging packet corresponding to each Internet of things application layer protocol is established, the analysis task of the packaging packet corresponding to each Internet of things application layer protocol is added to the service queue corresponding to each Internet of things application layer protocol, and each Internet of things application layer protocol corresponds to one service queue.
8. The system of claim 6, wherein the parsing module is specifically configured to:
the method comprises the steps that the application server reads the working state of a processor, when the working state of the processor is in an idle state, the processor is used for configuring data analysis threads corresponding to each Internet of things application layer protocol, and the data analysis threads corresponding to each Internet of things application layer protocol are used for analyzing analysis tasks of encapsulation packets corresponding to each Internet of things application layer protocol in a service queue.
9. The system of claim 6, further comprising:
and the recording module is used for retransmitting the encapsulation packet corresponding to each Internet of things application layer protocol to the application server if the sink node identifies that the analysis result identifier is a failure identifier, and recording the retransmission times until the retransmission times reach the preset times.
10. The system of claim 6, further comprising:
and the transmission module is used for transmitting the protocol table to other sink nodes by the sink node so as to realize the sharing of the protocol table.
CN202010148407.4A 2020-03-05 2020-03-05 Sensor data analysis method and system Withdrawn CN111245867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010148407.4A CN111245867A (en) 2020-03-05 2020-03-05 Sensor data analysis method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010148407.4A CN111245867A (en) 2020-03-05 2020-03-05 Sensor data analysis method and system

Publications (1)

Publication Number Publication Date
CN111245867A true CN111245867A (en) 2020-06-05

Family

ID=70873326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010148407.4A Withdrawn CN111245867A (en) 2020-03-05 2020-03-05 Sensor data analysis method and system

Country Status (1)

Country Link
CN (1) CN111245867A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745284A (en) * 2022-03-07 2022-07-12 深圳渊联技术有限公司 Configuration method and device of industrial Internet of things and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745284A (en) * 2022-03-07 2022-07-12 深圳渊联技术有限公司 Configuration method and device of industrial Internet of things and computer readable storage medium

Similar Documents

Publication Publication Date Title
JP7284528B2 (en) Transmission method and server of OPC UA message by CoAP
CN112769938B (en) Kubernets cloud side communication system and method based on QUIC
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN111343218A (en) Data sending and receiving method based on heartbeat message, storage medium and processor
CN107566233A (en) The resource share method and device of home appliance
CN104639385B (en) Detect the method and apparatus of L2VPN network user's side interface connectivity
CN109547162B (en) Data communication method based on two sets of one-way boundaries
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN108377579B (en) Method, device, terminal and storage medium for controlling radio resource control connection
CN110708234B (en) Message transmission processing method, message transmission processing device and storage medium
CN110519388B (en) Processing method and device for block chain request, electronic equipment and readable storage medium
CN111245867A (en) Sensor data analysis method and system
CN112347105A (en) General data service platform based on resource tree
CN108076535B (en) Method, device, terminal and storage medium for controlling radio resource control connection
CN112910909B (en) Data packet processing method based on conversion of CoAP protocol and HTTP protocol
CN117082102A (en) Service-oriented architecture-based vehicle data processing method, device and equipment
CN113032054B (en) Service execution method and device, storage medium and electronic device
CN116743886A (en) Industrial control equipment data acquisition system based on Internet of things
CN112637370B (en) Data processing method, device, equipment and storage medium
CN115442177A (en) Data communication method and device of CAN (controller area network)
CN111240867B (en) Information communication system and method
CN103618716B (en) Conversation interaction method, equipment and system of terminal WAN management protocol
CN114915555A (en) Gateway driving communication method, device, equipment and storage medium
CN112019491B (en) Message processing method and system
CN113992644A (en) Internet of things gateway system based on non-service technology and data processing method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200605

WW01 Invention patent application withdrawn after publication