CN114422625A - Data access method and gateway - Google Patents

Data access method and gateway Download PDF

Info

Publication number
CN114422625A
CN114422625A CN202210095803.4A CN202210095803A CN114422625A CN 114422625 A CN114422625 A CN 114422625A CN 202210095803 A CN202210095803 A CN 202210095803A CN 114422625 A CN114422625 A CN 114422625A
Authority
CN
China
Prior art keywords
data
link data
current link
protocol plug
protocol
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
CN202210095803.4A
Other languages
Chinese (zh)
Other versions
CN114422625B (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.)
Hangzhou Hopechart Iot Technology Co ltd
Original Assignee
Hangzhou Hopechart Iot 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 Hangzhou Hopechart Iot Technology Co ltd filed Critical Hangzhou Hopechart Iot Technology Co ltd
Priority to CN202210095803.4A priority Critical patent/CN114422625B/en
Publication of CN114422625A publication Critical patent/CN114422625A/en
Application granted granted Critical
Publication of CN114422625B publication Critical patent/CN114422625B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • 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/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

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

Abstract

The application provides a data access method and a gateway. The method comprises the following steps: when current link data sent by a terminal is received, matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data; and performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in. The data access method provided by the embodiment of the application can improve the efficiency of data transmission.

Description

Data access method and gateway
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a data access method and a gateway.
Background
With the rapid development of the internet of things and the mobile internet, the electronic programs of various information acquisition intelligent terminals such as the internet of vehicles, public security, smart home and the like are higher and higher. However, different terminal services have different terminal service data types and standard specifications, so in the related art, when transmitting data of multiple-type standard specifications, even cross-industry attributes, to the cloud, it is necessary to perform horizontal expansion according to communication protocols for different terminals, so as to achieve multi-type and multi-protocol data acquisition at the cloud.
However, with the rapid development of the internet of things and the mobile internet, the service data types and standard specifications of the terminal all show explosive growth, so when the multi-type standard specification and even the scene of a cross-industry attribute terminal are processed, the access of a large number of different data protocols can enable the cloud to perform unordered horizontal expansion in the form of overlapping rohan, and further the system reuse rate is reduced, the complexity is increased, and the transmission efficiency of data is affected. Meanwhile, each data transmission is usually performed by performing protocol parsing on each piece of data, so as to ensure the validity of data transmission. However, as the electronic program of the terminal is higher and higher, the amount of data to be collected is larger and larger, which causes a pressure of performing protocol analysis on the data to be larger, and affects the efficiency of data transmission.
Disclosure of Invention
The embodiment of the application provides a data access method and a gateway, which can improve the data transmission efficiency of multiple protocols.
In a first aspect, an embodiment of the present application provides a data access method, including:
when current link data sent by a terminal is received, matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data;
and performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
In one embodiment, matching a target protocol plug-in corresponding to the current link data from among the protocol plug-ins according to the data format of the current link data includes:
detecting a communication link of the terminal and each protocol plug-in;
and when the target protocol plug-in bound with the communication link of the terminal does not exist in the protocol plug-ins, matching the target protocol plug-in corresponding to the current link data from the protocol plug-ins according to the data format of the current link data.
In one embodiment, the matching the target protocol plug-in corresponding to the current link data from the protocol plug-ins according to the data format of the current link data includes:
analyzing and resolving the current link data according to the message header of the current link data, and determining a target protocol of the current link data;
and matching the target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the target protocol.
In one embodiment, the method further comprises:
and when detecting that the target protocol plug-in bound with the communication link of the terminal exists in each protocol plug-in, performing protocol analysis on link data sent by the communication link of the terminal according to the target protocol plug-in.
In one embodiment, the method further comprises:
and acquiring operation data generated in the access process of the current link data, and synchronizing the operation data to the monitoring terminal.
In an embodiment, before matching, according to a data format of the current link data, a target protocol plug-in corresponding to the current link data from among the protocol plug-ins, the method further includes:
caching the current link data to a target storage area in each storage area;
and the target storage area is determined according to at least one of the data storage capacity of each storage area, the data volume of the current link data and the data format of the current link data.
In one embodiment, each of the protocol cards is independent of the other.
In a second aspect, an embodiment of the present application provides a data access gateway, including:
the link data management module is used for matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data when receiving the current link data sent by a terminal;
and the protocol plug-in management module is used for performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory storing a computer program, where the processor implements the steps of the data access method according to the first aspect when executing the program.
In a fourth aspect, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data access method according to the first aspect are implemented.
According to the data access method and the gateway provided by the embodiment of the application, a plurality of protocol plug-ins are constructed in advance, when current link data sent by a terminal are received, a target protocol plug-in corresponding to the current link data is matched from the protocol plug-ins according to the data format of the current link data, and the current link data is accessed after the protocol of the current link data is analyzed through the target protocol plug-in, so that the access of multi-protocol data can be realized through a single gateway, the unordered transverse expansion is avoided, the system reuse rate is improved, and the complexity is reduced. And simultaneously, the target protocol plug-in is bound with the communication link of the terminal, so that protocol analysis can be carried out on link data sent by the communication link of the terminal according to the target protocol plug-in subsequently, unnecessary protocol analysis judgment on each piece of data is avoided, and the efficiency of data transmission is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, 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 flowchart of a data access method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a data access gateway provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow diagram of a data access method provided in an embodiment of the present invention, where the method is applied to a gateway device and is used to implement a multi-protocol data unified access gateway. As shown in fig. 1, a data access method provided in this embodiment includes:
step 101, when receiving current link data sent by a terminal, matching a target protocol plug-in corresponding to the current link data from each protocol plug-in according to a data format of the current link data;
102, performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal, so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
By constructing a plurality of protocol plug-ins in advance, when current link data sent by a terminal is received, a target protocol plug-in corresponding to the current link data is matched from the protocol plug-ins according to the data format of the current link data, so that the current link data is accessed after the protocol of the current link data is analyzed by the target protocol plug-in, multi-protocol data access can be realized through a single gateway, unordered transverse expansion is avoided, the system reuse rate is improved, and the complexity is reduced. And simultaneously, the target protocol plug-in is bound with the communication link of the terminal, so that protocol analysis can be carried out on link data sent by the communication link of the terminal according to the target protocol plug-in subsequently, unnecessary protocol analysis judgment on each piece of data is avoided, and the efficiency of data transmission is effectively improved.
In step 101, before receiving the current link data sent by the terminal, in order to ensure that data transmission can be performed efficiently, various parameters of the gateway may be configured in advance. The method comprises the configuration of parameters such as gateway access address, basic configuration (thread number, memory and the like) of service operation, data export, public resource initialization parameters, various protocol plug-ins and the like. The configuration types can be divided into general basic parameters and protocol plug-in independent parameters, the configuration modes can be various, and static and dynamic configurations are supported; the static configuration supports one-time file loading, the dynamic configuration adopts a message queue and provides a dynamic parameter configuration interface for the outside.
After parameter configuration is completed, the communication link of each terminal is received through the link data management module, and after the communication link of each terminal is released, when the current link data is received through the communication link of any terminal, because the link data usually carries the data format information corresponding to the communication protocol of the link data, the data format information of the current link data can be obtained from the current link data, so that the data format of the current link data, such as String data format, is determined.
After the data format of the current link data is acquired, determining a communication protocol matched with the data format according to a preset matching rule of the preset data format and the communication protocol, and determining a corresponding target protocol plug-in from each protocol plug-in according to the communication protocol matched with the data format.
Wherein, the target protocol plug-in can bind the communication links of all terminals conforming to the protocol.
In one embodiment, the communication protocol includes, for example, JT/T808 and 2019 terminal communication protocol and data format for road transport vehicles, GB/T32960.3-2016 electric vehicle remote service and management System Specification section 3: communication protocol and data format, and can also be universal communication protocols in industries such as MQTT and HTTP.
Each protocol plug-in can be JT/T808 and 2019 road transport vehicle satellite positioning system terminal communication protocol and data format (i.e. 808 protocol), GB/T32960.3-2016 electric vehicle remote service and management system technical specification part 3: communication protocol and data format (i.e., 32960 protocol) or protocol plug-in to an industry common communication protocol.
In order to improve data transmission efficiency, in an embodiment, matching, according to a data format of the current link data, a target protocol plug-in corresponding to the current link data from each protocol plug-in includes:
detecting a communication link of the terminal and each protocol plug-in;
and when the target protocol plug-in bound with the communication link of the terminal does not exist in the protocol plug-ins, matching the target protocol plug-in corresponding to the current link data from the protocol plug-ins according to the data format of the current link data.
And when detecting that the target protocol plug-in bound with the communication link of the terminal exists in each protocol plug-in, performing protocol analysis on link data sent by the communication link of the terminal according to the target protocol plug-in.
In one embodiment, when receiving current link data, a communication link for transmitting the current link data is obtained in advance, and the binding relationship between the communication link and each protocol plug-in is detected; and when detecting that the target protocol plug-in bound with the communication link does not exist in each protocol plug-in, performing protocol arbitration on the data format of the current link data through a data analysis arbitration interface GEJudgeRequest, and matching the target protocol plug-in corresponding to the current link data from each protocol plug-in.
If the target protocol plug-in bound with the communication link exists in the protocol plug-ins, the protocol of the current link data can be directly analyzed through the target protocol plug-in, and the protocol analysis and judgment of the current link data are not needed.
In one embodiment, the data format of the current link data may be determined according to a header of the current link data. If detecting that the target protocol plug-in bound with the communication link does not exist in the protocol plug-ins, analyzing and judging the current link data according to the message header of the current link data, and determining the target protocol of the current link data; and matching the target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the target protocol.
For example, it is assumed that a plug-in management module in a gateway creates a 808 protocol plug-in and a 32960 protocol plug-in advance through a plug-in loading interface GEInitialize, and there are two terminals that have established a TCP data link through a mobile internet before reporting data. If the current link data of the two terminals are received, if the current link data of the terminal a is received: 7E020040260100000002008061065000F1A50000000000000003020AECF3067CF5E7016F011000592111291725570302011030011F31010BA 77E; the current link data received by terminal B is: 232302FE4C 47434C323434384C5831373232393301024A150C02142E0901010301029600037273178E25685F011E13AD0E00020101013F57784E444B 272B03000000000000000000000100000100000102040200000000050006C023AD0202D 4 DFA01390CBD01023C012438070000000000000000020000008000000001080101178E256801680001C80CDB0CDF0CDE0CDD0CDD 0CDD0CDD0CDF0CDF0CDF CDD0CE20 CDD0CE00CF30CF30 CF20CF20 CF20CF40CF10CF20CF20CF00 CF20 CFF 0CFD CFB0CFD 0CFD CFF 0CFD CFB0CFD 020 CFD 040CF 3D 040D010 CFD 3D 010 CFD 010D 3D 010D 010F 0D010D010CF 3D 010C 010D010C 010D010C 010F 010D010C 010D010C 3D 010C 010D010C 3D 010C 3D 010C 010D 3D 010C 010 CFD 010C 010 CFD 010C 3D 010C 010 CFD 3D 010 CFD 010C 010 CFD 3D 010C 010 CFD 010C 010 CFD 010C 010 CFD 3D 010C 010 CFD 3D 010 CFD 3D 010C 010 CFD 010C 010 CFD 3D 010 CFD 010C 010 CFD 3D 010 CFD 3D 010C 010 CFD 010C 010 CFD 010C 010 CFD 3D 010 CFD 010C 010 CFD 3C 010 CFD 010C 010 CFD 3D 010C 010 CFD 3D 010C 010 CFD 010C 010 CFD 010C 010 CFD 010C 010 CFD 3D 010 CFD 3C 010 CFD 3D 010 CFD 3C 010 CFD 3C 010 CFD 3C 010 CFD 3D 3; determining that the link data of the terminal A adopts 808 protocol according to the message header 7E of the link data of the terminal A and the message header 2323 of the link data of the terminal B, and conforming to the 808 protocol plug-in; the link data of the terminal B adopts a 32960 protocol, and conforms to a 32960 protocol plug-in. At this time, the link data of the terminal a is subjected to data analysis and related service processing by the 808 protocol plug-in, and the link data of the terminal B is subjected to data analysis and related service processing by the 32960 protocol plug-in, so that the link data of the terminal a and the link data of the terminal B are accessed to the gateway and are transmitted to the destination address through the gateway.
In one embodiment, in addition to the arbitration of the data format of the link data through the message header, the data format of the link data may also be arbitrated through the message check code.
In an embodiment, after determining a target protocol plug-in for parsing current link data, since a communication protocol used by the current link data is determined by a communication link for sending the current link data, the matched target protocol plug-in can be bound with the communication link of a terminal for sending the current link data, and when subsequently receiving link data sent by the communication link, the corresponding protocol plug-in can be directly called, thereby avoiding unnecessary protocol parsing and resolving for each piece of data. Wherein, only one protocol plug-in is bound to the data link of each terminal.
Illustratively, a communication link of the terminal a with a communication protocol of 808 protocol is bound with the 808 protocol plug-in, so that when receiving link data sent by the communication link of the terminal a, the 808 protocol plug-in is directly called to parse the link data.
In an embodiment, each of the protocol plug-ins is independent from each other, so that any one of the protocol plug-ins does not affect the other protocol plug-ins when being dynamically plugged and unplugged. And each protocol plug-in is written according to a uniform API structure.
In an embodiment, during the accessing process of the current link data, the method further includes:
and acquiring operation data generated in the access process of the current link data, and synchronizing the operation data to the monitoring terminal.
In an embodiment, the gateway is provided with a scheduling center module, and the scheduling center module is used for acquiring the operation data generated in the access process of the current link data, namely acquiring the operation states of the link data management module and the protocol plug-in management module, and then synchronizing the information to the monitoring terminal.
The monitoring terminal can be integrated with a third-party platform monitoring system such as Grafana, Prometous, Zabbix and the like, and can dynamically display customized data such as terminal access volume, dynamic trajectory tracking, data flow direction, abnormal alarm, gateway operation details and the like for a user.
By monitoring the process of accessing data during data access, the problems in the data access process can be timely and effectively found, and the data access efficiency is improved.
The monitoring terminal only interacts with the dispatching center module, and does not interact with other modules such as a link data management module and the like, so that the coupling degree of the gateway is reduced.
In an embodiment, before matching, according to a data format of the current link data, a target protocol plug-in corresponding to the current link data from among the protocol plug-ins, the method further includes:
caching the current link data to a target storage area in each storage area;
and the target storage area is determined according to at least one of the data storage capacity of each storage area, the data volume of the current link data and the data format of the current link data.
In an embodiment, the gateway also presets interfaces of the public third-party resource storage area, such as database (oracle, mysql, postgresql, nosql, and the like) interfaces, cache interfaces (ehcache, memcache, redis, and the like), message queue interfaces (mq, kafka, and the like), and the like.
When receiving the current link data sent by the terminal, storing the current link data into a target storage area in each storage area in advance, such as a kafka message queue or a redis buffer. And then extracting the current link data from the target storage area for processing, thereby reducing the processing pressure in the data access process, enabling the current link data to be multiplexed and improving the resource reusability.
In an embodiment, the target storage area corresponding to the current link data may be preset according to a data format of the current link data. If the protocol corresponding to the data format of the current link data is 808, the target storage area of the current link data is a redis cache; or, the data storage amount of each storage area can be determined, for example, the storage area with the least data storage amount in each storage area is selected as the target storage area; alternatively, the correspondence relationship between the data amount section and the storage area may be set in advance, and then the target storage area corresponding to the data amount section to which the data amount of the current link data belongs may be determined from each storage area according to the data amount section to which the data amount of the current link data belongs.
The data access gateway provided in the embodiments of the present application is described below, and the data access gateway described below and the data access method described above may be referred to correspondingly.
In one embodiment, as shown in fig. 2, there is provided a data access gateway, comprising:
the link data management module 210 is configured to, when receiving current link data sent by a terminal, match a target protocol plug-in corresponding to the current link data from each protocol plug-in according to a data format of the current link data;
a protocol plug-in management module 220, configured to perform protocol analysis on the current link data according to the target protocol plug-in, access the current link data, and bind the target protocol plug-in with the communication link of the terminal, so as to perform protocol analysis on link data sent by the communication link of the terminal according to the target protocol plug-in.
In an embodiment, the link data management module 210 is specifically configured to:
detecting a communication link of the terminal and each protocol plug-in;
and when the target protocol plug-in bound with the communication link of the terminal does not exist in the protocol plug-ins, matching the target protocol plug-in corresponding to the current link data from the protocol plug-ins according to the data format of the current link data.
In an embodiment, the link data management module 210 is specifically configured to:
analyzing and resolving the current link data according to the message header of the current link data, and determining a target protocol of the current link data;
and matching the target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the target protocol.
In an embodiment, the link data management module 210 is further configured to:
and when detecting that the target protocol plug-in bound with the communication link of the terminal exists in each protocol plug-in, performing protocol analysis on link data sent by the communication link of the terminal according to the target protocol plug-in.
In one embodiment, the system further comprises a dispatch center module configured to:
and acquiring operation data generated in the access process of the current link data, and synchronizing the operation data to the monitoring terminal.
In an embodiment, the link data management module 210 is further configured to:
caching the current link data to a target storage area in each storage area;
and the target storage area is determined according to at least one of the data storage capacity of each storage area, the data volume of the current link data and the data format of the current link data.
In one embodiment, each of the protocol cards is independent of the other.
By constructing a plurality of protocol plug-ins in advance, when current link data sent by a terminal is received, a target protocol plug-in corresponding to the current link data is matched from the protocol plug-ins according to the data format of the current link data, so that the current link data is accessed after the protocol of the current link data is analyzed by the target protocol plug-in, multi-protocol data access can be realized through a single gateway, unordered transverse expansion is avoided, the system reuse rate is improved, and the complexity is reduced. And simultaneously, the target protocol plug-in is bound with the communication link of the terminal, so that protocol analysis can be carried out on link data sent by the communication link of the terminal according to the target protocol plug-in subsequently, unnecessary protocol analysis judgment on each piece of data is avoided, and the efficiency of data transmission is effectively improved.
Fig. 3 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 3: a processor (processor)810, a Communication Interface 820, a memory 830 and a Communication bus 840, wherein the processor 810, the Communication Interface 820 and the memory 830 communicate with each other via the Communication bus 840. The processor 810 may invoke computer programs in the memory 830 to perform the steps of the data access method, including, for example:
when current link data sent by a terminal is received, matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data;
and performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present application also provides a computer program product, where the computer program product includes a computer program, where the computer program may be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, a computer is capable of executing the steps of the data access method provided in the foregoing embodiments, for example, the steps include:
when current link data sent by a terminal is received, matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data;
and performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
On the other hand, embodiments of the present application further provide a processor-readable storage medium, where the processor-readable storage medium stores a computer program, where the computer program is configured to cause a processor to perform the steps of the method provided in each of the above embodiments, for example, including:
when current link data sent by a terminal is received, matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data;
and performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
The processor-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
The above described gateway embodiments are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. 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 description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: 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 in the embodiments of the present application.

