CN112714153B - Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system - Google Patents

Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system Download PDF

Info

Publication number
CN112714153B
CN112714153B CN202011437388.3A CN202011437388A CN112714153B CN 112714153 B CN112714153 B CN 112714153B CN 202011437388 A CN202011437388 A CN 202011437388A CN 112714153 B CN112714153 B CN 112714153B
Authority
CN
China
Prior art keywords
tcp
information
processing platform
internet
platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011437388.3A
Other languages
Chinese (zh)
Other versions
CN112714153A (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.)
Zero Hole Technology Co ltd
Original Assignee
Zero Hole 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 Zero Hole Technology Co ltd filed Critical Zero Hole Technology Co ltd
Priority to CN202011437388.3A priority Critical patent/CN112714153B/en
Publication of CN112714153A publication Critical patent/CN112714153A/en
Application granted granted Critical
Publication of CN112714153B publication Critical patent/CN112714153B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a processing method and a device compatible with multiple TCPs based on an Internet of things system, wherein the processing method comprises the following steps: the TCP processing platform defines TCP attribute information, wherein the TCP attribute information comprises TCP configuration information, TCP link information and TCP protocol information; the TCP processing platform starts RPC communication service based on an NIO frame, so that the Internet of things platform realizes information interaction with the terminal equipment through the TCP processing platform. The device is used for realizing the steps of the processing method. Therefore, the implementation of the method and the device is beneficial to the fact that under the condition that the transmission protocols of the terminal equipment are various, the information interaction between the platform of the Internet of things and the terminal equipment can be reliably carried out, and the system of the Internet of things can be compatible with various TCP protocols.

