CN112688967A - Internet of things data processing method, device, equipment and storage medium - Google Patents

Internet of things data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112688967A
CN112688967A CN202110265298.9A CN202110265298A CN112688967A CN 112688967 A CN112688967 A CN 112688967A CN 202110265298 A CN202110265298 A CN 202110265298A CN 112688967 A CN112688967 A CN 112688967A
Authority
CN
China
Prior art keywords
internet
message
things
terminal
target port
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
Application number
CN202110265298.9A
Other languages
Chinese (zh)
Other versions
CN112688967B (en
Inventor
钟浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Wiregate Technology Co ltd
Original Assignee
Wuhan Wiregate Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Wiregate Technology Co ltd filed Critical Wuhan Wiregate Technology Co ltd
Priority to CN202110265298.9A priority Critical patent/CN112688967B/en
Publication of CN112688967A publication Critical patent/CN112688967A/en
Application granted granted Critical
Publication of CN112688967B publication Critical patent/CN112688967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the disclosure discloses a method, a device, equipment and a storage medium for processing data of the internet of things, which are applied to a server of the internet of things and comprise the following steps: receiving a first message sent by a first Internet of things terminal; the first message carries preset information; the preset information includes: a first identifier and a second identifier; the first identity indicates a network protocol; the second identification indicates a communication address and/or a target port which has a corresponding relation with the network protocol; the communication address is a communication access address of the terminal of the Internet of things accessing the server; the target port is a port through which the first message reaches the server; determining an analysis script by using a second identifier in the preset information carried by the first message; messages sent by different types of Internet of things terminals correspond to different analysis scripts; messages sent by the same type of Internet of things terminals use the same parsing script; and analyzing the first message according to the analysis script and processing the service data corresponding to the first message by using the analysis script.

Description

Internet of things data processing method, device, equipment and storage medium
Technical Field
The disclosed embodiment relates to the technical field of information, in particular to but not limited to a method, a device, equipment and a storage medium for processing data of the Internet of things.
Background
Because of LoRa (Long Range Radio, Long distance withoutLine-to-line) and narrowband-to-Internet of Things (NB-IoT) NB-IoT, and fifth generation mobile communications (5)thGeneration, 5G) technology, the interconnection of everything has been the trend.
With the gradual expansion of the scale of the Internet of things, the communication mode of the Internet of things tends to be diversified, and the application of the Internet of things is increasingly enriched. At present, to access the internet of things equipment to the platform, development and deployment need to be performed on each piece of internet of things equipment of the access platform.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, equipment and a storage medium for processing data of the Internet of things.
The technical scheme of the embodiment of the disclosure is realized as follows:
in a first aspect, an embodiment of the present disclosure provides an internet of things data processing method, which is applied to an internet of things server, and the method includes:
receiving a first message sent by a first Internet of things terminal; the first message carries preset information; wherein the preset information includes: a first identifier and a second identifier; the first identity is indicative of a network protocol; the second identification indicates a communication address and/or a target port which has a corresponding relation with the network protocol; the communication address is a communication access address of the internet of things terminal accessing the server; the target port is a port through which the first message reaches the server;
determining an analysis script according to a second identifier in preset information carried by the first message; the messages sent by different types of terminals of the Internet of things correspond to different analysis scripts; messages sent by the same type of Internet of things terminals use the same parsing script;
and analyzing the first message according to the analysis script, and processing the service data corresponding to the first message by using the analysis script.
Based on the above scheme, before receiving the first message sent by the first internet of things terminal, the method further includes:
receiving a second message of a second networking terminal and a message data format of the second networking terminal; wherein the second packet carries protocol information; the protocol information is used for indicating a network protocol adopted by the second message; the network protocols and message data formats adopted by the first internet of things terminal and the second internet of things terminal are the same;
determining an analysis script capable of analyzing the second networking terminal message and processing service data corresponding to the second networking terminal message according to the network protocol indicated by the protocol information and the message data format;
determining a communication access address and/or a target port of the second networking terminal;
and determining the communication access address and/or the target port of the first internet of things terminal according to the communication access address and/or the target port, and recording the second identifier corresponding to the network protocol.
Based on the above scheme, the determining, according to the network protocol indicated by the protocol information and the message data format, an analysis script capable of analyzing the second internet-of-things terminal message and processing service data corresponding to the second internet-of-things terminal message includes:
determining an analysis script template corresponding to the network protocol according to the network protocol indicated by the protocol information;
and modifying the analysis script template according to the message data format, determining an analysis script for analyzing the internet of things terminal message and processing the service data corresponding to the second internet of things terminal message, and storing the analysis script.
Based on the above scheme, the determining the target port of the second networked terminal includes:
and determining a target port of the second networking terminal according to the message data format.
In a second aspect, an embodiment of the present disclosure provides an internet of things data processing apparatus, which is applied to an internet of things server, the apparatus including:
the first receiving unit is used for receiving a first message sent by a first Internet of things terminal; the first message carries preset information; wherein the preset information includes: a first identifier and a second identifier; the first identity is indicative of a network protocol; the second identification indicates a communication address and/or a target port which has a corresponding relation with the network protocol; the communication address is a communication access address of the internet of things terminal accessing the server; the target port is a port through which the first message reaches the server;
a first determining unit, configured to determine an analysis script according to a second identifier in preset information carried in the first packet; the messages sent by different types of terminals of the Internet of things correspond to different analysis scripts; messages sent by the same type of Internet of things terminals use the same parsing script;
and the analysis unit is used for analyzing the first message according to the analysis script and processing the service data corresponding to the first message by using the analysis script.
Based on the above-mentioned scheme, the method,
the second receiving unit is used for receiving a second message of a second networking terminal and a message data format of the second networking terminal; wherein the second packet carries protocol information; the protocol information is used for indicating a network protocol adopted by the second message; the network protocols and message data formats adopted by the first internet of things terminal and the second internet of things terminal are the same;
a second determining unit, configured to determine, according to the network protocol indicated by the protocol information and the message data format, an analysis script that can analyze the internet of things terminal message and is used to process service data corresponding to the second internet of things terminal message, and determine a communication access address and/or a target port of the second internet of things terminal; determining a communication access address and/or a target port of the first internet of things terminal according to the communication access address and/or the target port;
and the recording unit is used for recording a second identifier corresponding to the network protocol according to the communication access address and/or the target port of the first internet of things terminal.
Based on the foregoing scheme, the second determining unit is specifically configured to:
determining an analysis script template corresponding to the network protocol according to the network protocol indicated by the protocol information;
modifying the analysis script template according to the message data format, determining an analysis script for analyzing the second networking terminal message and processing the service data corresponding to the second networking terminal message, and storing the analysis script;
and determining a target port of the second networking terminal according to the message data format.
In a third aspect, an embodiment of the present disclosure provides an internet of things data processing device, where the device at least includes: a processor and a storage medium configured to store executable instructions, wherein: the processor is configured to execute stored executable instructions, and the executable instructions are configured to execute the data processing method of the internet of things provided by the scheme.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are configured to execute the data processing method for the internet of things provided in the foregoing aspect.
According to the data processing method of the internet of things, the analysis script is determined according to the communication address and/or the target port which is established with the corresponding relation between the preset information of the received first message and the network protocol, the first message is analyzed by the analysis script and the service data of the first message is processed, on the one hand, the message analysis script is provided for the internet of things terminals adopting the same network protocol, repeated development of a server on data processing modules of different devices adopting the same network protocol is reduced, and the messages sent by different types of the internet of things terminals correspond to different analysis scripts; the messages sent by the internet of things terminals of the same type use the same analysis script, and the analysis script is provided for the internet of things terminals with the same communication addresses and/or the same target ports, which are established with the corresponding relation with the network protocol, so that the repeated development of each internet of things terminal device of the same type is reduced, a server does not need to independently perform complete access, development and deployment of analysis codes on each internet of things terminal, and the complexity and coupling of communication between the internet of things terminal and the internet of things server are greatly reduced. In the second aspect, the corresponding analysis script is determined according to the communication address and/or the target port which is in the preset information of the internet of things terminal and has the corresponding relation with the network protocol, so that the compatibility of the server and the communication of various internet of things terminals using different network protocols is realized, and the complexity of the access of the internet of things equipment is reduced.
Drawings
Fig. 1 is a schematic flow chart of a data processing method of the internet of things according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another data processing method for the internet of things according to the embodiment of the present disclosure;
fig. 3 is a schematic flow chart of another data processing method for the internet of things according to the embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a data processing device of the internet of things according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an internet of things data processing device provided in the embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where appropriate, to enable embodiments of the invention described herein to be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The technical solution of the present invention is further described in detail with reference to the drawings and the specific embodiments of the specification.
The embodiment of the disclosure provides an internet of things data processing method, which is applied to internet of things data processing equipment, and the functions realized by the method can be realized by calling a program code through a processor in a server, and certainly, the program code can be stored in a computer storage medium.
Fig. 1 is a schematic flow diagram of a data processing method of an internet of things provided in an embodiment of the present disclosure, and as shown in fig. 1, the method includes:
step S110, receiving a first message sent by a first Internet of things terminal; the first message carries preset information; wherein the preset information includes: a first identifier and a second identifier; the first identity is indicative of a network protocol; the second identification indicates a communication address and/or a target port which has a corresponding relation with the network protocol; the communication address is a communication access address of the internet of things terminal accessing the server; the target port is a port through which the first message reaches the server;
step S120, determining an analysis script according to a second identifier in preset information carried by the first message; the messages sent by different types of terminals of the Internet of things correspond to different analysis scripts; messages sent by the same type of Internet of things terminals use the same parsing script;
step S130, the first message is analyzed according to the analysis script, and the service data corresponding to the first message is processed by using the analysis script.
Wherein, thing networking terminal equipment is the equipment that connects sensing network layer and transmission network layer in the thing networking, realizes gathering data and send data to the network layer, for example: the system comprises an image transmission service terminal for automobile monitoring, an electric power monitoring terminal and the like. The parsing script may be at least an execution file for parsing the message. The network protocols include, but are not limited to: transmission Control Protocol (TCP), User Datagram Protocol (UDP), Hypertext Transfer Protocol (HTTP), Message queue Telemetry Transport Protocol (MQTT), and the like.
In an embodiment, the preset information is set by the terminal device of the internet of things, and the preset information is generally carried in header information of the message.
The first identifier indicates a type of a network protocol used by the packet, including but not limited to TCP, UDP, and the like. The first identifier may be: a number and/or version number of a network protocol type.
Illustratively, the second identifier indicates a destination port of the message sent by the terminal of the internet of things, that is, indicates a server port to which the message is sent by the terminal of the internet of things, and the destination port has a corresponding relationship with a network protocol, and the destination ports of the messages using different network protocols are also different.
Illustratively, the second identification may be a port number of the destination port.
The current internet of things equipment has abundant protocols, and different protocol implementation methods are different. Based on the network protocols, richer service protocols and different internet of things products are provided, the using scenes are different, and the transmitted message formats are different if the acquired data are different. This results in the inability to use a protocol-based process to be compatible with other protocols. Different data formats and different protocols of the Internet of things equipment need to be accessed into the Internet of things platform, and the equipment needs to be developed, so that a large amount of repeated development and deployment are caused.
According to the method and the device, the analysis script is determined by establishing the communication address and/or the target port with the corresponding relation with the network protocol according to the preset information of the received first message, the analysis script is adopted to analyze the first message and process the service data of the first message, and the messages sent by different types of terminals of the internet of things correspond to different analysis scripts; the messages sent by the terminals of the internet of things of the same type use the same analysis script, on one hand, the messages sent by the terminals of the internet of things of different types correspond to different analysis scripts by providing the analysis script for the terminals of the internet of things with the same communication address and/or target port which are in corresponding relation with the network protocol; the messages sent by the same type of Internet of things terminals use the same analysis script, repeated development of all Internet of things terminal equipment with the same type is reduced, a server does not need to perform complete access and analysis code development and deployment on each type of Internet of things terminal, and the complexity and coupling of communication between the Internet of things terminals and the Internet of things server are greatly reduced. On the other hand, the message analysis script is provided for the internet of things terminals adopting the same network protocol, repeated development of the server on data processing modules of different devices adopting the same network protocol is reduced, the server does not need to independently perform complete access and development and deployment of analysis codes on each internet of things terminal, and the complexity and coupling of communication between the internet of things terminals and the internet of things server are greatly reduced.
In some embodiments, as shown in fig. 2, before receiving the first message sent by the first internet of things terminal, the method further includes:
step S210, receiving a second message of a second networking terminal and a message data format of the second networking terminal; wherein the second packet carries protocol information; the protocol information is used for indicating a network protocol adopted by the second message; the network protocols and message data formats adopted by the first internet of things terminal and the second internet of things terminal are the same;
the specific protocol information may be a protocol identifier and/or a protocol name of a network protocol adopted by the second packet;
step S220, determining an analysis script capable of analyzing the second networking terminal message and processing service data corresponding to the second networking terminal message according to the network protocol indicated by the protocol information and the message data format;
step S230, determining a communication access address and/or a target port of the second networking terminal;
step S240, determining the communication access address and/or the target port of the first internet of things terminal according to the communication access address and/or the target port, and recording the second identifier corresponding to the network protocol.
The message data format is a data format defined by the Internet of things terminal. The message data format specifies the service content corresponding to the message data, and the service data of the message can be processed according to the message data format.
In an embodiment, a message data format of the internet of things terminal corresponds to a device type of the internet of things terminal, and message data formats corresponding to internet of things terminals of different device types are different, wherein the device type of the internet of things terminal is classified according to a data type collected by the internet of things terminal, for example: the pressure monitor acquires pressure data, the camera acquires image data, the pressure detector and the camera are respectively of two different equipment types, and message data formats adopted by the pressure detector and the camera are different.
In one embodiment, a communication access address and/or a target port of the second networking terminal is determined; determining the communication access address and/or the target port of the first internet of things terminal according to the communication access address and/or the target port, specifically comprising: and the server allocates a corresponding communication access address and/or a corresponding target port for the second networking terminal according to the same network protocol and message data format adopted by the second networking terminal, and sets the first networking terminal to adopt the same communication access address and/or the same target port as the second networking terminal.
The embodiment analyzes the corresponding relation between the message data format of the current internet of things terminal and the type of the internet of things terminal equipment, determines the analysis script corresponding to the equipment type of the internet of things terminal by determining the analysis script according to the network protocol and the data format of the internet of things terminal, and the first internet of things terminal and the second internet of things terminal adopt the same communication access address and/or target port, so that the server can directly call the corresponding analysis script to analyze the message and process message service data by using the analysis script after the target port receives the message, thereby realizing the development of the analysis program only once for the internet of things terminal equipment with the same type of equipment, and reducing the complexity of accessing various internet of things terminals and the repeated development of the analysis program for the server.
In some embodiments, the determining the target port of the terminal of the internet of things includes:
and determining a target port of the second networking terminal according to the message data format.
Specifically, in this embodiment, the internet of things terminals of the same type use the same network protocol, the type of the internet of things terminal device corresponds to the message data format and the target port, and the server allocates different target ports to the internet of things terminals according to the difference in the message data format of the internet of things terminals, so that the corresponding target ports are allocated to different types of internet of things terminals, and the second identifier corresponding to the network protocol is recorded according to the target ports.
In this embodiment, the message data format of the internet of things terminal is set by the internet of things terminal in a user-defined manner, and indicates the specific meaning of the message data. The message data format specifies the meaning of each bit of data in the message data. For example: when the internet of things terminal is a temperature and humidity sensor, the message data format defined by the temperature and humidity sensor is as follows: the first bit of the message data indicates whether the device is controlled: 01 is equipment controlled, 00 is equipment uncontrolled; the second bit indicates the packet type: 01 represents the message of the type of the downloading service, and 02 represents the message of the type of the request service; the third bit represents the collected temperature value; the fourth represents the collected humidity value. If the message data of the temperature and humidity sensor is 0x01023557, the following information can be obtained according to the format of the message data: the message data are sequentially represented from left to right as: 01 denotes that the equipment is controlled, 02 denotes that a message for requesting service is carried out, 35 denotes that the temperature value collected by the temperature and humidity sensor is 52 ℃, and 57 denotes that the relative humidity is 87%. For another example, when the internet of things terminal is a pressure sensor, the message data format of the pressure sensor specifies that the first bit of the message data represents the message type, the second bit represents the pressure value, and the like. The specific service content of the service data in the message can be specified according to the message data format, for example, the message data format of the pressure sensor specifies that the first bit of the message service data represents the message data type, the second bit represents the pressure value and the like, so that the pressure value and the like of the pressure sensor can be obtained.
The message data formats of different types of terminal equipment of the Internet of things are different, and after receiving a file containing the message data format provided by the terminal of the Internet of things, the server allocates different ports for receiving the message of the terminal of the Internet of things according to the different specific contents of the message data format. For example, a port with a port number of 1024 corresponds to the message data format of the temperature and humidity sensor, and a port with a port number of 1025 corresponds to the message data format of the pressure sensor.
Because the internet of things terminals of different device types have different message data formats, in this embodiment, by determining an analysis script corresponding to the message data format and capable of analyzing the message and processing the service data corresponding to the second internet of things terminal message, and a message target port corresponding to the message data format, it is realized that the internet of things terminal devices of the same type send the message data to the same target port, and the server can directly determine the analysis script for analyzing the message and processing the service data corresponding to the message according to the target port of the second identifier of the message.
In some embodiments, the determining, according to the network protocol indicated by the protocol information and the message data format, an analysis script that can analyze the second internet-of-things terminal message and is used for processing service data corresponding to the second internet-of-things terminal message includes:
determining an analysis script template corresponding to the network protocol according to the network protocol indicated by the protocol information;
and modifying the analysis script template according to the message data format, determining an analysis script for analyzing the internet of things terminal message and processing the service data corresponding to the second internet of things terminal message, and storing the analysis script.
Specifically, after receiving the message of the second internet-of-things terminal, the server analyzes the network protocol adopted by the message, calls an analysis script template corresponding to the network protocol, modifies the analysis script template according to the received message data format of the second internet-of-things terminal, and determines and stores an analysis script file which is finally used for analyzing the second internet-of-things terminal message and used for processing service data corresponding to the internet-of-things terminal message. In an embodiment, the server analyzes the received message by using the analysis script, and performs service processing on service data corresponding to the message.
In an embodiment, the communication access address and/or the target port and the parsing script establish a corresponding relationship, and different parsing scripts corresponding to different communication access addresses and/or target ports are different. And different analysis scripts are used for analyzing and processing messages sent by different types of Internet of things terminals. The messages sent by the terminals of the Internet of things of the same type use the same analysis script.
In one embodiment, after the server determines the parsing script, the method further comprises: and marking the analysis script according to the message data format of the terminal of the Internet of things. The method comprises the steps that a corresponding relation is established between the equipment type of the terminal of the Internet of things and the message data format of the terminal of the Internet of things, when the terminal of the Internet of things corresponding to the message data format is accessed into a server, the server can directly call an analysis script capable of analyzing the message of the terminal of the Internet of things according to a corresponding mark, and when the server needs to stop the service of the terminal of the Internet of things of a specified equipment type, the server can directly stop the execution of the corresponding analysis script according to the mark corresponding to the terminal of the Internet.
In some embodiments, after determining the target port and the access address of the first internet of things terminal, the method further includes:
and determining a network connection service corresponding to the first internet of things terminal according to the communication access address and the target port of the first internet of things terminal, wherein the network connection service is used for data communication between the internet of things terminal and the server. Specifically, an Internet Protocol (IP) address of a current server and a target port of the Internet of things terminal are used as socket data monitoring addresses, so that a network connection service of the Internet of things terminal is established, and a first Internet of things terminal in the Internet of things can directly send service data to the Internet of things server. And the server performs service processing corresponding to the message on the service data sent by the first Internet of things terminal by using the corresponding analysis script.
One specific example is provided below in connection with the above embodiments:
the example provides an internet of things data processing method applied to an internet of things platform, and the scheme is mainly characterized in that according to a working mode and a data acquisition flow of internet of things equipment, a universal part of a network connection and application layer is abstracted, some internet of things protocols are based on TCP (transmission control protocol) and some internet of things protocols are based on UDP (user datagram protocol), and a device data pushing flow can be subjected to secondary packaging transformation into a protocol module. According to the protocol module, four-tuple attributes (protocol, number, access address and analysis script) can be extracted to form a standard access processing module, and the standard access processing module is built in a network layer of protocols such as TCP/UDPHTTP/MQTT.
As shown in fig. 3, the data processing method for the internet of things provided by the present scheme includes:
step S310: and receiving a message sent to the server by the Internet of things equipment and a message data format of the Internet of things equipment.
Specifically, the internet of things equipment firstly uses a network protocol to send messages to the server, and after the server receives the messages, the messages are subjected to packet sticking processing and IP packet header processing according to the packet head and the packet tail and the set duration of each packet of data. The specific processing mode is that a buffer pool of the overtime time is set, the overtime time T can be set to be 100ms on average according to the communication condition, all data received within the time T are sequentially extracted according to the packet head and the packet tail, and then a packet of normal and complete data packets can be completely extracted.
Step S320: and constructing a protocol module for processing the message of the Internet of things equipment according to the information of the data packet in the message and the message data format of the Internet of things equipment.
Specifically, the quadruple attributes of the protocol module are determined according to the packet information of the internet of things device and the message data format of the internet of things device, wherein the quadruple attributes include: network protocol, serial number, access address and analysis script. In the four-tuple attribute: the network protocol is matched with a network protocol adopted by the Internet of things equipment, the serial number is used for identifying a protocol module, the access address is a port address which is distributed by the server and used for receiving the Internet of things equipment message, and the analysis script is an execution file for analyzing the Internet of things equipment message. In this example, the number, the access address, and the parsing script correspond to a message data format used by the internet of things terminal. The protocol module with one number can realize the analysis of the message of the Internet of things equipment adopting the same message data format. The server can manage and call the protocol module according to the serial number of the protocol module and the functional requirement of the user.
The protocol module is internally provided with a network layer realization module of various internet of things protocols, determines the network protocol in the four-tuple attributes according to the network protocol used by the received message, realizes the compatibility with the network layer of the internet of things equipment, and calls an analysis script template corresponding to the type of the network protocol according to the type of the network protocol. And then modifying the analysis script module according to the message data format used by the Internet of things equipment to obtain an analysis script which can be used for analyzing the message of the Internet of things equipment.
Step S330: a network communication service is established.
The network connection service takes the ip address of the current server and the access address in the four-tuple attribute (namely, the port for receiving the message sent by the internet of things equipment) as a socket data monitoring address. After the network communication service is established, the Internet of things equipment can directly send service data to the network service, and communication between the Internet of things equipment and the server is achieved.
The protocol modules in this example include, but are not limited to, three types of message traffic, request, download, ack. And establishing a processing pipeline corresponding to messages such as request, downlink data, ack and the like from a software layer according to the processing of the data messages in the configured analysis script. After the protocol module receives the message data, the message can be processed by adopting the processing flow lines corresponding to the message respectively according to the service type of the message.
Step S340: and receiving a message sent by the Internet of things equipment, and pushing message data to a protocol module for message processing.
Specifically, after the protocol module is constructed, the server receives a message sent by the internet of things device through the established network communication service, and pushes message data to the established protocol module for processing.
In the scheme of this example, the server constructs a protocol module for processing the message of the internet of things device according to the message data format of the internet of things device and the network protocol adopted by the internet of things device. In the first aspect, because different types of internet of things devices adopt different data formats, the unified message processing protocol module is constructed for the internet of things devices adopting the same message data format, so that module development of only once data processing for one type of internet of things device is realized, and development of message processing modules for each type of internet of things device is reduced. In the second aspect, the compatibility of the internet of things equipment adopting different protocols is realized by adopting the corresponding protocol modules according to the network protocol adopted by the internet of things equipment. In the third aspect, the precision of service control of the internet of things is improved by marking the protocol module for processing the message and calling the protocol module according to the mark.
Based on the foregoing embodiments, the embodiments of the present disclosure provide an internet of things data processing apparatus, where each unit included in the apparatus may be implemented by a processor in an internet of things data processing device; of course, may be implemented by logic circuits; in implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 4 is a schematic structural diagram of a data processing apparatus of the internet of things according to an embodiment of the present disclosure, where the apparatus 400 is applied to a server of the internet of things, and includes:
a first receiving unit 410, configured to receive a first message sent by a first internet of things terminal; the first message carries preset information; wherein the preset information includes: a first identifier and a second identifier; the first identity is indicative of a network protocol; the second identification indicates a communication address and/or a target port which has a corresponding relation with the network protocol; the communication address is a communication access address of the internet of things terminal accessing the server; the target port is a port through which the first message reaches the server;
a first determining unit 420, configured to determine an analysis script according to a second identifier in the preset information carried in the first packet; the messages sent by different types of terminals of the Internet of things correspond to different analysis scripts; messages sent by the same type of Internet of things terminals use the same parsing script;
and an analyzing unit 430, configured to analyze the first packet according to the analysis script and process the service data corresponding to the first packet by using the analysis script.
In some embodiments, the apparatus further comprises:
the second receiving unit is used for receiving a second message of a second networking terminal and a message data format of the second networking terminal; wherein the second packet carries protocol information; the protocol information is used for indicating a network protocol adopted by the second message; the network protocols and message data formats adopted by the first internet of things terminal and the second internet of things terminal are the same;
a second determining unit, configured to determine, according to the network protocol indicated by the protocol information and the message data format, an analysis script that can analyze the internet of things terminal message and is used to process service data corresponding to the second internet of things terminal message, and determine a communication access address and/or a target port of the second internet of things terminal; determining a communication access address and/or a target port of the first internet of things terminal according to the communication access address and/or the target port;
and the recording unit is used for recording a second identifier corresponding to the network protocol according to the communication access address and/or the target port of the first internet of things terminal.
It should be noted that, in the embodiment of the present disclosure, if the data processing method of the internet of things is implemented in the form of a software functional module and is sold or used as an independent product, the data processing method of the internet of things may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a server to execute all or part of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present disclosure are not limited to any specific combination of hardware and software.
Correspondingly, the embodiment of the disclosure provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the data processing method for the internet of things provided by the embodiment.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present disclosure, reference is made to the description of the embodiments of the method of the present disclosure.
It should be noted that fig. 5 is a schematic structural diagram of an internet of things data processing device provided in the embodiment of the present disclosure, as shown in fig. 5, the device 500 at least includes: a processor 510, a communication interface 520, and a memory 530, wherein:
processor 510 generally controls the overall operation of device 500.
Communication interface 520 may enable a device to communicate with other devices over a network.
The Memory 530 is configured to store instructions and applications executable by the processor 510, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 510 and modules in the device 500, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
Of course, the apparatus in the embodiment of the present disclosure may have other similar protocol interaction implementation cases, and those skilled in the art can make various corresponding changes and modifications according to the embodiment of the present disclosure without departing from the spirit and the spirit of the present disclosure, but these corresponding changes and modifications should fall within the scope of the appended claims of the method of the present disclosure.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present disclosure, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure. The above-mentioned serial numbers of the embodiments of the present disclosure are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the modules is only one logical functional division, and there may be other division ways in actual implementation, such as: multiple modules or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be electrical, mechanical or other.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules; the network module can be located in one place or distributed on a plurality of network modules; some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above description is only an embodiment of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (8)