Claims (10)

1. A data access method, comprising:
when current link data sent by a terminal is received, matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data;
and performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
2. The data access method according to claim 1, wherein matching a target protocol plug-in corresponding to the current link data from among the protocol plug-ins according to a data format of the current link data comprises:
detecting a communication link of the terminal and each protocol plug-in;
and when the target protocol plug-in bound with the communication link of the terminal does not exist in the protocol plug-ins, matching the target protocol plug-in corresponding to the current link data from the protocol plug-ins according to the data format of the current link data.
3. The data access method according to claim 2, wherein the matching the target protocol plug-in corresponding to the current link data from the protocol plug-ins according to the data format of the current link data comprises:
analyzing and resolving the current link data according to the message header of the current link data, and determining a target protocol of the current link data;
and matching the target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the target protocol.
4. A data access method according to claim 2 or 3, further comprising:
and when detecting that the target protocol plug-in bound with the communication link of the terminal exists in each protocol plug-in, performing protocol analysis on link data sent by the communication link of the terminal according to the target protocol plug-in.
5. The data access method of claim 1, further comprising:
and acquiring operation data generated in the access process of the current link data, and synchronizing the operation data to the monitoring terminal.
6. The data access method according to claim 1, further comprising, before matching a target protocol plug-in corresponding to the current link data from among the protocol plug-ins according to a data format of the current link data:
caching the current link data to a target storage area in each storage area;
and the target storage area is determined according to at least one of the data storage capacity of each storage area, the data volume of the current link data and the data format of the current link data.
7. The data access method of claim 1, wherein each of the protocol plugins is independent of each other.
8. A data access gateway, comprising:
the link data management module is used for matching a target protocol plug-in corresponding to the current link data from all protocol plug-ins according to the data format of the current link data when receiving the current link data sent by a terminal;
and the protocol plug-in management module is used for performing protocol analysis on the current link data according to the target protocol plug-in, accessing the current link data, and binding the target protocol plug-in with the communication link of the terminal so as to perform protocol analysis on the link data sent by the communication link of the terminal according to the target protocol plug-in.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that the steps of the data access method according to any of claims 1 to 7 are implemented when the processor executes the computer program.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the data access method of any one of claims 1 to 7 when executed by a processor.
CN202210095803.4A 2022-01-26 2022-01-26 Data access method and gateway Active CN114422625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210095803.4A CN114422625B (en) 2022-01-26 2022-01-26 Data access method and gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210095803.4A CN114422625B (en) 2022-01-26 2022-01-26 Data access method and gateway