Description

Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system
Technical Field
The invention relates to the technical field of Internet of things, in particular to a processing method and device compatible with multiple TCPs based on an Internet of things system.
Background
At present, all countries actively support the Internet of things, and few Internet of things projects which can be really put into and used on a large scale are provided behind the seemingly hundreds of flowers. At present, the standard of the traditional internet is not suitable for the internet of things. Data of a sensing layer of the Internet of things are multi-source heterogeneous, and different devices have different interfaces and different technical standards; the network layer and the application layer also have different network protocols and architectures due to different types of networks used and different application directions of industries.
A Transmission Control Protocol (TCP) is a connection-oriented, reliable transport layer communication Protocol based on byte streams, and is widely used for communication between devices and an internet of things cloud platform.
However, in the actual development process, different manufacturers and different devices have different message protocols, and corresponding docking programs need to be developed corresponding to the different protocols. For the internet of things cloud platform, the higher cost is generated when the platform is in butt joint development with each equipment manufacturer, and as the number of butt joint equipment is increased, the management of various butt joint programs is also more complicated. Therefore, how to enable the internet of things system to be compatible with a plurality of TCP protocols is a technical problem which needs to be solved urgently.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a processing method and a processing device compatible with multiple TCPs based on an Internet of things system, so that the Internet of things system can be compatible with multiple TCP protocols.
In order to solve the above technical problems, an embodiment of a first aspect of the present invention discloses a processing method compatible with multiple kinds of TCP based on an internet of things system, where the internet of things system includes a TCP processing platform, an internet of things platform, and a plurality of terminal devices, where one side of the TCP processing platform is communicatively connected to the plurality of terminal devices, and the other side of the TCP processing platform is communicatively connected to the internet of things platform,
the processing method comprises the following steps:
the TCP processing platform defines TCP attribute information, wherein the TCP attribute information comprises TCP configuration information, TCP link information and TCP protocol information;
and the TCP processing platform starts RPC communication service based on an NIO frame, so that the Internet of things platform passes through the TCP processing platform and the JS end equipment realizes information interaction.
Therefore, according to the processing method compatible with various TCPs based on the IOT system, after the TCP attribute information is defined, based on the NIO framework, the RPC communication service is started, so that the IOT platform realizes information interaction with the terminal equipment through the TCP processing platform, and under the condition that the transmission protocols of the terminal equipment are various, the information interaction between the IOT platform and the terminal equipment can be reliably carried out, so that the IOT system can be compatible with various TCP protocols.
As an optional implementation manner, in an embodiment of the first aspect of the present invention, the TCP processing platform starts an RPC communication service based on an NIO framework, so that the internet of things platform realizes information interaction with the terminal device through the TCP processing platform, and specifically includes:
the TCP processing platform establishes a server side starting guide class for realizing RPC communication service based on an NIO framework;
the TCP processing platform creates a working thread group based on an NIO framework, and enables each working thread to be responsible for processing events on a plurality of channels;
the TCP processing platform appoints one Channel to correspond to only one thread and is used for processing I/O read-write events and business logic;
the TCP processing platform sets a Channel type as an NIO type;
the TCP processing platform sets RPC communication service attribute information, wherein the RPC communication service attribute information comprises connection configuration information, inbound event type information, outbound operation type information, message decoder configuration information, message encoder configuration information and monitoring port configuration information;
the TCP processing platform starts RPC communication service, so that the Internet of things platform realizes information interaction with the terminal equipment through the TCP processing platform.
As an optional implementation manner, in an embodiment of the first aspect of the present invention, the TCP processing platform starts an RPC communication service, so that the internet of things platform realizes information interaction with the terminal device through the TCP processing platform, which specifically includes:
the TCP processing platform acquires message information sent by the terminal equipment;
the TCP processing platform determines a JS file for analyzing the message according to the message information and the TCP attribute information;
the TCP processing platform analyzes and processes the message information according to the JS file to obtain service information of the message information, and converts the service information based on a predetermined conversion standard;
and the TCP processing platform sends the converted service information to a target object aimed at by the service information, wherein the target object comprises an Internet of things platform.
As an optional implementation manner, in an embodiment of the first aspect of the present invention, the analyzing, by the TCP processing platform, the message information according to the JS file to obtain service information of the message information, and converting, by the TCP processing platform, the service information based on a predetermined conversion standard specifically includes:
the TCP processing platform acquires the analysis configuration of the message information and the message content of the message information according to the JS file;
the TCP processing platform judges whether the message information accords with a predetermined standard according to a plurality of predetermined starting frame headers corresponding to TCP protocols respectively;
and when the message information is judged to accord with the standard, the TCP processing platform analyzes and processes the message information according to the JS file, and acquires the service information of the message information.
As an optional implementation manner, in an embodiment of the first aspect of the present invention, the TCP processing platform starts an RPC communication service based on an NIO framework, so that the internet of things platform realizes information interaction with the terminal device through the TCP processing platform, and specifically includes:
the TCP processing platform acquires downlink message information sent by the Internet of things platform;
the TCP processing platform acquires link object information according to the downlink message information;
the TCP processing platform determines a target JS file for protocol conversion according to the link object information and the downlink message information, and converts the downlink message information based on the JS file;
and the TCP processing platform sends the converted downlink message information to corresponding terminal equipment.
The embodiment of the second aspect of the invention discloses a processing device compatible with multiple kinds of TCP based on an internet of things system, which is applied to an intelligent home system, wherein the internet of things system comprises a TCP processing platform, the internet of things platform and a plurality of terminal devices, one side of the TCP processing platform is in communication connection with the terminal devices, the other side of the TCP processing platform is in communication connection with the internet of things platform, and the processing device comprises:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the steps of the processing method compatible with multiple TCPs based on the Internet of things system according to the embodiment of the first aspect of the invention.
The third aspect embodiment of the present invention discloses a computer readable storage medium, which stores computer instructions, when the computer instructions are called, for executing the steps of the processing method compatible with multiple TCPs based on the internet of things system according to the first aspect embodiment of the present invention.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an internet of things system compatible with multiple TCP processing methods according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating a processing method compatible with multiple TCPs based on an internet of things system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a processing device compatible with multiple kinds of TCP based on an internet of things system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms first, second and the like in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein may be combined with other embodiments.
In order to better understand the processing method compatible with multiple TCPs based on the internet of things system described in the present invention, the internet of things system is first described, and specifically, the internet of things system may be as shown in fig. 1. As shown in fig. 1, the internet of things system includes a TCP processing platform, an internet of things platform, and a plurality of terminal devices (in fig. 1, terminal device 2, and terminal device 3 … … terminal device N), where one side of the TCP processing platform is in communication connection with the plurality of terminal devices, and the other side of the TCP processing platform is in communication connection with the internet of things platform. The terminal equipment can be an intelligent electric appliance with a communication function, and also can be gateway equipment in communication connection with a plurality of intelligent electric appliances; the TCP processing platform may be an information processing apparatus (e.g., a server) having a TCP link management unit, a standard RPC (Remote Procedure Call) service unit, a message parsing unit, a TCP link uplink standard definition unit, and a TCP link downlink standard definition unit.
It should be noted that the structural diagram of the internet of things system shown in fig. 1 is only for illustrating a processing method compatible with multiple kinds of TCPs based on the internet of things system, the related devices are only schematically shown, and specific structures, sizes, shapes, positions, installation modes, and the like can be adaptively adjusted according to actual scenes, which is not limited by the structural diagram shown in fig. 1.
A method and an apparatus for processing compatible with multiple TCPs based on an internet of things system will be described in detail below.
Referring to fig. 2, fig. 2 is a schematic flowchart of a processing method compatible with multiple TCPs based on an internet of things system according to an embodiment of the first aspect of the present invention. The processing method compatible with multiple kinds of TCP based on the internet of things system described in fig. 2 is suitable for the internet of things system described in fig. 1. As shown in fig. 2, the processing method compatible with multiple TCPs based on the internet of things system may include the following operations:
101. the TCP processing platform defines TCP attribute information.
In the embodiment of the invention, the TCP attribute information comprises TCP configuration information, TCP link information and TCP protocol information. The TCP configuration information may include port information (for identifying what port is used by the current connection link), domain name information (for identifying a domain name/IP when the TCP link is established), packet protocol information (for configuring an association relationship between the TCP link configuration and the packet protocol), device information (for maintaining device class information, product information, and the like), and operation status information (whether the RPC service for maintaining the link configuration service is operating normally). The TCP link information may include a link unique identifier (for identifying a link channel established by each TCP connection, for obtaining a channel during context data transmission), a device serial number (for identifying which device the currently established link belongs to), a link status (for indicating a current link status, such as online, offline, and waiting), a link packet log (for maintaining history data of communication performed on the link), and a link level (for identifying a function level and a communication priority level of the link). The TCP protocol information may include a protocol unique identifier (unique identifier for identifying the protocol), a protocol version (for representing a protocol version number and distinguishing version iteration of the protocol), a protocol context (for representing a context format when the protocol is configured to be converted), a protocol conversion file configuration (for configuring a path of a converted JS file corresponding to the protocol, where the JS file is a Java Script client Script file), and a protocol encryption/decryption (for identifying a protocol encryption/decryption manner).
102. The TCP processing platform starts RPC communication service based on the NIO framework, so that the Internet of things platform realizes information interaction with the terminal equipment through the TCP processing platform.
In the embodiment of the invention, NIO is called Non-Blocking IO or New IO in all, namely Non-Blocking IO or New IO.
Therefore, according to the processing method compatible with various TCPs based on the IOT system, after the TCP attribute information is defined, based on the NIO framework, the RPC communication service is started, so that the IOT platform realizes information interaction with the terminal equipment through the TCP processing platform, and under the condition that the transmission protocols of the terminal equipment are various, the information interaction between the IOT platform and the terminal equipment can be reliably carried out, so that the IOT system can be compatible with various TCP protocols.
In some embodiments of the present invention, the TCP processing platform starts RPC communication service based on the NIO framework, so that the internet of things platform realizes information interaction with the terminal device through the TCP processing platform, which may include the following operations:
the TCP processing platform establishes a server side starting guide class for realizing RPC communication service based on an NIO framework;
the TCP processing platform creates a working thread group based on an NIO framework, and enables each working thread to be responsible for processing events on a plurality of channels;
a TCP processing platform appoints one Channel to only correspond to one thread and is used for processing I/O read-write events and business logic;
the TCP processing platform sets the Channel type as an NIO type;
the TCP processing platform sets RPC communication service attribute information;
the TCP processing platform starts RPC communication service, so that the Internet of things platform realizes information interaction with the terminal equipment through the TCP processing platform.
In this embodiment, the RPC communication service attribute information includes connection configuration information, inbound event type information, outbound operation type information, message decoder configuration information, message encoder configuration information, and listening port configuration information.
Further, the TCP processing platform starts the RPC communication service, so that the internet of things platform realizes the information interaction with the terminal device through the TCP processing platform, which may include the following operations:
the TCP processing platform acquires message information sent by the terminal equipment;
the TCP processing platform determines a JS file for analyzing the message according to the message information and the TCP attribute information;
the TCP processing platform analyzes the message information according to the JS file, acquires the service information of the message information, and converts the service information based on a predetermined conversion standard;
and the TCP processing platform sends the converted service information to a target object aimed by the service information, wherein the target object comprises an Internet of things platform.
Still further, the step of the TCP processing platform parsing the message information according to the JS file to obtain the service information of the message information, and converting the service information based on a predetermined conversion standard may include the following operations:
the TCP processing platform acquires the analysis configuration of the message information and the message content of the message information according to the JS file;
the TCP processing platform judges whether the message information accords with a predetermined standard according to a plurality of predetermined starting frame headers corresponding to TCP protocols respectively;
and when the message information is judged to be in accordance with the standard, the TCP processing platform analyzes and processes the message information according to the JS file, and obtains the service information of the message information.
Optionally, when the message information is uplink message information, that is, when the specific direction of the communication process performed in the internet of things system is from the terminal device through the TCP processing platform and points to the internet of things platform, the TCP processing platform starts RPC communication service based on the NIO frame, so that the internet of things platform realizes the step of information interaction with the terminal device through the TCP processing platform, which may include the following operations:
the TCP processing platform establishes a server side to start a bootstrap ServerBootstrap;
the TCP processing platform creates a NioEventLoopGroup, mainly manages the life cycle of the EventLoop, can be understood as a thread pool, internally maintains a group of threads, each thread (NioEventLoop) is responsible for processing events on a plurality of channels, and one Channel only corresponds to one thread and is used for processing I/O read-write events and business logic;
configuring a NioEventLoopGroup related attribute by the TCP processing platform;
the TCP processing platform is configured with Nio connection, efficiently processes connection and avoids using IO to process communication connection;
the TCP processing platform sets parameters related to connection, such as timeout time, message length, packet sticking, packet loss configuration and the like;
the TCP processing platform configuration maintains a List of channelhandles for handling or intercepting inbound events and outbound operations of the channels.
The TCP processing platform develops a corresponding encoder and a corresponding decoder, and messages need to be processed according to a formulated unified protocol;
the TCP processing platform binds a port which needs to be monitored by NIO, and a server needs to develop the port for connection communication;
when the TCP processing platform starts a link, acquiring link information of a port needing to be opened from a link management unit of the TCP processing platform;
the TCP processing platform starts different Group thread groups and configures corresponding link ports. After the link is opened, the RPC service waits for data to be reported, when equipment is connected to the channel, a link is maintained in Redis, and the Cannal is cached in the memory.
In addition, when the message information is uplink message information, the TCP processing platform may analyze and process the message, which may specifically include the following operations:
the TCP processing platform acquires message data, and can acquire a message analysis JS file defined by the link through a link configuration center;
the module core of the TCP processing platform is a JS protocol conversion engine, after a message is received, the JS protocol conversion engine can carry out logic judgment on message data, different protocols have different JS analysis files, the files can be deployed in a hot-plug mode, and all Tcp uplink data can pass through the module, so that the module can realize compatible processing on different protocols;
the TCP processing platform can analyze the uplink message data through the logic processing of JS, and obtain the service data of the message, such as information of equipment serial number, function code, message content, message length, message version number and the like;
after the TCP processing platform data is converted, the function of the message is defined according to the service logic, the output object is the object required by the standard function, and the message is forwarded to the corresponding service function module by using a Handler adapter to carry out the corresponding standard service processing logic.
Further, the step of analyzing the uplink message information based on the JS file may include the following operations:
the TCP processing platform acquires message analysis configuration, such as encryption and decryption configuration, context configuration and protocol version configuration;
after the TCP processing platform acquires the message content, the message content is converted from the byte stream into the character string for processing, so that the subsequent logic can be conveniently analyzed;
the TCP processing platform judges the source of the message through a starting frame header formulated by the protocol, if the frame header is not in a format formulated in the protocol, the message is illegal, and service processing is not carried out;
the TCP processing platform acquires the specific length of the whole message according to the length frame established in the message, and the message can be processed according to the length when being read, so that the problems of packet loss and packet sticking are avoided;
the TCP processing platform judges a decoding protocol to be used according to a protocol version frame, and the method is to avoid that the TCP processing platform can be downward compatible with protocols of different versions after a message is changed;
the TCP processing platform acquires the equipment information frame, acquires the unique identifier of the equipment, and determines the equipment from which the message originates by using the unique identifier;
the TCP processing platform judges the decryption method to be used according to the encryption frame, because the messages are encrypted, and in order to ensure the safety, the encryption mode is diversified, so different encryption methods are compatible;
because the TCP processing platform has too many instructions sent by the equipment and the instructions can be expanded continuously, the TCP processing platform needs to have a function code to identify the message of which service logic is currently sent and uses the message as a service judgment basis;
the TCP processing platform can acquire service data to be transmitted in the message according to the information field frame, and the data is used for the following service processing logic;
after the server finishes processing the service logic, the TCP processing platform needs to return a standard function object to perform corresponding standard service logic processing on the next uplink standard function.
Still further, the uplink message information of the device can be abstracted into 4 types of standard information, including device heartbeat, state reporting, message reporting, and device data synchronization. After the uplink data of the equipment is abstracted, different equipment and different Tcp message protocols thereof can be compatible only by realizing the 4 types of standard functions. The functional compatibility can be completed only by carrying out logic cleaning on the uplink data before executing the 4 types of standard functions.
Further, after the TCP processing platform acquires the message information, the default equipment is in an online state; and (4) setting up InfluxDB time sequence data for storing the history record of offline change data reported by the equipment.
Still further, the TCP processing platform, in the process of obtaining the state data object of the upstream standard, includes the following steps: inquiring the configuration of the state protocol conversion file of the equipment; starting a JS conversion engine, executing the compiled JS conversion logic, and converting the original message into a redefined standard message logic; the method comprises the steps of acquiring standard state data, maintaining the data, and mainly dividing the data into 2 types of maintenance services (state pushing and state snapshot), wherein the state pushing service is to push the state data changed by equipment to Mq, so that other services can be subscribed and used. The state snapshot is to maintain the current state data of the device in Redis, so that other services can inquire the state of the device.
Still further, in the process of acquiring the upstream standard message data object by the TCP processing platform, the following steps may be included: inquiring the message protocol conversion file configuration of the equipment; starting a JS conversion engine, executing the compiled JS conversion logic, and converting the original message into a redefined standard message logic; the method includes the steps that standard message data are acquired, data need to be maintained, and the method is mainly divided into 2 types of maintenance services (message pushing and message persistence), wherein the message pushing service refers to the step that message data reported by equipment are pushed to Mq, and other services can be subscribed and used. The message persistence refers to maintaining message data in the MongoDB for persistent storage.
Still further, the data synchronization between the TCP processing platform and the terminal device may include the following steps: acquiring an equipment data object of an upstream standard; inquiring the configuration of the data synchronization protocol conversion file of the equipment; a standard equipment model can be formed after conversion; and the equipment model needs to be stored persistently, and a MySQL database is built to store the equipment model persistently.
In other specific embodiments of the present invention, the TCP processing platform starts RPC communication service based on the NIO framework, so that the internet of things platform realizes information interaction with the terminal device through the TCP processing platform, which specifically includes:
the TCP processing platform acquires downlink message information sent by the Internet of things platform;
the TCP processing platform acquires link object information according to the downlink message information;
the TCP processing platform determines a target JS file for protocol conversion according to the link object information and the downlink message information, and converts the downlink message information based on the JS file;
and the TCP processing platform sends the converted downlink message information to corresponding terminal equipment.
Optionally, when the message information is downlink message information, the TCP processing platform starts an RPC communication service based on the NIO frame, so that the internet of things platform realizes information interaction with the terminal device through the TCP processing platform, and the method further includes the following steps:
the TCP processing platform finds out a link object according to the channelID, checks whether a device link of a current issued command is normally opened or not, stops issuing the command if the device link of the current issued command is not normally opened, and returns to the failure of issuing;
the TCP processing platform determines that the maintenance equipment is in an off-line state and maintains the off-line state.
Further optionally, if the link is normal, finding out a protocol conversion JS for message delivery according to the device information, and converting the standard delivery protocol into a delivery command protocol supported by the device; and finding a link object according to the channelID, and pushing the converted data into a communication link.
Referring to fig. 3, fig. 3 is a flowchart illustrating a processing device compatible with multiple TCPs based on an internet of things system according to a second aspect of the present invention. Among them, the processing device compatible with multiple kinds of TCP based on the internet of things system described in fig. 3 is suitable for the internet of things system described in fig. 1. As shown in fig. 3, the processing apparatus includes:
a processor 202 to which the memory 201 is coupled;
further, an input interface 203 and an output interface 204 coupled to the processor 202 may be included;
wherein, the processor 202 calls the executable program code stored in the memory 201 for executing the steps of the processing method compatible with multiple TCPs based on the system of internet of things described in the embodiment of the first aspect of the present invention.
In a third embodiment of the present invention, a computer-readable storage medium is disclosed, which stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the multiple TCP-compliant processing method based on the internet of things system according to the first embodiment of the present invention.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, wherein the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM) or other Memory capable of storing data, a magnetic tape, or any other computer-readable medium capable of storing data.
Finally, it should be noted that: the processing method and device compatible with multiple TCP based on the Internet of things system disclosed by the embodiment of the invention are only the preferred embodiment of the invention, and are only used for explaining the technical scheme of the invention, but not limiting the technical scheme; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (5)