1. An Internet of things data processing method is applied to an Internet of things server, and comprises the following steps:
receiving a first message sent by a first Internet of things terminal; the first message carries preset information; wherein the preset information includes: a first identifier and a second identifier; the first identity is indicative of a network protocol; the second identification indicates a communication address and/or a target port which has a corresponding relation with the network protocol; the communication address is a communication access address of the internet of things terminal accessing the server; the target port is a port through which the first message reaches the server;
determining an analysis script according to a second identifier in preset information carried by the first message; the messages sent by different types of terminals of the Internet of things correspond to different analysis scripts; messages sent by the same type of Internet of things terminals use the same parsing script;
and analyzing the first message according to the analysis script, and processing the service data corresponding to the first message by using the analysis script.
2. The method according to claim 1, wherein before receiving the first message sent by the first internet of things terminal, the method further comprises:
receiving a second message of a second networking terminal and a message data format of the second networking terminal; wherein the second packet carries protocol information; the protocol information is used for indicating a network protocol adopted by the second message; the network protocols and message data formats adopted by the first internet of things terminal and the second internet of things terminal are the same;
determining an analysis script capable of analyzing the second networking terminal message and processing service data corresponding to the second networking terminal message according to the network protocol indicated by the protocol information and the message data format;
determining a communication access address and/or a target port of the second networking terminal;
and determining the communication access address and/or the target port of the first internet of things terminal according to the communication access address and/or the target port, and recording the second identifier corresponding to the network protocol.
3. The method according to claim 2, wherein the determining, according to the network protocol indicated by the protocol information and the message data format, an analysis script capable of analyzing the second internet-of-things terminal message and processing service data corresponding to the second internet-of-things terminal message includes:
determining an analysis script template corresponding to the network protocol according to the network protocol indicated by the protocol information;
and modifying the analysis script template according to the message data format, determining an analysis script for analyzing the second networking terminal message and processing the service data corresponding to the second networking terminal message, and storing the analysis script.
4. The method according to claim 2, wherein the determining the target port of the second networked terminal comprises:
and determining a target port of the second networking terminal according to the message data format.
5. The utility model provides a thing networking data processing apparatus which characterized in that is applied to thing networking server, the device includes:
the first receiving unit is used for receiving a first message sent by a first Internet of things terminal; the first message carries preset information; wherein the preset information includes: a first identifier and a second identifier; the first identity is indicative of a network protocol; the second identification indicates a communication address and/or a target port which has a corresponding relation with the network protocol; the communication address is a communication access address of the internet of things terminal accessing the server; the target port is a port through which the first message reaches the server;
a first determining unit, configured to determine an analysis script according to a second identifier in preset information carried in the first packet; the messages sent by different types of terminals of the Internet of things correspond to different analysis scripts; messages sent by the same type of Internet of things terminals use the same parsing script;
and the analysis unit is used for analyzing the first message according to the analysis script and processing the service data corresponding to the first message by using the analysis script.
6. The apparatus of claim 5, further comprising:
the second receiving unit is used for receiving a second message of a second networking terminal and a message data format of the second networking terminal; wherein the second packet carries protocol information; the protocol information is used for indicating a network protocol adopted by the second message; the network protocols and message data formats adopted by the first internet of things terminal and the second internet of things terminal are the same;
a second determining unit, configured to determine, according to the network protocol indicated by the protocol information and the message data format, an analysis script that can analyze the internet of things terminal message and is used to process service data corresponding to the second internet of things terminal message, and determine a communication access address and/or a target port of the second internet of things terminal; determining a communication access address and/or a target port of the first internet of things terminal according to the communication access address and/or the target port;
and the recording unit is used for recording a second identifier corresponding to the network protocol according to the communication access address and/or the target port of the first internet of things terminal.
7. An internet of things data processing device, the device comprising at least: a processor and a storage medium configured to store executable instructions, wherein:
the processor is configured to execute stored executable instructions configured to perform the internet of things data processing method provided by any one of the preceding claims 1 to 4.
8. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are configured to execute the data processing method of the internet of things provided in any one of the claims 1 to 4.
CN202110265298.9A 2021-03-11 2021-03-11 Internet of things data processing method, device, equipment and storage medium Active CN112688967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110265298.9A CN112688967B (en) 2021-03-11 2021-03-11 Internet of things data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110265298.9A CN112688967B (en) 2021-03-11 2021-03-11 Internet of things data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112688967A true CN112688967A (en) 2021-04-20
CN112688967B CN112688967B (en) 2021-06-22