Publications (2)

Publication Number Publication Date
CN114422625A true CN114422625A (en) 2022-04-29
CN114422625B CN114422625B (en) 2024-01-26

Family

ID=81276414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210095803.4A Active CN114422625B (en) 2022-01-26 2022-01-26 Data access method and gateway

Country Status (1)

Country Link
CN (1) CN114422625B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040088425A1 (en) * 2002-10-31 2004-05-06 Comverse, Ltd. Application level gateway based on universal parser
US20040267933A1 (en) * 2001-09-10 2004-12-30 Piotr Przybylski Configurable connector adapted to convey data between a first application and a second application
US20050066045A1 (en) * 2003-09-03 2005-03-24 Johnson Neil James Integrated network interface supporting multiple data transfer protocols
CN107368334A (en) * 2017-07-24 2017-11-21 北京奇艺世纪科技有限公司 A kind of business plug-in unit interactive system and method
CN109274774A (en) * 2018-11-16 2019-01-25 郑州云海信息技术有限公司 A kind of date storage method, device and computer readable storage medium
CN110287041A (en) * 2019-06-28 2019-09-27 苏州亿歌网络科技有限公司 A kind of business datum sending method, device, equipment and storage medium
CN112087454A (en) * 2020-09-10 2020-12-15 上海顺舟智能科技股份有限公司 Communication method, device, equipment and storage medium of Internet of things gateway equipment
CN112422395A (en) * 2020-10-28 2021-02-26 视联动力信息技术股份有限公司 Data transmission method, device, terminal equipment and storage medium
CN113347195A (en) * 2021-06-18 2021-09-03 山东产研信息与人工智能融合研究院有限公司 Dynamic mounting system and method for communication protocol packet of Internet of things equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040267933A1 (en) * 2001-09-10 2004-12-30 Piotr Przybylski Configurable connector adapted to convey data between a first application and a second application
US20040088425A1 (en) * 2002-10-31 2004-05-06 Comverse, Ltd. Application level gateway based on universal parser
US20050066045A1 (en) * 2003-09-03 2005-03-24 Johnson Neil James Integrated network interface supporting multiple data transfer protocols
CN107368334A (en) * 2017-07-24 2017-11-21 北京奇艺世纪科技有限公司 A kind of business plug-in unit interactive system and method
CN109274774A (en) * 2018-11-16 2019-01-25 郑州云海信息技术有限公司 A kind of date storage method, device and computer readable storage medium
CN110287041A (en) * 2019-06-28 2019-09-27 苏州亿歌网络科技有限公司 A kind of business datum sending method, device, equipment and storage medium
CN112087454A (en) * 2020-09-10 2020-12-15 上海顺舟智能科技股份有限公司 Communication method, device, equipment and storage medium of Internet of things gateway equipment
CN112422395A (en) * 2020-10-28 2021-02-26 视联动力信息技术股份有限公司 Data transmission method, device, terminal equipment and storage medium
CN113347195A (en) * 2021-06-18 2021-09-03 山东产研信息与人工智能融合研究院有限公司 Dynamic mounting system and method for communication protocol packet of Internet of things equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
戴理;舒辉;黄荷洁;: "基于数据流分析的网络协议逆向解析技术", 计算机应用, no. 05 *
金惠英;苏勇;: "一种软件定义的嵌入式RTU多协议自动适配数据传输方法", 江苏水利, no. 08 *