1. A processing method compatible with multiple TCPs based on an Internet of things system is characterized in that the Internet of things system comprises a TCP processing platform, the Internet of things platform and a plurality of terminal devices, wherein one side of the TCP processing platform is in communication connection with the terminal devices, the other side of the TCP processing platform is in communication connection with the Internet of things platform,
the processing method comprises the following steps:
the TCP processing platform defines TCP attribute information, wherein the TCP attribute information comprises TCP configuration information, TCP link information and TCP protocol information;
the TCP processing platform starts RPC communication service based on an NIO frame, so that the Internet of things platform realizes information interaction with the terminal equipment through the TCP processing platform;
the TCP processing platform starts RPC communication service based on an NIO frame, so that the Internet of things platform passes through the TCP processing platform, and the terminal equipment realizes information interaction, and the method specifically comprises the following steps:
the TCP processing platform establishes a server side starting guide class for realizing RPC communication service based on an NIO framework;
the TCP processing platform creates a working thread group based on an NIO framework, and enables each working thread to be responsible for processing events on a plurality of channels;
the TCP processing platform appoints one Channel to correspond to only one thread and is used for processing I/O read-write events and business logic;
the TCP processing platform sets a Channel type as an NIO type;
the TCP processing platform sets RPC communication service attribute information, wherein the RPC communication service attribute information comprises connection configuration information, inbound event type information, outbound operation type information, message decoder configuration information, message encoder configuration information and monitoring port configuration information;
the TCP processing platform starts RPC communication service, so that the Internet of things platform realizes information interaction with the terminal equipment through the TCP processing platform;
TCP processing platform starts RPC communication service, makes the thing networking platform pass through TCP processing platform, with terminal equipment realizes the information interaction, specifically includes:
the TCP processing platform acquires message information sent by the terminal equipment;
the TCP processing platform determines a JS file for analyzing the message according to the message information and the TCP attribute information;
the TCP processing platform analyzes and processes the message information according to the JS file, acquires service information of the message information, and converts and processes the service information on the basis of a predetermined conversion standard;
and the TCP processing platform sends the converted service information to a target object aimed at by the service information, wherein the target object comprises an Internet of things platform.
2. The processing method compatible with multiple TCPs based on the internet of things system according to claim 1, wherein the TCP processing platform parses the message information according to the JS file to obtain service information of the message information, and converts the service information based on a predetermined conversion standard, specifically comprising:
the TCP processing platform acquires the analysis configuration of the message information and the message content of the message information according to the JS file;
the TCP processing platform judges whether the message information accords with a predetermined standard according to a plurality of predetermined starting frame headers corresponding to TCP protocols respectively;
and when the message information is judged to accord with the specification, the TCP processing platform analyzes and processes the message information according to the JS file, and acquires the service information of the message information.
3. The processing method compatible with multiple TCPs based on the internet of things system according to claim 1, wherein the TCP processing platform starts RPC communication service based on the NIO framework, so that the internet of things platform realizes information interaction with the terminal device through the TCP processing platform, specifically comprising:
the TCP processing platform acquires downlink message information sent by the Internet of things platform;
the TCP processing platform acquires link object information according to the downlink message information;
the TCP processing platform determines a target JS file for protocol conversion according to the link object information and the downlink message information, and converts the downlink message information based on the JS file;
and the TCP processing platform sends the converted downlink message information to corresponding terminal equipment.
4. The utility model provides a processing apparatus based on thing networking system's compatible multiple TCP is applied to intelligent home systems, its characterized in that, thing networking system includes TCP processing platform, thing networking platform and a plurality of terminal equipment, wherein, one side and a plurality of terminal equipment communication connection of TCP processing platform, the opposite side and thing networking platform communication connection of TCP processing platform, processing apparatus includes:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to perform the steps of the system of internet of things-based TCP compliant processing method of any of claims 1-3.
5. A computer-readable storage medium storing computer instructions which, when invoked, perform the steps of the internet of things system-based multiple TCP compatible processing method according to any one of claims 1-3.
CN202011437388.3A 2020-12-10 2020-12-10 Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system Active CN112714153B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011437388.3A CN112714153B (en) 2020-12-10 2020-12-10 Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011437388.3A CN112714153B (en) 2020-12-10 2020-12-10 Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system