Family

ID=75455458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110265298.9A Active CN112688967B (en) 2021-03-11 2021-03-11 Internet of things data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112688967B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172974A (en) * 2021-12-07 2022-03-11 北京自如信息科技有限公司 Protocol conversion method, device and system
CN114257663A (en) * 2021-11-30 2022-03-29 神彩科技股份有限公司 Data analysis method and device, computer equipment and storage medium
CN114338849A (en) * 2021-12-23 2022-04-12 瀚云科技有限公司 Protocol message processing method and device, electronic equipment and storage medium
CN114466044A (en) * 2022-01-26 2022-05-10 武汉慧联无限科技有限公司 Data processing system, data processing method and device, equipment and medium
CN114513561A (en) * 2022-02-16 2022-05-17 拉扎斯网络科技(上海)有限公司 Information processing method, information processing device, electronic equipment and computer readable storage medium
CN114710572A (en) * 2022-03-31 2022-07-05 深圳奇迹智慧网络有限公司 Data processing method, device and computer storage medium
CN114978888A (en) * 2022-04-25 2022-08-30 平安付科技服务有限公司 Message forwarding method and device, electronic equipment and storage medium
CN115037811A (en) * 2022-08-12 2022-09-09 中达安股份有限公司 Equipment data interaction method, device, equipment and storage medium
CN115361456A (en) * 2022-08-04 2022-11-18 广东中设智控科技股份有限公司 Data message processing method, device and system
CN115514712A (en) * 2021-06-22 2022-12-23 中移物联网有限公司 Data processing method, device, terminal and network side equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095609A (en) * 2013-01-09 2013-05-08 大唐软件技术股份有限公司 Access adaptive method and device based on Internet of things terminals
CN105516382A (en) * 2015-09-09 2016-04-20 深圳市唯传科技有限公司 Communication method and system for IPV4 network and IPV6 Internet of Things (IOT) node
CN108536469A (en) * 2018-05-28 2018-09-14 苏州德姆斯信息技术有限公司 Internet of Things data resolution system based on configuration script and analytic method
CN109104300A (en) * 2018-07-12 2018-12-28 华清慧商(北京)科技有限公司 A kind of general sensing data acquisition parsing of software definition reports things system and method
CN110933095A (en) * 2019-12-04 2020-03-27 锐捷网络股份有限公司 Message parsing method and device
CN111083225A (en) * 2019-12-19 2020-04-28 远景智能国际私人投资有限公司 Data processing method and device in Internet of things platform and Internet of things platform
US20200226326A1 (en) * 2019-01-11 2020-07-16 Arm Ip Limited Electronic message translation management
CN111866139A (en) * 2020-07-21 2020-10-30 李炳勇 Sensor message processing method and system based on Internet of things
CN112087426A (en) * 2020-07-31 2020-12-15 华瑞新智科技(北京)有限公司 Dynamic control protocol analysis method based on Internet of things and IOT (Internet of things) equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095609A (en) * 2013-01-09 2013-05-08 大唐软件技术股份有限公司 Access adaptive method and device based on Internet of things terminals
CN105516382A (en) * 2015-09-09 2016-04-20 深圳市唯传科技有限公司 Communication method and system for IPV4 network and IPV6 Internet of Things (IOT) node
CN108536469A (en) * 2018-05-28 2018-09-14 苏州德姆斯信息技术有限公司 Internet of Things data resolution system based on configuration script and analytic method
CN109104300A (en) * 2018-07-12 2018-12-28 华清慧商(北京)科技有限公司 A kind of general sensing data acquisition parsing of software definition reports things system and method
US20200226326A1 (en) * 2019-01-11 2020-07-16 Arm Ip Limited Electronic message translation management
CN110933095A (en) * 2019-12-04 2020-03-27 锐捷网络股份有限公司 Message parsing method and device
CN111083225A (en) * 2019-12-19 2020-04-28 远景智能国际私人投资有限公司 Data processing method and device in Internet of things platform and Internet of things platform
CN111866139A (en) * 2020-07-21 2020-10-30 李炳勇 Sensor message processing method and system based on Internet of things
CN112087426A (en) * 2020-07-31 2020-12-15 华瑞新智科技(北京)有限公司 Dynamic control protocol analysis method based on Internet of things and IOT (Internet of things) equipment

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115514712A (en) * 2021-06-22 2022-12-23 中移物联网有限公司 Data processing method, device, terminal and network side equipment
CN115514712B (en) * 2021-06-22 2023-09-05 中移物联网有限公司 Data processing method, device, terminal and network side equipment
CN114257663A (en) * 2021-11-30 2022-03-29 神彩科技股份有限公司 Data analysis method and device, computer equipment and storage medium
CN114172974A (en) * 2021-12-07 2022-03-11 北京自如信息科技有限公司 Protocol conversion method, device and system
CN114172974B (en) * 2021-12-07 2024-02-09 北京自如信息科技有限公司 Protocol conversion method, device and system
CN114338849A (en) * 2021-12-23 2022-04-12 瀚云科技有限公司 Protocol message processing method and device, electronic equipment and storage medium
CN114466044A (en) * 2022-01-26 2022-05-10 武汉慧联无限科技有限公司 Data processing system, data processing method and device, equipment and medium
CN114513561A (en) * 2022-02-16 2022-05-17 拉扎斯网络科技(上海)有限公司 Information processing method, information processing device, electronic equipment and computer readable storage medium
CN114710572A (en) * 2022-03-31 2022-07-05 深圳奇迹智慧网络有限公司 Data processing method, device and computer storage medium
CN114978888A (en) * 2022-04-25 2022-08-30 平安付科技服务有限公司 Message forwarding method and device, electronic equipment and storage medium
CN114978888B (en) * 2022-04-25 2024-02-06 平安付科技服务有限公司 Message forwarding method and device, electronic equipment and storage medium
CN115361456A (en) * 2022-08-04 2022-11-18 广东中设智控科技股份有限公司 Data message processing method, device and system
CN115037811B (en) * 2022-08-12 2022-11-25 中达安股份有限公司 Equipment data interaction method, device, equipment and storage medium
CN115037811A (en) * 2022-08-12 2022-09-09 中达安股份有限公司 Equipment data interaction method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112688967B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN112688967B (en) Internet of things data processing method, device, equipment and storage medium
CN102891890B (en) Exchange method between a kind of terminal and relevant device, system
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN109800008B (en) Configuration updating method and related product
CN110460488B (en) Service flow identification method and device, and model generation method and device
CN111405042A (en) Discovery method and device of electronic equipment, computer readable storage medium and electronic device
CN111224792A (en) Conference access method and device
CN114157461A (en) Industrial control protocol data stream processing method, device, equipment and storage medium
CN113596017A (en) Protocol analysis method, device, soft gateway and storage medium
CN114157607A (en) Media stream transmission method and system
US9049254B2 (en) Control method, apparatus and system
CN112616171B (en) Communication method and device based on wireless local area network and computer readable storage medium
CN111884938B (en) Router information acquisition method and device
EP1636965B1 (en) Method and system for establishing a data link layer protocol on a 12c physical layer connection
CN111464879B (en) Data communication method and device
CN113950088B (en) Base station monitoring analysis method, device, system, electronic device and storage medium
CN111277449B (en) Safety testing method and device for voice service equipment
CN113645131A (en) Data processing method and device, electronic equipment and storage medium
CN112383617A (en) Method, device, terminal equipment and medium for long connection
CN111918257A (en) Head-mounted display device, data transmission method thereof and readable storage medium
CN111263344A (en) Method and system for connecting wireless local area network based on NFC message transmission and projection equipment
CN114827188B (en) Platform equipment management method, system, terminal and storage medium
CN109218374A (en) Using exchange method and device
CN104468514B (en) Information processing method, electronic equipment and server
CN108990039A (en) Data transmission method and relevant apparatus

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A data processing method, device, equipment and storage medium for the Internet of Things

Effective date of registration: 20230210

Granted publication date: 20210622

Pledgee: Wuhan area branch of Hubei pilot free trade zone of Bank of China Ltd.

Pledgor: WUHAN EASYLINKIN TECHNOLOGY CO.,LTD

Registration number: Y2023420000041