Also Published As

Publication number Publication date
CN114422625B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN107147657B (en) Coding and decoding method and communication equipment suitable for multi-machine reliable communication
CN108289060B (en) Data processing method and device based on RPC service
CN111818136B (en) Data processing method, device, electronic equipment and computer readable medium
CN107135188B (en) Method, device and system for realizing services of financial information exchange (FIX) protocol
CN110324405B (en) Message sending method, device, system and computer readable storage medium
CN112988485A (en) Simulation test method and device for power Internet of things equipment
CN113360301B (en) Message transmission system and method
CN109861998B (en) Plug-in type dynamic analysis system and method based on Beidou short message protocol
CN113225339B (en) Network security monitoring method and device, computer equipment and storage medium
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN106992940B (en) Message processing method, device, system and terminal
CN113867732A (en) Message information processing method, system and storage medium
CN112311720B (en) Data transmission method and device
US9781010B2 (en) Managing remote devices
CN110995538B (en) Network data acquisition method, device, system, equipment and storage medium
CN114422625A (en) Data access method and gateway
CN114915555B (en) Gateway drive communication method, device, equipment and storage medium
CN112422485A (en) Communication method and device of transmission control protocol
CN115866587A (en) Internet of things safety data processing method, device and system based on real-time dynamic transmission
CN113518087A (en) IOT protocol reverse docking method and device
CN111459819B (en) Software testing method and device, electronic equipment and computer readable medium
CN114374745A (en) Protocol format processing method and system
CN112333262A (en) Data updating prompting method and device, computer equipment and readable storage medium
CN111371586B (en) Log data transmission method, device and equipment
US20160149855A1 (en) Service processing method, system, and relevant device

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