Publications (2)

Publication Number Publication Date
CN112714153A CN112714153A (en) 2021-04-27
CN112714153B true CN112714153B (en) 2023-03-28

Family

ID=75542938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011437388.3A Active CN112714153B (en) 2020-12-10 2020-12-10 Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system

Country Status (1)

Country Link
CN (1) CN112714153B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697364B (en) * 2022-04-01 2024-03-22 西安华凡科技有限公司 Internet of things security method supporting multiple transmission protocols based on TCP (Transmission control protocol) link

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835786A (en) * 2020-07-23 2020-10-27 杨承 System for data acquisition and equipment control of multi-protocol equipment and implementation method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105025056A (en) * 2014-04-25 2015-11-04 上海迪爱斯通信设备有限公司 Internet of Things information collection and monitoring system design method
CN108769165B (en) * 2018-05-17 2021-12-24 深圳市信锐网科技术有限公司 Data processing method in Internet of things and Internet of things access system
CN109104461A (en) * 2018-07-06 2018-12-28 安徽电科恒钛智能科技有限公司 A kind of data processing system and its method based on Internet of things middleware
CN109005166A (en) * 2018-07-23 2018-12-14 合沃物联技术(南京)有限公司 A kind of middleware system for Internet of things and its multi protocol conversion method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835786A (en) * 2020-07-23 2020-10-27 杨承 System for data acquisition and equipment control of multi-protocol equipment and implementation method

Also Published As

Publication number Publication date
CN112714153A (en) 2021-04-27

Similar Documents

Publication Publication Date Title
CN109391500B (en) Configuration management method, device and equipment
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
CN112988485A (en) Simulation test method and device for power Internet of things equipment
US11709722B2 (en) Extensible communication framework and communication method supporting multiple communication protocols
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN112714153B (en) Processing method and device compatible with multiple TCPs (Transmission control protocol) based on Internet of things system
CN114157537A (en) System and method for realizing multi-source heterogeneous data access by general equipment gateway
CN111984561A (en) IPMI command processing method, system, device and medium for BMC
CN113347195B (en) Dynamic mounting system and method for communication protocol packet of Internet of things equipment
CN108989157B (en) Method and device for controlling intelligent equipment
CN111740967A (en) Method, system and electronic equipment for message conversion and transmission
CN113031569B (en) Monitoring method, system, terminal and medium of nuclear fusion control system
CN114257623B (en) Internet of things equipment communication method based on stream processing
CN115410580A (en) Voice recognition method, device, equipment and medium for command scheduling system
CN113204492A (en) Android application testing method and device
CN112671915A (en) Message pushing processing method and intelligent device
CN113285904A (en) RDP-based method for analyzing disk mapping file information
CN113079055A (en) Method and device for dynamically acquiring AGV (automatic guided vehicle) running data
CN100375464C (en) Method for data communication of every terminal when network interconnecting
CN115314572B (en) Protocol conversion method, system and equipment for power communication protocol
CN115118765B (en) Service processing method, device, electronic equipment and storage medium
CN114338633B (en) Method and system for remotely connecting Linux server
CN113965894B (en) Method for realizing packet data in subway LTE system
CN113852651B (en) FANUC proxy service realization system and method based on edge gateway
CN115174340B (en) Communication method supporting interaction of multiple protocol types and Internet of things operating system

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 528311 no.l203 Country Garden International Club, Beijiao Town, Shunde District, Foshan City, Guangdong Province

Applicant after: Zero Hole Technology Co.,Ltd.

Address before: 528311 no.l203 Country Garden International Club, Beijiao Town, Shunde District, Foshan City, Guangdong Province

Applicant before: GUANGDONG ACIGA TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant